Closed localhost61 closed 5 years ago
Just did a test on a BlitzWolf SHP6 using this template:
{"NAME":"BlitzWolf SHP5","GPIO":[56,255,158,255,0,134,0,0,131,17,132,21,0],"FLAG":0,"BASE":45}
Using a 150W bulb it correctly reports 5W over two minutes.
19:33:30 CMD: backlog status 8;power 1;delay 1200;power 0;status 8
19:33:30 MQT: stat/shp6/STATUS8 = {"StatusSNS":{"Time":"2019-06-12T19:33:30","ENERGY":{"TotalStartTime":"2018-11-25T17:57:09","Total":2.392,"Yesterday":0.004,"Today":0.010,"Power":0.40,"ApparentPower":21.43,"ReactivePower":21.40,"Factor":0.02,"Voltage":225.6,"Current":0.095}}}
19:33:30 MQT: stat/shp6/RESULT = {"POWER":"ON"}
19:33:30 MQT: stat/shp6/POWER = ON
19:33:31 MQT: stat/shp6/RESULT = {"Delay":1200}
19:35:31 MQT: stat/shp6/RESULT = {"POWER":"OFF"}
19:35:31 MQT: stat/shp6/POWER = OFF
19:35:31 MQT: stat/shp6/STATUS8 = {"StatusSNS":{"Time":"2019-06-12T19:35:31","ENERGY":{"TotalStartTime":"2018-11-25T17:57:09","Total":2.397,"Yesterday":0.004,"Today":0.015,"Power":68.20,"ApparentPower":152.71,"ReactivePower":136.60,"Factor":0.45,"Voltage":224.9,"Current":0.679}}}
It uses the same driver as your Neo Coolcam.
I'll do some further tests on different hardware.
As the Neo is configured for HLW8012 I would suggest you change it's config to BL0937 by changing GPIO04 from 133 to 134.
I haven't seen any HLW8012 lately in new devices. It's mostly BL0937.
You may need to recalibrate.
My latest readings tended to confirm what you tell me now. HLW8012 was for POW R1 and my further tests on LED lamps show no active power :-/ I'll check right now.
@arendst you got it right! Many thanks! I changed GPIO4 to 134 as you said and calibrated again with the 2kW kettle and the SDM230 I get a Total Energy of 82Wh instead of 67Wh now, the measure is not especially accurate but it's consistent. FYI here is the console log
20:12:45 CMD: voltageset 230
20:12:45 MQT: stat/Spare/RESULT = {"VoltageSetCal":1608}
20:14:38 CMD: Currentset 8940
20:14:38 MQT: stat/Spare/RESULT = {"CurrentSetCal":3489}
20:20:15 CMD: Backlog energyreset1 0; power on;delay 20;status 10;delay 1180;power off;energyreset
20:20:15 MQT: stat/Spare/RESULT = {"EnergyReset":{"Total":0.083,"Yesterday":0.000,"Today":0.000}}
20:20:15 MQT: stat/Spare/RESULT = {"POWER":"ON"}
20:20:15 MQT: stat/Spare/POWER = ON
20:20:15 MQT: stat/Spare/RESULT = {"Delay":20}
20:20:18 MQT: stat/Spare/STATUS10 = {"StatusSNS":{"Time":"2019-06-12T20:20:18","ENERGY":{"TotalStartTime":"2019-06-12T20:20:15","Total":0.001,"Yesterday":0.000,"Today":0.001,"Power":1988,"ApparentPower":1988,"ReactivePower":0,"Factor":1.00,"Voltage":220,"Current":9.030}}}
20:20:18 MQT: stat/Spare/RESULT = {"Delay":1180}
20:22:16 MQT: stat/Spare/RESULT = {"POWER":"OFF"}
20:22:16 MQT: stat/Spare/POWER = OFF
20:22:16 MQT: stat/Spare/RESULT = {"EnergyReset":{"Total":0.082,"Yesterday":0.000,"Today":0.082}}
20:26:33 CMD: Backlog power on;delay 20;status 10;delay 580;power off;energyreset
20:26:33 MQT: stat/Spare/RESULT = {"POWER":"ON"}
20:26:33 MQT: stat/Spare/POWER = ON
20:26:34 MQT: stat/Spare/RESULT = {"Delay":20}
20:26:36 MQT: stat/Spare/STATUS10 = {"StatusSNS":{"Time":"2019-06-12T20:26:36","ENERGY":{"TotalStartTime":"2019-06-12T20:20:15","Total":0.083,"Yesterday":0.000,"Today":0.083,"Power":2033,"ApparentPower":2033,"ReactivePower":0,"Factor":1.00,"Voltage":223,"Current":9.123}}}
20:26:36 MQT: stat/Spare/RESULT = {"Delay":580}
20:27:34 MQT: stat/Spare/RESULT = {"POWER":"OFF"}
20:27:34 MQT: stat/Spare/POWER = OFF
20:27:34 MQT: stat/Spare/RESULT = {"EnergyReset":{"Total":0.123,"Yesterday":0.000,"Today":0.123}}
21:45:00 CMD: Backlog energyreset1 0; power on;delay 20;status 10;delay 3580;power off;energyreset
21:45:00 MQT: stat/Spare/RESULT = {"EnergyReset":{"Total":0.143,"Yesterday":0.000,"Today":0.000}}
21:45:00 MQT: stat/Spare/RESULT = {"POWER":"ON"}
21:45:00 MQT: stat/Spare/POWER = ON
21:45:00 MQT: stat/Spare/RESULT = {"Delay":20}
21:45:03 MQT: stat/Spare/STATUS10 = {"StatusSNS":{"Time":"2019-06-12T21:45:03","ENERGY":{"TotalStartTime":"2019-06-12T21:45:00","Total":0.000,"Yesterday":0.000,"Today":0.000,"Power":23,"ApparentPower":34,"ReactivePower":25,"Factor":0.68,"Voltage":229,"Current":0.149}}}
21:45:03 MQT: stat/Spare/RESULT = {"Delay":3580}
21:51:01 MQT: stat/Spare/RESULT = {"POWER":"OFF"}
21:51:01 MQT: stat/Spare/POWER = OFF
21:51:01 MQT: stat/Spare/RESULT = {"EnergyReset":{"Total":0.002,"Yesterday":0.000,"Today":0.002}}
(I use an initial 2" delay in the command to hide the first lower values (due to averageing, I guess).
I close the post, the issue was located between the chair and my keyboard :-D
After removing the inner sticker, and the plastic safety cover with a 2mm Hex Allen key, the digital PCB appears and I can confirm there is a Belling BL0937 chip in this device as U5.
@localhost61 I noticed the same issues as you with my new 16a wifi switches so I switched gpio4 to 134 and it looks better but not great. Voltage hangs around 280...., and Watt usage is around 15 to 20 watts higher that actual
Yes, it absolutely needs calibration. For me that was quite easy, I own everything needed for the operation.
I just received my new NEO CoolCam 16A, flashed it using Tuya-convert method. I applied blakadder's template of this page to initialize GPIOs. The voltage readout was wrong, I got 750V instead of about 220V. So, I calibrated it with a 40W resistive load and confirmed with a 2kW load, using an Eastron SDM230 (class 1.0) as reference.
I didn't use PowerSet command, the readout was consistent and thought it would alter the result of the previous ones.
BUG DESCRIPTION
The issue concerns Energy calculation, it seems about 10 times too high. It becomes obvious with a 2kW load. If I power a 2kW load during 2mn (0.0333h) it consumes 2*0.0333=0.067kWh but I get 0.6kWh This is what I realize with the next Backlog command:
REQUESTED INFORMATION
I did several other tests measuring 40W during 6mn (delay 50+3550) and always got about 33Wh instead of 4Wh.
As a side remark, one can see on 2nd line that Total Energy is not directly affected by command
energyreset1 0
, but later on, as seen on last line, the process will copy Today Energy in Total Energy and erase the volatile counter too.TO REPRODUCE
Issue that should affect Sonoff POW too, it shares same energy meter chip HLW8012