Closed jslegers73 closed 6 months ago
Hello, it depend of device. Some device have the power and the consumption on the same cluster (so the same widget) and I m forced to mix them (in a "general kwh"). But your device have the consumption on the device finishing by 0702 and the power on the one finishing by 0b04.
It still possible using script like this one https://github.com/Smanar/Domoticz-deCONZ/wiki/Example-to-make-a-LUA-script-to-mix-temperature-humidity-barometer-on-the-same-sensor
The script was already done but I can't found it again. If you want to do like that I can help you to remake the script.
Hello. Thanks for the answer. I will have a look at this. I'm not a scripting guru but wil try.
I haven't tested, but with LUA will be something like (using the LUA script from the wiki)
--Mixed sensor for Power/consumption
if devicechanged['deCONZ - power'] or devicechanged['deCONZ - consumption'] then
print ('Update Mixed sensor')
--Get all values
p = otherdevices_svalues['deCONZ - power']
c = otherdevices_svalues['deCONZ - consumption']
print ('debug '..p..' '..c )
--Set new value
commandArray['UpdateDevice'] = '75|0|'..p..';'..c
end
Thank you I will try this soon when I have some spare time.
Same problem for me ^^ I need to simulate your device to test it. Tell me the result you have, or the debug ouput , I can adapt the code.
I have a power plug that can read out power usage. We I have added it in deConz it shows up in the device list in domoticz. The power consumption/usgae is offered in a RFXMeter. Is it possible to make this a General kWh meter?
Like this:![General](https://user-images.githubusercontent.com/6212673/197584094-416eb269-a8cb-4641-812d-c7c070ec6a36.png)