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.
Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Sonoff Touch

Post by Eddiever » Sunday 30 April 2017 20:41

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?
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

mayyam
Posts: 39
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam » Monday 01 May 2017 11:38

_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- Xiaomi Gateway
- different species of ESP8266

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Monday 01 May 2017 18:53

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.
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Tuesday 02 May 2017 20:53

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 1754 times
switch 2.PNG
switch 2.PNG (18.01 KiB) Viewed 1754 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?
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

mayyam
Posts: 39
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam » Tuesday 02 May 2017 20:58

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 1754 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 1754 times
Last edited by mayyam on Tuesday 02 May 2017 22:41, edited 1 time in total.
_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- Xiaomi Gateway
- different species of ESP8266

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Tuesday 02 May 2017 21:18

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 1751 times
What kind of stupid thing I am overlooking?
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

mayyam
Posts: 39
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam » Tuesday 02 May 2017 21:25

On ESPEasy, in button device You have to give idx of realay device in domoticz and check "Send data" chceck box.
_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- Xiaomi Gateway
- different species of ESP8266

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Tuesday 02 May 2017 21:34

sonoff touch 1.PNG
sonoff touch 1.PNG (6.55 KiB) Viewed 1740 times
esp 1.PNG
esp 1.PNG (9.43 KiB) Viewed 1740 times
Changed it to 3 but still no state change when manually switched
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

mayyam
Posts: 39
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam » Tuesday 02 May 2017 21:41

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.
_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- Xiaomi Gateway
- different species of ESP8266

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Tuesday 02 May 2017 21:47

Switch 1.PNG
Switch 1.PNG (17.98 KiB) Viewed 1738 times
switch 2.PNG
switch 2.PNG (18.01 KiB) Viewed 1738 times
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

mayyam
Posts: 39
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam » Tuesday 02 May 2017 21:49

And the Config tab?
_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- Xiaomi Gateway
- different species of ESP8266

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Tuesday 02 May 2017 21:53

The config:
config.PNG
config.PNG (22.48 KiB) Viewed 1735 times
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

mayyam
Posts: 39
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam » Tuesday 02 May 2017 21:56

If Your Domoticz server is 192.168.1.200, and port is 8080 it looks right to me.
_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- Xiaomi Gateway
- different species of ESP8266

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Tuesday 02 May 2017 22:01

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

8080 is the default port, right?
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

mayyam
Posts: 39
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam » Tuesday 02 May 2017 22:08

Right.
I Have no Domoticz password, so my Controller User and Controller Pass fields are empty, but maybe You have to fill them ?
_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- Xiaomi Gateway
- different species of ESP8266

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Tuesday 02 May 2017 22:22

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!
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

mayyam
Posts: 39
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam » Tuesday 02 May 2017 22:26

:)
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.
_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- Xiaomi Gateway
- different species of ESP8266

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Tuesday 02 May 2017 22:31

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.
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

mayyam
Posts: 39
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Sonoff Touch

Post by mayyam » Tuesday 02 May 2017 22:33

You can also use the GPIO - 13 on the Wifi Status Led on the Hardware settings.
_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- Xiaomi Gateway
- different species of ESP8266

Eddiever
Posts: 60
Joined: Thursday 27 April 2017 20:32
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: The Netherlands (Hoogeveen)
Contact:

Re: Sonoff Touch

Post by Eddiever » Tuesday 02 May 2017 22:37

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
RPi 2B with Domoticz and cam module RPi 3 with cam module
1 rftxtrx433E module 1 solar-edge SE-3500
1 Sonoff Touch 3 Sonoff wifi swithes 6 kaku modules

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests