Neo CoolCam Power plug 12A+ problem with kWh

For Z-Wave related questions in Domoticz

Moderator: leecollings

EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Neo CoolCam Power plug 12A+ problem with kWh

Post by EddyG »

I have several Neo Coolcam power plugs and lately also the new 12A+ plug.
This plug 'spikes' with very high value for kWh, always in the order of 21474837
Anybody any idea how to prevent this?
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by tonbor »

Let kWh be calculated by domoticz not the sensor. If the spike is in watt too computed kWh is wrong too.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

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

Post by EddyG »

Tnx, I will do that. I hoped there was an other way 'inside' the plug.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

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

Post by EddyG »

Unfortunately that did NOT solve the problem.
I have a lot of 'old' neo coolcam powerplugs, which all work fine and give good reading of kWh.
I have 3 new powerplugs ID=0x1027 Type=0x0200. 1 works fine as it should be, but 2 powerplugs still are giving these strange readings.
In the database I see values like -21474828288.
Anyone any idea how to solve this?
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by tonbor »

It is not only kWh, ampere too.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

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

Post by EddyG »

My current even stays at zero all the time.
Watt gives a normal display.
Question remains, how to solve it.
I looked a little bit further. The value in database is very close to the negative power of 2 to 31. Which is: -2.147.483.648
The difference might be the real value.
So it might be a 32 bit value, where the MSB has a special meaning which is not converted in OZW.
dens1975
Posts: 26
Joined: Monday 12 February 2018 17:03
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

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

Post by dens1975 »

I also have this problem with the new Power Plugs. Hope someone can help out. I already had it with the previous version of domoticz and was hoping it was solved when I upgraded to version: 4.10717
krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

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

Post by krizzz »

Same issue here! Strange KwH readings!
akamming
Posts: 338
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by akamming »

Same here on the same device type.

i noticed 2 things.
1. Apparently the kwh value in the device itself is not initialised correctly: There is a very big negative value reported by the device itself. (bug in the device)
afbeelding 2.jpg
afbeelding 2.jpg (239.46 KiB) Viewed 6441 times
2. This should not bother domoticz, because it is an incremental counter. The value itself is not relevant, only the increment between 2 reported values. Domoticz does not seem to handle this negative value correctly: See graph below: for the 48 hr history the increments are calculated correctly. However for the last month graph (lower graph) when the increments are calculated on a daily basis they seem to be calculated incorrectly in case of these big negative absolute numbers.
afbeelding 1.jpg
afbeelding 1.jpg (104.85 KiB) Viewed 6441 times
I will try to do a factory reset on this device, to check if problem 1 is gone, however for now i will leave it like it is. Hopefully a domoticz developer can follow up on the 2nd issue (making domoticz more robust) for which i then would have a valid testscenario to verify if the problem is gone.
jfh75
Posts: 1
Joined: Monday 10 December 2018 7:29
Target OS: NAS (Synology & others)
Domoticz version: 4.11213
Location: France
Contact:

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

Post by jfh75 »

Same for me, I thought is was due to moving from one network (paris house) to countryside house.
I tried to reset the device following instruction. And since, I also get this huge negative total. And it seems to decrease indeed.
To my opinion, it must be a domoticz issue as suddenly, in my zwave control panel, I once got all my devices ID, manufacturer and type turning to 00 and empty.
I soft and hard resetted the controller it the same.
Also, when I click heal network, nothing is happening, as I used to get "healing network launched !" notice before. So I am actually wondering if it is working or not.
This faulty zwave management happens on a 716+II synology nas with Aeon gen5 stick and beta V4.11213.
On my other installation with everspring zwave dongle, everything look fine on a synology 916+ and stable v4.10717. Which was beta before anyway and also working fine.
akamming
Posts: 338
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by akamming »

hmmm... today the node suddenly seems to be repaired by itself. It now shows a counter of 2.348kwh, also in the OZW control panel. I manually removed all weird values from the database and the graph is now looking fine. I will keep monitoring and report if it changes back to the weird values again.
To my opinion, it must be a domoticz issue
Although i do think it is possible to make a fix in domoticz (if the increments are calculated correctly, domoticz should not be bothered by the wrong incorrect total value), i don't think the root cause is domoticz. On this device the same behaviour is reported on several home automation software packages, for example: https://community.athom.com/t/neo-coolc ... ssue/11389
akamming
Posts: 338
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by akamming »

hmmmm.... the meter log from last night on this device ("select * From Meter where DeviceRowID=416;")

Code: Select all

416|2350|0|2019-08-26 22:20:00
416|2150|1663|2019-08-26 22:25:01
416|2170|1669|2019-08-26 22:30:00
416|2190|1679|2019-08-26 22:35:00
416|-21474834432|1688|2019-08-26 22:40:01
416|-21474834432|1697|2019-08-26 22:45:00
416|-21474834432|1703|2019-08-26 22:50:00
416|2300|1708|2019-08-26 22:55:00
416|2320|1712|2019-08-26 23:00:00
416|2360|1716|2019-08-26 23:05:01
416|-21474834432|1717|2019-08-26 23:10:00
416|-21474834432|1726|2019-08-26 23:15:02
416|-21474834432|1732|2019-08-26 23:20:00
416|2480|1738|2019-08-26 23:25:02
416|2500|1747|2019-08-26 23:30:00
416|2520|1757|2019-08-26 23:35:01
416|-21474834432|1766|2019-08-26 23:40:00
416|-21474834432|1778|2019-08-26 23:45:01
416|-21474834432|1786|2019-08-26 23:50:01
416|2630|1795|2019-08-26 23:55:00
416|2670|1807|2019-08-27 00:00:00
416|2690|1814|2019-08-27 00:05:00
416|-21474834432|1820|2019-08-27 00:10:00
416|-21474834432|1828|2019-08-27 00:15:00
416|-21474834432|1842|2019-08-27 00:20:00
416|2820|1856|2019-08-27 00:25:00
416|2840|1860|2019-08-27 00:30:01
416|2880|1633|2019-08-27 00:35:00
416|-21474834432|1448|2019-08-27 00:40:00
416|-21474834432|1304|2019-08-27 00:45:00
416|-21474834432|1201|2019-08-27 00:50:00
416|2960|1129|2019-08-27 00:55:00
416|2980|1076|2019-08-27 01:00:00
416|3000|1035|2019-08-27 01:05:00
416|3020|989|2019-08-27 01:10:02
416|3020|946|2019-08-27 01:15:00
416|3040|899|2019-08-27 01:20:02
416|-21474834432|846|2019-08-27 01:25:00
416|-21474834432|787|2019-08-27 01:30:01
416|-21474834432|716|2019-08-27 01:35:00
416|3100|644|2019-08-27 01:40:02
416|3100|569|2019-08-27 01:45:00
416|3120|496|2019-08-27 01:50:01
So not spontaniously fixed at all… every now and then the negative values screwing up the sensor history! I will try a factory reset next

UPDATE: Factory reset did not have impact, so i created a workaround, by creating a dzvents script which resets the kwh value to the latest valid value in case of a negatively reported number. Since on a daily basis there are also valid kwh reports this should theoretically result in a working kwh meter (which is less accurate unfortunately):

Code: Select all

return {
    
    on = { 
       devices = { 
           "kWh Meter Power Plug 1" -- add your to be corrected neo coolcam kwh meter here 
       }
    },
        
    logging =   {   
        level     =   domoticz.LOG_DEBUG,
        marker    =   "NEO Coolcam kWh Fix"      
    },
    data = {
             ["kWh Meter Power Plug 1"] = { 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=domoticz.data[device.name].max()
            domoticz.log("Negative number, correcting WhTotal from "..device.WhTotal.." to "..CorrectedWhTotal,domoticz.LOG_DEBUG)
            device.updateElectricity(device.usage,CorrectedWhTotal).silent()
            
        end
        
    end
}
i will let this run for a few days and let you know if the stats are corrected automatically.
akamming
Posts: 338
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by akamming »

update:

happy to report that my workaround script works as expected.

this script has now been running for a few days and it works as a workaround. The node still reports spikes to domoticz (there is evidence in the log:a lot of lines like: 2019-08-29 05:57:22.010 Status: dzVents: Debug: NEO Coolcam Fix: Negative number, correcting WhTotal from -21474832384 to 4080), but they are corrected by the script resulting in a nice graph of daily stats without the spikes
NEO Coolcam log.png
NEO Coolcam log.png (111.63 KiB) Viewed 6331 times
mleferink
Posts: 1
Joined: Monday 07 October 2019 9:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by mleferink »

hi there,

same problem here. is there a nice solution already?

greets mark
Micha123
Posts: 62
Joined: Monday 28 August 2017 16:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Micha123 »

I have exactly the same problem, wil try your script.


Maybe is there an firmware update for it?
Aad3229
Posts: 18
Joined: Wednesday 07 January 2015 10:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: NL
Contact:

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

Post by Aad3229 »

Ik heb hetzelfde probleem en Ik krijg een foutmelding bij het runnen van het script. Ik ben zelf onbekend met programmeren, iemand een idee wat er fout gaat?

Code: Select all

2019-10-21 20:35:09.072 Status: dzVents: Info: NEO Coolcam kWh Fix: ------ Start internal script: kWh_Correct: Device: "L_WMGroot_kWh (Aeon Z-Stick Gen 5)", Index: 283
2019-10-21 20:35:09.072 Status: dzVents: Debug: NEO Coolcam kWh Fix: device[L_WMGroot_kWh] was changed to [6.020;-21474836480.000]
2019-10-21 20:35:09.072 Status: dzVents: Debug: NEO Coolcam kWh Fix: total is -21474836480, usage=6.02
2019-10-21 20:35:09.072 Status: dzVents: Error (2.4.19): NEO Coolcam kWh Fix: An error occured when calling event handler kWh_Correct
2019-10-21 20:35:09.072 Status: dzVents: Error (2.4.19): NEO Coolcam kWh Fix: ...cz/var/scripts/dzVents/generated_scripts/kWh_Correct.lua:26: attempt to concatenate local 'CorrectedWhTotal' (a nil value)
2019-10-21 20:35:09.072 Status: dzVents: Info: NEO Coolcam kWh Fix: ------ Finished kWh_Correct
2019-10-21 20:35:09.120 Status: dzVents: Info: NEO Coolcam kWh Fix: ------ Start internal script: kWh_Correct: Device: "L_WMGroot_kWh (Aeon Z-Stick Gen 5)", Index: 283
2019-10-21 20:35:09.121 Status: dzVents: Debug: NEO Coolcam kWh Fix: device[L_WMGroot_kWh] was changed to [6.000;-21474836480.000]
2019-10-21 20:35:09.121 Status: dzVents: Debug: NEO Coolcam kWh Fix: total is -21474836480, usage=6
2019-10-21 20:35:09.121 Status: dzVents: Error (2.4.19): NEO Coolcam kWh Fix: An error occured when calling event handler kWh_Correct
2019-10-21 20:35:09.121 Status: dzVents: Error (2.4.19): NEO Coolcam kWh Fix: ...cz/var/scripts/dzVents/generated_scripts/kWh_Correct.lua:26: attempt to concatenate local 'CorrectedWhTotal' (a nil value)
2019-10-21 20:35:09.121 Status: dzVents: Info: NEO Coolcam kWh Fix: ------ Finished kWh_Correct
Domoticz V4.10717 on Synology, RFXtrx433E USB 433.92MHz Transceiver, 9 x KAKU Switch (APA3-1500R), 1 x ABST-604 KAKU Dusk sensor, MiLight iBox V6, OpenZwave USB-stick Aeon LabS, Zwave PIR, Zwave door sensors, Zwave powerplugs
xvisor
Posts: 2
Joined: Wednesday 27 February 2019 23:28
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: build 14600
Contact:

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

Post by xvisor »

Same problem here with the CoolCam 12A+, i own 2 types:
5x Shenzhen Neo Electronics Co Ltd NAS-WR01Z Power plug 12A+ Shenzhen Neo Electronics Co Ltd 0x1087 0x0003
2x Shenzhen Neo Electronics Co Ltd NAS-WR01ZE Power plug 12A+ Shenzhen Neo Electronics Co Ltd 0x1027 0x0200

Both are having these issues, my Fibaro's have no issues at all. This started somewhere around the time I updated to OZW 1.6 I guess...

Any working solution would be great!

@akamming: Can I put multiple devices at once in your script, or would it be better to use a unique one for every device???

Thanks,
Peter
Domoticz running @Pi3B with Aeonlabs Z-stick, P1 USB, Sony TV, Yamaha receiver, OTGW v4, Anna Thermostat, multiple self made Arduino https temperature sensors, etc.
klin34970
Posts: 3
Joined: Monday 15 July 2019 18:19
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

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

Post by klin34970 »

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
Senior laravel & fullstack developer
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

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

Post by JuanUil »

Same problem here
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
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 »

Following because I also have this problem.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest