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...

    0_1489403323507_upload-2167b1c3-2d16-4de5-805d-f5b8eff5b243 0_1489403343628_upload-5a480014-3f13-4aa6-9f6c-3c8a39d12a49 0_1489403403817_upload-42e052a0-ec6c-4642-a2ff-fed76e74172f

    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... 😉


  • Hero Member

    @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.


Log in to reply
 

Suggested Topics

  • 87
  • 7
  • 10
  • 6
  • 7
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts