One easy thing that you can build with your child is a terrarium, but what about mixing this achievment with your DIY competencies and transform it into a connected terrarium.
Here is how to do it:
Bill of materials :
Terrarium
- Big recipient in glass with a top that can be drilled or cut (so as to pass the alimentation cable)
- A cap in plastic of another recipient that can fits into the bigger cap
- Different earth or little stones color.
- Plants
- Cup of something in plastic
- FTDI so as to program the Arilux the first time (after you can upload by Over The Air update)
- Arilux AL-LC0X
- Power supply for the arilux
- Rgb led strip
- Glue gun
We are not going to use the stock firmware of the ARILUX (of course ;-) so as to connect it to a home automation controller (in this case OpenHAB).
We will load into the Arilux the firmware from mertenats
So as to load the firmware follow the instructions on the first page of the repository, I used Option 2 to avoid soldering on tiny parts, my advice is to solder temporary the breadboard type wires to the Arilux board.
Set your credentials and servers into config.example.h and rename it to config.h:
- Uncomment the model of Arilux you are using and the line below the model, in my case it's:
#define DEVICE_MODEL "LC01"
- Set your WIFI_SSID
- Set your WIFI_PASSWORD
- Set your MQTT_SERVER
- Set your MQTT_USER & MQTT_PASS, if you don't use MQTT credentials let them as they are
Upload the firmware to the Arilux.
Open a command line so as to see the messages coming to your MQTT broker, if you are using mosquitto you can see all the traffic by typing:
mosquitto_sub -t +/# -v
Connect and RGB led strip and power the Arilux.
You should see a status message saying the Arilux is alive. The topic of your Arilux will depend on you chip id and will begin by RGB.
Now let's try to turn ON the lights.
So as to turn the light ON you can publish the following command (replace the first parts of the topic by the identification you gathered with the state topic:Open a command line so as to see the messages coming to your MQTT broker, if you are using mosquitto you can see all the traffic by typing:
mosquitto_sub -t +/# -v
Connect and RGB led strip and power the Arilux.
You should see a status message saying the Arilux is alive. The topic of your Arilux will depend on you chip id and will begin by RGB.
Now let's try to turn ON the lights.
mosquitto_sub -t rgb(w/ww)/<chipid>/brightness/set -m 255
mosquitto_sub -t rgb(w/ww)/<chipid>/color/state -m "255,255,0"
Now unplug the Arilux and remove the led strip.
Cut it to a length so as to fit into the smaller cap.
Drill a hole into both caps so as to pass the powerr cable of the Arilux, put the led strip into the smaller cap and paste it with a glue gun. Paste after the smaller cap into the bigger one.
Commentaires
Enregistrer un commentaire