So i have a couple of raspberry pi’s running in my house so i can control my thermostat, audio, lights and hoses for the garden but i wanted to change my kitchen a little and i saw some kitchens on the internet with lights in the bottom of the whole kitchen.
I thought hmm could it be possible, so i started to search on the web if other people tried to control an led strip.. duhh so many people did it but an specific instruction was a little bit difficult to find.
After a while i did find enough instructions so i made an list with the hardware i needed to control an rgb led strip and the supply’s to install it in the kitchen.
So the list was:
- RGB ledstrip, i didn’t want to spend a lot of money because i haven’t worked with it so i could wreck it the first time 🙂 so i bought this one: Renkforce 5MAC862W for € 17,99
- Then i needed some transistors, for the sake of safety that if i wreck an transistor and cant keep trying to control the led strip i bought 40 of them: Transistor TIP120STM TO220 for € 0,28 a piece
- Raspberry pi Zero
- Microsd card
- Some Male Female jumper cables, just enough to connect everything. i bought enough last year on AliExpress so no worry’s here.
- Cable tray 2.5 m
- UTP Cable, 2 m
To install the led strip in the kitchen i bought an simple cable tray of 2.5 meters, we will use both sites of the tray because we don’t want the ledstrip closed inside the tray but the tray will hold the ledstrip in one line and displays it nicely on the ground 🙂
So the next friday everything was delivered at home so i started by connecting the led strip to the raspberry pi using the breadboard, jumpercables and the transistors.
i used the instructions on: http://dordnung.de/raspberrypi-ledstrip/ using the following scheme’s
for the easy modus i also added an push button to the breadboard so i could test my api and ledstrip. To simple add an button just have 1 pin added to ground and the other to an bcm gpio pin.
When i was done with the instructions i tried the example script and you know what the led strip wasn’t working… After an hour looking at a simple 4 line script to turn the led strip on and checking the breadboard again and again i was sick of it and begun to mess around with the led strip. apparently the rgb connections where different than the led strip itself say’d so my + was on an other pin and my r and b where switched…. strange that they wrote it down differently on the led itself but pff i was happy that it was working 🙂 !!
So the led strip was working and i could control the colors, i was so happy until i thought about the installation in the kitchen. How could i connect the led strip to the raspberry without seeing any awful cables or jumper wires. After some thinking i thought an UTP cable has enough connectors in it maybe it could work so i tried that and yes after some soldering and connecting the right cables to each other it was working 🙂 so now the final step, installation in the kitchen itself.
First a nice place for the raspberry and the power for the led strip and the raspberry itself. It seemed that i was lucky because an kitchen tray wasn’t as high as it could be so i’ve had enough space in an tray 🙂
Than it was just installing the cable tray beneath the kitchen and put the led strip in it
First i tried a couple of meters to look how it was, and actually it wasn’t to bad. so i went on with the rest of it and tadaa.
Now i needed to write the api for it so i could control the led strip using my domoticz installation.
1,2,3 and poof i’ve had an simple api which controls the transistors so i could control the colors using an selector switch in domoticz.
But i wasn’t ready. my purpose of these actions is at an moment in the future my house can think a little bit for itself. I remembered what an friend of my has in his own house. And lamp or led strip that colors blue when it starts to rain within 20 min.
I thought you now what, i will do that as wel. so i’ve searched the domoticz sites for the buienradar lua script and found the is it gonna rain wiki: https://www.domoticz.com/wiki/Is_it_gonna_rain
Here i found the script for the rain and created an extra lua script which checks if the switch rain is on it will change the kitchen led strip to Blue and saves the old value to an user variable.
The reason for this was that if the rain switch went off that the kitchen led strip will change into his old value again.
and you know what, for the first time it worked at once 😀
so another project done and that in one weekend of work 🙂 up to the next one