GPIO's for SonOff THR320D

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
TD-er
Core team member
Posts: 8642
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: GPIO's for SonOff THR320D

#51 Post by TD-er » 14 Nov 2022, 23:30

You can also power cycle and then it should not even start the AP mode when WiFi is connected.

The AP will remain active as long as some device is still connected to it.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: GPIO's for SonOff THR320D

#52 Post by obod0002c » 15 Nov 2022, 10:07

if power cycle means taking the device off the mains and re-connect it: that has been done multiple times, even with minutes while off the mains. The device always reconnected as AP last night.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: GPIO's for SonOff THR320D

#53 Post by obod0002c » 15 Nov 2022, 17:59

I've re-done everything again meanwhile .. two or three times .. looks like there's still some miracle in when the AP mode to disappear.
Also followed the rule to stick to the newest version: mega-20221105
Hopefully followed all good advice from the posts before.

Image

I'm not sure what happened or if it's stable from now on - but there's one thing I didn't mention so far, and why I wanted to start again from scratch:
when displaying all the various GPIO's I saw this warning that I exceeded the daily memory changes (?) ..

I connected a second sensor that also worked (not two at a time, just another one).
Attachments
againOkay.jpg
againOkay.jpg (72.95 KiB) Viewed 2550 times

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: GPIO's for SonOff THR320D

#54 Post by obod0002c » 15 Nov 2022, 20:13

and in the middle of the action, updating Rules or checking something in the Device's tab .. it's gone, what? No idea, device, WiFi, .. and it will not reboot. sometime the ESP Easy hotspot shows up again but not reliable, not at all.

Haven't thought it's going to be that difficult with this device :cry:

TD-er
Core team member
Posts: 8642
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: GPIO's for SonOff THR320D

#55 Post by TD-er » 15 Nov 2022, 21:04

obod0002c wrote: 15 Nov 2022, 17:59 [...]
when displaying all the various GPIO's I saw this warning that I exceeded the daily memory changes (?) ..
[...]
ESPEasy tries to protect the flash memory.
So after 100 flash writes per 24h, it will stop writing to the flash and give you this warning which exactly tells you what to do.
Either give the command to reset this counter or power cycle the device.
Then the counter will be reset.

With this state present, nothing will be written, so changing values/settings will not do anything which relies on saved settings.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: GPIO's for SonOff THR320D

#56 Post by obod0002c » 16 Nov 2022, 19:54

Short update: the device is configured and started serving hot water.
I'm a bit puzzled, if now everything's working and also whether the device is reliable now .. as the sensors e.a. are.

Current version running: mega-20221105
LittleFS-factory.bin

I've read about some timing peculiarities together with ESP32's in the past and they seem to persist.
Manually counted/estimated I'd say the timers are in real approx. 75% of what they were initially set to.

Maybe useful:

Code: Select all

ESP Board
ESP Chip ID:	1132716 (0x1148AC)
ESP Chip Frequency:	240 MHz
ESP Crystal Frequency:	40 MHz
ESP APB Frequency:	80 MHz
ESP Chip Model:	ESP32-D0WDQ5-V3
ESP Chip Revision:	3
ESP Chip Cores:	2
ESP Board Name:	Espressif Generic ESP32 4M Flash ESPEasy 1810k Code/OTA 316k FS

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: GPIO's for SonOff THR320D

#57 Post by obod0002c » 26 Nov 2022, 13:19

I can inform that the first SonOff THR320D is now running since almost 10 days without any problems.

That one is meanwhile accompanied by a second one, I decided to go for the same one as I expected synergies and easier maintenance (although a cheaper would have been sufficient).
This second device took just about half an hour to set it up and receive some data provided by the the first one.

TD-er
Core team member
Posts: 8642
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: GPIO's for SonOff THR320D

#58 Post by TD-er » 26 Nov 2022, 13:22

Great!
I have also received those myself, so I will also try to setup them to see what we're missing.
For example the display does look like we may need to make some mapping between segments and how to render the characters.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: GPIO's for SonOff THR320D

#59 Post by obod0002c » 26 Nov 2022, 14:40

allowing the display to work would be an additional great value.
If I somehow can help, please let me know.

chri2
New user
Posts: 3
Joined: 17 Jan 2019, 11:59

Re: GPIO's for SonOff THR320D

#60 Post by chri2 » 27 Feb 2023, 11:40

obod0002c wrote: 14 Nov 2022, 17:06 temperature reading still 0.00 unfortunately .. somehow believing I have to cut my own RJ9 to connect multimeter e.a.
I have the exactly same problem:

* Sonoff THR316
* ESP_Easy_mega_20221224_normal_ESP32_4M316k_LittleFS
* Espressif Generic ESP32 4M Flash ESPEasy 1810k Code/OTA 316k FS
* DS18b2 Sensor connected through 3.5mm/RJ adapter

Installed ESP_Easy_mega_20221224_normal_ESP32_4M316k.factory.bin and got the sensor working.

After moving the Sonoff to its destination place the sensor didn't work anymore. Tried everything from this thread to get it back working and gave up.

Got the Sonoff back from its place to the office and re-installed using ESP_Easy_mega_20221224_normal_ESP32_4M316k_LittleFS.factory.bin (without knowing what the difference is). Followed the whole procedure again and now it works - even though I restarted a few times and switched it off and on several times.

TD-er
Core team member
Posts: 8642
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: GPIO's for SonOff THR320D

#61 Post by TD-er » 27 Feb 2023, 12:22

Please use one of the latest GH Actions builds, as this has been fixed already.
For example: https://github.com/letscontrolit/ESPEas ... 4247452178

N.B. you need to pull up a pin to enable the power to the RJ9 connector.
Set GPIO-27 to "output high" in the Hardware tab of the web interface.

chri2
New user
Posts: 3
Joined: 17 Jan 2019, 11:59

Re: GPIO's for SonOff THR320D

#62 Post by chri2 » 02 Mar 2023, 05:59

TD-er wrote: 27 Feb 2023, 12:22 Please use one of the latest GH Actions builds, as this has been fixed already.
For example: https://github.com/letscontrolit/ESPEas ... 4247452178

N.B. you need to pull up a pin to enable the power to the RJ9 connector.
Set GPIO-27 to "output high" in the Hardware tab of the web interface.
Thanks for the prompt reply! Next time I need to touch the device I'll try the updated firmware.

Wrote a short article about what I tried, what I found out and why I did that. ESPeasy is a great software - thanks for all the work on it!

https://chrichri.ween.de/articles/38c17 ... or-ds18b20

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: GPIO's for SonOff THR320D

#63 Post by Ath » 02 Mar 2023, 07:43

Great blog-post :)
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8642
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: GPIO's for SonOff THR320D

#64 Post by TD-er » 02 Mar 2023, 11:16

In your blogpost you also link to the wiki.
Can you replace those links to the much more up-to-date ReadTheDocs pages, like this one on ESP32 flashing: https://espeasy.readthedocs.io/en/lates ... html#esp32

Quite an extensive blogpost :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 26 guests