-->
Page 1 of 1

ESP8266-01 use as wireless button?

PostPosted: Fri Aug 14, 2015 2:29 pm
by burton666
I would like to fit a battery powered ESP8266-01 behind a dummy wall-switch and have the ESP8266 send a REST command every time I toggle the switch. Would a rather small battery like cr2450 still be enough to make the switch run for +1year ? I would think that the switch would only be toggled a few times a day like <5.

Second question would be if the respons-time would be fast enough. From switch press I would like to have the ESP8266 to wake up and send REST command in <1sec. Is this possible?

Re: ESP8266-01 use as wireless button?

PostPosted: Fri Aug 14, 2015 4:53 pm
by tytower
Using deepSleep() and interupts you could wake the module when it senses a gpio is high and have it sleep for regular periods between being interupted so that part should be easy and the battery might last that long if you get it all right.

However you have a source of power right there . Could you not harness a wall wart inside the wall.

Re: ESP8266-01 use as wireless button?

PostPosted: Fri Aug 14, 2015 5:45 pm
by martinayotte
The Barnabybear circuit shows exactly that, simply replace the PIR sensor with a button :

viewtopic.php?f=11&t=4458&hilit=wake+up#p25583