Sonoff Touch Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Sonoff Touch

Post by Eddiever »

I have a Sonoff Touch wall switch. I would like to change it's firmware through ESP Easy. I have been searching but haven't found the right firmware. Due to the fact it is using the 8285 chip instead of 8266.

Does anyone have a suggestion?
mayyam
Posts: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam »

_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

mayyam, thanks. I just flashed it. Now to replace it with the active touch which is in normal use. But do I cut the power or should I just replace the circuitboard with the wiring still alive? Just kidding, always with the power off.
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

As I stated before I am very new and trying things out. Flashing worked. I can activate the ligth by hardware switch and from Domoticz. But somehow (I really don't know why) if I switch it manually the status in Domoticz won't change. Used some info from sincze
Switch 1.PNG
Switch 1.PNG (18.07 KiB) Viewed 7364 times
switch 2.PNG
switch 2.PNG (18.01 KiB) Viewed 7364 times
On action Domoticz:

Code: Select all

http://192.168.1.160/control?cmd=GPIO,12,1
I could really use some help. Who can?
mayyam
Posts: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam »

That's my config.
And I also use Rules:

Code: Select all

on System#Boot do
    gpio,12,1
    timerSet,1,1
  endif
endon

on Rules#Timer=1 do
    gpio,12,0
endon

on button#state do
  if [button#state]=1
    gpio,12,1
    endif
endon

on button#state do
  if [button#state]=0
    gpio,12,0
    endif
endon
Attachments
devices_2_2017-04-23 20_48_50-sonoff_touch_lazienka.png
devices_2_2017-04-23 20_48_50-sonoff_touch_lazienka.png (16.77 KiB) Viewed 7364 times
devices_1_2017-04-23 20_48_27-sonoff_touch_lazienka.png
devices_1_2017-04-23 20_48_27-sonoff_touch_lazienka.png (15.08 KiB) Viewed 7364 times
Last edited by mayyam on Tuesday 02 May 2017 22:41, edited 1 time in total.
_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

Sorry mayyam, thought the code was from sincze.

Even if I set it up exactly like your example the state doesn't change within Domoticz. The IDX variable was wrong in my case. In Domoticz it has the value of 3. I changed that in both ESP devices.

From Domoticz:
domoticz.PNG
domoticz.PNG (121.15 KiB) Viewed 7361 times
What kind of stupid thing I am overlooking?
mayyam
Posts: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam »

On ESPEasy, in button device You have to give idx of realay device in domoticz and check "Send data" chceck box.
_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

sonoff touch 1.PNG
sonoff touch 1.PNG (6.55 KiB) Viewed 7350 times
esp 1.PNG
esp 1.PNG (9.43 KiB) Viewed 7350 times
Changed it to 3 but still no state change when manually switched
mayyam
Posts: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam »

Do You have "Send data" checked?
Also On Config tab: Protocol, Controller IP and Controller Port - do You have right values ?
Last edited by mayyam on Tuesday 02 May 2017 21:49, edited 2 times in total.
_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

Switch 1.PNG
Switch 1.PNG (17.98 KiB) Viewed 7348 times
switch 2.PNG
switch 2.PNG (18.01 KiB) Viewed 7348 times
mayyam
Posts: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam »

And the Config tab?
_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

The config:
config.PNG
config.PNG (22.48 KiB) Viewed 7345 times
mayyam
Posts: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam »

If Your Domoticz server is 192.168.1.200, and port is 8080 it looks right to me.
_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

My server is indeed on 192.168.1.200 and the port is 8080. Thus it is strange :(

8080 is the default port, right?
mayyam
Posts: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam »

Right.
I Have no Domoticz password, so my Controller User and Controller Pass fields are empty, but maybe You have to fill them ?
_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

Oh mayyam, how great (and stupid of me). That is it. Username/password. Darn me.

Thank you so much for your quick reply and help!
mayyam
Posts: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam »

:)
Try Rules. With Rules if Wifi will crash, Sonoff Touch will still work. Also, there is no latency when You switch it manually with Rules.

Code: Select all

on button#state do
if [button#state]=1
gpio,12,1
endif
endon

on button#state do
if [button#state]=0
gpio,12,0
endif
endon
I've also that rule:

Code: Select all

on System#Boot do
gpio,12,1
timerSet,1,1
endif
endon

on Rules#Timer=1 do
gpio,12,0
endon
It's for telling me (one second blink) that there is power back if the electric company fu..ed up again.
Last edited by mayyam on Tuesday 02 May 2017 22:41, edited 1 time in total.
_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

I have copied your rules and used them ;)

Great to know Rules in combination with actions if wifi is out. Will dive into that later on.
mayyam
Posts: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam »

You can also use the GPIO - 13 on the Wifi Status Led on the Hardware settings.
_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
User avatar
Eddiever
Posts: 105
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever »

Already done that:

Code: Select all

on System#Boot do
gpio,12,1
gpio,13,0
timerSet,1,1
endif
endon

on Rules#Timer=1 do
gpio,12,0
gpio,13,1
endon

on button#state do
if [button#state]=1
gpio,12,1
gpio,13,0
endif
endon

on button#state do
if [button#state]=0
gpio,12,0
gpio,13,1
endif
endon
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest