Connect a Light to the Weather Forecast

583

11

3

Use the weather to change the color of your lamp, to create your personnal ambiance !

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Get a Z-wave Key and the Bulb:

The key:

The bulb:

https://www.amazon.fr/Aeotec-LED-RGBW-lampoule-ZW098-
C55/dp/B0117ZX936/ref=pd_sim_60_11? ie=UTF8&dpID=31FhkNgq7DL&dpSrc=sims&preST=_AC_UL160_SR115%2C160_&refRID=T3T9 BWX3A8KWRP371MCW

TimeSquAir :

https://www.amazon.fr/Digital-Airways-TimeSquAir-connect%C3%A9-
%C3%A9ducatif/dp/B014D0RBWC

Go on the menu → import → node then type «ttb-zwave», wait for the install then reboot.

I let you refer at those tutorials, I can't explain better:

http://thethingbox.io/docs/ZwaveUI.html

http://thethingbox.io/docs/ZWaveAeotecBulb.html

Step 4: Create the Flow

In the workspace «Z-wave» copie the node «Aeotec, LED Bulb» in a new workspace.

Then add the node «zwave» in the Automation section and activate the workspace. You can now interact with the Bulb.

Step 5: Get the Weather

Add the node «inject» and set it like on the first pitcure, you can set the interval as you want of course.

After that, link the nodes «meteo», «function», «switch» and finally two «Color» like on the second picture.

Let the node «meteo» as it is.

Open the node «function» and write this code inside:

return msg;"

This code will get just the number of the temperature. At the beginning the node «meteo» display something like: «Paris:13°C». So what I've seperate this sentence with the method split(), first I'll seperate {Paris} and {13°C} with the caractere «:». Then I seperate {13} and {C} with the caracter «°». Finally I convert the string we have into an integer with the method parseInt().

Step 6: Configure the Color of the Bulb

Now you must configure the switch ( example on the fisrt picture). Then link it to the nodes color and set it like you want. Activate the work space and it's done !

Recommendations

• Internet of Things Class

22,784 Enrolled

3 Discussions

You lost me when the fist link is not in English

I am not able to read that

2 replies

Ho yes sorry I haven't realise this haha, I'll translate this part soon.