HomeHome AutomationAlexa and NodeRED integration

Alexa and NodeRED integration

Hey Alexa, turn the lights on!

It’s oh so good to walk into the office and completely ignore the light switch. Hey Alexa, please please make it shine! I guess you are familiar by now with my WIFI light switch project (that I keep adding features to it). It just gained Alexa and NodeRED functionality. Perfect, but how to get the Alexa talking to the NodeRED running on a Raspberry Pi? Don’t worry, it’s not complicated.

Alexa and NodeRED

I will assume, that you know your way around the Amazon Echo and NodeRED at least a little bit. I won’t get into every detail but I will show you how to interact with the server and how to make my office bright.

Buy Amazon Echo Dot 3rd Gen

Buy it using these links to support NotEnoughTech.

Alexa, get ready!

Let’s start with the Alexa side of things. I found this to be the quickest option especially if you are near a computer. Go and visit:

https://alexa-node-red.bm.hardill.me.uk

Register an account, and take a look at the devices tab. There is an option there to add a new device. If you already have smart devices at home, call it something new and easily recognizable. ‘fridge’ will do! It’s unique enough, and I don’t expect you to own a smart fridge just yet.

Each device comes with possible toggles and states that we can pull using this service. For the sake of this example  – I will focus on ON/OFF option. Feel free to experiment.

You are ready to add the Alexa skill now. Search for NodeRed skill in the Alexa app, enable it, then log in to the account you have just created. Once logged in, the app will start looking for connected devices. You will see your ‘fridge’ among them.

Raspberry Pi and NodeRED set up

To make the Alexa and NodeRED play together we have to add new nodes to the palette. Run this in terminal:

npm install node-red-contrib-alexa-home-skill

and reboot your NodeRed or Raspberry. You should see newly installed nodes available in the palette. Install the nodes and you will be able to use Alexa and NodeRed together. In the node set up add a new account and log in using the details from the Alexa skill. If you won’t see any devices – deploy the server and check the devices again – your ‘fridge’ should be available on the list.

In the node set up add a new account and log in using the details from the Alexa skill. If you won’t see any devices – deploy the server and check the devices again – your ‘fridge’ should be available on the list.

Hey, Alexa whats next?

Hey Alexa, turn the 'fridge' on.

Add a debug node to the Alexa-Home node to see how the msg.payload looks like. In my case, it’s a boolean value true/false. As my MQTT expect the bool value and the client ID I had to use 2 change nodes to pass the message in the correct format to my  WiFi Light via MQTT.

The result is great:

Alexa and NodeRED

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

0
To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

0
Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Nora – Google Assistant in NodeRED

0
Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

DIY Smart Washing Machine – for about 15 bucks!

0
Learn how to add washing machine notifications to your Google Home on the cheap

Sonoff Zigbee Bridge – review

0
Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

Smart Home

We’ve seen this before: SwitchBot K10+ PRO

0
This is an odd one. Building on the success of SwitchBot K10+ they released SwitchBot K10+ PRO - but is the experience actually better?

Is this the smart panel we have waited for?

0
ITEAD has released a new smart panel: Sonoff NSPanel Pro 120 - have they learned the lesson from the terrible launch of the original Pro? Let's see what's new.

Aqara FP1E detects motionless humans

0
This isn't exactly a new device, it's an interaction of the original Aqara presence sensor. Aqara FP1E brings Matter, ZigBee and new triggers to your smart home

SwitchBot S10: cleaning re-imagined!

0
SwitchBot S10 promises unattended vacuuming and mopping so you can focus on things you love and care for. Does it deliver?

Sonoff for households and gardens

0
ITEAD released two ZigBee devices to manage water in your household and gardens. Now you can monitor the flow and dispense water with Sonoff SWV and prevent water damage using the Sonoff Water Leak sensor with a twist.