Hi, i play with sonoff RF and alredy manage to isntall easy easy, and control it.
Now i want to make some "extras".
As Sonoff have hardware buron connected to GPIO - 0 and relay caonected to GPIO 13, i try somehow to connect this.
Each time when i press buton it have to toggle realay output. Can i wrire some script or something else that can do that for me ?
Eny ideas please ?
How can control one GPIO from other ?
Moderators: grovkillen, Stuntteam, TD-er
Re: How can control one GPIO from other ?
Go to Advanced Tab and activate rules. Reboot.
Under Devices make devices as in attached pic
Then under the Rules Tab :
on pushbutton#Switch=0 do
if [Relais#Switch]=1
gpio,12,0
else
gpio,12,1
endif
endon
its on the forum at least 3x, please use search
Under Devices make devices as in attached pic
Then under the Rules Tab :
on pushbutton#Switch=0 do
if [Relais#Switch]=1
gpio,12,0
else
gpio,12,1
endif
endon
its on the forum at least 3x, please use search
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Re: How can control one GPIO from other ?
Than you. It's work
But i face some strange behavior.
My Esp (i use sonofF RF ) is setup to use Domoticz protocol and send data via MQTT.
If it's connected to the wife, rule work as expected. But if there is no connection, rule work very strange, big delay or even not every time execute. So strange. Any suggestions ?
But i face some strange behavior.
My Esp (i use sonofF RF ) is setup to use Domoticz protocol and send data via MQTT.
If it's connected to the wife, rule work as expected. But if there is no connection, rule work very strange, big delay or even not every time execute. So strange. Any suggestions ?
-
- Normal user
- Posts: 21
- Joined: 31 Oct 2016, 03:03
Re: How can control one GPIO from other ?
If you don't use connection, go In Config,and replace mqtt protocol by standalone protocol. Because the ESP gonna Keep trying to connect to your mqtt broker. And of course, without wifi connection, it impossible. So try standalone protocol and let me know if is better.
Hope that helpful!!
Doo
Hope that helpful!!
Doo
Re: How can control one GPIO from other ?
Hi,
if i switch to standalone protocol , would i have mqtt ?
My issue is that sometimes wifi connection may gone and then devece is ussles. I just need setup, where if wifi is temporary unavaliable , device switch can still operate normally, and when wifi is back,it will reconnect.
if i switch to standalone protocol , would i have mqtt ?
My issue is that sometimes wifi connection may gone and then devece is ussles. I just need setup, where if wifi is temporary unavaliable , device switch can still operate normally, and when wifi is back,it will reconnect.
Who is online
Users browsing this forum: No registered users and 45 guests