Sonoff THR316D

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
cigale
New user
Posts: 7
Joined: 07 Oct 2023, 17:02

Sonoff THR316D

#1 Post by cigale » 07 Oct 2023, 17:09

Hello, I flashed the Sonoff THR316D with the WTS01 temperature probe
I can configure everything except the temperature probe, I can't get the address
I used the binary ESP_Easy_mega_20230304_climate_ESP32_4M316k.bin
Attachments
espeasy1.jpg
espeasy1.jpg (103.13 KiB) Viewed 1638 times
espeasy.JPG
espeasy.JPG (141.15 KiB) Viewed 1638 times

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

Re: Sonoff THR316D

#2 Post by TD-er » 07 Oct 2023, 19:42

You need to pull up GPIO-27
So you can set this as the boot state on the hardware tab.
Then reboot, or just give the command "gpio,27,1"

cigale
New user
Posts: 7
Joined: 07 Oct 2023, 17:02

Re: Sonoff THR316D

#3 Post by cigale » 07 Oct 2023, 21:05

Thanks, that was it, now it works
I couldn't find the information

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

Re: Sonoff THR316D

#4 Post by TD-er » 07 Oct 2023, 22:46

The 3V3 pin of the RJ11 connector is controlled by this GPIO.

cigale
New user
Posts: 7
Joined: 07 Oct 2023, 17:02

Re: Sonoff THR316D

#5 Post by cigale » 08 Oct 2023, 14:22

thanks, now it works

cigale
New user
Posts: 7
Joined: 07 Oct 2023, 17:02

Re: Sonoff THR316D

#6 Post by cigale » 11 Oct 2023, 15:09

I still have a little problem with the configuration
I can't get the button to work
Is there anything special to do with it?
I enable Internal PullUp it works, but after a reboot it no longer works, then I disable Internal PullUp it works again, but after a reboot it no longer works, I re-enable it and it works until the next boot

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

Re: Sonoff THR316D

#7 Post by TD-er » 11 Oct 2023, 15:32

Button: GPIO-0
Relay1: GPIO-21
Relay2: GPIO-4


The button is a push-button, so you should set the Switch Button Type to "Push Button Active High" (or Low, as long as it is set as push button)

This will then toggle the state each time you press the button.

I don't have the internal pull-up checked.

cigale
New user
Posts: 7
Joined: 07 Oct 2023, 17:02

Re: Sonoff THR316D

#8 Post by cigale » 11 Oct 2023, 16:05

That's what I did
Attachments
espeasy2.JPG
espeasy2.JPG (70.56 KiB) Viewed 1551 times

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

Re: Sonoff THR316D

#9 Post by TD-er » 11 Oct 2023, 16:20

You have the debounce set to 0.
That's not a good value for actual buttons which do bounce.
Try setting it to 100 msec.

cigale
New user
Posts: 7
Joined: 07 Oct 2023, 17:02

Re: Sonoff THR316D

#10 Post by cigale » 11 Oct 2023, 16:35

I just set it to 100ms, and it's still the same
I also tried with 200ms

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

Re: Sonoff THR316D

#11 Post by TD-er » 11 Oct 2023, 16:46

I just added this as rule:

Code: Select all

on Button1#state do
  gpio,4,%eventvalue1%
endon
For this I may first need to get "in sync" so the first time I may need to press the button twice.

Changing it to this, should fix that:

Code: Select all

on Button1#state do
  gpiotoggle,4
endon

cigale
New user
Posts: 7
Joined: 07 Oct 2023, 17:02

Re: Sonoff THR316D

#12 Post by cigale » 11 Oct 2023, 17:10

thanks for your help, now it works

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 36 guests