Energy calculation wrong on Nous A1T #20653
-
PROBLEM DESCRIPTIONThe energy calculation on the Nous A1T is off by a fair margin. REQUESTED INFORMATIONMake sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Configuration output here:
13:30:46.540 MQT: tasmota/stat/tasmota_158777/RESULT = {"NAME":"NOUS A1T","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":49}
13:30:46.773 MQT: tasmota/stat/tasmota_158777/RESULT = {"Module":{"0":"NOUS A1T"}}
13:30:46.980 MQT: tasmota/stat/tasmota_158777/RESULT = {"GPIO0":{"32":"Button1"},"GPIO1":{"0":"None"},"GPIO2":{"0":"None"},"GPIO3":{"0":"None"},"GPIO4":{"2720":"BL0937 CF"},"GPIO5":{"2656":"HLWBL CF1"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO12":{"2624":"HLWBL SEL_i"},"GPIO13":{"320":"Led_i1"},"GPIO14":{"224":"Relay1"},"GPIO15":{"0":"None"},"GPIO16":{"0":"None"},"GPIO17":{"0":"None"}}
Rules output here:
13:43:22.239 MQT: tasmota/stat/tasmota_158777/RESULT = {"Rule1":{"State":"ON","Once":"ON","StopOnError":"OFF","Length":39,"Free":472,"Rules":"ON Energy#Power < 100 DO SaveData ENDON"}}
STATUS 0 output here:
13:31:46.899 MQT: tasmota/stat/tasmota_158777/STATUS = {"Status":{"Module":0,"DeviceName":"CarCharger","FriendlyName":["Auto Ladegerät in der Garage"],"Topic":"tasmota_158777","ButtonTopic":"0","Power":1,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}}
13:31:46.909 MQT: tasmota/stat/tasmota_158777/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota/release/tasmota.bin.gz","RestartReason":"Software/System restart","Uptime":"0T00:29:47","StartupUTC":"2024-02-03T12:01:59","Sleep":50,"CfgHolder":4617,"BootCount":10,"BCResetTime":"2024-01-03T15:23:55","SaveCount":198,"SaveAddress":"FA000"}}
13:31:46.917 MQT: tasmota/stat/tasmota_158777/STATUS2 = {"StatusFWR":{"Version":"13.3.0(tasmota)","BuildDateTime":"2023-12-12T14:29:05","Boot":31,"Core":"2_7_4_9","SDK":"2.2.2-dev(38a443e)","CpuFrequency":80,"Hardware":"ESP8266EX","CR":"383/699"}}
13:31:46.926 MQT: tasmota/stat/tasmota_158777/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["HSMHS8",""],"TelePeriod":60,"Resolution":"558180C0","SetOption":["00008009","2805C80001000600003C5A0A192800000000","00000080","00006000","00004000","00000000"]}}
13:31:46.943 MQT: tasmota/stat/tasmota_158777/STATUS4 = {"StatusMEM":{"ProgramSize":637,"Free":364,"Heap":20,"ProgramFlashSize":1024,"FlashSize":2048,"FlashChipId":"156085","FlashFrequency":40,"FlashMode":"DOUT","Features":["0809","8F9AC787","04368001","000000CF","010013C0","C000F981","00004004","00001000","54000020","00000080","00000000"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37,45,62,68","Sensors":"1,2,3,4,5,6","I2CDriver":"7"}}
13:31:46.956 MQT: tasmota/stat/tasmota_158777/STATUS5 = {"StatusNET":{"Hostname":"tasmota-158777-1911","IPAddress":"10.8.10.176","Gateway":"10.8.10.1","Subnetmask":"255.255.255.0","DNSServer1":"10.8.10.1","DNSServer2":"10.8.10.3","Mac":"C8:C9:A3:15:87:77","Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}}
13:31:46.967 MQT: tasmota/stat/tasmota_158777/STATUS6 = {"StatusMQT":{"MqttHost":"10.8.100.11","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_158777","MqttUser":"tasmota","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}}
13:31:46.980 MQT: tasmota/stat/tasmota_158777/STATUS7 = {"StatusTIM":{"UTC":"2024-02-03T12:31:46","Local":"2024-02-03T13:31:46","StartDST":"2024-03-31T02:00:00","EndDST":"2024-10-27T03:00:00","Timezone":"+01:00","Sunrise":"08:18","Sunset":"17:49"}}
13:31:46.991 MQT: tasmota/stat/tasmota_158777/STATUS9 = {"StatusPTH":{"PowerDelta":[0,0,0],"PowerLow":0,"PowerHigh":0,"VoltageLow":0,"VoltageHigh":0,"CurrentLow":0,"CurrentHigh":0}}
13:31:47.001 MQT: tasmota/stat/tasmota_158777/STATUS10 = {"StatusSNS":{"Time":"2024-02-03T13:31:46","ENERGY":{"TotalStartTime":"2024-01-03T15:23:55","Total":105.581,"Yesterday":13.898,"Today":4.643,"Power":2319,"ApparentPower":2319,"ReactivePower":0,"Factor":1.00,"Voltage":236,"Current":9.830}}}
13:31:47.014 MQT: tasmota/stat/tasmota_158777/STATUS11 = {"StatusSTS":{"Time":"2024-02-03T13:31:47","Uptime":"0T00:29:48","UptimeSec":1788,"Heap":23,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"HSMHS8","BSSId":"68:FF:7B:EF:51:8C","Channel":2,"Mode":"11n","RSSI":44,"Signal":-78,"LinkCount":1,"Downtime":"0T00:00:04"}}}
Console output here:
13:35:08.382 MQT: tasmota/tele/tasmota_158777/STATE = {"Time":"2024-02-03T13:35:08","Uptime":"0T00:33:09","UptimeSec":1989,"Heap":23,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"HSMHS8","BSSId":"68:FF:7B:EF:51:8C","Channel":2,"Mode":"11n","RSSI":40,"Signal":-80,"LinkCount":1,"Downtime":"0T00:00:04"}}
13:35:08.393 MQT: tasmota/tele/tasmota_158777/SENSOR = {"Time":"2024-02-03T13:35:08","ENERGY":{"TotalStartTime":"2024-01-03T15:23:55","Total":105.748,"Yesterday":13.898,"Today":4.810,"Period":49,"Power":2315,"ApparentPower":2315,"ReactivePower":0,"Factor":1.00,"Voltage":236,"Current":9.830}}
13:35:09.200 HLW: EPC 1734, CFlen 573 usec
13:35:10.201 HLW: EPC 1735, CFlen 573 usec
13:35:11.200 HLW: EPC 1733, CFlen 574 usec
13:35:12.200 HLW: EPC 1733, CFlen 578 usec
13:35:13.200 HLW: EPC 1734, CFlen 577 usec
13:35:14.200 HLW: EPC 1734, CFlen 574 usec
13:35:15.200 HLW: EPC 1734, CFlen 577 usec
13:35:16.200 HLW: EPC 1734, CFlen 578 usec
13:35:17.200 HLW: EPC 1734, CFlen 578 usec
13:35:18.200 HLW: EPC 1734, CFlen 573 usec
13:35:19.200 HLW: EPC 1734, CFlen 574 usec
13:35:20.200 HLW: EPC 1735, CFlen 578 usec
13:35:21.200 HLW: EPC 1733, CFlen 574 usec
13:35:22.200 HLW: EPC 1735, CFlen 578 usec
13:35:22.783 WIF: Checking connection...
13:35:23.200 HLW: EPC 1734, CFlen 574 usec
13:35:24.200 HLW: EPC 1734, CFlen 573 usec
13:35:25.201 HLW: EPC 1735, CFlen 574 usec
13:35:26.200 HLW: EPC 1733, CFlen 584 usec
13:35:27.200 HLW: EPC 1734, CFlen 573 usec
13:35:28.200 HLW: EPC 1734, CFlen 573 usec
13:35:29.200 HLW: EPC 1734, CFlen 578 usec
13:35:30.200 HLW: EPC 1735, CFlen 578 usec
13:35:31.200 HLW: EPC 1734, CFlen 573 usec
13:35:32.200 HLW: EPC 1735, CFlen 577 usec
13:35:33.200 HLW: EPC 1734, CFlen 578 usec
13:35:34.200 HLW: EPC 1734, CFlen 578 usec
13:35:35.200 HLW: EPC 1735, CFlen 578 usec
13:35:36.201 HLW: EPC 1735, CFlen 578 usec
13:35:37.200 HLW: EPC 1734, CFlen 578 usec
13:35:38.200 HLW: EPC 1734, CFlen 573 usec
13:35:39.200 HLW: EPC 1735, CFlen 578 usec
13:35:40.200 HLW: EPC 1734, CFlen 574 usec
13:35:41.199 HLW: EPC 1734, CFlen 573 usec
13:35:42.200 HLW: EPC 1734, CFlen 578 usec
13:35:42.812 WIF: Checking connection...
13:35:43.200 HLW: EPC 1735, CFlen 574 usec
13:35:44.200 HLW: EPC 1734, CFlen 578 usec
13:35:45.200 HLW: EPC 1735, CFlen 578 usec
13:35:46.200 HLW: EPC 1734, CFlen 574 usec
13:35:47.200 HLW: EPC 1734, CFlen 574 usec
13:35:48.200 HLW: EPC 1735, CFlen 578 usec
13:35:49.200 HLW: EPC 1734, CFlen 578 usec
13:35:50.200 HLW: EPC 1734, CFlen 573 usec
13:35:51.200 HLW: EPC 1735, CFlen 570 usec
13:35:52.200 HLW: EPC 1735, CFlen 574 usec
13:35:53.200 HLW: EPC 1734, CFlen 574 usec
13:35:54.200 HLW: EPC 1735, CFlen 573 usec
13:35:55.200 HLW: EPC 1733, CFlen 573 usec
13:35:56.200 HLW: EPC 1734, CFlen 573 usec
13:35:57.200 HLW: EPC 1734, CFlen 578 usec
13:35:58.200 HLW: EPC 1734, CFlen 571 usec
13:35:59.200 HLW: EPC 1735, CFlen 580 usec
13:35:59.374 WIF: Sending Gratuitous ARP
13:36:00.200 HLW: EPC 1735, CFlen 573 usec
13:36:01.200 HLW: EPC 1733, CFlen 577 usec
13:36:02.200 HLW: EPC 1734, CFlen 578 usec
13:36:02.754 WIF: Checking connection...
13:36:03.201 HLW: EPC 1736, CFlen 578 usec
13:36:04.200 HLW: EPC 1731, CFlen 574 usec
13:36:05.200 HLW: EPC 1734, CFlen 573 usec
13:36:06.200 HLW: EPC 1733, CFlen 577 usec
13:36:07.200 HLW: EPC 1733, CFlen 573 usec
13:36:08.200 HLW: EPC 1733, CFlen 578 usec
13:36:08.410 MQT: tasmota/tele/tasmota_158777/STATE = {"Time":"2024-02-03T13:36:08","Uptime":"0T00:34:09","UptimeSec":2049,"Heap":23,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"HSMHS8","BSSId":"68:FF:7B:EF:51:8C","Channel":2,"Mode":"11n","RSSI":42,"Signal":-79,"LinkCount":1,"Downtime":"0T00:00:04"}}
13:36:08.425 MQT: tasmota/tele/tasmota_158777/SENSOR = {"Time":"2024-02-03T13:36:08","ENERGY":{"TotalStartTime":"2024-01-03T15:23:55","Total":105.797,"Yesterday":13.898,"Today":4.859,"Period":49,"Power":2323,"ApparentPower":2323,"ReactivePower":0,"Factor":1.00,"Voltage":236,"Current":9.830}}
13:36:09.200 HLW: EPC 1734, CFlen 573 usec TO REPRODUCESteps to reproduce the behavior: EXPECTED BEHAVIOURA clear and concise description of what you expected to happen. SCREENSHOTSIf applicable, add screenshots to help explain your problem. ADDITIONAL CONTEXTAdd any other context about the problem here. (Please, remember to close the issue when the problem has been addressed) |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 26 replies
-
Device needs calibration. When done it was not precise enough. |
Beta Was this translation helpful? Give feedback.
-
Calibration has influence in every value. Volt, Current and Power needs to be set and checked. Your calculation is only correct when it is a 100% resistive load. |
Beta Was this translation helpful? Give feedback.
-
Power Factor? |
Beta Was this translation helpful? Give feedback.
-
I had a look and the are of no help. Take a look at the uptime. What happens the time before? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Here's some logging data and a worksheet to show what I mean with the discrepancy between the power value and the accumulated energy value. |
Beta Was this translation helpful? Give feedback.
-
Hi Folks! I've found the same issue what H-Sachse described. I ask your advice how to solve this issue. |
Beta Was this translation helpful? Give feedback.
-
In the meantime I dived in a bit more to find a cause of the difference. What happens is that Tasmota Energy Monitoring calculates Apparent Power if it is not provided by the monitoring hardware (as is the case with Nous / HLW driver). Apparent Power is Voltage * Current. Active Power can never be more than Apparent Power (definition) so it adjusts measured Active Power to calculated Apparent Power. So logging this information:
Shows measured Active Power (=1875.3) which is also used in energy calculation. Provided Active Power to the user is 1818.25 being the result of calculation Voltage (221.9) + Current (8.194). After re-calibration both measured and calculated power are equal:
Conclusion: Perform a decent calibration using a pure resistive load like a 60W bulb (at 230V).
This will sove your issue with pure resistive loads showing lower than measured Active Power. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your investigation. In my practice i use two multimeter Before i write my issue i recalibrate some a1t and test them but i'am going to check them again. What does it mean 'dev branch'? Is it a beta firmware? (I do not forget what i promise, yesterday my wife unplug my electric heater) |
Beta Was this translation helpful? Give feedback.
-
After i re calibrate manually as before i see powerfactor 1.01 as you told 17:04:37.403 MQT: pwr_17_tele/pwr_17_155BBB/SENSOR = {"Time":"2024-08-20T17:04:37","ENERGY":{"TotalStartTime":"2024-08-15T09:41:04","Total":0.335,"Yesterday":0.000,"Today":0.059,"Power":61,"ApparentPower":61,"ReactivePower":3277,"Factor":1.00,"Voltage":237,"Current":0.256}} |
Beta Was this translation helpful? Give feedback.
-
One important note if enyone comes here with utility meter calibration problem later! DO NOT CALIBRATE IF YOU HAVE PV SYSTEM AND SUN IS SHINING !!! Your voltage will dancing (you can not catch a stabil point for calibration) and there will be more difference between your swich box (where your inverter connect to the grid) and between your electric plugs inside the house. |
Beta Was this translation helpful? Give feedback.
-
With the updated firmware and the new calibration procedure the energy values are now OK for my EV charging. |
Beta Was this translation helpful? Give feedback.
The dev branch is the development branch of Tasmota with latest and greatest features and can be found here https://ota.tasmota.com/tasmota/
Today I've added a new command allowing to calibrate a lot easier.
The new procedure is as follows:
VoltageSet <voltage read from multimeter>
PowerSet 60,230
will use the now calibrated Voltage and calculate the correct power and current calibration values even if voltage is fluctuating at the time you execute the command.That's it! No seperate
PowerSet
…