Are you bored with your ordinary lights? You can make them change just by clicking the button or shaking the little device. With HARDWARIO IoT Kit there is a smart and easy solution.
You will need just two devices that will control lights in your room or anywhere else.
It is customizable thanks to the HARDWARIO IoT Kit integration with Node-RED.
1. Build hardwareAs was said earlier you will need two devices.
Start with the Push button kit, you will use it to control the light effects with accelerometer and the orientation of the whole thing, also you will be able to control brightness and color with the button.
The second device contains the Power Module, Core Module and LED strip, I used the one with 144 LEDs. Just put the Core module on top of Power Module and connect the LED strip to it.
After you have both devices ready you can move on to the second step.
- Download HARDWARIO Playground.
- You can see documentation page on how to flash the firmware with HARDWARIO Playground.
- You will need the bcf-radio-power-controller-rgbw144 firmware for this project.
- And you will also need the bcf-radio-push-button
You need to pair the Core module with the Radio dongle that you are using, follow the instructions below to see how it is done.
The same thing will go if you are using a Raspberry Pi as a server, just access the Raspberry through the IP address instead of the Playground
- Connect your USB Radio Dongle to your computer.
- Open HARDWARIO Playground
- Click Start Pairing the LED on the dongle should start blinking
- Connect the device that you want to pair into your computer or insert the batteries.
- Wait for the device to appear in the table
- It should add the device with the Alias: power-controller:0
- The second device with the radio push button firmware should appear as push-button:0
- Click Stop Pairing
After you did all this you can unplug the device from the computer and insert the batteries, it will run on them without a problem. Next steps will be done on the computer, so you can leave the device and focus on the Playground.
4. Import FunctionOpen Node-RED in the Playground or Raspberry Pi and import the flow from the Attachements in the Menu -> Import -> Clipboard. Do not forget to hit "Deploy" in the top right corner to apply the changes.
This function is ready to be used, you can do some changes but if you are fine with effects as they are here and the colors are fine too. You are ready to start using this solution.
Use of the Push button kit is simple. You can control the brightness of the LED strip by pressing the button.
If you hold down the button random color will appear
Or you can use the orientation of the device to select the effect that should be shown. you can use up to 6 effects due to the six sides of the device.
You can customize some things in the flow. Basically, it is the effects that will be shown at the specific orientation of Push button kit, and the colors that are randomly selected from the array.
If you want other effects you can get them in the documentation.
If the effect JSON has color in it like this one:
{"type":"pulse-color", "wait":200, "color":"#ff0000"}
It should go to the upper node with name Effects with specific color you just paste the effect JSON instead of another one that is already there, you can, of course, add more field in there.
Pasted JSON should look like this
{"type":"pulse-color", "wait":200, "color":"
This way the color that was used last time when you choose the color by button will show with the effect.
If the effect does not care about the color like the rainbow effect you put it into the lower node with name Effects without specific color.
You can add some more colors into the array on the first line at the color swap node. Just add some to the end or remove any of them, the only thing you have to do is to follow the format, otherwise, it will cause some troubles.
Hex codes of colors are available for example on this page.
7. Place your LED stripFind some spot for the LED strip, you can control it from all over your house. I choose my computer so I can use the transparent side. I placed the Push button kit onto my table so I can change the mood at any given time just by pressing the button or flipping it to the side.
You can simply put more light strips all over your house, sync them together or separate them so anyone can change their lightning in the room as they feel.
Play with the effects, assign them to another orientation, use completely different ones.
You can also use the thermometer function so on some side the Push button kit will make the LED strip to show the temperature in the room. You won't need any other module. The firmware that we used sends the temperature regularly to the Node-RED so you just add some nodes and it is done.
Feel free to ask any questions about this project.
- Visit HARDWARIO page on hackster.io for more interesting projects or go directly to their website
- Go to HARDWARIO documentation to learn more about their modules and other possibilities of the platform.
- Try more firmware from HARDWARIO Playground or write your own, it is easy to start.
- Because everything is Open source you can get all firmware on GitHub, get some inspiration and try to make your own applications.
- Get your own HARDWARIO Hub to replace your computer in this project so you have always access to your applications.
- Check out more applications that can be used with HARDWARIO IoT Kit in Integrations section.
Comments