arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.04k stars 4.78k forks source link

Shelly Plus 2PM kWh not saved in eprom #18672

Closed Zounich closed 1 year ago

Zounich commented 1 year ago

I have a Shelly Plus 2PM with PCB v0.1.9 The problem is that the kWh is lost after a power on reset.

image

The Tasmota version is: 12.5.0 The following template was used: {"NAME":"Shelly Plus 2PM PCB v0.1.9","GPIO":[320,0,0,0,32,192,0,0,225,224,0,0,0,0,193,0,0,0,0,0,0,608,640,3458,0,0,0,0,0,9472,0,4736,0,0,0,0],"FLAG":0,"BASE":1}

SetOption129 1 is aktiv

Savedata is 1

Is there any parameter to change that?

Jason2866 commented 1 year ago

Please provide logs.

sfromis commented 1 year ago

Note that consumption data is not saved continuously, but only at midnight, or when settings are saved for other reasons.

Jason2866 commented 1 year ago

Closing, no feedback

Zounich commented 1 year ago

Please excuse the delay here are the login data:

06:37:44.081 MQT: tele/Poolpumpe/SENSOR = {"Time":"2023-05-18T06:37:44","Switch1":"OFF","Switch2":"OFF","ANALOG":{"Temperature1":24.8},"ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":[0.042,0.000],"Yesterday":[0.042,0.000],"Today":[0.000,0.000],"Period":[0,0],"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":50,"Voltage":241,"Current":[0.000,0.000]},"TempUnit":"C"} 06:37:57.263 HTP: Console 06:39:36.289 HTP: Consoles 06:39:42.386 HTP: Manage File system 06:39:47.499 HTP: Consoles 06:39:49.038 HTP: Main Menu 06:40:02.091 HTP: Configuration 06:40:12.609 HTP: Configure Logging 06:40:41.605 HTP: Configuration 06:40:46.411 HTP: Main Menu 06:40:49.605 HTP: Consoles 06:40:50.996 HTP: Console 06:42:44.101 MQT: tele/Poolpumpe/STATE = {"Time":"2023-05-18T06:42:44","Uptime":"0T09:30:10","UptimeSec":34210,"Heap":167,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":20,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":45},"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"Draft","BSSId":"24:5A:4C:A7:FB:D2","Channel":1,"Mode":"11n","RSSI":94,"Signal":-53,"LinkCount":1,"Downtime":"0T00:00:03"}} 06:42:44.114 MQT: tele/Poolpumpe/SENSOR = {"Time":"2023-05-18T06:42:44","Switch1":"OFF","Switch2":"OFF","ANALOG":{"Temperature1":25.3},"ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":[0.042,0.000],"Yesterday":[0.042,0.000],"Today":[0.000,0.000],"Period":[0,0],"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":50,"Voltage":242,"Current":[0.000,0.000]},"TempUnit":"C"} 06:44:35.602 WIF: Network (re)scan started... 06:44:42.571 WIF: Network 0, AP1, SSId Draft, Channel 11, BSSId 50:E6:36:91:67:85, RSSI -50, Encryption 1 06:44:42.572 WIF: Network 1, AP-, SSId FRITZ!Box Gastzugang, Channel 11, BSSId CA:E6:36:91:67:86, RSSI -51, Encryption 1 06:44:42.573 WIF: Network 2, AP-, SSId DraftK, Channel 1, BSSId 26:5A:4C:97:FB:D2, RSSI -54, Encryption 1 06:44:42.574 WIF: Network 3, AP1, SSId Draft, Channel 1, BSSId 24:5A:4C:A7:FB:D2, RSSI -54, Encryption 1 06:44:42.575 WIF: Network 4, AP-, SSId WLAN-8K7MLN, Channel 6, BSSId 04:A2:22:8B:D1:71, RSSI -77, Encryption 1 06:44:42.576 WIF: Network 5, AP-, SSId DraftK, Channel 1, BSSId 76:AC:B9:B1:9A:08, RSSI -80, Encryption 1 06:44:42.577 WIF: Network 6, AP1, SSId Draft, Channel 1, BSSId 74:AC:B9:B1:9A:08, RSSI -80, Encryption 1 06:47:44.094 MQT: tele/Poolpumpe/STATE = {"Time":"2023-05-18T06:47:44","Uptime":"0T09:35:10","UptimeSec":34510,"Heap":170,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":45},"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"Draft","BSSId":"24:5A:4C:A7:FB:D2","Channel":1,"Mode":"11n","RSSI":94,"Signal":-53,"LinkCount":1,"Downtime":"0T00:00:03"}} 06:47:44.107 MQT: tele/Poolpumpe/SENSOR = {"Time":"2023-05-18T06:47:44","Switch1":"OFF","Switch2":"OFF","ANALOG":{"Temperature1":25.0},"ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":[0.042,0.000],"Yesterday":[0.042,0.000],"Today":[0.000,0.000],"Period":[0,0],"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":50,"Voltage":240,"Current":[0.000,0.000]},"TempUnit":"C"} 06:52:44.081 MQT: tele/Poolpumpe/STATE = {"Time":"2023-05-18T06:52:44","Uptime":"0T09:40:10","UptimeSec":34810,"Heap":171,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":20,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":45},"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"Draft","BSSId":"24:5A:4C:A7:FB:D2","Channel":1,"Mode":"11n","RSSI":92,"Signal":-54,"LinkCount":1,"Downtime":"0T00:00:03"}} 06:52:44.093 MQT: tele/Poolpumpe/SENSOR = {"Time":"2023-05-18T06:52:44","Switch1":"OFF","Switch2":"OFF","ANALOG":{"Temperature1":24.9},"ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":[0.042,0.000],"Yesterday":[0.042,0.000],"Today":[0.000,0.000],"Period":[0,0],"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":50,"Voltage":241,"Current":[0.000,0.000]},"TempUnit":"C"} 06:57:44.073 MQT: tele/Poolpumpe/STATE = {"Time":"2023-05-18T06:57:44","Uptime":"0T09:45:10","UptimeSec":35110,"Heap":171,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":45},"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"Draft","BSSId":"24:5A:4C:A7:FB:D2","Channel":1,"Mode":"11n","RSSI":94,"Signal":-53,"LinkCount":1,"Downtime":"0T00:00:03"}} 06:57:44.086 MQT: tele/Poolpumpe/SENSOR = {"Time":"2023-05-18T06:57:44","Switch1":"OFF","Switch2":"OFF","ANALOG":{"Temperature1":24.5},"ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":[0.042,0.000],"Yesterday":[0.042,0.000],"Today":[0.000,0.000],"Period":[0,0],"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":50,"Voltage":240,"Current":[0.000,0.000]},"TempUnit":"C"} 07:02:44.073 MQT: tele/Poolpumpe/STATE = {"Time":"2023-05-18T07:02:44","Uptime":"0T09:50:10","UptimeSec":35410,"Heap":171,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":45},"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"Draft","BSSId":"24:5A:4C:A7:FB:D2","Channel":1,"Mode":"11n","RSSI":94,"Signal":-53,"LinkCount":1,"Downtime":"0T00:00:03"}} 07:02:44.086 MQT: tele/Poolpumpe/SENSOR = {"Time":"2023-05-18T07:02:44","Switch1":"OFF","Switch2":"OFF","ANALOG":{"Temperature1":24.8},"ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":[0.042,0.000],"Yesterday":[0.042,0.000],"Today":[0.000,0.000],"Period":[0,0],"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":50,"Voltage":240,"Current":[0.000,0.000]},"TempUnit":"C"} 07:03:39.088 HTP: Main Menu 07:03:48.567 HTP: Main Menu 07:03:51.081 HTP: Consoles 07:03:52.920 HTP: Main Menu 07:03:55.391 HTP: Consoles 07:03:57.837 HTP: Console

00:00:00.002 HDW: ESP32-U4WDH-D 00:00:00.020 UFS: FlashFS mounted with 304 kB free 00:00:00.036 CFG: Loaded from File, Count 56 00:00:00.042 QPC: Count 1 00:00:00.043 CFG: CR 424/699, Busy 0 00:00:00.053 CFG: CR 424/699, Busy 0 00:00:00.058 TFS: File 'mcp23x.dat' not found 00:00:00.059 MCP: Invalid template 00:00:00.065 ROT: Mode 1 00:00:00.160 BRY: Berry initialized, RAM used=4074 bytes 00:00:00.190 BRY: No 'preinit.be' 00:00:00.205 CFG: Energy loaded from file 00:00:00.307 I2C: ADE7953 found at 0x38 00:00:00.311 TFS: File 'calib.dat' not found 00:00:00.312 NRG: Init driver 7 00:00:00.314 SRC: Restart 00:00:00.321 Project tasmota - Pool Version 12.5.0(solo1)-2_0_7(2023-04-17T08:07:06) 00:00:00.323 ETH: No ETH MDC and/or ETH MDIO GPIO defined 00:00:00.335 SHT: Sensor did not ACK command 00:00:00.469 BRY: No 'autoexec.be' 00:00:00.562 WIF: Attempting connection... 00:00:00.000 WIF: Connecting to AP1 Draft Channel 1 BSSId 24:5A:4C:A7:FB:D2 in mode 11n as Poolpumpe-3004... 00:00:01.059 WIF: IPv4 192.168.38.69, mask 255.255.255.0, gateway 192.168.38.1 00:00:02.505 WIF: Connected 00:00:02.761 HTP: Web server active on Poolpumpe-3004 with IP address 192.168.38.69 00:00:03.014 WIF: DNS resolved '2.pool.ntp.org' (129.70.132.34) in 61 ms 00:00:03.040 RTC: UTC 2023-05-18T06:05:25, DST 2023-03-26T02:00:00, STD 2023-10-29T03:00:00 07:05:25.000 RTC: Synced by NTP 07:05:25.706 MQT: Attempting connection... 07:05:25.708 WIF: DNS resolved '192.168.38.152' (192.168.38.152) in 0 ms 07:05:25.779 WIF: IPv6 Local xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 07:05:25.900 MQT: Connected 07:05:25.910 MQT: tele/Poolpumpe/LWT = Online (retained) 07:05:25.919 MQT: cmnd/Poolpumpe/POWER = 07:05:25.921 MQT: Subscribe to cmnd/Poolpumpe/# 07:05:25.928 MQT: Subscribe to cmnd/tasmotas/# 07:05:25.935 MQT: Subscribe to cmnd/DVES_8E4BBC_fb/# 07:05:25.948 MQT: tele/Poolpumpe/INFO1 = {"Info1":{"Module":"Shelly Plus 2PM PCB v0.1.9","Version":"12.5.0(solo1)single-core","FallbackTopic":"cmnd/DVES_8E4BBC_fb/","GroupTopic":"cmnd/tasmotas/"}} 07:05:26.006 MQT: tele/Poolpumpe/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"Poolpumpe-3004","IPAddress":"192.168.38.69","IP6Global":"","IP6Local":"fe80::c249:efff:fe8e:4bbc"}} 07:05:26.020 MQT: tele/Poolpumpe/INFO3 = {"Info3":{"RestartReason":"Vbat power on reset","BootCount":17}} 07:05:26.047 MQT: stat/Poolpumpe/RESULT = {"POWER1":"ON"} 07:05:26.059 MQT: stat/Poolpumpe/POWER1 = ON 07:05:26.074 MQT: stat/Poolpumpe/RESULT = {"POWER2":"ON"} 07:05:26.086 MQT: stat/Poolpumpe/POWER2 = ON 07:05:26.094 TFS: File 'autoexec.bat' not found 07:05:27.280 SRC: MQTT 07:05:27.282 CMD: Grp 0, Cmd 'STATUS', Idx 1, Len 1, Pld 1, Data '1' 07:05:27.297 MQT: stat/Poolpumpe/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota32/release/tasmota32solo1.bin","RestartReason":"Vbat power on reset","Uptime":"0T00:00:06","StartupUTC":"2023-05-18T06:05:21","Sleep":50,"CfgHolder":4617,"BootCount":16,"BCResetTime":"2023-05-04T21:31:23","SaveCount":56}} 07:05:27.352 SRC: MQTT 07:05:27.353 CMD: Grp 0, Cmd 'STATUS', Idx 1, Len 2, Pld 11, Data '11' 07:05:27.371 MQT: stat/Poolpumpe/STATUS11 = {"StatusSTS":{"Time":"2023-05-18T07:05:27","Uptime":"0T00:00:06","UptimeSec":6,"Heap":173,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":40,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":45},"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"Draft","BSSId":"24:5A:4C:A7:FB:D2","Channel":1,"Mode":"11n","RSSI":92,"Signal":-54,"LinkCount":1,"Downtime":"0T00:00:03"}}} 07:05:27.414 SRC: MQTT 07:05:27.416 CMD: Grp 0, Cmd 'STATE', Idx 1, Len 0, Pld -99, Data '' 07:05:27.427 MQT: stat/Poolpumpe/RESULT = {"Time":"2023-05-18T07:05:27","Uptime":"0T00:00:06","UptimeSec":6,"Heap":175,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":44,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":45},"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"Draft","BSSId":"24:5A:4C:A7:FB:D2","Channel":1,"Mode":"11n","RSSI":92,"Signal":-54,"LinkCount":1,"Downtime":"0T00:00:03"}} 07:05:27.484 SRC: MQTT 07:05:27.486 CMD: Grp 0, Cmd 'STATUS', Idx 1, Len 2, Pld 10, Data '10' 07:05:27.505 MQT: stat/Poolpumpe/STATUS10 = {"StatusSNS":{"Time":"2023-05-18T07:05:27","Switch1":"OFF","Switch2":"OFF","ANALOG":{"Temperature1":23.8},"ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":[0.042,0.000],"Yesterday":[0.042,0.000],"Today":[0.000,0.000],"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":50,"Voltage":239,"Current":[0.000,0.000]},"TempUnit":"C"}} 07:05:28.970 QPC: Reset 07:05:30.008 MQT: tele/Poolpumpe/STATE = {"Time":"2023-05-18T07:05:29","Uptime":"0T00:00:08","UptimeSec":8,"Heap":173,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":32,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":45},"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"Draft","BSSId":"24:5A:4C:A7:FB:D2","Channel":1,"Mode":"11n","RSSI":92,"Signal":-54,"LinkCount":1,"Downtime":"0T00:00:03"}} 07:05:30.058 MQT: tele/Poolpumpe/SENSOR = {"Time":"2023-05-18T07:05:30","Switch1":"OFF","Switch2":"OFF","ANALOG":{"Temperature1":23.9},"ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":[0.042,0.000],"Yesterday":[0.042,0.000],"Today":[0.000,0.000],"Period":[0,0],"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":50,"Voltage":240,"Current":[0.000,0.000]},"TempUnit":"C"} 07:05:30.970 APP: Boot Count 17 07:05:31.414 CFG: Saved, Count 57, Bytes 4096 07:10:29.994 MQT: tele/Poolpumpe/STATE = {"Time":"2023-05-18T07:10:29","Uptime":"0T00:05:08","UptimeSec":308,"Heap":168,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":45},"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"Draft","BSSId":"24:5A:4C:A7:FB:D2","Channel":1,"Mode":"11n","RSSI":92,"Signal":-54,"LinkCount":1,"Downtime":"0T00:00:03"}} 07:10:30.049 MQT: tele/Poolpumpe/SENSOR = {"Time":"2023-05-18T07:10:30","Switch1":"OFF","Switch2":"OFF","ANALOG":{"Temperature1":25.1},"ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":[0.042,0.000],"Yesterday":[0.042,0.000],"Today":[0.000,0.000],"Period":[0,0],"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":50,"Voltage":240,"Current":[0.000,0.000]},"TempUnit":"C"}

It is really the case that the consumption data is only saved at night. It's the same with my Plug S. I just never noticed. I can live with that. Are you still finding problems in the log?

Jason2866 commented 1 year ago

With the command restart 2 you can shutdown the esp correctly. In this state it can be powered off. Settings are saved. After applying power again all values should be there.