Sonoff + wall manual switch

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Sonoff + wall manual switch

#1 Post by vojtishek » 06 Mar 2017, 09:29

Hi everyone,

I saw video when was introduced ability to on/off sonoff with manual switch connected to gpio14 and GND.
I was not succesfull on espeasy flashed sonoff.

Do you have any experience with that?

Goal is to implement sonoff next to wall switch to be able to control it from domoticz as well as change state via manual switch.

Thanks
Vojta

vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Re: Sonoff + wall manual switch

#2 Post by vojtishek » 25 Mar 2017, 14:02

I´ve was able to use gpio14 for it but over the wifi and there is delay of course.

Could you please advise how to put script inside espeasy firmware to switch on/off light via manual switch with immediate reaction?

Your help much appreciated.

Thank you
Vojta

Mr Moose
Normal user
Posts: 1
Joined: 25 Mar 2017, 21:32

Re: Sonoff + wall manual switch

#3 Post by Mr Moose » 25 Mar 2017, 21:47

Hello,

I have the same function in my ESP12. Try this:

A new Device:
Device: Switch Input
Name: Input
1st GPIO: GPIO 14
Pullup: X
Inverted: X
Switch Type: Switch
Switch Button Type: Push Button Active Low
Value Name 1: Pushbutton

Rules:
on Input#Pushbutton do
if [Input#Pushbutton]=1
event switchon
else
event switchoff
endif
endon

on switchon do
gpio 12,1
endon

on switchoff do
gpio 12,0
endon

vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Re: Sonoff + wall manual switch

#4 Post by vojtishek » 25 Mar 2017, 22:12

Mr Moose wrote:
25 Mar 2017, 21:47
Hello,

I have the same function in my ESP12. Try this:

A new Device:
Device: Switch Input
Name: Input
1st GPIO: GPIO 14
Pullup: X
Inverted: X
Switch Type: Switch
Switch Button Type: Push Button Active Low
Value Name 1: Pushbutton

Rules:
on Input#Pushbutton do
if [Input#Pushbutton]=1
event switchon
else
event switchoff
endif
endon

on switchon do
gpio 12,1
endon

on switchoff do
gpio 12,0
endon
Thanks a lot, I will try and let you know.

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: Sonoff + wall manual switch

#5 Post by paxi » 26 Mar 2017, 01:20

If you use a standard wall switch configure "switch button" type to "normal switch". Just to be safe wire a 1k resistor in series with the switch.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests