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.
tontze
Posts: 231
Joined: Thursday 12 January 2017 16:30
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Sonoff Touch

Post by tontze » Friday 18 August 2017 15:59

Eddiever wrote:
Wednesday 16 August 2017 21:15
Do you also use the name state in the devices tab?
I have 2 devices :
Attachments
gr2.PNG
gr2.PNG (18.07 KiB) Viewed 233 times
gr1.PNG
gr1.PNG (17.8 KiB) Viewed 233 times
-----------------------------------------
Rpi 3 / Razberry 2
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
ESP82xx

Eddiever
Posts: 51
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 » Friday 18 August 2017 16:18

Try to change the name Sonoff 2 to button.
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

tontze
Posts: 231
Joined: Thursday 12 January 2017 16:30
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Sonoff Touch

Post by tontze » Sunday 03 September 2017 7:38

Eddiever wrote:
Friday 18 August 2017 16:18
Try to change the name Sonoff 2 to button.
Thnx ! that did it !
-----------------------------------------
Rpi 3 / Razberry 2
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
ESP82xx

iLLiac4
Posts: 13
Joined: Thursday 31 August 2017 8:13
Target OS: -
Domoticz version:
Contact:

Re: Sonoff Touch

Post by iLLiac4 » Monday 11 September 2017 10:48

There is one problem. I want the code/rule to change the status of touch also if the relay status changes to the same status as relay is in.
This is because if you remote execute the code:
http://ip/control?cmd=GPIO,12,0
Only the status of the relay changeses. The status of the touch stays in this case 1. So this causes the problem that the touch button has to be press twice; first will not react because it will only change the status to the same one as the relay is and the second press will then eventually turn on or off the light.

The rules i have are:

Code: Select all

on touch#switch do
if [touch#switch]=1 do
gpio,12,1
else
gpio,12,0
endif
endon

on relay#switch do
if [relay#switch]=1 do
gpio,13,1
inputswitchstate 0,1
else
gpio,13,0
inputswitchstate 0,0
endif
endon
P.S.:
The above code is fixed now and it works with refreshing also the touch state.

How can i achive that the touch status will always be the same as the relay one.

Post Reply

Who is online

Users browsing this forum: Hobbybob and 8 guests