Components and supplies
Resistor 220 ohm
LED RGB common cathode
Arduino MKR WiFi 1010
Jumper wires (generic)
High Brightness LED, White
Breadboard (generic)
Arduino MKR ENV Shield
Apps and platforms
Arduino IoT Cloud
Arduino Web Editor
Amazon Alexa Official Arduino Skill
Project description
Code
Downloadable files
mkr1010 schematics
mkr1010 schematics
mkr1010 schematics
mkr1010 schematics
Comments
Only logged in users can leave comments
umbertobaldi95
2 years ago
Hello, as mentioned in the tutorial, the temperature is red thanks to [this](https://store.arduino.cc/arduino-mkr-env-shield) shield
Anonymous user
2 years ago
Hello, I have the Arduino MKR 1000 and I would like to control a servo with Alexa. How is that manageable ? Because there is no pre made projects to control something else than a light or a TV. How do I get access to the data that are updated in the cloud to understand how to invoke Alexa ?
Anonymous user
2 years ago
Everything works up to the point of finding the devices in the Alexa app. The device works through the Arduino IOT Cloud dashboard but not on the Alexa app when finding devices. Same Wifi, Installed Arduino Skill, Linked account, but no devices found.
Anonymous user
2 years ago
Really interesting project. Impressive the way users are shielded from the complexity of IoT & Alexa integration. One bit that is missing is how to tell if the board is connected. Any suggestions for that?
umbertobaldi95
2 years ago
Hello, you can use the Serial Monitor for that, [here](https://create.arduino.cc/projecthub/133030/iot-cloud-getting-started-c93255) there is a tutorial on Arduino IoT Cloud, there is also a section about the Serial Monitor :) If you are searching for a more permanent solution maybe you can use a LED and turn it on if the connection is working
Anonymous user
2 years ago
Ditto on everyone who said great tutorial. Very easy to setup and get going. You might want to let folks know that if they don't have a maker shield, they can just use the MKR1000 by itself. Just comment out the MKR initiation code in setup. They can still do the part of the project that lets the lights go on and off. BTW, my colored LED doesn't match the color Alexa is sending. I need to check my wiring. I saw you asked another commentor for suggestions on what Alexa device types to add. My suggestion is a couple of very simple, generic ones that we can map to various devices and sensors. So a device we can send numeric commands to and a sensor that can just read any range of numbers.
Anonymous user
2 years ago
But... for now it seems like we can hack the colored light to send 16 different commands to the device (one for each of the different Alexa setting for colored lights) and use the temperature sensor to read any input. For anyone interested in checking that the sensor part works, just take out the MKR initiation code in the setup and add this code to loop: uint8_t r, g, b; iot_loungeArea.getValue().getRGB(r, g, b); iot_temperature = r ; And then if you ask Alexa the temperature it returns the red value of the LoungeArea light. (To check this, you can put all the Alexa devices in a group called IOT Test and ask "Alexa what is the temperature in IOT Test". Or just look at the sensor in the Alexa app.)
Anonymous user
2 years ago
This is a great project that I could learn a lot with besides being fun to make but the code is no longer available
umbertobaldi95
2 years ago
The code is included at the end of the tutorial :)
Anonymous user
2 years ago
Why do you say the code is no longer available? It's included in the article.
Anonymous user
2 years ago
Thank you for this great project! I am able to add any of the "Smart Home" properties to a sketch, download to Nano 33 IOT, connect to Arduino Cloud and send/receive commands to/from Alexa. However, Alexa has a new capability since 2018 - When it receives a message from a Contact or a Motion Sensor, that signal can be used in "Routines; Add Routine; When This Happens; Smart Home (all 'triggers' show up there')" to launch a Routine. So instead of saying, "Alexa" is there someone at the door? you can create a routine so when the motion sensor near the door is 'detected' Alexa will say, "there is someone at the door". (and, with Arduino - turn on a light, ring a bell, raise a flag, whatever...) This works fine with a motion sensor I bought from Amazon and it works with an Arduino connected to Samsung - SmartThings cloud - both 'skills' of Alexa. But I can't get the Arduino - Arduino Cloud connection to show the "Smart Home' device in 'Routines'. I need to do this because there are some really good things the Arduino-Arduino Cloud connection will do that the Arduino-SmartThings connection will not do. Is there something I should do differently or is this a capability not (yet??) available? Thanks
Anonymous user
2 years ago
Are you able to ask Alexa to tell you the status (or state) of the Contact Sensor?
umbertobaldi95
2 years ago
Hello! Thanks for the request! It's a functionality we are currently watching into. It only has to be implemented in the code of the skill. So stay tuned ;)
Anonymous user
2 years ago
Great project that has inspired me to explore more about IOT. I am having a problem with the temperature, however. Alex and the dashboard show the temp as -1 degrees and this never changes. Any suggestions on where I could look to fix this?
Anonymous user
2 years ago
Sir can I just wire up showed in the schematics and upload the programming without setting up Arduino Amazon Alexa official Arduino skill and Arduino iot cloud.
Anonymous user
2 years ago
Congratulations! Based on the info in your example I could build a very simple PoC, which simply toggles the state of the LED on the MKR board. I also declared a counter, as a simulated temperature sensor, which increases each time, when the LED changes. The only point, which is not clear for me, what are the naming conventions for Alexa? Saying "Alexa, switch on LED" works, but I could not find out, how to ask Alexa to read the value of the counter? I'm sure this is based on my minimal knowledge on Alexa, but could you suggest some documentation about defining Alexa's commands?
umbertobaldi95
2 years ago
Hello! Thanks for your interest! Basically a property created on Arduino IoT Cloud (from the Smart Home section) has the same name as the device found by Alexa. So if you create a new property called `Temperature` on Arduino IoT Cloud you will find it in the Alexa app by the name of `Temperature`. This simple explanation should help you. If you want to understand more on Arduino IoT Cloud I suggest you to read [this](https://create.arduino.cc/projecthub/133030/iot-cloud-getting-started-c93255) interesting tutorial. 😃
Anonymous user
2 years ago
I see the following lines of code: loungeArea.getValue().getRGB(r, g, b); if (loungeArea.getSwitch()) { Where do you find the API for the Colored Light property (or the Dimmed Light)? And is there an API for the Contact Sensor?
Anonymous user
2 years ago
il y a un erreur analogWrite(PIN_LOUGE_AREA_G, O); il manque le N a LOUGE
Anonymous user
2 years ago
Will the Alexa integration work if I am using the MRK1010 to send discrete signals to the inputs of a PLC?
Anonymous user
2 years ago
thank you for the tutorial. however despite choosing smart home properties i cant get them to show up under devices with alexa... The control over the dashboard however works. Anybody has got an idea?
umbertobaldi95
2 years ago
Hello! Have you enabled the Alexa skill? If yes, have you used the same e-mail to register to the skill?
Anonymous user
2 years ago
A very interesting tutorial. but I still don't understand how the connection with alexa happens
Anonymous user
2 years ago
Many thanks! It is an amazing project! I have another question. How can I set the keyword with alexa? Are they preset defined on the type of property I have choosen, or can i choose?
umbertobaldi95
2 years ago
Hello, sorry for the delay. What properties would you like to use in the future? Maybe I can talk with the development team.
umbertobaldi95
2 years ago
Hello! Thanks for your interest! Basically a property created on Arduino IoT Cloud (from the Smart Home section) is mapped to a device with the same name in Alexa.
umbertobaldi95
2 years ago
Thank you! The name of the device on the Alexa app is the same as the property name. For example if you create a property called `Light` in Arduino IoT Cloud, in the Alexa app you will find the device called `Light`. It's as simple as that! Remember to use property types under *Smart Home* section.
Anonymous user
2 years ago
Thank you for your article. Unfortunately I found it very limitative to have only few properties under SMART HOME, for example I would like to send to Alexa th HUMIDITY readings as long as the temp but I cannot because they are not discovered if they are not in the proper section... frustrating...
Anonymous user
3 years ago
Sir can I just wire up showed in the schematics and upload the programming without setting up Arduino Amazon Alexa official Arduino skill and Arduino iot cloud.
27062005
3 years ago
http://www.juggling.ch/gisin/microcontroleur/code_exemples.html
Anonymous user
3 years ago
Hello, I have the Arduino MKR 1000 and I would like to control a servo with Alexa. How is that manageable ? Because there is no pre made projects to control something else than a light or a TV. How do I get access to the data that are updated in the cloud to understand how to invoke Alexa ?
Anonymous user
4 years ago
il y a un erreur analogWrite(PIN_LOUGE_AREA_G, O); il manque le N a LOUGE
Anonymous user
4 years ago
Everything works up to the point of finding the devices in the Alexa app. The device works through the Arduino IOT Cloud dashboard but not on the Alexa app when finding devices. Same Wifi, Installed Arduino Skill, Linked account, but no devices found.
wmurphy41
4 years ago
Ditto on everyone who said great tutorial. Very easy to setup and get going. You might want to let folks know that if they don't have a maker shield, they can just use the MKR1000 by itself. Just comment out the MKR initiation code in setup. They can still do the part of the project that lets the lights go on and off. BTW, my colored LED doesn't match the color Alexa is sending. I need to check my wiring. I saw you asked another commentor for suggestions on what Alexa device types to add. My suggestion is a couple of very simple, generic ones that we can map to various devices and sensors. So a device we can send numeric commands to and a sensor that can just read any range of numbers.
wmurphy41
2 years ago
But... for now it seems like we can hack the colored light to send 16 different commands to the device (one for each of the different Alexa setting for colored lights) and use the temperature sensor to read any input. For anyone interested in checking that the sensor part works, just take out the MKR initiation code in the setup and add this code to loop: uint8_t r, g, b; iot_loungeArea.getValue().getRGB(r, g, b); iot_temperature = r ; And then if you ask Alexa the temperature it returns the red value of the LoungeArea light. (To check this, you can put all the Alexa devices in a group called IOT Test and ask "Alexa what is the temperature in IOT Test". Or just look at the sensor in the Alexa app.)
Anonymous user
4 years ago
Great project that has inspired me to explore more about IOT. I am having a problem with the temperature, however. Alex and the dashboard show the temp as -1 degrees and this never changes. Any suggestions on where I could look to fix this?
MarceloKenji
4 years ago
Great Project! Congrats!!! I'm searching for the best alternative for my home automation project, using Alexa. After reading about your project, Arduino Iot Cloud seems to be the best choice for me. I just have a few doubts before investing and starting, and it would be awesome to hear from you. The first challenge is related with my electrical water heating system, backup to the solar one. It's nowadays a simple manual Switch on/off system. I'm planning to evolve it, step by step: A) Turn on/off the system using direct Alexa voice comand "Alexa, turn on/off the heater"; B) Then, also using a direct voice comand to keep it on, during a certain period of time: "Alexa, turn on the heater for 1 hour"; C) After this, try to control the water temperature inside the boiler for a period of time: "Alexa, keep the water temperature on 40o Celsius for the next 4 hours"; D) Supposing I'm out of home, create a routine on Alexa that can check the temperature and then define what to do: "Alexa, arriving home" and if the temperature is under 38o celsius it turns on the heating system for 1 hour, for example; E) The last scenario my imagination have created for now, is to read the information on Waze, for example, to know I'm going home and how much time I'll get to arrive, and, if the water temperature is under 38o celsius, it turns it on the heating system 1 hour before my arrival and keep the water on 40o C, for example. Doubts: 1) Is it possible to connect wifi sensors for water temperature on Arduino? And also wifi relays for actuators? Any specific model? Just because the boiler is over the roof, and wired connections become things harder on this case. 2) I noticed that we need to identify the sensors and actuators individually on Alexa and the comands sent was always directly to turn on/off each one or to simply read an information from them. How can I read from Alexa, for example, the information "1 hour" given by my voice comand, to use it on a loop inside Arduino Web Editor to keep the system on for this period of time, or to read the "40 o celsius" information from Alexa to use it on a range to control the system? 3) How to count time inside a loop on Arduino Web Editor? 4) How to send, from Alexa to Arduino, a complex comand with teperature and time information, starting from a simple Alexa routine event (Alexa, arriving home)? 5) Is it possible to get information from my Iphone GPS system, or route information from Waze? 6) How many wifi actuators and sensors can I connect to a Arduino MKR Wifi 1010? I want to use the same board to control the gates from the garage, and a lot of lights over the house. 7) Do you know any wifi water tap I can control with Arduino? I'm thinkng on the bathtub. Thanks in advance for any kind of help or tips you can provide! Kenji
wmurphy41
2 years ago
I think you're overloading Arduino. You could maybe do the things you're talking about, but your pushing it. Arduino reads sensors that are directly connected to it through it's pins (or through the maker shield which seems like just and extension of its pins). It does very simple command communication through wifi. If you have multiple IOT sensors, you would want to have them communicate to a controller which had the logic you described. Then that controller could use your Arduino to trigger the heater.
Anonymous user
5 years ago
I see the following lines of code: loungeArea.getValue().getRGB(r, g, b); if (loungeArea.getSwitch()) { Where do you find the API for the Colored Light property (or the Dimmed Light)? And is there an API for the Contact Sensor?
Anonymous user
5 years ago
Will the Alexa integration work if I am using the MRK1010 to send discrete signals to the inputs of a PLC?
Anonymous user
5 years ago
Thank you for this great project! I am able to add any of the "Smart Home" properties to a sketch, download to Nano 33 IOT, connect to Arduino Cloud and send/receive commands to/from Alexa. However, Alexa has a new capability since 2018 - When it receives a message from a Contact or a Motion Sensor, that signal can be used in "Routines; Add Routine; When This Happens; Smart Home (all 'triggers' show up there')" to launch a Routine. So instead of saying, "Alexa" is there someone at the door? you can create a routine so when the motion sensor near the door is 'detected' Alexa will say, "there is someone at the door". (and, with Arduino - turn on a light, ring a bell, raise a flag, whatever...) This works fine with a motion sensor I bought from Amazon and it works with an Arduino connected to Samsung - SmartThings cloud - both 'skills' of Alexa. But I can't get the Arduino - Arduino Cloud connection to show the "Smart Home' device in 'Routines'. I need to do this because there are some really good things the Arduino-Arduino Cloud connection will do that the Arduino-SmartThings connection will not do. Is there something I should do differently or is this a capability not (yet??) available? Thanks
Anonymous user
2 years ago
Are you able to ask Alexa to tell you the status (or state) of the Contact Sensor?
umbertobaldi95
2 years ago
Hello! Thanks for the request! It's a functionality we are currently watching into. It only has to be implemented in the code of the skill. So stay tuned ;)
Anonymous user
5 years ago
thank you for the tutorial. however despite choosing smart home properties i cant get them to show up under devices with alexa... The control over the dashboard however works. Anybody has got an idea?
umbertobaldi95
2 years ago
Hello! Have you enabled the Alexa skill? If yes, have you used the same e-mail to register to the skill?
Filippo2019
5 years ago
A very interesting tutorial. but I still don't understand how the connection with alexa happens
umbertobaldi95
2 years ago
Thank you! The name of the device on the Alexa app is the same as the property name. For example if you create a property called `Light` in Arduino IoT Cloud, in the Alexa app you will find the device called `Light`. It's as simple as that! Remember to use property types under *Smart Home* section.
umbertobaldi95
2 years ago
Hello, sorry for the delay. What properties would you like to use in the future? Maybe I can talk with the development team.
umbertobaldi95
2 years ago
Hello! Thanks for your interest! Basically a property created on Arduino IoT Cloud (from the Smart Home section) is mapped to a device with the same name in Alexa.
Filippo2019
2 years ago
Many thanks! It is an amazing project! I have another question. How can I set the keyword with alexa? Are they preset defined on the type of property I have choosen, or can i choose?
Anonymous user
2 years ago
Thank you for your article. Unfortunately I found it very limitative to have only few properties under SMART HOME, for example I would like to send to Alexa th HUMIDITY readings as long as the temp but I cannot because they are not discovered if they are not in the proper section... frustrating...
Zsolt56
5 years ago
Congratulations! Based on the info in your example I could build a very simple PoC, which simply toggles the state of the LED on the MKR board. I also declared a counter, as a simulated temperature sensor, which increases each time, when the LED changes. The only point, which is not clear for me, what are the naming conventions for Alexa? Saying "Alexa, switch on LED" works, but I could not find out, how to ask Alexa to read the value of the counter? I'm sure this is based on my minimal knowledge on Alexa, but could you suggest some documentation about defining Alexa's commands?
umbertobaldi95
2 years ago
Hello! Thanks for your interest! Basically a property created on Arduino IoT Cloud (from the Smart Home section) has the same name as the device found by Alexa. So if you create a new property called `Temperature` on Arduino IoT Cloud you will find it in the Alexa app by the name of `Temperature`. This simple explanation should help you. If you want to understand more on Arduino IoT Cloud I suggest you to read [this](https://create.arduino.cc/projecthub/133030/iot-cloud-getting-started-c93255) interesting tutorial. 😃
Anonymous user
5 years ago
How is the temperature read? Do you need a temperature sensor?
umbertobaldi95
2 years ago
Hello, as mentioned in the tutorial, the temperature is red thanks to [this](https://store.arduino.cc/arduino-mkr-env-shield) shield
Anonymous user
5 years ago
This is a great project that I could learn a lot with besides being fun to make but the code is no longer available
davidfmackenzie
2 years ago
Why do you say the code is no longer available? It's included in the article.
umbertobaldi95
2 years ago
The code is included at the end of the tutorial :)
davidfmackenzie
5 years ago
Really interesting project. Impressive the way users are shielded from the complexity of IoT & Alexa integration. One bit that is missing is how to tell if the board is connected. Any suggestions for that?
umbertobaldi95
2 years ago
Hello, you can use the Serial Monitor for that, [here](https://create.arduino.cc/projecthub/133030/iot-cloud-getting-started-c93255) there is a tutorial on Arduino IoT Cloud, there is also a section about the Serial Monitor :) If you are searching for a more permanent solution maybe you can use a LED and turn it on if the connection is working
Anonymous user
2 years ago
How is the temperature read? Do you need a temperature sensor?