mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
vzlogger: add new package
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 <a.voigt@mailbox.org>
This commit is contained in:
committed by
George Sapkin
parent
1ee28605f3
commit
29a46353fc
@@ -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))
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user