Page 1 of 1

Send the daily value from a counter through MQTT

Posted: Saturday 07 December 2024 19:53
by PieterS
I am able to send data from a counter through MQTT from Domoticz to another application. In my case Node-RED. But a counter in Domoticz has 2 values, a daily value and a total value.

As I watch the data in MQTT Explorer I notice that Domoticz sends only the total value. I do not need that value. I need the daily value... :?

There are two ways to configure MQTT out from Domoticz. Both methodes send the total value of that counter.. Method 1 (Setup, Hardware, MQTT client gateway) sends total value and the power. The other method (Settings, More Options, Data push, MQTT) sends only the total value. See screenshot.

Image

Is there a way to send the daily value, 10.751 kWh in my case and shown in the dashboard. Otherwise I have to calculate the value in Node-RED again.. :|

Re: Send the daily value from a counter through MQTT

Posted: Monday 09 December 2024 15:16
by PieterS
Opgelost door de waardes Totaal Energie en Power van de S0-meter naar Node-RED te sturen en vervolgens de waarde Opgenomen-energie-vandaag te berekenen. 8-)

Image

Re: Send the daily value from a counter through MQTT

Posted: Tuesday 10 December 2024 19:07
by Kedi
Might be more simple to do a, where XXX is the deviceID

Code: Select all

http://<domoticz_ip>:<port>/json.htm?type=devices&rid=XXX
and process the json output.
There are "CounterDelivToday" and "CounterToday" present in that output.

Re: Send the daily value from a counter through MQTT

Posted: Tuesday 10 December 2024 21:27
by waltervl
I would expect that the message of Domoticz/out already had that values like the Json output but apparently not.
But also that counter today value is only meant for internal usage on the user interface. No reason to publish that counter today value to outside world.

Re: Send the daily value from a counter through MQTT

Posted: Wednesday 11 December 2024 16:58
by PieterS
@waltervl: that is your, remarkable opinion... :| i needed that value in another application and it was made available there.. why not sharing my own data in my network??

Btw: when I marked on this site that this issue is solved I got an error 404 from the browser.

Thanks kedi. Good to know.

Re: Send the daily value from a counter through MQTT

Posted: Thursday 12 December 2024 16:49
by waltervl
I should have added that it probably was the opinion of the developer that created the mqtt out function.....
As it is opensource you are free to modify the mqtt out function to enable counterToday values :-)