Need advice on espeasy switch

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
Grumpf
Normal user
Posts: 124
Joined: 05 May 2017, 23:45
Location: Namur

Need advice on espeasy switch

#1 Post by Grumpf » 14 Nov 2020, 21:41

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.

cwhb2020
New user
Posts: 6
Joined: 23 Dec 2020, 15:39

Re: Need advice on espeasy switch

#2 Post by cwhb2020 » 27 Dec 2020, 17:17

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

User avatar
Grumpf
Normal user
Posts: 124
Joined: 05 May 2017, 23:45
Location: Namur

Re: Need advice on espeasy switch

#3 Post by Grumpf » 27 Dec 2020, 17:35

Looks great Chris, I'll look over it tomorrow thanks a lot for your time !
Cheers.

User avatar
Grumpf
Normal user
Posts: 124
Joined: 05 May 2017, 23:45
Location: Namur

Re: Need advice on espeasy switch

#4 Post by Grumpf » 09 Feb 2021, 18:33

Was on another projects for a while. I've bookmarked this and post as soon as I've made some progress.
Tx again.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 30 guests