powreader
1.0.0
(オランダの)スマートパワーメーターを読み取り、別のデバイスのInfluxDBにデータを送信するために使用する小さくてシンプルなツール。これにより、パワーメーターを読み取るだけに専念することなく、同じ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」はスマート電源メーターへのシリアル接続であり、InfluxDB-PartはUDPでデータをプッシュするために使用するInfluxDBデータベースの場所です。
次に、グラファナを使用して、グラフとゲージに測定値を表示します。