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
21.98k stars 4.77k forks source link

Support for SONOFF Smart Power Meter Switch | POW Elite #15856

Closed nobodyman1 closed 2 years ago

nobodyman1 commented 2 years ago

PROBLEM DESCRIPTION

Is it possible to use Tasmota on the new SONOFF POW Elite? I found some Pictures here. It´s based on an ESP32 and the power measuring is done with a CSE7759B (same as used in SONOFF POW R2). But what´s about the LCD driver?

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

Montreal666 commented 1 year ago

Ok after soldering the serial wires (vs dupont connectors) and a number of retries with NodeMCU-PYflasher, ESPFlasher and Web uploader, I was finally able to reflash Tasmota32, phew. had to redo that "/!%/" microscopic jumper soldering. done and restarted fine. Now I need to find a RJ10 connector to test GPIO25-26. fingers crossed.

Montreal666 commented 1 year ago

@Longlife4ever @arendst or anyone else, would you mind confirming if my modification below (Sonoff THR320D - soldering tin dot between the two poles of R16) should provide access to GPIO26 or if other hardware/software changes are required?

Unit works well with the modification but still no access to GPIO26 (configured switch on GPIO26 but shorting it to ground returns nothing - same goes for DS18B20 when switching data line from GPIO25 (works) to GPIO26 (doesn't work) )

Quite possible that my micro soldering skills are deficient or I'm missing something.

Thanks

Screenshot_20230723_111524_Chrome

dl7jp commented 1 year ago

Hi, I am struggling w/ a THR316D, I just can't get the DS18B20 values being displayed in the LCD or the Web-Interface. I exchanged the DS18B20, same problem. The 1-wire bus seems to be queried, at least I see triggers on a scope. Configuration is done via Auto-configuration, here's the console output - any suggestions?

00:00:00.002 HDW: ESP32-D0WD-V3 00:00:00.067 UFS: FlashFS mounted with 304 kB free 00:00:00.094 CFG: Loaded from File, Count 114 00:00:00.104 QPC: Count 1 00:00:00.106 CFG: CR 389/699, Busy 0 00:00:00.126 ROT: Mode 1 00:00:00.134 BRY: GC from 3665 to 3465 bytes, objects freed 4/20 (in 0 ms) - slots from 35/61 to 27/61 00:00:00.303 BRY: GC from 5881 to 4451 bytes, objects freed 6/41 (in 1 ms) - slots from 63/91 to 41/91 00:00:00.303 BRY: Berry initialized, RAM used=4451 bytes 00:00:00.359 BRY: No 'preinit.be' 00:00:00.365 TFS: File '.drvset003' not found 00:00:00.366 CFG: Energy use defaults as file system not ready or file not found 00:00:00.369 SRC: Restart 00:00:00.375 Project tasmota - Tasmota Version 13.0.0(tasmota32)-2_0_10(2023-06-26T10:54:38) 00:00:00.376 ETH: No ETH MDC and/or ETH MDIO GPIO defined 00:00:00.418 CFG: XDRV87 loaded from file 00:00:00.419 DSP: TM1621 00:00:00.421 DSB: Sensors found 0 00:00:00.709 BRY: No 'autoexec.be' 00:00:00.980 WIF: Checking connection... 00:00:00.981 WIF: Attempting connection... 00:00:01.336 WIF: Connecting to AP1 Rennweg-IoT Channel 6 BSSId 28:B3:71:65:2C:73 in mode 11n as tasmota-E77DC0-7616... 00:00:01.156 WIF: Checking connection... 00:00:01.157 WIF: Attempting connection... 00:00:02.552 WIF: Checking connection... 00:00:02.553 WIF: Attempting connection... 00:00:03.049 WIF: IPv4 10.21.250.37, mask 255.255.255.0, gateway 10.21.250.1 00:00:04.125 WIF: Checking connection... 00:00:04.126 WIF: Connected 00:00:04.387 HTP: Web server active on tasmota-E77DC0-7616 with IP address 10.21.250.37 00:00:04.890 NTP: Sync time... 00:00:05.036 WIF: DNS resolved '2.pool.ntp.org' (81.169.224.6) in 145 ms 00:00:05.072 RTC: UTC 2023-08-13T13:03:23, DST 2023-03-26T02:00:00, STD 2023-10-29T03:00:00 14:03:23.000 RTC: Synced by NTP 14:03:23.104 WIF: IPv6 Local fe80::caf0:9eff:fee7:7dc0 14:03:23.319 RSL: INFO1 = {"Info1":{"Module":"Sonoff THR316D","Version":"13.0.0(tasmota32)","FallbackTopic":"cmnd/DVES_E77DC0_fb/","GroupTopic":"cmnd/tasmotas/"}} 14:03:23.333 RSL: INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-E77DC0-7616","IPAddress":"10.21.250.37","IP6Global":"","IP6Local":"fe80::caf0:9eff:fee7:7dc0"}} 14:03:23.346 RSL: INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":36}} 14:03:23.349 RSL: RESULT = {"POWER1":"OFF"} 14:03:23.360 RSL: POWER1 = OFF 14:03:23.362 RSL: RESULT = {"POWER2":"OFF"} 14:03:23.363 RSL: POWER2 = OFF 14:03:23.371 TFS: File 'autoexec.bat' not found 14:03:24.882 QPC: Reset 14:03:26.901 APP: Boot Count 36 14:03:27.149 HTP: Main Menu 14:03:28.077 CFG: Saved, Count 115, Bytes 4096 14:03:28.084 BRY: GC from 6533 to 4284 bytes, objects freed 25/47 (in 1 ms) - slots from 89/122 to 49/122 14:03:28.089 RSL: STATE = {"Time":"2023-08-13T14:03:28","Uptime":"0T00:00:11","UptimeSec":11,"Heap":120,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":31,"MqttCount":0,"Berry":{"HeapUsed":4,"Objects":47},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Rennweg-IoT","BSSId":"28:B3:71:65:2C:73","Channel":6,"Mode":"11n","RSSI":76,"Signal":-62,"LinkCount":1,"Downtime":"0T00:00:05"}} 14:03:32.898 RSL: config = {"ip":"10.21.250.37","dn":"Tasmota","fn":["Tasmota","",null,null,null,null,null,null],"hn":"tasmota-E77DC0-7616","mac":"C8F09EE77DC0","md":"Sonoff THR316D","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"13.0.0","t":"tasmota_E77DC0","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,1,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,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"btn":[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,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"sho":[],"sht":[],"ver":1} 14:03:32.903 RSL: sensors = {"sn":{"Time":"2023-08-13T14:03:32"},"ver":1} 14:03:42.449 WIF: Checking connection... 14:03:58.594 HTP: Consoles 14:03:59.622 HTP: Console

Untitled

pmknowles commented 1 year ago

What GPIO did you use?. Do you have a pullup resistor?

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: dl7jp @.> Sent: Sunday, August 13, 2023 2:06:42 PM To: arendst/Tasmota @.> Cc: pmknowles @.>; Comment @.> Subject: Re: [arendst/Tasmota] Support for SONOFF Smart Power Meter Switch | POW Elite (Issue #15856)

Hi, I am struggling w/ a THR316D, I just can't get the DS18B20 values being displayed in the LCD. I exchanged the DS18B20, same problem. The 1-wire bus seems to be queried, at least I see triggers on a scope. Configuration is done via Auto-configuration, here's the console output - any suggestions?

00:00:00.002 HDW: ESP32-D0WD-V3 00:00:00.067 UFS: FlashFS mounted with 304 kB free 00:00:00.094 CFG: Loaded from File, Count 114 00:00:00.104 QPC: Count 1 00:00:00.106 CFG: CR 389/699, Busy 0 00:00:00.126 ROT: Mode 1 00:00:00.134 BRY: GC from 3665 to 3465 bytes, objects freed 4/20 (in 0 ms) - slots from 35/61 to 27/61 00:00:00.303 BRY: GC from 5881 to 4451 bytes, objects freed 6/41 (in 1 ms) - slots from 63/91 to 41/91 00:00:00.303 BRY: Berry initialized, RAM used=4451 bytes 00:00:00.359 BRY: No 'preinit.be' 00:00:00.365 TFS: File '.drvset003' not found 00:00:00.366 CFG: Energy use defaults as file system not ready or file not found 00:00:00.369 SRC: Restart 00:00:00.375 Project tasmota - Tasmota Version 13.0.0(tasmota32)-2_0_10(2023-06-26T10:54:38) 00:00:00.376 ETH: No ETH MDC and/or ETH MDIO GPIO defined 00:00:00.418 CFG: XDRV87 loaded from file 00:00:00.419 DSP: TM1621 00:00:00.421 DSB: Sensors found 0 00:00:00.709 BRY: No 'autoexec.be' 00:00:00.980 WIF: Checking connection... 00:00:00.981 WIF: Attempting connection... 00:00:01.336 WIF: Connecting to AP1 Rennweg-IoT Channel 6 BSSId 28:B3:71:65:2C:73 in mode 11n as tasmota-E77DC0-7616... 00:00:01.156 WIF: Checking connection... 00:00:01.157 WIF: Attempting connection... 00:00:02.552 WIF: Checking connection... 00:00:02.553 WIF: Attempting connection... 00:00:03.049 WIF: IPv4 10.21.250.37, mask 255.255.255.0, gateway 10.21.250.1 00:00:04.125 WIF: Checking connection... 00:00:04.126 WIF: Connected 00:00:04.387 HTP: Web server active on tasmota-E77DC0-7616 with IP address 10.21.250.37 00:00:04.890 NTP: Sync time... 00:00:05.036 WIF: DNS resolved '2.pool.ntp.org' (81.169.224.6) in 145 ms 00:00:05.072 RTC: UTC 2023-08-13T13:03:23, DST 2023-03-26T02:00:00, STD 2023-10-29T03:00:00 14:03:23.000 RTC: Synced by NTP 14:03:23.104 WIF: IPv6 Local fe80::caf0:9eff:fee7:7dc0 14:03:23.319 RSL: INFO1 = {"Info1":{"Module":"Sonoff THR316D","Version":"13.0.0(tasmota32)","FallbackTopic":"cmnd/DVES_E77DC0_fb/","GroupTopic":"cmnd/tasmotas/"}} 14:03:23.333 RSL: INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-E77DC0-7616","IPAddress":"10.21.250.37","IP6Global":"","IP6Local":"fe80::caf0:9eff:fee7:7dc0"}} 14:03:23.346 RSL: INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":36}} 14:03:23.349 RSL: RESULT = {"POWER1":"OFF"} 14:03:23.360 RSL: POWER1 = OFF 14:03:23.362 RSL: RESULT = {"POWER2":"OFF"} 14:03:23.363 RSL: POWER2 = OFF 14:03:23.371 TFS: File 'autoexec.bat' not found 14:03:24.882 QPC: Reset 14:03:26.901 APP: Boot Count 36 14:03:27.149 HTP: Main Menu 14:03:28.077 CFG: Saved, Count 115, Bytes 4096 14:03:28.084 BRY: GC from 6533 to 4284 bytes, objects freed 25/47 (in 1 ms) - slots from 89/122 to 49/122 14:03:28.089 RSL: STATE = {"Time":"2023-08-13T14:03:28","Uptime":"0T00:00:11","UptimeSec":11,"Heap":120,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":31,"MqttCount":0,"Berry":{"HeapUsed":4,"Objects":47},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Rennweg-IoT","BSSId":"28:B3:71:65:2C:73","Channel":6,"Mode":"11n","RSSI":76,"Signal":-62,"LinkCount":1,"Downtime":"0T00:00:05"}} 14:03:32.898 RSL: config = {"ip":"10.21.250.37","dn":"Tasmota","fn":["Tasmota","",null,null,null,null,null,null],"hn":"tasmota-E77DC0-7616","mac":"C8F09EE77DC0","md":"Sonoff THR316D","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"13.0.0","t":"tasmota_E77DC0","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,1,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,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"btn":[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,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"sho":[],"sht":[],"ver":1} 14:03:32.903 RSL: sensors = {"sn":{"Time":"2023-08-13T14:03:32"},"ver":1} 14:03:42.449 WIF: Checking connection... 14:03:58.594 HTP: Consoles 14:03:59.622 HTP: Console

[Untitled]https://user-images.githubusercontent.com/38257972/260304586-46af98bb-b807-4ea6-9ec9-decd08c67e1b.jpg

— Reply to this email directly, view it on GitHubhttps://github.com/arendst/Tasmota/issues/15856#issuecomment-1676355098, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI5KPM7PLH6ZFVDTV7MJFZLXVDGOFANCNFSM5ZVP735A. You are receiving this because you commented.Message ID: @.***>

dl7jp commented 1 year ago

I tried both SetOption74 and an external 4.7k pull-up R, but no luck. I do measure 3V at the middle pin. Here's the GPIO:

Untitled

pmknowles commented 1 year ago

I‘d try the setup on the Blakadder page with Generic rather than using the preset. Sonoff TH Origin 16A Switch Module (THR316) Configuration for Tasmota (blakadder.com)https://templates.blakadder.com/sonoff_THR316.html

There’s also an issue which, in the commentary has GPIO25 being internally connected Support for SONOFF Smart Power Meter Switch | POW Elite · Issue #15856 · arendst/Tasmota · GitHubhttps://github.com/arendst/Tasmota/issues/15856

Regards,

Phil

From: @.> Sent: 13 August 2023 14:28 To: @.> Cc: @.>; @.> Subject: Re: [arendst/Tasmota] Support for SONOFF Smart Power Meter Switch | POW Elite (Issue #15856)

I tried both SetOption74 and an external 4.7k pull-up R, but no luck. I do measure 3V at the middle pin. Here's the GPIO:

[Untitled]https://user-images.githubusercontent.com/38257972/260305881-38b6d4b9-e1c0-4c14-ad3e-840dd42fd63e.jpg

— Reply to this email directly, view it on GitHubhttps://github.com/arendst/Tasmota/issues/15856#issuecomment-1676361076, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI5KPMYXHL2UP4HKGUGCLJ3XVDJBBANCNFSM5ZVP735A. You are receiving this because you commented.Message ID: @.***>

dl7jp commented 1 year ago

Thanks for your hints! I did read through all posts here and experimented with other templates, but no luck. Strangely, the boot log says "00:00:00.601 DSB: Sensors found 0", but I see communication over the 1-wire line. I tried 3 different sensors, and the wire connecting is also just 1m lo IMAGE 2023-08-13 17:06:52 ng - I am out of ideas.

pmknowles commented 1 year ago

Because it's not appearing in the UI the ESP32 isn't seeing the sensor. If it sees the sensor and has comms issues it shows an improbable temperature so it's most likely a wiring or GPIO issue. 25 is used according to the Issue responses.

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: dl7jp @.> Sent: Sunday, August 13, 2023 4:07:45 PM To: arendst/Tasmota @.> Cc: pmknowles @.>; Comment @.> Subject: Re: [arendst/Tasmota] Support for SONOFF Smart Power Meter Switch | POW Elite (Issue #15856)

Thanks for your hints! I did read through all posts here and experimented with other templates, but no luck. Strangely, the boot log says "00:00:00.601 DSB: Sensors found 0", but I see communication over the 1-wire line. I tried 3 different sensors, and the wire connecting is also just 1m lo [IMAGE 2023-08-13 17:06:52]https://user-images.githubusercontent.com/38257972/260311066-79caade3-9b64-4da7-85f3-88267d64439c.jpg ng - I am out of ideas.

— Reply to this email directly, view it on GitHubhttps://github.com/arendst/Tasmota/issues/15856#issuecomment-1676387437, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI5KPM7JF4WSWM4FCZPKGJLXVDUUDANCNFSM5ZVP735A. You are receiving this because you commented.Message ID: @.***>

dl7jp commented 1 year ago

Wiring should be OK, I can't see what else to try. Is any other GPIO port free? I tried with 2, but this did not work either.

pmknowles commented 1 year ago

2 is connected to the onboard LED.

ESP32 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorialshttps://randomnerdtutorials.com/esp32-pinout-reference-gpios/

Regards,

Phil

From: @.> Sent: 13 August 2023 16:37 To: @.> Cc: @.>; @.> Subject: Re: [arendst/Tasmota] Support for SONOFF Smart Power Meter Switch | POW Elite (Issue #15856)

Is any other GPIO port free? I tried with 2, but this did not work either.

— Reply to this email directly, view it on GitHubhttps://github.com/arendst/Tasmota/issues/15856#issuecomment-1676394423, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI5KPM53ZPLEXXOL66K6CJTXVDYB7ANCNFSM5ZVP735A. You are receiving this because you commented.Message ID: @.***>

sfromis commented 1 year ago

Are you using the standard Sonoff-designed probe and cable? If not, exactly what do you do of wiring?

dl7jp commented 1 year ago

I tried with the Sonoff one, and also soldered my own one with a spare sensor. External wiring is definitely not the problem. There seems to be an issue with using GPIO25.

PS: I also tried to short circuit R16 and use GPIO 26 as suggested above, but no success.

dl7jp commented 1 year ago

Meanwhile I connected the DS18B20 incl. wiring to Sonoff Basic, works like a charm. I am coming to the conclusion that the THR316D came broken from Aliexpress...

arendst commented 1 year ago

Pls provide a picture of your DS18x20 connection to the Sonoff THR316D to rule out connection errors

dl7jp commented 1 year ago

I use the modular plug, as delivered with the device.

dl7jp commented 1 year ago

Then I replaced the Sensor to rule out that it is broken. Lastly, I connected the sensor to another modular plug to make sure the wire itself is not damaged.

1 2

arendst commented 1 year ago

Looks fine although I usually use a resistor of 4k7 between power and signal at the DS18x20. You did measure the cable for a broken wire/miss connection at connector end?

dl7jp commented 1 year ago

Looks fine although I usually use a resistor of 4k7 between power and signal at the DS18x20. You did measure the cable for a broken wire/miss connection at connector end?

I also tried with a pull-up R,no change. The Scope-Picture 9 posts above is directly from the legs of the Sensor. Electrically all seems OK.

sfromis commented 1 year ago

I just verified that my Sonoff THR316D still works with the original DS18B20 probe connected, on current Tasmota. Just plugged in without adding a pullup resistor or whatever.

dl7jp commented 1 year ago

Thanks for all responses! I don't see any options other than considering it as a broken device.

Montreal666 commented 1 year ago

Other than @arendst, anyone else was successful at shorting R16 to gain access to GPIO26? Just wondering if It's worth ordering a new unit to try again as my first attempt (below) was unsuccessful. Or am I doing this the wrong way? Thx for your input.

255402371-b1278bd7-4895-45ed-834d-87b77bbfd92e

dl7jp commented 1 year ago

Thanks for all responses! I don't see any options other than considering it as a broken device.

I am still curious and consutled https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf: The data line of the sensor is connected over 47 Ohm (R14) to the correct GPIO25 pin (14) of the ESP32 chip. GND is also OK, and the Sensor is powered properly. I just can't figure what could possibly be wrong...

As to GPIO26: I would use a 47 Ohm resistor rather than short circuit R16 (as with GPIO25).

Montreal666 commented 1 year ago

Thank you, since @arendst seem to have been successful without a resistor I was wondering if it was repeated successfully by others. Worst case I'll try the 47 ohm resistor and report back.

dl7jp commented 1 year ago

Thank you, since @arendst seem to have been successful without a resistor I was wondering if it was repeated successfully by others. Worst case I'll try the 47 ohm resistor and report back.

You won't need it if all is properly set up (pull-up R's, etc.); otherwise, it limits the current going through the pin and 47R won't hurt..

sfromis commented 1 year ago

Using a 47 ohm resistor would be bad, way lower than the suggestion of 4.7 kΩ (and normal operation works without)

dl7jp commented 1 year ago

Using a 47 ohm resistor would be bad, way lower than the suggestion of 4.7 kΩ (and normal operation works without)

4.7k is a standard pull-up R; the 47 R serves another purpose and is not supposed to replace the 4.7k R.

lolkop-cmd commented 1 year ago

I'm having the problem, that powr316d loses it's total values on each powerloss, reboot or update. Is there any good solution to prevent that from happening?

pmknowles commented 1 year ago

It shouldn’t on reboot but will on power loss.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: @.> Sent: 16 August 2023 10:40 To: @.> Cc: @.>; @.> Subject: Re: [arendst/Tasmota] Support for SONOFF Smart Power Meter Switch | POW Elite (Issue #15856)

I'm having the problem, that powr316d loses it's total values on each powerloss, reboot or update. Is there any good solution to prevent that from happening?

— Reply to this email directly, view it on GitHubhttps://github.com/arendst/Tasmota/issues/15856#issuecomment-1680287044, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI5KPM4HAUBEWMCAP6LPXH3XVSIQLANCNFSM5ZVP735A. You are receiving this because you commented.Message ID: @.***>

sfromis commented 1 year ago

By design, Tasmota is not writing to flash all the time, but only when saving for other reasons, including midnight or regular restarts/upgrades.

lolkop-cmd commented 1 year ago

I've just updated my 3 powr316d devices from 13.0.0 to 13.1.0 and they all had totalenergy reset to 0. If I understand you correctly, this should not happen by design. Also this does not happen to any other power monitoring tasmota device I own.

arendst commented 1 year ago

I just updated my powr320d from 12.4.0.3 to 13.1.0 without losing totalenergy:

00:00:00.003 HDW: ESP32-D0WD-V3 
00:00:00.088 UFS: FlashFS mounted with 304 kB free
00:00:00.132 CFG: Loaded from File, Count 921
00:00:00.142 QPC: Count 1
00:00:00.152 ROT: Mode 1
00:00:00.417 BRY: Berry initialized, RAM used=3883 bytes
00:00:00.495 BRY: No 'preinit.be'
00:00:00.532 CFG: Energy loaded from file
00:00:00.532 NRG: Init driver 2
00:00:00.536 SRC: Restart
00:00:00.580 Project tasmota - PowR320D3 Version 12.4.0.3(theo)-2_0_7(2023-03-17T22:10:57)
00:00:00.581 ETH: No ETH MDC and/or ETH MDIO GPIO defined
00:00:00.639 CFG: XDRV87 loaded from file
00:00:00.639 DSP: TM1621
00:00:00.008 BRY: No 'autoexec.be'
00:00:01.172 WIF: Attempting connection...
00:00:01.632 WIF: Connecting to AP1 indebuurt_IoT Channel 11 BSSId 18:E8:29:CA:17:C1 in mode 11n as powr320d3...
00:00:02.085 WIF: IPv4 192.168.2.148, mask 255.255.255.0, gateway 192.168.2.254
00:00:02.351 WIF: Connected
00:00:02.564 WIF: DNS resolved 'loghost' (192.168.2.24) in 13 ms
00:00:02.648 WIF: DNS resolved 'pool.ntp.org' (45.138.55.61) in 39 ms
00:00:03.021 RTC: UTC 2023-08-16T12:38:26, DST 2023-03-26T02:00:00, STD 2023-10-29T03:00:00
14:38:26.000 RTC: Synced by NTP
14:38:26.020 HTP: Web server active on powr320d3 with IP address 192.168.2.148
14:38:26.885 MQT: Attempting connection...
14:38:26.892 WIF: DNS resolved 'mqttbroker' (192.168.2.24) in 5 ms
14:38:26.909 MQT: Connected
14:38:26.915 MQT: tele/powr320d3/LWT = Online (retained)
14:38:26.920 MQT: cmnd/powr320d3/POWER = 
14:38:26.922 MQT: Subscribe to cmnd/powr320d3/#
14:38:26.925 MQT: Subscribe to cmnd/tasmotas/#
14:38:26.930 MQT: Subscribe to cmnd/DVES_113F84_fb/#
14:38:26.945 MQT: tele/powr320d3/INFO1 = {"Info1":{"Module":"Sonoff POWR320D","Version":"12.4.0.3(theo)","FallbackTopic":"cmnd/DVES_113F84_fb/","GroupTopic":"cmnd/tasmotas/"}}
14:38:26.960 MQT: tele/powr320d3/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"powr320d3","IPAddress":"192.168.2.148","IP6Global":"","IP6Local":"fe80::c6de:e2ff:fe11:3f84"}}
14:38:26.969 MQT: tele/powr320d3/INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":94}}
14:38:26.972 MQT: stat/powr320d3/RESULT = {"POWER":"ON"}
14:38:27.001 MQT: stat/powr320d3/POWER = ON
14:38:27.012 TFS: File 'autoexec.bat' not found
14:38:27.475 WIF: IPv6 Local fe80::c6de:e2ff:fe11:3f84
14:38:30.893 QPC: Reset
14:38:31.474 WIF: IPv6 Global fd79:962c:bf13:49d0:c6de:e2ff:fe11:3f84
14:38:31.900 MQT: tele/powr320d3/STATE = {"Time":"2023-08-16T14:38:31","Uptime":"0T00:00:08","UptimeSec":8,"Heap":163,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":42},"POWER":"ON","Wifi":{"AP":1,"SSId":"indebuurt_IoT","BSSId":"18:E8:29:CA:17:C1","Channel":11,"Mode":"11n","RSSI":100,"Signal":-29,"LinkCount":1,"Downtime":"0T00:00:02"}}
14:38:31.919 MQT: tele/powr320d3/SENSOR = {"Time":"2023-08-16T14:38:31","ENERGY":{"TotalStartTime":"2022-07-15T13:44:23","Total":2.012,"Yesterday":0.000,"Today":0.001,"Period":0.00,"Power":0.00,"ApparentPower":0.00,"ReactivePower":0.00,"Factor":0.00,"Voltage":246.6,"Current":0.000}}
14:38:32.885 APP: Boot Count 94
14:38:33.630 CFG: Saved, Count 922, Bytes 4096
14:38:55.488 CMD: otaurl
14:38:55.489 SRC: WebConsole from 192.168.2.171
14:38:55.491 CMD: Grp 0, Cmd 'OTAURL', Idx 1, Len 0, Pld -99, Data ''
14:38:55.503 MQT: stat/powr320d3/RESULT = {"OtaUrl":"https://ota.tasmota.com/tasmota32/release/tasmota32.bin"}
14:38:55.888 CMD: upload 1
.....
00:00:00.002 HDW: ESP32-D0WD-V3 
00:00:00.050 UFS: FlashFS mounted with 304 kB free
00:00:00.084 CFG: Loaded from File, Count 923
00:00:00.260 CFG: Saved, Count 924, Bytes 4096
00:00:00.266 QPC: Count 1
00:00:00.283 ROT: Mode 1
00:00:00.389 BRY: Berry initialized, RAM used=4503 bytes
00:00:00.449 BRY: No 'preinit.be'
00:00:00.483 CFG: Energy loaded from file
00:00:00.483 NRG: Init driver 2
00:00:00.486 SRC: Restart
00:00:00.532 Project tasmota - PowR320D3 Version 13.1.0(tasmota32)-2_0_11(2023-08-15T08:00:54)
00:00:00.533 ETH: No ETH MDC and/or ETH MDIO GPIO defined
00:00:00.575 CFG: XDRV87 loaded from file
00:00:00.575 DSP: TM1621
00:00:00.784 BRY: No 'autoexec.be'
00:00:00.072 WIF: Attempting connection...
00:00:01.266 WIF: Connecting to AP1 indebuurt_IoT Channel 11 BSSId 18:E8:29:CA:17:C1 in mode 11n as powr320d3...
00:00:02.063 WIF: IPv4 192.168.2.148, mask 255.255.255.0, gateway 192.168.2.254
00:00:02.073 WIF: Connected
00:00:02.338 HTP: Web server active on powr320d3 with IP address 192.168.2.148
00:00:02.901 RTC: UTC 2023-08-16T12:41:05, DST 2023-03-26T02:00:00, STD 2023-10-29T03:00:00
14:41:05.000 RTC: Synced by NTP
14:41:06.108 WIF: IPv6 Local fe80::c6de:e2ff:fe11:3f84
14:41:06.323 MQT: Attempting connection...
14:41:06.352 MQT: Connected
14:41:06.358 MQT: tele/powr320d3/LWT = Online (retained)
14:41:06.362 MQT: cmnd/powr320d3/POWER = 
14:41:06.363 MQT: Subscribe to cmnd/powr320d3/#
14:41:06.365 MQT: Subscribe to cmnd/tasmotas/#
14:41:06.368 MQT: Subscribe to cmnd/DVES_113F84_fb/#
14:41:06.382 MQT: tele/powr320d3/INFO1 = {"Info1":{"Module":"Sonoff POWR320D","Version":"13.1.0(tasmota32)","FallbackTopic":"cmnd/DVES_113F84_fb/","GroupTopic":"cmnd/tasmotas/"}}
14:41:06.395 MQT: tele/powr320d3/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"powr320d3","IPAddress":"192.168.2.148","IP6Global":"","IP6Local":"fe80::c6de:e2ff:fe11:3f84"}}
14:41:06.403 MQT: tele/powr320d3/INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":95}}
14:41:06.406 MQT: stat/powr320d3/RESULT = {"POWER":"ON"}
14:41:06.414 MQT: stat/powr320d3/POWER = ON
14:41:06.425 TFS: File 'autoexec.bat' not found
14:41:09.734 QPC: Reset
14:41:10.753 MQT: tele/powr320d3/STATE = {"Time":"2023-08-16T14:41:10","Uptime":"0T00:00:09","UptimeSec":9,"Heap":113,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":4,"Objects":48},"POWER":"ON","Wifi":{"AP":1,"SSId":"indebuurt_IoT","BSSId":"18:E8:29:CA:17:C1","Channel":11,"Mode":"11n","RSSI":100,"Signal":-31,"LinkCount":1,"Downtime":"0T00:00:03"}}
14:41:10.771 MQT: tele/powr320d3/SENSOR = {"Time":"2023-08-16T14:41:10","ENERGY":{"TotalStartTime":"2023-02-17T10:40:49","Total":2.012,"Yesterday":0.000,"Today":0.001,"Period":0.00,"Power":0.00,"ApparentPower":0.00,"ReactivePower":0.00,"Factor":0.00,"Voltage":247.3,"Current":0.000}}
14:41:11.108 WIF: IPv6 Global fd79:962c:bf13:49d0:c6de:e2ff:fe11:3f84
14:41:11.752 APP: Boot Count 95
14:41:11.979 CFG: Saved, Count 925, Bytes 4096
lolkop-cmd commented 1 year ago

@arendst: Did you update using the web-ui or using a serial connection? I've used the web-ui to update and didn't save the logs on first boot after updating so I can't provide them :s

Any ideas, what might have gone wrong for me when updating?

arendst commented 1 year ago

Without logs no idea what went wrong.

I always update from the gui console. A simple upload 1 command provides the most informative updating logging when weblog 3 is set.

0verEngineer commented 1 year ago

Hey, i have a THR316 with a ds18b20 ordered here: https://a.aliexpress.com/_EvnNy11

I flashed the tasmota32.factory.bin and then the tasmota32.bluetooth.bin in the web ui.

I tried the newest template from here https://templates.blakadder.com/sonoff_THR316.html and also the auto configuration but the device is not able to "see" the sensor. I did not wire the sensor myself, it was pre wired. Sadly i did not test the sensor with the original firmware before flashing.

I have no other hardware to test the 2 things so i just want to check here if i have something else wrong.

gpio all output:

16:37:21.640 CMD: gpio all
16:37:21.642 SRC: WebConsole from 192.168.178.49
16:37:21.643 CMD: Grp 0, Cmd 'GPIO', Idx 1, Len 3, Pld 255, Data 'all'
16:37:21.654 RSL: RESULT = {"GPIO0":{"32":"Button1"},"GPIO1":{"0":"None"},"GPIO2":{"0":"None"},"GPIO3":{"0":"None"},"GPIO4":{"225":"Relay2"},"GPIO5":{"9280":"TM1621 DAT"},"GPIO6":{"0":"None"},"GPIO7":{"0":"None"},"GPIO8":{"0":"None"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO11":{"0":"None"},"GPIO12":{"0":"None"},"GPIO13":{"321":"Led_i2"},"GPIO14":{"0":"None"},"GPIO15":{"576":"LedLink_i"},"GPIO16":{"320":"Led_i1"},"GPIO17":{"9184":"TM1621 CS"},"GPIO18":{"9216":"TM1621 WR"},"GPIO19":{"0":"None"},"GPIO20":{"0":"None"},"GPIO21":{"224":"Relay1"},"GPIO22":{"0":"None"},"GPIO23":{"9248":"TM1621 RD"},"GPIO24":{"0":"None"},"GPIO25":{"1312":"DS18x201"},"GPIO26":{"0":"None"},"GPIO27":{"3840":"Output Hi"},"GPIO32":{"0":"None"},"GPIO33":{"0":"None"},"GPIO34":{"0":"None"},"GPIO35":{"0":"None"},"GPIO36":{"0":"None"},"GPIO37":{"0":"None"},"GPIO38":{"0":"None"},"GPIO39":{"0":"None"}}

Logs:

00:00:00.003 HDW: ESP32-D0WD-V3 
00:00:00.100 UFS: FlashFS mounted with 304 kB free
00:00:00.136 CFG: Loaded from File, Count 32
00:00:00.146 QPC: Count 1
00:00:00.148 CFG: CR 396/699, Busy 0
00:00:00.157 ROT: Mode 1
00:00:00.277 BRY: Berry initialized, RAM used=3947 bytes
00:00:00.362 BRY: No 'preinit.be'
00:00:00.369 TFS: File '.drvset003' not found
00:00:00.370 CFG: Energy use defaults as file system not ready or file not found
00:00:00.371 SRC: Restart
00:00:00.376 Project tasmota - Tasmota Version 13.1.0(bluetooth)-2_0_11(2023-08-15T08:00:47)
00:00:00.377 ETH: No ETH MDC and/or ETH MDIO GPIO defined
00:00:00.379 DSB: Sensors found 0
00:00:00.380 iBeacon register for advert callbacks
00:00:00.380 MI32Option0: 1
00:00:00.391 MI32Option1: 0
00:00:00.391 MI32Option2: 0
00:00:00.391 MI32Option4: 1
00:00:00.392 MI32Option5: 0
00:00:00.392 MI32Option6: 0
00:00:00.403 M32: init: request callbacks
00:00:00.726 BRY: No 'autoexec.be'
00:00:00.007 WIF: Attempting connection...
00:00:01.314 WIF: Connecting to AP1 WIFI_2.4_ghz Channel 1 BSSId F0:B0:14:10:D4:0F in mode 11n as tasmota-E9A090-0144...
00:00:01.105 WIF: Attempting connection...
00:00:02.133 WIF: IPv4 192.168.178.47, mask 255.255.255.0, gateway 192.168.178.1
00:00:03.105 WIF: Connected
00:00:03.365 HTP: Web server active on tasmota-E9A090-0144 with IP address 192.168.178.47
00:00:03.943 RTC: UTC 2023-08-21T15:28:35, DST 2023-03-26T02:00:00, STD 2023-10-29T03:00:00
16:28:35.000 RTC: Synced by NTP
16:28:35.162 WIF: IPv6 Local fe80::caf0:9eff:fee9:a090
16:28:35.353 RSL: INFO1 = {"Info1":{"Module":"Sonoff THR316D","Version":"13.1.0(bluetooth)","FallbackTopic":"cmnd/DVES_E9A090_fb/","GroupTopic":"cmnd/tasmotas/"}}
16:28:35.368 RSL: INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-E9A090-0144","IPAddress":"192.168.178.47","IP6Global":"","IP6Local":"fe80::caf0:9eff:fee9:a090"}}
16:28:35.381 RSL: INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":15}}
16:28:35.383 RSL: RESULT = {"POWER1":"OFF"}
16:28:35.395 RSL: POWER1 = OFF
16:28:35.396 RSL: RESULT = {"POWER2":"OFF"}
16:28:35.397 RSL: POWER2 = OFF
16:28:35.406 TFS: File 'autoexec.bat' not found
16:28:37.875 QPC: Reset
16:28:39.167 WIF: IPv6 Global 2003:eb:f726:c200:caf0:9eff:fee9:a090
16:28:39.514 HTP: Main Menu
16:28:39.862 APP: Boot Count 15
16:28:39.868 RSL: STATE = {"Time":"2023-08-21T16:28:39","Uptime":"0T00:00:09","UptimeSec":9,"Heap":108,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":38,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":38},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"WIFI_2.4_ghz","BSSId":"F0:B0:14:10:D4:0F","Channel":1,"Mode":"11n","RSSI":34,"Signal":-83,"LinkCount":1,"Downtime":"0T00:00:04"}}
16:28:39.907 RSL: BLE = {"Time":"2023-08-21T16:28:39","BLEDevices":{"total":0}}
16:28:39.910 RSL: BLE = {"Time":"2023-08-21T16:28:39","BLE":{"scans":0,"adverts":0,"devices":0,"resets":0}}
16:28:41.236 CFG: Saved, Count 33, Bytes 4096
16:28:43.313 HTP: Consoles
16:28:45.980 HTP: Console
16:28:49.829 EQ3 poll cycle starting
16:33:30.848 M32: Kick off readOneSensor
16:33:30.849 M32: Kick off tele sending
16:33:39.851 RSL: STATE = {"Time":"2023-08-21T16:33:39","Uptime":"0T00:05:09","UptimeSec":309,"Heap":108,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":38},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"WIFI_2.4_ghz","BSSId":"F0:B0:14:10:D4:0F","Channel":1,"Mode":"11n","RSSI":28,"Signal":-86,"LinkCount":1,"Downtime":"0T00:00:04"}}
16:33:39.890 RSL: BLE = {"Time":"2023-08-21T16:33:39","BLEDevices":{"total":0}}
16:33:39.893 RSL: BLE = {"Time":"2023-08-21T16:33:39","BLE":{"scans":0,"adverts":0,"devices":0,"resets":0}}
16:33:49.862 EQ3 poll cycle starting

Thanks a lot

pmknowles commented 1 year ago

I would try disabling the template and just select generic and manually enter the GPIO GPIO 0 Button 1 GPIO 13 LED_i 2 GPIO 15 LEDLinki GPIO 16 LED_i 1 GPIO 21 Relay 1 GPIO 25 DS18x20 GPIO 27 Output Hi

They are too many issues caused by mis-applied templates to try to resolve it without. The really important one is GPIO 27 which supplies the power to the DS18B20

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: Julian @.> Sent: 21 August 2023 16:38 To: @.> Cc: @.>; @.> Subject: Re: [arendst/Tasmota] Support for SONOFF Smart Power Meter Switch | POW Elite (Issue #15856)

Hey, i have a THR316 with a ds18b20 ordered here: https://a.aliexpress.com/_EvnNy11

I flashed the tasmota32.factory.bin and then the tasmota32.bluetooth.bin in the web ui.

I tried the newest template from here https://templates.blakadder.com/sonoff_THR316.html and also the auto configuration but the device is not able to "see" the sensor. I did not wire the sensor myself, it was pre wired. Sadly i did not test the sensor with the original firmware before flashing.

I have no other hardware to test the 2 things so i just want to check here if i have something else wrong.

gpio all output:

16:37:21.640 CMD: gpio all

16:37:21.642 SRC: WebConsole from 192.168.178.49

16:37:21.643 CMD: Grp 0, Cmd 'GPIO', Idx 1, Len 3, Pld 255, Data 'all'

16:37:21.654 RSL: RESULT = {"GPIO0":{"32":"Button1"},"GPIO1":{"0":"None"},"GPIO2":{"0":"None"},"GPIO3":{"0":"None"},"GPIO4":{"225":"Relay2"},"GPIO5":{"9280":"TM1621 DAT"},"GPIO6":{"0":"None"},"GPIO7":{"0":"None"},"GPIO8":{"0":"None"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO11":{"0":"None"},"GPIO12":{"0":"None"},"GPIO13":{"321":"Led_i2"},"GPIO14":{"0":"None"},"GPIO15":{"576":"LedLink_i"},"GPIO16":{"320":"Led_i1"},"GPIO17":{"9184":"TM1621 CS"},"GPIO18":{"9216":"TM1621 WR"},"GPIO19":{"0":"None"},"GPIO20":{"0":"None"},"GPIO21":{"224":"Relay1"},"GPIO22":{"0":"None"},"GPIO23":{"9248":"TM1621 RD"},"GPIO24":{"0":"None"},"GPIO25":{"1312":"DS18x201"},"GPIO26":{"0":"None"},"GPIO27":{"3840":"Output Hi"},"GPIO32":{"0":"None"},"GPIO33":{"0":"None"},"GPIO34":{"0":"None"},"GPIO35":{"0":"None"},"GPIO36":{"0":"None"},"GPIO37":{"0":"None"},"GPIO38":{"0":"None"},"GPIO39":{"0":"None"}}

Logs:

00:00:00.003 HDW: ESP32-D0WD-V3

00:00:00.100 UFS: FlashFS mounted with 304 kB free

00:00:00.136 CFG: Loaded from File, Count 32

00:00:00.146 QPC: Count 1

00:00:00.148 CFG: CR 396/699, Busy 0

00:00:00.157 ROT: Mode 1

00:00:00.277 BRY: Berry initialized, RAM used=3947 bytes

00:00:00.362 BRY: No 'preinit.be'

00:00:00.369 TFS: File '.drvset003' not found

00:00:00.370 CFG: Energy use defaults as file system not ready or file not found

00:00:00.371 SRC: Restart

00:00:00.376 Project tasmota - Tasmota Version 13.1.0(bluetooth)-2_0_11(2023-08-15T08:00:47)

00:00:00.377 ETH: No ETH MDC and/or ETH MDIO GPIO defined

00:00:00.379 DSB: Sensors found 0

00:00:00.380 iBeacon register for advert callbacks

00:00:00.380 MI32Option0: 1

00:00:00.391 MI32Option1: 0

00:00:00.391 MI32Option2: 0

00:00:00.391 MI32Option4: 1

00:00:00.392 MI32Option5: 0

00:00:00.392 MI32Option6: 0

00:00:00.403 M32: init: request callbacks

00:00:00.726 BRY: No 'autoexec.be'

00:00:00.007 WIF: Attempting connection...

00:00:01.314 WIF: Connecting to AP1 WIFI_2.4_ghz Channel 1 BSSId F0:B0:14:10:D4:0F in mode 11n as tasmota-E9A090-0144...

00:00:01.105 WIF: Attempting connection...

00:00:02.133 WIF: IPv4 192.168.178.47, mask 255.255.255.0, gateway 192.168.178.1

00:00:03.105 WIF: Connected

00:00:03.365 HTP: Web server active on tasmota-E9A090-0144 with IP address 192.168.178.47

00:00:03.943 RTC: UTC 2023-08-21T15:28:35, DST 2023-03-26T02:00:00, STD 2023-10-29T03:00:00

16:28:35.000 RTC: Synced by NTP

16:28:35.162 WIF: IPv6 Local fe80::caf0:9eff:fee9:a090

16:28:35.353 RSL: INFO1 = {"Info1":{"Module":"Sonoff THR316D","Version":"13.1.0(bluetooth)","FallbackTopic":"cmnd/DVES_E9A090_fb/","GroupTopic":"cmnd/tasmotas/"}}

16:28:35.368 RSL: INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-E9A090-0144","IPAddress":"192.168.178.47","IP6Global":"","IP6Local":"fe80::caf0:9eff:fee9:a090"}}

16:28:35.381 RSL: INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":15}}

16:28:35.383 RSL: RESULT = {"POWER1":"OFF"}

16:28:35.395 RSL: POWER1 = OFF

16:28:35.396 RSL: RESULT = {"POWER2":"OFF"}

16:28:35.397 RSL: POWER2 = OFF

16:28:35.406 TFS: File 'autoexec.bat' not found

16:28:37.875 QPC: Reset

16:28:39.167 WIF: IPv6 Global 2003:eb:f726:c200:caf0:9eff:fee9:a090

16:28:39.514 HTP: Main Menu

16:28:39.862 APP: Boot Count 15

16:28:39.868 RSL: STATE = {"Time":"2023-08-21T16:28:39","Uptime":"0T00:00:09","UptimeSec":9,"Heap":108,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":38,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":38},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"WIFI_2.4_ghz","BSSId":"F0:B0:14:10:D4:0F","Channel":1,"Mode":"11n","RSSI":34,"Signal":-83,"LinkCount":1,"Downtime":"0T00:00:04"}}

16:28:39.907 RSL: BLE = {"Time":"2023-08-21T16:28:39","BLEDevices":{"total":0}}

16:28:39.910 RSL: BLE = {"Time":"2023-08-21T16:28:39","BLE":{"scans":0,"adverts":0,"devices":0,"resets":0}}

16:28:41.236 CFG: Saved, Count 33, Bytes 4096

16:28:43.313 HTP: Consoles

16:28:45.980 HTP: Console

16:28:49.829 EQ3 poll cycle starting

16:33:30.848 M32: Kick off readOneSensor

16:33:30.849 M32: Kick off tele sending

16:33:39.851 RSL: STATE = {"Time":"2023-08-21T16:33:39","Uptime":"0T00:05:09","UptimeSec":309,"Heap":108,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":38},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"WIFI_2.4_ghz","BSSId":"F0:B0:14:10:D4:0F","Channel":1,"Mode":"11n","RSSI":28,"Signal":-86,"LinkCount":1,"Downtime":"0T00:00:04"}}

16:33:39.890 RSL: BLE = {"Time":"2023-08-21T16:33:39","BLEDevices":{"total":0}}

16:33:39.893 RSL: BLE = {"Time":"2023-08-21T16:33:39","BLE":{"scans":0,"adverts":0,"devices":0,"resets":0}}

16:33:49.862 EQ3 poll cycle starting

Thanks a lot

— Reply to this email directly, view it on GitHubhttps://github.com/arendst/Tasmota/issues/15856#issuecomment-1686566512, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI5KPM5HWIQLHA4LCTXGLTDXWN6I7ANCNFSM5ZVP735A. You are receiving this because you commented.Message ID: @.***>

sfromis commented 1 year ago

I'd say that not using the standard templates is a source of errors, not the other way. When using the template, make sure to also use auto-configuration, otherwise gpio25 will not be assigned. Template already includes gpio27.

Seeing 00:00:00.379 DSB: Sensors found 0 looks like the configuration is correct, but Tasmota not able to get through to the sensor, hardware-wise.

pmknowles commented 1 year ago

The number of issues I’ve resolved because people have changed something in the Template but then not activated it...

At least with a ‘clean’ configuration you know exactly what is what

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: @.> Sent: 21 August 2023 16:58 To: @.> Cc: @.>; @.> Subject: Re: [arendst/Tasmota] Support for SONOFF Smart Power Meter Switch | POW Elite (Issue #15856)

I'd say that not using the standard templates is a source of errors, not the other way.

Seeing 00:00:00.379 DSB: Sensors found 0 looks like the configuration is correct, but Tasmota not able to get through to the sensor, hardware-wise.

— Reply to this email directly, view it on GitHubhttps://github.com/arendst/Tasmota/issues/15856#issuecomment-1686598353, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI5KPMYRZQONYOPRS4IGSF3XWOASLANCNFSM5ZVP735A. You are receiving this because you commented.Message ID: @.***>

sfromis commented 1 year ago

Using the template is the "clean" configuration, instead of messing around with gpios, and making errors. Sure, it has to be enabled, but that is really not a good reason to skip using it.

0verEngineer commented 1 year ago

@pmknowles I tried resetting and only set the gpios manually in configure module but this did also not work. I also did what @sfromis said but actually before posting here at all, i set the template, then the sensor did not show up so i changed the GPIO25 to ds18x20 in "Configure Module", then it did also not work and i discovered this auto config thing and used this. So i did everything required.

Interestingly when i check the Aliexpress offer where i ordered mine now i see no option with ds18b20, they list another sensor WTS01, so this changed after my order, i wonder if i have a WTS01 instead of a ds18b20...

Edit: just checked the box the sensor came in, it a WTS01

sfromis commented 1 year ago

Since that "WTS01" has a bulge on the cable, I'd guess that there is another MCU in there, as per common Sonoff style. IDK if this would work, but I'd try autoconfiguring as "Sonoff THR316D with THS01". Might work. If not, some work may need to be done to support that sensor probe....

0verEngineer commented 1 year ago

@sfromis It detects a sensor but the temp is not there. I see the THS01 and MS01 are already this newer type of sonoff sensor, so the WTS01 is still missing.

Logs:

00:00:00.003 HDW: ESP32-D0WD-V3 
00:00:00.051 UFS: FlashFS mounted with 304 kB free
00:00:00.076 CFG: Loaded from File, Count 22
00:00:00.078 FRC: Some settings have been reset (2)
00:00:00.079 CFG: CR 396/699, Busy 0
00:00:00.088 ROT: Mode 1
00:00:00.171 BRY: Berry initialized, RAM used=3945 bytes
00:00:00.225 BRY: No 'preinit.be'
00:00:00.230 TFS: File '.drvset003' not found
00:00:00.231 CFG: Energy use defaults as file system not ready or file not found
00:00:00.232 SRC: Restart
00:00:00.277 Project tasmota - Tasmota Version 13.1.0(bluetooth)-2_0_11(2023-08-15T08:00:47)
00:00:00.278 ETH: No ETH MDC and/or ETH MDIO GPIO defined
00:00:00.279 DHT: (v7) Sensors found 1
00:00:00.279 iBeacon register for advert callbacks
00:00:00.280 MI32Option0: 1
00:00:00.290 MI32Option1: 0
00:00:00.291 MI32Option2: 0
00:00:00.291 MI32Option4: 1
00:00:00.292 MI32Option5: 0
00:00:00.292 MI32Option6: 0
00:00:00.302 M32: init: request callbacks
00:00:00.485 BRY: No 'autoexec.be'
00:00:00.744 WIF: Attempting connection...
00:00:01.038 WIF: Connecting to AP1 WIFI_2.4_ghz Channel 1 BSSId 9C:C7:A6:FC:1A:F9 in mode 11n as tasmota-E9A090-0144...
00:00:01.879 WIF: Attempting connection...
00:00:01.911 WIF: IPv4 192.168.178.47, mask 255.255.255.0, gateway 192.168.178.1
00:00:02.963 DHT: Pin25 timeout waiting for pulse 0
00:00:02.997 WIF: Connected
00:00:03.205 HTP: Web server active on tasmota-E9A090-0144 with IP address 192.168.178.47
00:00:04.024 RTC: UTC 2023-08-21T16:50:26, DST 2023-03-26T02:00:00, STD 2023-10-29T03:00:00
17:50:26.000 RTC: Synced by NTP
17:50:26.162 RSL: INFO1 = {"Info1":{"Module":"Sonoff THR320D","Version":"13.1.0(bluetooth)","FallbackTopic":"cmnd/DVES_E9A090_fb/","GroupTopic":"cmnd/tasmotas/"}}
17:50:26.176 RSL: INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-E9A090-0144","IPAddress":"192.168.178.47","IP6Global":"","IP6Local":"fe80::caf0:9eff:fee9:a090"}}
17:50:26.189 RSL: INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":9}}
17:50:26.192 RSL: RESULT = {"POWER1":"OFF"}
17:50:26.203 RSL: POWER1 = OFF
17:50:26.204 RSL: RESULT = {"POWER2":"OFF"}
17:50:26.206 RSL: POWER2 = OFF
17:50:26.213 TFS: File 'autoexec.bat' not found
17:50:26.942 WIF: IPv6 Local fe80::caf0:9eff:fee9:a090
17:50:27.296 HTP: Main Menu
17:50:28.948 QPC: Reset
17:50:29.004 DHT: Pin25 timeout waiting for pulse 0
17:50:29.968 WIF: IPv6 Global 2003:eb:f726:c200:caf0:9eff:fee9:a090
17:50:30.910 APP: Boot Count 9
17:50:30.917 RSL: STATE = {"Time":"2023-08-21T17:50:30","Uptime":"0T00:00:09","UptimeSec":9,"Heap":107,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":38},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"WIFI_2.4_ghz","BSSId":"9C:C7:A6:FC:1A:F9","Channel":1,"Mode":"11n","RSSI":100,"Signal":-42,"LinkCount":1,"Downtime":"0T00:00:04"}}
17:50:30.954 RSL: SENSOR = {"Time":"2023-08-21T17:50:30","SI7021":{"Temperature":null,"Humidity":null,"DewPoint":null},"TempUnit":"C"}
17:50:30.969 RSL: BLE = {"Time":"2023-08-21T17:50:30","BLEDevices":{"total":0}}
17:50:30.972 RSL: BLE = {"Time":"2023-08-21T17:50:30","BLE":{"scans":0,"adverts":0,"devices":0,"resets":0}}
17:50:31.868 CFG: Saved, Count 23, Bytes 4096
17:50:32.975 DHT: Pin25 timeout waiting for pulse 0
17:50:36.987 DHT: Pin25 timeout waiting for pulse 0
17:50:38.043 HTP: Configuration
17:50:40.213 HTP: Main Menu
17:50:40.947 EQ3 poll cycle starting
17:50:41.001 DHT: Pin25 timeout waiting for pulse 0
17:50:41.858 HTP: Consoles
17:50:43.370 HTP: Console
17:50:45.006 DHT: Pin25 timeout waiting for pulse 52
17:50:48.966 DHT: Pin25 timeout waiting for pulse 0
17:50:52.980 DHT: Pin25 timeout waiting for pulse 0
17:50:56.992 DHT: Pin25 timeout waiting for pulse 0
17:51:00.952 DHT: Pin25 timeout waiting for pulse 0
17:51:04.961 DHT: Pin25 timeout waiting for pulse 0
17:51:08.971 DHT: Pin25 timeout waiting for pulse 0
17:51:12.986 DHT: Pin25 timeout waiting for pulse 0
17:51:16.997 DHT: Pin25 timeout waiting for pulse 0
sfromis commented 1 year ago

Yeah, seems to be "closer" but not there. As an experiment, trying with tweaks of DhtDelay might be "interesting", just in case. Default is 400,30, but with the THS01 some (including me) have had better luck with 500,50.

But still, I'd expect some analysis needing to be done to create support.....

ducadk commented 1 year ago

I recently updated my THR316D (with the SI7021 probe) to Version 13.1.0(tasmota32)-2_0_11(2023-08-15T08:00:54), since then, the probe sometimes/often report null on the readings: thr316D/tele/SENSOR = {"Time":"2023-09-03T07:31:07","SI7021":{"Temperature":null,"Humidity":null,"DewPoint":null},"TempUnit":"C"}

The values in the LCD though still shows last read value. I'm using the following template: {"NAME":"Sonoff THR316D","GPIO":[32,0,0,0,225,9280,0,0,0,321,0,576,320,9184,9216,0,0,224,0,9248,0,1248,0,3840,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}

Anyone else having the same issue?

sfromis commented 1 year ago

Read my post just prior to yours. While it is about a different situation, fiddling with DhtDelay is a likely remedy for you.

ducadk commented 1 year ago

Hi @sfromis,

Thanks for your reply, that did the trick, now the readings are stable again (after setting the DhtDelay to 500,50). I thought the DhtDelay fiddling only applied to the WTS01, but great that it also applies to the SI7021, thanks for pointing it out!

sfromis commented 1 year ago

In fact, it did not seem to help for WTS01, that test was just a bit of a longshot. It is specifically intended for the "SI7021" (which is often not really a SI7021 sensor), and DHT one-line sensors.

richardspiers commented 11 months ago

In case it helps others, I removed the "bulge/chip" from a WTS01 and respliced the wire, and then it works fine with Tasmota 13.1.0.3 running on a THR320D. Somebody else had the same experience here as well https://github.com/arendst/Tasmota/discussions/19373. (Appears to work just like a normal DS18x20 sensor)

Henkonoly commented 10 months ago

Hello guys,

Which bin file should i use for the THR316D and the THR316D I`v been day trying but all i get is a faint blue 'auto' led,... then nothing

I use ESPTOOL for flashing, flashing itself is succesfull every time

Help would be much appreciated ;)

info:

c:\esptool>esptool.py --port COM4 flash_id esptool.py v4.6.2 Serial port COM4 Connecting... Detecting chip type... Unsupported detection protocol, switching and trying again... Connecting... Detecting chip type... ESP32 Chip is ESP32-D0WD-V3 (revision v3.0) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: c8:f0:9e:e8:c1:20 Stub is already running. No upload is necessary. Manufacturer: 5e Device: 4016 Detected flash size: 4MB Hard resetting via RTS pin...

pmknowles commented 10 months ago

Use the Web installer tab on the web page and flash initially with Tasmota32.bin

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: @.> Sent: 27 October 2023 15:58 To: @.> Cc: @.>; @.> Subject: Re: [arendst/Tasmota] Support for SONOFF Smart Power Meter Switch | POW Elite (Issue #15856)

Hello guys,

Which bin file should i use for the THR316D and the THR316D I`v been day trying but all i get is a faint blue 'auto' led,... then nothing

I use ESPTOOL for flashing, flashing itself is succesfull every time

Help would be much appreciated ;)

info:

c:\esptool>esptool.py --port COM4 flash_id esptool.py v4.6.2 Serial port COM4 Connecting... Detecting chip type... Unsupported detection protocol, switching and trying again... Connecting... Detecting chip type... ESP32 Chip is ESP32-D0WD-V3 (revision v3.0) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: c8:f0:9e:e8:c1:20 Stub is already running. No upload is necessary. Manufacturer: 5e Device: 4016 Detected flash size: 4MB Hard resetting via RTS pin...

— Reply to this email directly, view it on GitHubhttps://github.com/arendst/Tasmota/issues/15856#issuecomment-1783060826, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI5KPM37N6SFFMY3SGSQCWTYBPDXXAVCNFSM5ZVP735KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZYGMYDMMBYGI3A. You are receiving this because you were mentioned.Message ID: @.***>

sfromis commented 10 months ago

and flash initially with Tasmota32.bin

No. In the web installer, just use the default of "Tasmota (english)", no other selection needed.

If you want to flash using esptool.py, use tasmota32.factory.bin - which is what the web installer will use automatically.