First off team please let me know where to place this. I’m thinking it might be better if I write up all the details and then point this group to it. Have git account so can move the code up there? Thought on that.
Okay. Overall project was that I had seen advertised nightlights that you put under your bed that turn on when you get up during the night. Great, but better if it was OpenHab controlled. Looked around and not seen this type of project of the forum so off I went.
Sensor so it would detect movement from me getting up from out of the bed = PIR Sensor
LED Strip and be able to control the colour that displayed at night so not wake me up to much (aka no blue)
Be also able to tell the unit I what color I wanted.
Breakdown of components:
This got fun as I had an ESP12 unit and while I could work with it via Arduino code which I was familiar with the Pin out’s drove me crazy. The other bit which some time to work out is that the cheap LED strips work at 12 volts, so that was the feed voltage. The ESP12 module work at 3.3, and have fun figuring out making a PIR sensor work on an ESP12 chip at 3.3. (yes you can remove the voltage regulator and all that and its still does not work).
After days of frustration and two buck converters as I did not think they worked. Solution was to use the buck converter to drive down to 5.5 volts then feed that to the PIR sensor and also provide the ESP12 with 5 volts. Some heat loss there, but also the PIR outputs 3.3 or there about so it all started to work. Lots of time also spent understand how the frecking pin maps work. That a big issue. Go back to Arduirno Lib on this. I does work.
All this time I was using some great libs on the ESP12 and will amend later with the full credits. Homie is one of the best out. I thought about this for a while and then hell, stop inventing the wheel because you could. Better to use a great library that works brillantly. Other one was the LED lib.
Finish now. I got it all to work with OpenHab using Homie into MQTT. Went a few steps further thou and got into 3d printing and have the full case for it as well.
Huge and wonderful learning trip for me in ESP12 / ESP32 / OpenHab/ 3DP/ MQTT.
Thanks . Now here do I place all the gory details of this