Page 1 of 1

How to get whToday from energy dummy sensor and pass it to node red?

Posted: Tuesday 26 May 2020 22:45
by xury
Is there any simple way to get whToday value to node red without using os.execute mosquitto_pub?
It is a pity that domoticz/out does not release this value:

Code: Select all

{"Battery":255,"EnergyMeterMode":"1","RSSI":12,"description":"","dtype":"General","hwid":"13","id":"00082119","idx":119,"name":"Użycie energii","nvalue":0,"stype":"kWh","svalue1":"386.96","svalue2":"3609246.5","unit":1}

Re: How to get whToday from energy dummy sensor and pass it to node red?  [Solved]

Posted: Wednesday 27 May 2020 2:05
by waaren
xury wrote: Tuesday 26 May 2020 22:45 Is there any simple way to get whToday value to node red without using os.execute mosquitto_pub?
the os.execute method is probably easier but if you define a custom sensor and update it with

domoticz.devices('myCustomSensor').setValues(0, dz.devices(119).WhToday, 'parsetrigger')

you will get something like

Code: Select all

1590537677.076390379 - domoticz/out - {
        "Battery" : 255,
        "RSSI" : 12,
        "description" : "",
        "dtype" : "General",
        "hwid" : "3",
        "id" : "00082295",
        "idx" : 295,
        "name" : "myCustomSensor",
        "nvalue" : 0,
        "stype" : "Custom Sensor",
        "svalue1" : "123.34",
        "unit" : 1

in domoticz/out