I am collecting power consumption data using a shelly 3EM. I don't like the MQTT approach, as this disables the cloud data feature. Thus, I want to connect to the shelly "status" endpoint using telegraph [[inputs.html]] plugin.
The json from "status" looks like this:
{
"wifi_sta":{"connected":true,"ssid":"HelloNetWorld","ip":"yip","rssi":-62},
"cloud":{"enabled":true,"connected":true},
"mqtt":{"connected":false},
"time":"18:27",
"unixtime":1685636832,
"serial":14404,
"has_update":false,
"mac":"mimic",
"cfg_changed_cnt":1,
"actions_stats":{"skipped":0},"relays":[{"ison":false,"has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"overpower":false,"is_valid":true,"source":"input"}],
"emeters":
[
{"power":59.25,"pf":0.58,"current":0.44,"voltage":233.62,"is_valid":true,"total":80595.1,"total_returned":215.4},
{"power":67.61,"pf":0.26,"current":1.12,"voltage":232.00,"is_valid":true,"total":213500.9,"total_returned":92953.7},
{"power":3.36,"pf":0.05,"current":0.30,"voltage":233.77,"is_valid":true,"total":113106.8,"total_returned":1469.6}
],
"total_power":130.22,"emeter_n":{"current":0.00,"ixsum":1.04,"mismatch":false,"is_valid":false},"fs_mounted":true,"v_data":1,"ct_calst":0,"update":{"status":"idle","has_update":false,"new_version":"20230510-083155/v1.13.1-gda6f9f2","old_version":"20230510-083155/v1.13.1-gda6f9f2"},"ram_total":49920,"ram_free":31204,"fs_size":233681,"fs_free":154616,"uptime":87421}
I am looking for a telegram configuration, where the emeters
readings (each meters array item is one electrical phase) are persisted to InfluxDB like this (
phase1 power=double_value1,pf=double_value1,... unixtime
phase2 power=double_value2,pf=double_value2,... unixtime
phase3 power=double_value3,pf=double_value3,... unixtime
I already played around with the telegraf config for quite a while, but didn't get anywhere. Debugging the output is complicated as I am running telegraph in a Docker container on a Synology DS720+...
Thanks for any help