-
Notifications
You must be signed in to change notification settings - Fork 5
2.6 Tutorials on using the Smart Home Blocks
Before you try out the programs below, make sure you have followed the Tutorial on integrating smart home devices to connect your devices to CAIT.
As smart home devices are getting more popular, you likely have one or more of these devices at home. With CAIT, you can easily control these devices. In the program below, we show you how to turn on a smart light and then change its color within the Visual Programming Interface. In the program, we selected a light called "living room", but you may have a different name for your light; feel free to choose your own light.
After you run the program, you should find your smart light turn on and change to an orange color.
Besides smart lights, CAIT can also control smart speakers. The program below shows how to play music on a smart speaker and control the output volume. Note that your speaker should already have a playlist set up before you run this program.
After you run the program, you should start enjoying the music coming from your speaker.
Note: If you place any of the smart home blocks within a loop that keeps executing these blocks rapidly, you will notice a significant delay in the control of your smart home devices. This is because it takes time to send commands to your smart home devices and make sure they executed correctly. If too many commands are sent at short intervals, they will be queue up for execution one by one. This can cause unwanted delays for future commands. You can store the state of each smart home device in a variable and only send a single command to change its state when the device is not in its desired state.