Neo CoolCam Power plug 12A+ problem with kWh

For Z-Wave related questions in Domoticz

Moderator: leecollings

RduPre
Posts: 53
Joined: Thursday 11 August 2016 18:41
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by RduPre »

Same here....
Thugbear
Posts: 5
Joined: Wednesday 06 June 2018 14:08
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by Thugbear »

The script works perfectly, and I have it running for multiple powerplugs.

Now I'm trying to find a way that i can adjust the values already recorded, so i can get my history working properly. Any ideas how to do that with for example DB Browser for SQLite?
User avatar
trakers
Posts: 1
Joined: Wednesday 05 February 2020 20:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Tuscany
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by trakers »

I have the same problem,
the script worked for a few days, then on some devices the history has shown high values again.
Thugbear wrote: Monday 03 February 2020 10:49 Now I'm trying to find a way that i can adjust the values already recorded, so i can get my history working properly. Any ideas how to do that with for example DB Browser for SQLite?
From the command line you can connect and work directly to the db through the commands :

Code: Select all

sudo sqlite3 domoticz.db 
select * from Meter_Calendar Where Value >220000000;
update Meter_Calendar set value = 1182 where (DeviceRowID = 440 and Date ='2020-02-01'); 
But can you tell me the formula for converting bad values into real values?
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by roblom »

klin34970 wrote:Hello,
thx akamming for your script, I didn't have to do it from scratch. I had to improve it.
I received 1 day ago, 10 NAS-WR01Z and same problem for all.

During my investigation, sometimes domoticz.data[device.name].max() return nil.
In this case, it's a error and negative value will be written.
Here is my little changes:

Code: Select all

return {
    
    on = { 
       devices = { 
           "Spa kWh Meter" -- add your to be corrected neo coolcam kwh meter here 
       }
    },
        
    logging =   {   
        level     =   domoticz.LOG_DEBUG,
        marker    =   "NEO Coolcam kWh Fix"      
    },
    data = {
             ["Spa kWh Meter"] = { history = true, maxItems = 10 } -- add your to be corrected neo coolcam kwh meter here
    },
    
    execute = function(domoticz,device)
        domoticz.log("device["..device.name.."] was changed to ["..device.state.."]",domoticz.LOG_DEBUG);
        
        domoticz.log("total is "..device.WhTotal..", usage="..device.usage,domoticz.LOG_DEBUG)
        if (device.WhTotal>0) then
            domoticz.log("adding to history",domoticz.LOG_DEBUG)
            domoticz.data[device.name].add(device.WhTotal)
        else
            local CorrectedWhTotal=0
            if (domoticz.data[device.name].max()) then
                CorrectedWhTotal=domoticz.data[device.name].max()
            end
            device.updateElectricity(device.usage,CorrectedWhTotal).silent()
            domoticz.log("Negative number, correcting WhTotal from "..device.WhTotal.." to "..CorrectedWhTotal,domoticz.LOG_DEBUG)
        end
        
    end
}
I also delete all negatives values from Database.

Code: Select all

sqlite3 domoticz.db
DELETE FROM Meter WHERE value < 0;
BEFORE
Image

AFTER
Image
I tried it but for some reason it doesn't work and the values are still the high values.
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by roblom »

The log shows for example

Code: Select all

2020-02-08 19:17:26.227 Status: dzVents: Info: NEO Coolcam kWh Fix - Ketel - Verbruik: ------ Start external script: Neo_correction_script_ketel.lua: Device: "Ketel - Verbruik (Zwave USB)", Index: 1665
2020-02-08 19:17:26.265 Status: dzVents: Debug: NEO Coolcam kWh Fix - Ketel - Verbruik: device[Ketel - Verbruik] was changed to [4.620;-21474785280.000]
2020-02-08 19:17:26.266 Status: dzVents: Debug: NEO Coolcam kWh Fix - Ketel - Verbruik: total is -21474785280.0, usage=4.62
2020-02-08 19:17:26.268 Status: dzVents: Debug: NEO Coolcam kWh Fix - Ketel - Verbruik: Negative number, correcting WhTotal from -21474785280.0 to 50650.0
2020-02-08 19:17:26.280 Status: dzVents: Info: NEO Coolcam kWh Fix - Ketel - Verbruik: ------ Finished Neo_correction_script_ketel.lua
User avatar
Louk
Posts: 17
Joined: Sunday 14 July 2019 13:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2 β
Location: Alkmaar, The Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by Louk »

As I ran into the same issue this week, I did some investigation.

The first value reported was -21474837,23 (note: EU notation of decimal separator). Multiplying this value by 1000 and converting it to a hexadecimal value will result in FAFFFFFD10. Hence that this number contains 10 digits, which is quite unusual in computer environments: A normal integer nowadays is stored in 2 (short), 4 (int), or 8 (long) bytes or 4, 8, or 16 hexadecimal digits.

So I expect this value is incorrectly retrieved / interpreted from the received Z-wave message from the device. When you cut off the upper 2 digits, and interpret the left over 8 digits as a long integer, this will result in -752. Still a negative number, but much more an expected value. I've no idea what the upper 2 digits mean: This could be part of another parameter or some kind of floating point notation, I guess.

For the next day, it reported -21474839,93. After multiplication and conversion, this will result in FAFFFFF284. After cutting off the top two digits, this will result in an integer value of -3452, a difference of -2700 ( -2,7 kWh).

Another thing that attracted my attention where the software versions reported by the device: Library V3, Protocol V6.04, and Application V2.21. My older devices report Library V3, Protocol V.4.05 (lower), and Application V3.94 (Higher!!!!). So I assume that this issue is introduced by a change of firmware in the devices: Older devices use protocol version 4.05 and more recent devices use version 6.04.

This might also explain why the newer devices don't report a Device ID and Serial Number (The fields are empty). And a final difference I noticed was that Domoticz shows an extra field for the failing device: Secured: Disabled. Strange, because I added the device by using the "Add secure" to add the device to the network.

Image
Aantekening 2020-03-12 160809.png
Aantekening 2020-03-12 160809.png (129.56 KiB) Viewed 3007 times
Have fun,
Louk
User avatar
Louk
Posts: 17
Joined: Sunday 14 July 2019 13:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2 β
Location: Alkmaar, The Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by Louk »

For some reason, something has changed since yesterday: I just did the same export from the Domoticz graph as I did yesterday evening and now I get about the same numbers, but just positive :o

I did not changed anything in the database or ran any scripts to correct those values.

However, this does not change my conclusion: The message layout has changed due to a protocol version update.

Here are the updated figures:

Code: Select all

[b]DateTime 	Energy Usage (kWh)	Energy Usage (Wh)	Hexadecimal	4 byte int value (wH)[/b]
10-3-2020 00:00	21474837,23		21474837232		5000002F0	752
11-3-2020 00:00	21474839,93		21474839932		500000D7C	3452
12-3-2020 00:00	21474837,16		21474837156		5000002A4	676
Maybe someone with knowledge about the protocols used, can respond to this?
Have fun,
Louk
SchulieBug
Posts: 4
Joined: Monday 25 March 2019 16:04
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by SchulieBug »

I do have the same issue and have implemented the script mentioned in this topic. However, when I look in the database, Meter table, I see large negative numbers in the Value field (not anymore in the usage). How do I get rid of these false values?

As an example:
Meter table value large negative.jpg
Meter table value large negative.jpg (201.24 KiB) Viewed 2800 times
What can I do to get rid of these values (besides dropping the Neo Coolcam's)?
Bolten88
Posts: 6
Joined: Tuesday 16 June 2020 5:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by Bolten88 »

I have the same issue and the script does not seems to fix this. Is there another solution available yet?

1.PNG
1.PNG (144.48 KiB) Viewed 2762 times
Bolten88
Posts: 6
Joined: Tuesday 16 June 2020 5:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by Bolten88 »

SchulieBug wrote: Wednesday 27 May 2020 10:58 I do have the same issue and have implemented the script mentioned in this topic. However, when I look in the database, Meter table, I see large negative numbers in the Value field (not anymore in the usage). How do I get rid of these false values?

As an example:
Meter table value large negative.jpg

What can I do to get rid of these values (besides dropping the Neo Coolcam's)?
Wich application are you using here?
SchulieBug
Posts: 4
Joined: Monday 25 March 2019 16:04
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by SchulieBug »

Bolten88 wrote: Wednesday 17 June 2020 9:45 Wich application are you using here?
Export the database from within Domoticz and open it with SQ Lite Database Browser Portable (download it here)
Bolten88
Posts: 6
Joined: Tuesday 16 June 2020 5:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by Bolten88 »

SchulieBug wrote: Wednesday 17 June 2020 9:50
Bolten88 wrote: Wednesday 17 June 2020 9:45 Wich application are you using here?
Export the database from within Domoticz and open it with SQ Lite Database Browser Portable (download it here)
Thanks!
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by Eddiever »

I ran into the same issue as mentioned here. Therefore it resulted in me visiting this thread.

But when I look at my devices I have a General Kwh option but also a Usage Electric option. This last one seems to be working fine. Anybody knows the diference between these two?
neo.PNG
neo.PNG (3.71 KiB) Viewed 2679 times
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by roblom »

The usage is the used power (so the used power in Watt). The general is the used energy (so the used energy in kiloWatt per hour).

So if a device uses 1000W, and it is turned on for 30min, the used energy is 500Wh which is 0,5kWh.
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by Eddiever »

Ah, thanks. So no good for showing the total amount of Kwh of my refrigirator.
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by roblom »

Normally you should use the general for that. But with the problem of these Neo devices it doesn't work well.
When using the usage you don't know how long the fridge was on so you are missing the factor time.
GJvdP
Posts: 19
Joined: Thursday 30 November 2017 0:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Arnhem, the Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by GJvdP »

I see that it has been a while since there was a post on this issue.
I have 2 of the NAS-WR01Z Power plug 12A+ and 2 NAS-WR01ZE Power plug 12A+ powerplugs.
The last ones produce de big negative numbers and is the only error I have left in my logs. (every 5 minutes)

2021-06-07 12:11:07.597 Error: ZWAVE: OpenZWave: Invalid counter value received!: (-21474834.000000) Node: 3 (0x03), CommandClass: METER, Instance: 1, Index: 0, Id: 0x34C8012
2021-06-07 12:11:53.187 Error: ZWAVE: OpenZWave: Invalid counter value received!: (-21474832.000000) Node: 2 (0x02), CommandClass: METER, Instance: 1, Index: 0, Id: 0x24C8012
2021-06-07 12:16:07.192 Error: ZWAVE: OpenZWave: Invalid counter value received!: (-21474834.000000) Node: 3 (0x03), CommandClass: METER, Instance: 1, Index: 0, Id: 0x34C8012
2021-06-07 12:16:53.015 Error: ZWAVE: OpenZWave: Invalid counter value received!: (-21474832.000000) Node: 2 (0x02), CommandClass: METER, Instance: 1, Index: 0, Id: 0x24C8012
etc.

The only thing that I haven't heard anybody say is if this is a Zwave problem, a NEO hardware problem of the powerplug or a Domoticz problem.
I think this would be helpfull to create a solution (even if it means not to buy the NEO powerplugs but another brand).
The workaround is nice but not the solution for the errorlog.

If this is going to be revisited I am happy to supply more data for a permanent solution.
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by roblom »

The problem is within the NEO powerplug hardware or firmware.
User avatar
Louk
Posts: 17
Joined: Sunday 14 July 2019 13:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2 β
Location: Alkmaar, The Netherlands
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by Louk »

Maybe your right about the source of the issue, but it could easily corrected on the Domoticz side by stripping off the extraneous high order bits and/or correcting sign extend issues. That is, if someone is aquatinted with the software that handles the data from those power plugs.
Have fun,
Louk
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Neo CoolCam Power plug 12A+ problem with kWh

Post by heggink »

Using zwavejs2mqtt and the plugin, I have no issues with these plugs. I had issues with the built-in OZW interface.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest