Alexa Node-RED integration with DuloNode

This flow begins with a DuloNode Hub and a DuloNode Device node. The Hub listens for voice commands from Alexa, while the Device represents the smart device you want to control—such as a light, fan, or switch.

When you speak a command to Alexa, the DuloNode Hub picks it up and passes it to the appropriate DuloNode Device. From there, you can look at the payload to figure out what action needs to happen—for example, turning something on or off.

The last step is to send that action to your actual hardware. This usually means sending an MQTT message or an HTTP request. The format, topic, or API URL you need will depend on your specific device, so check its documentation for the correct details.

Getting Started with DuloNode

To get started with Alexa Node-RED integration using DuloNode, you'll need two key nodes:

  • DuloNode Hub – This node connects your Alexa environment to Node-RED.
  • DuloNode Device – This node represents the smart device you want to control, like a light, fan, or switch.

Once these nodes are set up, you can start building flows that respond to Alexa voice commands and control your hardware through MQTT, HTTP, or other supported protocols.

[{"id":"f88a9620419a1883","type":"tab","label":"DuloNode Flow","disabled":false,"info":"","env":[]},{"id":"a66ad5f3d1a272b2","type":"group","z":"f88a9620419a1883","name":"Hub Zone","style":{"label":true},"nodes":["2a63e5a95f6ba233","c54dfb6e7fe7662e","4a8a03ce8f83cd98","2e330d5dca3b58e9"],"x":34,"y":39,"w":372,"h":302},{"id":"f8771b83f145fb4e","type":"group","z":"f88a9620419a1883","name":"Devices Zone","style":{"label":true},"nodes":["a332338e63fbc88d","4cd4fd220a8085dd"],"x":434,"y":39,"w":332,"h":302},{"id":"3964b3ac11596f36","type":"group","z":"f88a9620419a1883","name":"Payload Processing Zone","style":{"label":true},"nodes":["243f7ace77369e3b","5d9f7db7fcd9d1bb","ce19175fc58e7d48","7e57aa4aa4ceec7b","406297b8d34e3afa","4f0decc27ed1f455"],"x":794,"y":39,"w":392,"h":302},{"id":"43af534f9757d7cc","type":"group","z":"f88a9620419a1883","name":"Action Zone","style":{"label":true},"nodes":["03a34cf596d2d767","df4181ea4070a4df","9a45d581e305710a","580e5315a9236c10","e8481978a3b36e4e"],"x":1234,"y":39,"w":392,"h":302},{"id":"2a63e5a95f6ba233","type":"DuloNodeHub","z":"f88a9620419a1883","g":"a66ad5f3d1a272b2","name":"","plan":"Free","x":200,"y":300,"wires":[["a332338e63fbc88d"]]},{"id":"243f7ace77369e3b","type":"switch","z":"f88a9620419a1883","g":"3964b3ac11596f36","name":"Power State","property":"payload.components.PowerController.powerState","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"},{"t":"eq","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":890,"y":160,"wires":[["580e5315a9236c10"],["580e5315a9236c10"]]},{"id":"a332338e63fbc88d","type":"DuloNodeDevice","z":"f88a9620419a1883","g":"f8771b83f145fb4e","name":"Demo Light","deviceType":"light","x":590,"y":300,"wires":[["243f7ace77369e3b","5d9f7db7fcd9d1bb","7e57aa4aa4ceec7b"]]},{"id":"5d9f7db7fcd9d1bb","type":"range","z":"f88a9620419a1883","g":"3964b3ac11596f36","minin":"0","maxin":"100","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload.components.BrightnessController.brightness","name":"Brightness","x":890,"y":200,"wires":[["580e5315a9236c10"]]},{"id":"ce19175fc58e7d48","type":"comment","z":"f88a9620419a1883","g":"3964b3ac11596f36","name":"Learn more in the description","info":"These nodes allow you to detect payload changes after an Alexa voice command is processed.\n\nEach device generates its own unique set of payload components based on its type.\nYou can find all device types and their component fields in the documentation:\n[https://www.dulonode.com/docs/device-node/#types](https://www.dulonode.com/docs/device-node/#types)","x":940,"y":80,"wires":[]},{"id":"c54dfb6e7fe7662e","type":"comment","z":"f88a9620419a1883","g":"a66ad5f3d1a272b2","name":"Alexa, turn on Demo Light","info":"","x":170,"y":80,"wires":[]},{"id":"4cd4fd220a8085dd","type":"comment","z":"f88a9620419a1883","g":"f8771b83f145fb4e","name":"Status change payload is generated","info":"","x":600,"y":80,"wires":[]},{"id":"4a8a03ce8f83cd98","type":"comment","z":"f88a9620419a1883","g":"a66ad5f3d1a272b2","name":"Alexa, set Demo Light brightness to 50%","info":"","x":220,"y":160,"wires":[]},{"id":"2e330d5dca3b58e9","type":"comment","z":"f88a9620419a1883","g":"a66ad5f3d1a272b2","name":"Alexa, set Demo Light to green color","info":"","x":200,"y":120,"wires":[]},{"id":"03a34cf596d2d767","type":"comment","z":"f88a9620419a1883","g":"43af534f9757d7cc","name":"Learn more in the description","info":"The next step in the flow is to trigger an action on the corresponding hardware device.\n\nFor example, if you ask Alexa to turn on the Demo Light, you’ll need to send an MQTT message or an HTTP request to the device.\n\nBe sure to refer to your device’s documentation for the expected message format, MQTT topic, or API endpoint.","x":1380,"y":80,"wires":[]},{"id":"df4181ea4070a4df","type":"mqtt out","z":"f88a9620419a1883","g":"43af534f9757d7cc","name":"","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"","x":1510,"y":300,"wires":[]},{"id":"9a45d581e305710a","type":"http request","z":"f88a9620419a1883","g":"43af534f9757d7cc","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1530,"y":160,"wires":[[]]},{"id":"7e57aa4aa4ceec7b","type":"switch","z":"f88a9620419a1883","g":"3964b3ac11596f36","name":"Color Mode","property":"payload.components.ColorModeController.colorMode","propertyType":"msg","rules":[{"t":"eq","v":"CT","vt":"str"},{"t":"eq","v":"HUE","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":890,"y":280,"wires":[["406297b8d34e3afa"],["4f0decc27ed1f455"]]},{"id":"406297b8d34e3afa","type":"rbe","z":"f88a9620419a1883","g":"3964b3ac11596f36","name":"Kelvin value","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload.components.ColorTemperatureController.colorTemperatureInKelvin","topi":"topic","x":1090,"y":260,"wires":[["e8481978a3b36e4e"]]},{"id":"4f0decc27ed1f455","type":"rbe","z":"f88a9620419a1883","g":"3964b3ac11596f36","name":"Color Value","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload.components.ColorController.color","topi":"topic","x":1090,"y":300,"wires":[["e8481978a3b36e4e"]]},{"id":"580e5315a9236c10","type":"change","z":"f88a9620419a1883","g":"43af534f9757d7cc","name":"Prepare","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1320,"y":160,"wires":[["9a45d581e305710a"]]},{"id":"e8481978a3b36e4e","type":"change","z":"f88a9620419a1883","g":"43af534f9757d7cc","name":"Prepare","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1320,"y":300,"wires":[["df4181ea4070a4df"]]}]

Flow Info

Created 1 month, 1 week ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • change (x2)
  • comment (x6)
  • http request (x1)
  • mqtt out (x1)
  • range (x1)
  • rbe (x2)
  • switch (x2)
Other

Tags

  • alexa
  • smarthome
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option