Page 1 of 1

Need advice on espeasy switch

Posted: 14 Nov 2020, 21:41
by Grumpf
Hi Guys, I want to build a simple remote control for various tasks. One of my objective is to be able to have a pushbutton that can trigger other Nodes through HTTP/MQTT commands. I want Domoticz (or insert your app here) to know about it but I want the switch to work even when the server is down.

So... deep deep sleep, only working when I press a button (We'll do test now then 3D print something not too ugly after prototyping).

Any advice ? Ideally it should be able to run on small battery in order for the device to be not too thick but that's for later optimisation.

I have some RF433 switches that works well but they need the middle men: "RFXCOM & Domoticz". I'd like to be free of 433 at some point.

Voilà, so just a first post, I'll add more later and thanks a lot already.

Cheers,
Grumpf.

Re: Need advice on espeasy switch

Posted: 27 Dec 2020, 17:17
by cwhb2020
Hi Grumpf,

i have setup such a switch by modifying the water/flooding sensor described in https://esp8266-server.de/Wassermelder.html

The idea is that the ESP01 is virtually inactive, consuming just a few uA while the CH_PD pin is pulled low.
It's a while ago, if i recall correctly i had serial logging disabled so the RXD, TXD pins could be used as GPIO as well.
One button pulling CH_PD & RxD (=GPIO3) high and second one doing the same with CH_PD & TxD (=GPIO1) plus two rules as shown below did the trick.

txd#State
on txd#State=1 do
SendToHTTP 192.168.20.249,80,/cm?cmnd=Power%20On
endon

rxd#State
on rxd#State=1 do
SendToHTTP 192.168.20.249,80,/cm?cmnd=Power%20Off
endon

I have just played around on a breadboard, not built it actually for real usage, it worked as expected anyway.
Except you have to keep the button pressed 3 - 5 seconds, that's the time the ESP01 takes to wake up, connect to the WiFi and sent out the HTTP command.

However i'm sure in terms of battery life this should be very effective.


Hth,
Chris

Re: Need advice on espeasy switch

Posted: 27 Dec 2020, 17:35
by Grumpf
Looks great Chris, I'll look over it tomorrow thanks a lot for your time !
Cheers.

Re: Need advice on espeasy switch

Posted: 09 Feb 2021, 18:33
by Grumpf
Was on another projects for a while. I've bookmarked this and post as soon as I've made some progress.
Tx again.