3.7320 - KWh meter stange peaks

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
Description:
.....

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
djflix
Posts: 3
Joined: Sunday 16 April 2017 17:20
Target OS: Raspberry Pi
Domoticz version:
Contact:

3.7320 - KWh meter stange peaks

Post by djflix » Sunday 16 April 2017 17:24

Version: 3.7320
Platform: Raspberry Pi
Plugin/Hardware: Aeon Smart Switch 6 / NorthQ NQ-9021
Description:I've found some topics on these forums about incorrect KWh values. With different types of Z-Wave sensors I've been encountering issues for a few weeks now. Shift+click and then removing the value does not remove the value. I've tried shutting down domoticz, fixing the values in the sqlite database and starting domoticz again, but a week later I have the same issue, only for more recent measurements. Somehow it seems that the total is stored as the aggregate value for a day. Can anyone explain this? How can I prevent this in the future?
Screen Shot 2017-04-16 at 17.17.08.png
Screen Shot 2017-04-16 at 17.17.08.png (285.94 KiB) Viewed 1663 times

Szwuntex
Posts: 12
Joined: Friday 31 July 2015 13:32
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by Szwuntex » Monday 17 April 2017 16:27

Version: 3.7067
Platform: Raspberry Pi with RaZberry
Plugin/Hardware: AEON LABS, Home energy Meter Gen5 - Three clamps 60A
Description: I have the same problem. I had this problem for a while, even in previous beta versions of Domoticz than I use now.
Sorry to say that I don't know any solution (yet) :-(
Attachments
Domoticz.JPG
Domoticz.JPG (89.89 KiB) Viewed 1642 times

Szwuntex
Posts: 12
Joined: Friday 31 July 2015 13:32
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: RE: Re: 3.7320 - KWh meter stange peaks

Post by Szwuntex » Wednesday 19 April 2017 8:17

gordonb3 wrote:So this started on February 25? You wouldn't happen to know what version you used before that? Might help to identify a time frame.

One more question: are these high values related to days where you restarted Domoticz or the machine it is running on? Any other hardware restarted? Looks like somehow the previous day value is being reset to zero/not being read from the database.
Yes, it started on Februari 25 but I don't remeber which version I used before. It could have been the latest stable version.
These high values comes randomly, I don't restart Domoticz or anything else at these times.
The high values/peaks are the total energi consumtions until that day/time instead of that specific days consumtion.

djflix
Posts: 3
Joined: Sunday 16 April 2017 17:20
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by djflix » Thursday 27 April 2017 12:02

It might be a coincidence but I did restart today and one of the meters did 'reset' (using the total value as current, ignoring the database value for current). Not really sure when the issue started as I've been correcting the values, but I agree that the issue started somewhere around February. At least I'm not alone :)

Olgmo
Posts: 19
Joined: Tuesday 28 June 2016 12:24
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by Olgmo » Monday 01 May 2017 20:45

Here is my take on this matter which seems to work okay for me.
Running on RPi and latest beta.

This may improve the random occurrence of incorrect value on a new day and also add the last incremental reading on the meter.
See this image of how NorthQ meter and my new meter is displayed.

Image

Remember to enable polling for this device.
Also remember that by default the NorthQ only activate the antenna every 15 min. So when you are sending configuration don´t hammer the «Apply configuration»- button.

1: I added an external power supply and now use Wake-up interval every 300 sec (5 minutes)
(bought a 3V power supply and made some dummy AA batteries)

2: On domoticz, create a virtual device with your name of choice and the type «Electric (Instant + Counter)»
Setup —> Hardware —> «Name» + «Type»: Dummy —> Add. Then Create Virtual Sensors..
This will be the new device instead of the one from NorthQ

3: Create a new user variable
Setup —> More Options —> User Variables —> Variable name = «kWh_prev», Variable type = Integer, Variable value: From your meter.
This is for temporary store the previous meter value and to calculate usage.

4: Added a LUA script.
Setup —> More Options —> Events: Event name:»Your choice», Select LUA and Device

Code: Select all

------------------------------------------------------------------------------
-- Raw counter sensor NorthQ name (from Setup —> Devices —> NorthQ device name), mine is "NorthQ"
northq_counter = ’NorthQ'
 
-- Electric meter virtual sensor ID (from Setup —> Devices —> Idx number of the dumme device)
-- my idx is 390
meter_id = 390 

-- Debug switch, Change to anything else than Y if you don´t need this.
debug="Y"

------------------------------------------------------------------------------
commandArray = {}

if (devicechanged[northq_counter]) then
    
-- Retrieve the previous reading
    prev_meter = uservariables['kWh_prev’]
-- Retrieve the current value
    read_meter = otherdevices_svalues[northq_counter]
-- formate the reading
    meter = math.abs(tonumber(string.sub(read_meter,-12)))
-- calculate the usage
    diff = meter - prev_meter
    
   if (debug == "Y") then
        print("kWh incr script. " .. read_meter)
        print('kWh NorthQ: ' .. meter)
        print('kWh Saved: ' .. prev_meter)
        print('kWh Diff: ' .. diff)
   end

    if (diff > 0) then
        commandArray[1] = {['UpdateDevice'] = meter_id .. "|1|" .. diff .. ";" .. meter}
        commandArray['Variable:kWh_prev'] = "" .. meter
    end

end

return commandArray
------------------------------------------------------------------------------
I hope this is helpful for some of you.
Log image
Image

erkka
Posts: 7
Joined: Monday 09 September 2013 16:45
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by erkka » Thursday 04 May 2017 9:30

I've had simmilar spikes on my 1-wire counter (hobby boards dual counter) since november 2015. I've checked the SQlite-db and found out that those spikes are equal to the total of the counter at that time. I think in my case it has to do with a small instability in my 1-wire network (propably my old power supply). My RRD-graphs have no spikes, so it's just the way domoticz uses the values.
It would be nice to be able to clean up the DB, since all it would require is to re-calculate the differance betwen couter values. I've done it manually but it takes time.

cineks
Posts: 2
Joined: Thursday 04 May 2017 12:30
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by cineks » Thursday 04 May 2017 13:21

Hi,
I have also spikes. Always at 12:00 pm,
the spikes is mostly in minus, some times on plus.
I checked the counter and work properly. Value increment is correct

But is some wrong in dbase.
I have two entries (id 50) at 12:00 - see attached
second entries (5490) is the same like on 23:55 (5483)

counter is 1-wire ds2423
board Raspberry PI 3
Domoticz v3.5877
Attachments
Clipboard06.jpg
dbase
Clipboard06.jpg (22.24 KiB) Viewed 1444 times
Clipboard02.jpg
chart
Clipboard02.jpg (43.22 KiB) Viewed 1444 times

Gaston
Posts: 10
Joined: Saturday 05 December 2015 16:35
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by Gaston » Friday 05 May 2017 23:16

djflix wrote: Shift+click and then removing the value does not remove the value.
I also encounter that shift-leftclick and choosing "OK" in the popup does not remove the database value.
Is it solved for you, or should we report this again as a bug?

I'm running:
Version: 3.7416
Build Hash: 4abc3e4
Compile Date: 2017-05-05 00:31:42

djflix
Posts: 3
Joined: Sunday 16 April 2017 17:20
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by djflix » Saturday 27 May 2017 15:31

Gaston wrote:
djflix wrote: Shift+click and then removing the value does not remove the value.
I also encounter that shift-leftclick and choosing "OK" in the popup does not remove the database value.
Is it solved for you, or should we report this again as a bug?

I'm running:
Version: 3.7416
Build Hash: 4abc3e4
Compile Date: 2017-05-05 00:31:42
I'm currently running 3.7518, Build Hash- af79901, Build Date- 2017-05-25 17-40-57 and I still have the same problem.

You say "again", but has this been reported before?

Gaston
Posts: 10
Joined: Saturday 05 December 2015 16:35
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by Gaston » Sunday 28 May 2017 11:27

djflix wrote:
Gaston wrote:
djflix wrote: Shift+click and then removing the value does not remove the value.
You say "again", but has this been reported before?
You could be right.
https://github.com/domoticz/domoticz/bl ... istory.txt

Version 2.2025 (September 28th 2014)
- Implemented: Delete short log value P1 SmartLog (Shift-Left click)

Version 2.2563 (June 14th 2015)
- Fixed: Possible bug that could delete an incorrect shortlog data point (option in graph, shift-click to delete)

This bug that was addressed I've seen is different.

Searching the Bug Forum: search.php?keywords=shift&fid%5B0%5D=6
it shows more users have experienced a not working Shift+Left-click

I don't like to create duplicate bug requests, but it seems we could address it again, or perhaps it's better
to contribute to a post of another user.

User avatar
Derik
Posts: 2097
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by Derik » Wednesday 23 May 2018 0:23

mmm my values are very strange to:
ScreenShot114.png
ScreenShot114.png (70.31 KiB) Viewed 267 times
ScreenShot115.png
ScreenShot115.png (88.25 KiB) Viewed 267 times
These are counters from different Zwave devices....

And the other thing i cannot remove the values. with a shift klik

I run almost always the last beta
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

User avatar
Derik
Posts: 2097
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by Derik » Thursday 24 May 2018 22:28

Make issue on github
https://github.com/domoticz/domoticz/issues/2418
Perhaps....

This make really crazy very expensive Zwave devices and no monitoring possible grrr.
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

User avatar
Derik
Posts: 2097
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: 3.7320 - KWh meter stange peaks

Post by Derik » Tuesday 12 June 2018 17:57

Dear all.

Perhaps there is a solution.
Do not ask me how..
Only i did very strange values in my zwcfg.. [ look @ location or name..]
ScreenShot168.png
ScreenShot168.png (7.62 KiB) Viewed 111 times
Now my value looks ok....
Do a soft reset so there is no name or something else in your system.
Then refresh your zwcfg file.

Then check very good on nam should be clean
And check the location should be clean also.
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests