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

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
xury
Posts: 48
Joined: Monday 10 December 2018 23:32
Target OS: Linux
Domoticz version:
Location: Poland
Contact:

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

Post 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}
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

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

Post 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
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest