Yes that is what I observed with the restful sensor. The total energy is now also available via mqtt, I don’t know if it follows the same update interval as I have not tried it.
But there is absolutely no need for 1s updates. All you would be doing would be causing needless network traffic and cpu utilisation. The mqtt value is pushed from the Shelly EM whenever an update is available so there is no need to set a scan interval.
- platform: template
sensors:
house_energy:
friendly_name: 'Total Energy'
value_template: "{{ (states('sensor.l1_energy')|float + states('sensor.l2_energy')|float + states('sensor.l3_energy')|float)|round(3) }}"
unit_of_measurement: "kWh"
availability_template: "{{ states('sensor.l1_energy') not in ['unknown','unavailable'] and states('sensor.l2_energy') not in ['unknown','unavailable'] and states('sensor.l3_energy') not in ['unknown','unavailable'] }}"
You cannot affect the update interval. The interval is irregular but approximately 1 data per second.
In the CSV its exactly 1 per second, but not via MQTT.
Go to Configuration / Integration / MQTT / Configure and listen to the topic shellies/<shelly-device/emeter/0/total and you will see how it behaves.
I have my shelly EM connected locally to HA (via the Shelly integration) and it seems like it is updating its value once every 30 seconds.
Can I change that to every 10 seconds and how?
Apparently it can be set to lower but maybe it needs to be removed from the Shelly UI integration and added to the config.yaml file as an mqtt sensor instead so that you can edit mqtt_update_period?
Found it, must send a POST request to http://<IPAddressofDevice>/settings?mqtt_update_period=10 but that is not affecting the Shelly integration from the UI.
Anyone managed to get the Shelly integration (not mqtt) to update every 10 seconds? It is updating every 10 when logging into the device locally.
I can confirm this works great to set the MQTT update period. This might not be useful for energy monitoring, but it’s very useful for power monitoring. I’ve set mine to update every 2 seconds and it’s working great.
The Shelly Integration uses the CoIoT protocol. According to the Shelly docs, there is a coiot_update_period REST endpoint, but it only accepts values from 15 seconds to 65535 seconds.
If you’re still using the official integration, you could try and see if POST to http://<IPAddressofDevice>/settings?coiot_update_period=10 works? But it might be limited to a min of coiot_update_period=15
Hello all. I have been reading in this topic about Shelly EM, and apparently there are slight mentions to to troubles with the reactive_power sensor. I have just installed my new Shelly EM, and after configuring with MQTT to integrate in HomeAssistant, I see energy/returned_energy/power/voltage sensors for both clamps (apart of other information about the device itself), but no way to see the reactive_power. Does anybody apart of me have this issue? I have read some mentions, but not clear for me the solution (if exist…). Thanks if somebody helps!!
Additional info:
Please, can you help about the steps to reduce the mqtt update?, I tried to send the post command but it not works, continues updating the mqtt messages each minute… thanks,
But node red continues to show values each minute:
Then, it seems that the parameter was changed correctly but any changes from nodered. I use nodered to simulate the invoice of the actual month, and I need to be accurate, then I need more samples than one each minute…
Not sure I just used the mqtt integration directly without nodered.
Also I think you need to navigate to the IP of the device and change it to mqtt there also
Hi everyone.
I am looking at getting a Shelly EM. I have solar panels and would like to monitor grid consumption and return to grid.
How do I configure the EM?
Will 1 clamp report a positive and negative value, or will I need 2 clamps on the same cable in opposite directions? Would I need to combine 2 readings on the Shelly, or use them separately in the energy dashboard?
Also, I would like to avoid MQTT. Is there a Rest/other API or should I just flash ESPHome?
Thanks.