powreader
1.0.0
我用来读取(荷兰)智能电表的小型而简单的工具,并将数据发送到另一台设备上的infuxdb。这使我可以在相同的Raspberry Pi上运行更多的实用程序,而无需它仅阅读功率计。
它的构建是可以交叉补充的,例如PI,但它可能可以在任何Linux设备上运行。它几乎没有CPU功率,少于3 MB的RAM。
$ ./powreader --help Powreader 1.0
Powreader interprets the output from the digital power meter and outputs it in JSON or pushes it to an InfluxDB.
USAGE:
powreader [OPTIONS] <SERIALPORT>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-i, --influxdb <influxdb> Sets the full host and port to the influxdb. Data is transfered over UDP. This argument
is given in the form of HOST:PORT. If this argument is not set, data will be printed as
a JSON stream.
ARGS:
<SERIALPORT> Sets the serial port to use
我做了一个SystemD配置,以确保该程序始终运行。对我的执行字符串是:
/home/ubuntu/powreader --influxdb=192.168.0.50:8089 /dev/ttyUSB0其中“/dev/ttyusb0”是与智能功率计的串行连接,而infuxdb-part是我用来将数据推向UDP的InfluxDB数据库的位置。
然后,我使用Grafana在图和仪表中显示测量值。