Connect a Light to the Weather Forecast

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: de=df0&ref_=asc_df_B00YETCNOE34044884&tag=googshopfr-21

The bulb:
C55/dp/B0117ZX936/ref=pd_sim_60_11? ie=UTF8&dpID=31FhkNgq7DL&dpSrc=sims&preST=_AC_UL160_SR115%2C160_&refRID=T3T9 BWX3A8KWRP371MCW

TimeSquAir :

Step 2: Download Z-Wave Node on TimeSquAir

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

Step 3: Connect Your Key and Your Bulb to TimeSquAir

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

Connect your key:

Connect your Bulb:

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:

"msg.payload = msg.payload.split(":");

msg.payload = msg.payload[1].split("°");

msg.payload = msg.payload[0];

msg.payload= parseInt(msg.payload, 10);

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 !

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    3 Discussions


    3 years ago

    You lost me when the fist link is not in English

    I am not able to read that

    2 replies

    Reply 3 years ago

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