Generic kWh Device returns Wrong values!

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
Posts: 41
Joined: Monday 01 May 2017 20:15
Target OS: Raspberry Pi
Domoticz version: 3.9030

Generic kWh Device returns Wrong values!

Post by tillo » Monday 03 December 2018 23:59

Version: 4.9700
Platform: RaPi 3
Plugin/Hardware: RFXCOM - RFXtrx433 USB 433.92MHz and Generic OpenZWave USB

When using the function WhToday for a device (Generic kWh, Electricity (instant and counter) ) that have 0 usage. The function would then return the last known value that is NOT equal to 0... in my case 8146.9.

The script bellow returns pool_kwh = 8146.9 when it should be 0

See attached code and screen dumps of the sensor logs.

Code: Select all

execute = function(domoticz, device)
    local pool_obj              = domoticz.devices('Pool - Total (kWh)');
    local pool_kwh              pool_kwh = (pool_obj.WhToday);	   

Side note: The log only shows up till Oct 21, why dose it not show 0 all the way up till today's date?

Domoticz log 2.PNG
Domoticz log 2.PNG (79.12 KiB) Viewed 33 times
Domoticz log 1.PNG
Domoticz log 1.PNG (95.19 KiB) Viewed 33 times
Raspberry Pi 2 B - Raspbian Jessie + Domoticz + RFXtrxcom 433, House(dimmers, sockets, harmonyhub, Temp / Humidity Sensors, PIR, ESP8266)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest