Help building battery powered switch for scene control!
-
Hi!
I'm just getting started with MySensors and have managed, after some difficulties, to get a ethernet gateway up and running together with my Vera.
However, the distance sensor for my wood pellet storage I built didn't work. I assume the range was to far for the NRF24L01+ I use and I can't get NRF24L01+PA+LNA to work.
I was then thinking about building devices that are not easily available. Sure, I could build some temperature and humidity sensors but because I'm also using a RFXtrx433E with my Vera I could just buy a cheap 433MHz sensor from the local store.
One thing my wife have talked about is a button by the bed that could trigger different scenes. I've bought and tried several commercial Z-Wave scene controllers but they are slow and unresponsive.
Preferably I would like to use the same kind of light switch we use for our ordinary electrical wiring, but make it battery powered for easy installation.
The switch we use around the house is called Schneider Renova and is available for surface mounted installation. I think it would be possible to cram a Arduino and battery pack in...
However, because I'm a beginner I don't really know what sketch I should use!
The scene controller seems overly complicated (https://www.mysensors.org/build/scene_controller) because I won't be using a touchscreen and the binary sketch (https://www.mysensors.org/build/binary) doesn't seem to work with momentary buttons. I'm assuming momentary buttons would be best for this?
Could someone please point me in the right direction? It would be good for my self esteem to be able to build something working and useful now that I have ordered lots and lots of components...
-
@Aron-Sjöberg Great switches, I thought these went out of production in the 60'ties
As you are going for a battery powered solution a good starting sketch would be the motion detector. Just replace the motion sensor with the switch and you are almost done. The switch will probably need some debouncing. Add a ``sleep(100)``` to avoid retriggering.
If you want to use a momentary switch you need a variable to save the last state.
Suggested Topics
-
Over the air updates
General Discussion • 23 Mar 2014, 21:38 • ToSa 1 Mar 2015, 11:21 -
hlk-pm01 are to noisy for rfm69?
Hardware • 5 Aug 2023, 21:16 • Tmaster 9 Aug 2023, 16:28 -
Does MySensors require Arduino Timer 2?
Hardware • 6 Jan 2024, 19:39 • OldSurferDude 11 Jan 2024, 04:39 -
Sensors and more
Hardware • 19 Jun 2023, 00:41 • Robert Leverett 19 Jun 2023, 00:41 -
Sensor to detect marijuana vape/smoke
Hardware • 21 Jan 2025, 06:36 • Hellmark 25 Feb 2025, 20:56 -
"Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design"
Hardware • 24 Jan 2024, 23:06 • wrendral 3 Feb 2024, 07:13