@villaRob Same problem here with a shellypro3em
I get the returnedKWH channels, but not the totalKWH one that the documentation claims. Furthermore, I don’t want to sum meter1-meter3 manually and was looking at the device channels accumulatedReturned
and accumulatedWTotal
but they show mostly garbage (or maybe only the 1minute value?).
I’m also super confused by the documentation talking about kW/h which isn’t a unit that exists.
I’ve turned on MQTT on the shelly and I’m seeing this getting published:
shellypro3em/events/rpc {“src”:“shellypro3em-xxxx”,“dst”:“shellypro3em/events”,“method”:“NotifyStatus”,“params”:{“ts”:1703018520.62,“emdata:0”:{“id”:0,“a_total_act_energy”:16256.06,“a_total_act_ret_energy”:0.00,“b_total_act_energy”:14826.41,“b_total_act_ret_energy”:7.23,“c_total_act_energy”:14795.21,“c_total_act_ret_energy”:0.84,“total_act”:45877.69,“total_act_ret”:8.07}}}
Where all three phases showing about 15kWh each should be right, as this is metering a 3-phase wallbox.
I assume this is also the discrepancy @Wolfgang_Rosenauer was seeing a while ago.
For now, I’ll also try the MQTT json transform magic, thanks @samtd !
Happy to test more builds but I’m currently in a hurry to get this working properly. The annoying bit is that even in the Shelly UI I basically cannot get to the true total counter values, it insist on telling me the “Energy last minute”.
Edit: Unlike the example by @samtd the total_energy is on a different topic for me, and I need different transforms as well.
Current thing:
Thing mqtt:topic:shellypro3em "MQTT Shelly Pro3EM" (mqtt:broker:d4979348) {
Channels:
Type number : total#act_power "Total active power" [ stateTopic="shellypro3em/status/em:0", transformationPattern="JSONPATH:$.total_act_power", unit="W" ]
Type number : total#act_energy "Total active energy" [ stateTopic="shellypro3em/status/emdata:0", transformationPattern="JSONPATH:$.total_act", unit="Wh" ]
}
Works! I get 3.3W for the current idle power draw and 45880Wh for the energy delivered.