Skill Level: Any Skill Level


This recipe is a continuation of AV04 and extends the previous application to issue email notifications under given sensor conditions.

Please visit our website for the latest BCM4343W recipes:


  1. Please complete Part 1 of this tutorial

    • This recipe is a continuation of the Avnet to Alexa Smart Home Demo (AV04), so make sure that you have part 1 completed first.
  2. Configure your Node RED Code

    • In Node RED, configure the node “Output to dashboard” as follows, where XXXX is the four digits of your device ID:


  3. Register your Device

    • Go to your bluemix console and scroll down to select the appropriate iotf service.




    • Click on “Launch” to access your Bluemix Services dashboard:


    • Hover your mouse over the icons to the left to open up the pop-out menu, then select “Devices”. Click “Add Device” in the top right corner of the screen.


    • Click on “Create device type”, then click “Create device type” again.


    • Enter “ZentriDevice” for the Name and add an optional description and click next to skip through rest of the windows until you reach the last page – Metadata. Click “Create” and you should now see a “ZentriDevice” device type.


    • Click “Next” and enter in your “zentri_XXXX” device ID from earlier. Skip through the remaining windows and click the “X” when finished.


  4. Create a Device Schema

    • You will now need to create a device schema – Select the “Manage Schemas” tab on the top menu from the devices page to create a device schema.


    • Click “Add Schema” In the top right corner, select “ZentriDevice” for your device type and press “next”.


    • Click “Add Property” and select the “From Connected Tab”, which will automatically import published properties.


    • Tell Alexa to “start publishing” to see properties appear on the menu. Select all by checking the box next to property.


    • Click “Finish”. You should now see a schema listed as “ZentriDevice” back in the Schemas menu:



  5. Create a Rule

    • Hover your cursor over the icons to the left of the page again to open the pop-up menu again. Select “Rules” and then click on “Create Cloud Rule”.


    • Enter a name for your rule, an optional description and select the “ZentriDevice” schema in the “Applies to:” box.


    • Click next and you should see an “IF/THEN” Diagram. Under the IF condition, click the “New Condition” box and “Select Property” to choose the property for the IF condition. Click on the triangle icon next to “d” to open up a drop-down list of additional nested properties select the “light_level” property.




    • Leave the operator as “>” and enter an arbitrary value for the “Value:” box as we are comparing whether the light is on or off. For this example, the value 200 is used. Click “OK”


    • Now select the “New action” box to create a response to the IF condition. Click on “Add Action” to open up a new menu for editing. Give your action a unique name and description, then select “send email” for “Type”. Press “Next” when complete.


    • Now to configure your email, edit the subject line if you wish, and select “Specific People” under the “To” header. Enter the email address(es) you wish the notification to be sent to. In addition, you can also include emails for CC.


    • When complete, press finish and click on “save” and “activate” on the top right corner of the main rule menu to start your email notification application.


  6. Test your Email Alerts

    • Hover your cursor over the left pop-out bar and select “Boards”. Then click on the “Rule-Centric Analytics” board.


    • You will now see several “cards” that display rule-related information. Try asking Alexa to “start publishing” and shine a light on the light sensor to trigger the email to see how these cards react.


    • Check your email to see the notification.


  7. Extend this Application!

    • Once you have successfully built this application, feel free to experiment with different IF conditions and THEN actions. There are many other actions that can be implemented with rules, such as triggering a Node-RED flow, IFTTT, etc.


Join The Discussion