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.
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..
Send the daily value from a counter through MQTT
Moderator: leecollings
-
- Posts: 195
- Joined: Wednesday 31 May 2017 16:06
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.7
- Location: NL
- Contact:
Send the daily value from a counter through MQTT
Synology with Domoticz build (V2024.7) in Docker
-
- Posts: 195
- Joined: Wednesday 31 May 2017 16:06
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Send the daily value from a counter through MQTT
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.
Synology with Domoticz build (V2024.7) in Docker
-
- Posts: 536
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: Send the daily value from a counter through MQTT
Might be more simple to do a, where XXX is the deviceID
and process the json output.
There are "CounterDelivToday" and "CounterToday" present in that output.
Code: Select all
http://<domoticz_ip>:<port>/json.htm?type=devices&rid=XXX
There are "CounterDelivToday" and "CounterToday" present in that output.
Logic will get you from A to B. Imagination will take you everywhere.
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Send the daily value from a counter through MQTT
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.
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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 195
- Joined: Wednesday 31 May 2017 16:06
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Send the daily value from a counter through MQTT
@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.
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.
Synology with Domoticz build (V2024.7) in Docker
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Send the daily value from a counter through MQTT
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
As it is opensource you are free to modify the mqtt out function to enable counterToday values
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 0 guests