vzlogger: add new package
authorAndy Voigt <redacted>
Sun, 10 May 2026 19:37:09 +0000 (21:37 +0200)
committerGeorge Sapkin <redacted>
Fri, 22 May 2026 13:28:17 +0000 (16:28 +0300)
vzlogger is a tool to read and log measurements of a wide variety of smart
meters and sensors to the volkszaehler.org middleware.

Signed-off-by: Andy Voigt <redacted>
utils/vzlogger/Makefile [new file with mode: 0644]
utils/vzlogger/files/vzlogger.conf [new file with mode: 0644]
utils/vzlogger/files/vzlogger.init [new file with mode: 0644]

diff --git a/utils/vzlogger/Makefile b/utils/vzlogger/Makefile
new file mode 100644 (file)
index 0000000..3dc7b00
--- /dev/null
@@ -0,0 +1,56 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=vzlogger
+PKG_VERSION:=0.8.9
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/volkszaehler/vzlogger/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=734fcd78ef5e1a41913fdef627b8382d9c0c04cb99fe023cdb50dc2ad2d972a4
+
+PKG_MAINTAINER:=Andy Voigt <a.voigt@mailbox.org>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+CMAKE_INSTALL:=1
+CMAKE_OPTIONS += -DBUILD_TEST:BOOL=OFF
+
+define Package/vzlogger
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Data logger for smart meters (SML) with MQTT support
+  URL:=https://volkszaehler.org/
+  DEPENDS:= \
+    +libcurl \
+    +libgcrypt \
+    +libgnutls \
+    +libjson-c \
+    +libmicrohttpd-no-ssl \
+    +libmosquitto-ssl \
+    +libsasl2 \
+    +libsml \
+    +libstdcpp \
+    +libunistring
+endef
+
+define Package/vzlogger/description
+  vzlogger is a tool to read values from sensors and smartmeters. It is
+  used to collect data which can be forwarded to the volkszaehler.org
+  Middleware or to an MQTT broker.
+endef
+
+define Package/vzlogger/conffiles
+/etc/vzlogger.conf
+endef
+
+define Package/vzlogger/install
+       $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vzlogger $(1)/usr/bin/
+       $(INSTALL_BIN) ./files/vzlogger.init $(1)/etc/init.d/vzlogger
+       $(INSTALL_CONF) ./files/vzlogger.conf $(1)/etc/vzlogger.conf
+endef
+
+$(eval $(call BuildPackage,vzlogger))
diff --git a/utils/vzlogger/files/vzlogger.conf b/utils/vzlogger/files/vzlogger.conf
new file mode 100644 (file)
index 0000000..d91fc64
--- /dev/null
@@ -0,0 +1,29 @@
+{
+  "retry": 2,
+  "verbosity": 1,
+  "log": "/var/log/vzlogger.log",
+  "push": [],
+  "local": {
+    "enabled": true,
+    "port": 8080,
+    "index": true,
+    "timeout": 0,
+    "buffer": 0
+  },
+  "meters": [
+    {
+      "enabled": true,
+      "allowskip": false,
+      "interval": -1,
+      "aggtime": 10,
+      "aggfixedinterval": true,
+      "channels": [],
+      "protocol": "sml",
+      "device": "/dev/ttyUSB0",
+      "pullseq": "",
+      "baudrate": 9600,
+      "parity": "8n1",
+      "use_local_time": false
+    }
+  ]
+}
diff --git a/utils/vzlogger/files/vzlogger.init b/utils/vzlogger/files/vzlogger.init
new file mode 100644 (file)
index 0000000..3439f6d
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+
+START=95
+STOP=01
+
+start_service() {
+    procd_open_instance
+    procd_set_param command /usr/bin/vzlogger -c /etc/vzlogger.conf
+    procd_set_param stdout 1
+    procd_set_param stderr 1
+    procd_close_instance
+}
git clone https://git.99rst.org/PROJECT