Take Control of Your Devices with Alexa and Node-RED - Home Assistant Tutorial #01: No Cloud
VloĆŸit
- Äas pĆidĂĄn 26. 07. 2024
- In this tutorial, we'll show you how to use Alexa and Node-RED to voice control your devices on Home Assistant, without the need for a cloud connection. Whether you're new to Home Assistant or a seasoned pro, this tutorial will provide you with the tools you need to take your smart home to the next level.
Join us as we explore the world of voice control and learn how to use Alexa and Node-RED to control your devices on Home Assistant. Don't forget to like and subscribe for more Home Assistant tutorials and tips!
You'll still need an internet connection but, no cloud subscription is needed and you won't have to write any complicated Alexa skills or sign up for Amazon Dev accounts...
And best of all, everything shown is Open Source (Free)
** PLEASE NOTE: If you have Nabu Casa, it takes precedence over the node-red nodes I show. **
Alexa Node-Red Palette: "node-red-contrib-amazon-echo"
GitHub Page for Function Node Code: github.com/3ative/HA-Alexa
đŹ THE LINKS - Files / Help / Support:
- đ Other files & Merch: store.3ative.com
- đ 3ATIVE DISCORD: / discord
- â Buy me a Coffee: www.buymeacoffee.com/3ative
- đ PATREON: / 3ative
- đŻ Get the Gadgets, Devices and Tools I use: Amazon UK: amzn.to/3uRw8fi
* As an Amazon Associate I earn from qualifying purchases. Using this link â provides small monetary support for my channel at no extra cost to you.đ
#homeassistant #nodered #alexa
Chapters:
00:00 Intro
00:09 Part 1 - Demo and Over-View
01:09 Part 2 - Installing the Nodes
01:45 Part 3 - Setting up the Hub
02:45 Part 4 - Setting up Basic Devices
04:47 Part 5 - Setting up Full Lighting Controls
~-~~-~~~-~~-~
Check out: "IKEA Air Quality Sensor: 7-in-1 ESPHome Update Hack"
âą Hack the IKEA Air Qual...
~-~~-~~~-~~-~ - Kråtké a kreslené filmy
Thank you very much!!! Without this, I don't think my smart home would be the same. Am going to recommend this to everyone!
Oh... thank you for the kind words. It makes me so happy to hear my videos are helping people.
Just found this. I canÂŽt believe how easy it was to solve a problem I could not figure out for almost a year! THANK YOU!
Thank you JosĂ©. I'm so glad to hear that my tutorial has helped you. â
Be sure to check out the other videos in this 'Alexa' series, I've done some pretty cool things with 'her' đ
Wow! So easy, been trying to set up everything with AWS etc and such hard work. This is so easy and so easy to select which bits are pushed through. Just got to do my heating now!
Excellent news, glad you found it helpful. I hope my other Alexa tutorials are just as useful for your setup.
Thank you very much for these videos. Excellent ! It works perfectly.
Thank you for the feedback - So happy to hear it worked for you too. đ
Thank you
3ATIVE VFX Studio! Very good video! I was looking how to do action from Alexa to entities, and I was trying to create a skill for this but I was very very complexe.... And then I found your video that explain this in a new solution, and It just need to put 3-4 blocks on Node-red, so simple!!! I tried it, It works perfectly!
I looked at many ways to do this and like you was frustrated by how complicated some were.
So glad it helped - I've got a few more Home Assistant and Alexa videos planned, stayed tuned for some really cool stuff.
David Soleillant would you share your code? Thanks!
@@eclecticlife what code do you need?
This is super cool! I'll have to get this setup and explore it more when I get time. Thanks for putting it together and a solid explanation video!
Glad you liked it, did you get it sorted ?
Thanks for your video. You made it all look so easy. I couldn't work out how to use the Echo functionality at all. I will try out some of your suggestions in my node red flows. My next problem is to get a particular radio station to play on my amazon echo.
Thank you Ian. I do try and make my li'videos as accessible as possible. đ
As for the radio station... #StayTuned, one of my up-coming tutorials is about triggering skills, routines, sounds and I'll add radio to it now. đ
Thanks for this, as a cheapskate anywhere I can save a few ÂŁ's I will! New to node red so will be a learning curve, but looking forward to using this
đYou are welcome - Have fun. Check out my other tutorials, in this series, to get TTS going - for some real laughs!
@@3ATIVE On it now!
Thank you! This can work perfectly with my amazon echo. I am wondering can we do a similar thing with a google home mini?
Mine works perfectly with my Amazon Echo - No reason why it won't work with yours. đ
- I don't have a Google Home so, can't advise. đ€
Thank you thank you thank you thank you!!!
LOL You are more than welcome Jason.
Merci Merci Merci
WOW! This is just beyond me .
What seems to be the problem??
Thank you for such a great video! Iâm new to all this and I canât figure out what should the function look like for non-rgb lights? I have some lights that dim from soft white to bright white. Iâd like to be able to dim via Alexa.
Thank, I'm glad you liked it. đ
Just use the same code, as I've shown, and the voice command: "Alexa, [ *_your light name_* ] 50%"
... You can also say: "Alexa, make the [ *your light name* ] Brighter/Dimmer"
Thanks for the video. Is this a reliable option instead of the options that HA documentation recommends? Hue, Alexa skill, haska, etc.
You are most welcome John. My video seems to be helping loads a ppl frustrated with those 'other' options. đ
@@3ATIVE We dont need to do nothing else before using Node Red for Alexa ?
I have the Echo Dot already in my config but no AWS account.
@@filipea.9853 Ah sorry, most of my tutorials assume some basic knowledge. To do everything from scratch would make them too long plus these already loads of 'Beginner' HA install & setup videos.
Basically, Node-Red connects to Home Assistant so you need Alexa setup there first. Search for the Alexa custom component in HACS
@@3ATIVE thank you
This is just awesome!! What would I need to control my blinds and other stuff? Is this also possible with nodered and alexa?
Thanks, glad you liked it.
For controlling devices and TTS, see my other tutorials in this series... It's all there đ
hi, thanks for the video. is there a way that cover can be controlled via alexa/nodered? thank you
Not sure, I will have a 'Play' and find out.
Hi. Thanks so much for taking the time to share with us, it's very useful. I am afraid I am missing something basic and if so, apologise. I can set a flow in NodeRed and trigger it with a switch or inject. I can also set a NR flow to TTS to the Alexa speakers. However, how do I use Alexa to actually run a new NR flow? For example, if I want A to turn off 2 devices and turn one on (I have this flow already in NR), so I can have a setup for watching movies, what do I do to link the new voice command "Alexa, set movie mode" to that NR flow? I hope that makes sense, sorry if I have missed the obvious!
Thank you for the feedback.
And so, your question:
If I'm reading it right, I would write a Function that goes after your Alexa Device Node that would send the relevant On and Off to the Call Service Nodes for your Devices.
E.G.:
If the Function Node gets an 'On' from your Alexa Node, send two outputs (FYI Function Nodes can have more than one Ouput)
Output 1 - Turn OFF your 2 devices
Output 2 - Turn ON the other device.
@@3ATIVE Thank you. works well. Much appreciated.
@@laneyweb Ah cool. Glad I was able to help. Have fun and stay tuned, I have more Node-Red tutorials planned.
Thanks
3ATIVE VFX Studio, great video. For RGBW light, what function node code will be ? because I am unable to operate white channel by this above code.
Thnx Yogesh, I'm glad you found it useful.
The 'Function' Node code for RGBW would depend on the 'Call Service' Node you use and the hardware it's driving.
You helped me a lot with your last video, but now I have another 2 questions for you :D:
1. I have a TTS Alexa in small room. How can I make Alexa TTS speak on the device i talk? (Like Speak payload to last alexa yours).
2. Can I make a custom command for alexa like: Alexa, server status and she tell the tts I already configured? I don't know how to get the command without on or off.
Thanks a lot for your videos.
It's always nice to hear my videos are helping people. â„ïž
I'm about to do a video that covers both of your questions. Should be up later today or tomorrow... Subscribe! đ
Thanks for the Video. For me it worked beautifully, I integrated some blinds that I have in Home Assistant, and now under Alexa with your video. I have one issue though, Alexa is not discovering new devices I just added in Node RED (the previous integrated ones work excellent but I haven't find a way to discover new ones that I already added in HA and Node Red). Any clue?
Glad it helped...
Hmmm.. not sure. I just tested it and everything works still. Once a new one is added, you should only need to ask Alexa; "Alexa, scan for devices" and she'll find it.
@@3ATIVE Thanks for taking the time to respond to me. I will keep trying
3ATIVE I have lights that do not have color but are on/off and also have dimming function would you be able to help with the code for the fuction if I had a light like that.
Not a problem... If you go to timestamp 5:12 you'll see the 'Function' Node for Lights.
On line 6, where I have:
*{rgb_color": msg.rgb, "brightness": msg.bri}*
Just remove the rgb part(s). So the line becomes:
*{"brightness": msg.bri}*
Hi, Thank you for this video - my setup, does not remember the state - if i exit the app and come back to it, it shows the light as 'off' when it is on. Also - it shows 'there was a problem' when i try and turn off the device. Any idea how to debug or how to resolve this issue?
The control in to Node-Red is only that.. in to.
Currently there is no feedback to the App if the light is turned on locally. There is a way but, I haven't had time to film it yet. đ
Hi,
I am unsure what you mean my port 80 is been used by something else in my installation?
Is there another port I can use?
I think other things like 'emulated hue', etc use port 80. I did see some stuff (from Googling) But, I haven't had a problem with my set up - so can't really advise, sorry.
Hi. First: Thank you for your nice video series. These are one of the best and helped me by far the most!
I adjusted your I/O BC node because I could not set the light temperature (Alexa make Light warm/cold):
if (msg.payload === "on" && msg.colormode === "ct")
msg.payload =
{
"service": "turn_on",
data:
{"brightness": msg.bri, "color_temp": msg.ct}
};
if (msg.payload === "on" && msg.colormode === "hs")
msg.payload =
{
"service": "turn_on",
data:
{"brightness": msg.bri, "rgb_color": msg.rgb}
};
if (msg.payload === "off") msg.payload = {"service": "turn_off"}
return msg;
Now I can set the color and the color temperature.
Excellent, It's always so great to hear my li'tutorials are helping people - Thanks for the feedback. â€
Good call - I will add and test your update to my Function Node(s) ASAP đ
newbie here, any nodered vid via HA that slow step by step to control devices?
this video seem to be for more advance users who knows what is nodered
Many people find my style helpful. However, a few, like yourself, have asked for a more 'noob' centric approach. I will do my best to include more details in
future videos. Thanks. đ
Very cool, thank you very much for sharing your ideas. I tested and it works perfectly, I'm probably gonna give up on Nabu Casa for this simple and super flexible solution. I have on question, maybe you have this already sorted out: I built some flows to switch sources on a media player (a Denon receiver). I have device nodes named as the sources, so I can for example tell Alexa to "activate denon ps4". Problem is that this device node remains on until I turn it off either in Alexa app or by telling Alexa to do so. The obvious solution would be to include in the flow a node to turn it off after a few seconds, but I can't figure a way to make it happen. The device node will simply not turn off. Do you know a way to to that? Thanks again! Cheers!
Thanks, it's so good the hear how well my li'videos are helping people.
As for you NR Question:
From what I can gather of what you're trying to do. I think a simple Delay node, should work for you. Pipe that in to a Change node to set it's output to "off", and you should be able to use that output to turn of your thingy. đ
Actually what I want to do is turn off the entity represented by (or linked with) the Device Node. When you use the Device Node to turn on a light, you see the light is on in the Alexa app. But when you want to select a source on a media player, this Device Node (or entity) should go on, trigger the flow, then go back off so it can be called again next time.
Problem is, I couldn't find a way to switch this Device Node/entity off again other than telling Alexa to do so (or using the Alexa app). Sorry if I couldn't make myself clear, English is not my native language.
@@talesmaschio I do this with my HA Alexa Virtual Lights (i.e. non-existent lights that I created just to act as interface with Alexa compatible devices and HA). I simply have automation nodes that immediately turn them off when Alexa turns them of. This of course resets the light so Alexa will be able to turn it on again next time she executes the routine. So basically you need: 1) an "events: state" node with the "entity ID" set to your device that you have setup with this method, and the "If State" set to "is" and "on" string; and then 2) connect that to a "call service" node with "Domain" set to "light" and "Service" set to "turn_off" and lastly the "entity ID" being your device again. This way Node Red will simply turn off the Virtual Light every time Alexa turns it on to trigger a separate function. If you must have a few seconds before Node Red turns the Virtual Light off, simply put a "delay" node in between the two nodes you just created, and set the time delay to whatever you need.
Bryan B perfect! Thank you! Will go that way đđ»đđ»
Hello, I've followed this step by step and feel I am missing something, when I set this up and then ask alexa to discover devices, is it meant to find it? or is there a specific phrase I use? or is there a skill needed? what part connects node red to my alexa account?
Hmmm.. not sure. I just tested it and everything works still. Once a new one is added, you should only need to ask Alexa; "Alexa, scan for devices" and she'll find it.
Thank you so much!... I have a question: on Alexa all the new devices I connect are recognised as lights, can you tell me how to change this, with media/cover/switch/whatever please? thanks
I don't think there is a way - They are all lights for me as well. So, basically anything that has on/off or a percentage value is do-able... for me that's all I seem to need.
One trick I use (for my curtains) is set up a routine in the Alexa App, so that when I say "Alexa, open curtains" - she sends 0% and, of course "Alexa, close curtains" she sends 100%
- I hope that helps.
@@3ATIVE yes, I've done the same but sometimes they work in the contrary way... instead of opening they close, sometimes don't work at all (maybe this is because of NodeRed... I use Shelly and with its cloud is definitely better but I prefer to keep the curtains within my lan). Still thx for your video, it has been so helpful!
Hmmm... I hope you can appreciate there's not much I can do in fault-finding your setup. I don't have any Shelly or Tuya converted devices.
My curtains are on an ESPHome D1 mini and are controlled via a Home Assistant Slider, which in turn is controlled by my Alexa commands.
I hope you find a solution... Having automated curtains is one of the most fun IOT things I've built. đ
@@AlexAmore Your devices are only recognized as lights, as this method is emulating Philips Hue devices (a light bulb that Alexa automatically recognizes as such). Until Amazon decides to give users the ability to change auto recognized device types to whatever they want (which I highly doubt will ever happen), you are stuck with your devices being seen as light bulbs when using this method. The only other emulation I've seen is the Belkin-Wemo method; however, that is a simple "On/Off" only action that Alexa finds as a "plug." Alexa can change a plug's device type to a "light," so you could use that method if you have a non-dimming white light you want to properly control.
Hi, I wonder if I can ask for another bit of advice please. I have this setup and working very well with a few devices that are not enabled for Alexa natively and it's really great to have them controllable. However, I'd like to add an Alexa device so I can track the whereabouts of my cat. We have a Sureflap wifi connected cat flap that is connected to homeassistant and this shows the status of the cat, inside or out. I have a node setup to speak TTS "Mittens is inside" or "Mittens is outside" based on the state of a binary sensor. What I'd like now is to add an Alexa device so I can ask: "Alexa, where is Mittens?" and her to answer in or out. I dont know how to setup a device that allows me to ask that. I can setup switches and lights etc, but I'm not sure how to get the "where is" question working or if it is even possible. Thanks again.
Thanks, I'm glad my video helped you. đ
âĄAs for your question:
Yep that can be done using Alexa App routines, I do something similar with my Thermostat to have Alexa readout the Value & State. I just say "Alexa, Bedroom Temperature" and she tells me all sorts of data.
It would be impractical for me to type out the entire solution but, here's the basics:
1. Make a new (NR) 'Alexa Device' - Name it something like: "Mittens in or out"
2. In the Alexa App, make a Routine based on 'When I say this' and give it the wording, E.G. "Alexa, Where is Mittens"
3. Have this Routine Turn On your new NR Node ("Mittens in or out")
4. Back in NR, set up nodes to read the cat-flap status and triggered it/them when the "Mittens in or out" node goes to "on".
I hope that's clear... It's also a good idea for another tutorial - Added to the list. Thanks. đ
@@3ATIVE Thank you for the quick reply. This worked perfectly. I didn't know I could create routines in Alexa where I set the listen phrase. Thanks again!
@@laneyweb My pleasure fella - Happy to help. đ
Bom dia . Me dĂĄ uma dica por favor.... Meus nodes âAmazon Echo Hubâ e vĂĄrios âAmazon Echo Deviceâ estavam funcionando perfeitamente no HA Node Red..., do nada pararam de funcionar. JĂĄ revisei todo o procedimento e nada de funcionar. Uso o HA em VM. Tem alguma sugestĂŁo do que possa ser ? Outro detalhe, quando faço a busca por novos devices criados com o Amazon Echo Device , app Alexa, nao aparece nada...Muito obrigado.
A miña mellor suposición é que o porto 80 estå a ser usado por outro servizo.
@@3ATIVE como eu consigo verificar se outro serviço estå utilizando a porta 80 .... tem algum teste a ser feito ? Thanks
@@edubalsa5184 Sinto muito, nĂŁo sei muito sobre Vm para oferecer ajuda. đą
Minha configuração funcionou, então não precisei verificar como.
This is excellent, i'm new to HA & NR but managed to get Alexa control of a zigbee socket in about 5 minutes with this guide. What are the limitations - could it be used for say turning on the tv with an IR device???
Glad to hear my guide helped. As for limitations: Well, if you can control it in Home Assistant, you can control it with Alexa now.
FYI - I control my TV with Alexa via a Harmony Hub in HA.
@@3ATIVE Excellent, using the harmony hub and HA can you control individual harmony devices or is it restricted to the harmony activities still ?? I want individual control but harmony and alexa will not do that it seems
@@dave-j-k I think I understand...
- As far as I can tell - Once you ask for a device to 'turn on' all subsequent commands will control that device. So, If you want to control another, you have to 'turn on' that one on first.
@@3ATIVE Thanks, though as much, I might look at a Broadlink RM-Mini3 then - its just a dumb IR transmitter so i can get full control over my TV/AV/SKy/Plex setup - there is a problem with device timing in harmony and i can't get round it. :)
@@dave-j-k Cool. Have fun. đ
Hi. Great video. Can I connect an Amazon Fire HD10 via Alexa to Node-red?
In what sense - What are you trying to do?
3ATIVE VFX Studio I want to use the HD10 to control stuff in node red/homeassistant via Alexa but I donât have any other Alexa devices.
This is awesome. Though since i only have basic knowledge enough to mimic what i see, i will be having little difficulties.
Now i am trying. once i manage i will post the result. thanks.
ps. when sharing screen kindly zoom in what you are mentioning.
Nope. could not manage.
Alexa not finding my devices
[{"id":"9bf2b559.4c8e48","type":"amazon-echo-hub","z":"163d1146.d02fdf","port":"80","processinput":0,"discovery":true,"x":190,"y":220,"wires":[["8a2ad8a4.009bc8"]]},{"id":"8a2ad8a4.009bc8","type":"link out","z":"163d1146.d02fdf","name":"Alexa out","links":["ca531e84.6ed4c"],"x":430,"y":220,"wires":[],"l":true},{"id":"fa5c534d.c9c71","type":"amazon-echo-device","z":"163d1146.d02fdf","name":"Smart Bulb","topic":"","x":290,"y":60,"wires":[["c5b5198.ffd2be8"]]},{"id":"ca531e84.6ed4c","type":"link in","z":"163d1146.d02fdf","name":"Alexa in","links":["8a2ad8a4.009bc8"],"x":90,"y":60,"wires":[["fa5c534d.c9c71"]],"l":true},{"id":"c5b5198.ffd2be8","type":"function","z":"163d1146.d02fdf","name":"I/O BC","func":"if (msg.payload === \"on\")
msg.payload =
{
\"service\": \"turn_on\",
data:
{\"rgb_color\": msg.rgb, \"brightness\": msg.bri}
};
if (msg.payload === \"off\") msg.payload = {
\"service\":\"turn_off\"
};
else if (msg.colormode === \"ct\")
msg.payload =
{
\"service\": \"turn_on\",
data:
{\"rgb_color\": [254,254,254], \"brightness\": msg.bri}
}
return msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":450,"y":60,"wires":[["175f3ca.8457bc3"]]},{"id":"175f3ca.8457bc3","type":"api-call-service","z":"163d1146.d02fdf","name":"Smart Bulb","server":"b290550b.4794c8","version":1,"debugenabled":false,"service_domain":"homeassistant","service":"","entityId":"light.yeelight_color1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":610,"y":60,"wires":[["a38ec20d.14316"]]},{"id":"a38ec20d.14316","type":"debug","z":"163d1146.d02fdf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":680,"y":120,"wires":[]},{"id":"b290550b.4794c8","type":"server","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
@@hamhumtube Everything looks aok in your Flow. There can be a couple of things that'll stop Device Discovery.
1. (As mentioned in the Description) - You're already using Nabu Casa
2. Port 80 is being used by something else. This usually is the case when running in a Docker or on Pi devices
@@3ATIVE nodered in docker (on debian at proxmox). HA is separately on proxmox as VM. This port 80 of which one should be unused, ha or nodered? I do not have any cloud subscription on HA. Thanks.
@@hamhumtube Hmmm... Your setup sounds a bit over-complicated. I have my HA installed on a VM too (UnRaid server) and I use Node-Red installed within HA itself. I.E. Supervisor > Add-on Store.
@@hamhumtube I did try NR on a separate Docker too but, like you (and others) I couldn't get it to work either - So, I stuck with the original setup - mentioned above.
Is that all local? So if you lost internet access it would still work with Alexa or is it instead of the nabu casa integration? Cheers
Sadly not, Alexa still needs the internet for any of its functions. However, you need nothing more than the nodes I show - No need for Nabu Casa and everything is free.
3ATIVE VFX Studio Cheers
Excellent video 3ATIVE VFX! Thank you for sharing and what a nice hack!!! I have a Phillips Hue hub (not using emulated hue) and had no issues with the setup - everything works well on my account. However, my wife's Amazon account (linked), does not discovery devices or respond to commands. Any suggestions on how this can be fixed? Is it only capable of controlling one account and if so, how was it that my account was selected and not hers? Thanks again!
Not sure, I only have one account to test on. However, You may be able to add multiple accounts to HA.
See here: github.com/custom-components/alexa_media_player/wiki/Configuration
@@3ATIVE Thank you for the kind reply. I reviewed the GitHub article you recommended and submitted a issue request at github.com/custom-components/alexa_media_player/issues/630, but have not found a solution. Please keep me in mind if you later discover a fix. Thanks again!
Do I need an echo or my mobile alone should find the new devices in Alexa app?
You can discover devices with just the app - It finds them as lights.
@@3ATIVE I got it! Thanks man!
whats the name of the hone screen you are useing please
Not sure what you mean... The Front end shown is just Home Assistant's 'Lovelace' panel.
Hey, are you using the node-red addon in hassio? Mine doesn't want to discover
Have you got Nabu Casa set up?
@@3ATIVE Nah im not. I tried spinning up another vm with hassio as well but still no luck :(
@@jonology Hmm.. the only other thing I've heard ppl having trouble with is something else in your setup is using port 80. Sadly, I don't have a fix for that as everything worked for me first time. Sorry fella.
How to direct alerts to echo devices using node-red. Something like, 'the door is open for 5 minutes'? It looks like it should be possible in a simple way, but I don't know which component is needed in node-red.
You're a bit off topic, but yes there is. I use Wyze Contact Sensors for my mine via HACS integration (see digiblur's channel for setup if you have those and are unfamiliar with the process). It's pretty simple, and I do it using the "Alexa Routine" node via the "node-red-contrib-alexa-remote2" addon. The other standard nodes I also use are "event: state" to trigger, "switch" for Open/Closed direction, "change" for timer STOP command, "looptimer" (self explanatory), "stoptimer" for separate one time delayed verbal message (optional), and a "traffic" node to close off the above Routine node once the stop command has been sent (prevents timer issues / slips from going through).
What Bryan said, then using what I show in this video should be all you need: czcams.com/video/Ib8RffCYcfo/video.html
Hello mate how can I use alexa to run scripts? I have a Christmas tree with an ir remote and have saved the button presses as scripts using the broadlink integration.
A Call Service Node can start a script.
@@3ATIVE Didn't realise it was that easy. Thanks again.
Sorry I ment Christmas tree lights. I couldn't get it to run each button press light setting without creating a separate entity for each one but I'm guessing that's the only way.
All my Alexa devices are in Sonos speakers for now. Do you expect that everything should still work as if there was an Echo, or is the code specific to an Echo?
I can't say for sure without testing it. The way I show uses the Alexa api.
My guess is... if your devices show in the Alexa app, it should still work.
When you try it, please re-comment and let everyone know.
@@3ATIVE I ended up buying an Echo Dot, but it doesn't see anything either. I am able to retrieve /api/description.xml from my NodeRed instance from my LAN and IoT subnets, but the Alexa never sees anything new. I do have Multicast DNS and UPnP on.
@@DaveDupre Hmmm, I don't have any subnets here so, can't say if that would effect it.
One question, are you using Navi Casa ?
@@3ATIVE I am not using Navi Casa. All my devices are in IoT except the Sonos speakers. The Echo is in IoT, and Alexa iOS is on my main LAN. All Alexas can see all devices except the echo-hub.
@@DaveDupre I can't think of anything else ATM.
Next best thing I can suggest is a video chat, where we can go through your setup and I'll try and sort it for ya.
I'm 3ATIVE everywhere... Find me on Discord / Facebook / Twitter chat and we'll arrange a time, etc.
I know this old topic but.. you said that nabu takes precedence. Does this mean âprecedenceâ or will this palate directly interfere with nabu?
Can you do an example of how how to ask Alexa if the door/ windows are open? One that checks all the contact sensors then responds with any/only the ones that are open. Or with a statement that all of them are secure. This is probably a pretty simple flow but I struggle with node red and Json payloads sometimes.
From what I've been able to tell from working on others' issues, is that any voice commands get picked up by Nabu Casa first. So, any Node-Red Alexa stuff seems to get ignored or superseded.
@@ChrisS-oo6fl I seen a few people do this. I don't really have a lot of door/window sensors here so, it may be some time before I do that tutorial. :)
Will this let you add Amazon lights to your Home Assistant install? I don't care for voice control. I just want to be able to see my Alexa lights switches etc in Home Assistant as devices.
Any device or entity you want to use in Home Assistant will need its own integration. This only provides control of those integrations. Sorry.
@@3ATIVE Do you know of a way to integrate Alexa only devices into Home Assistant?
@@merlinbk If an integration doesn't exist then it would have to be written. That's not something I can do.
See here to find out if your specific device is listed: www.home-assistant.io/integrations
Instead of turning on/off devices. How do we get Alexa to trigger a flow in node red? (or a scene in Home Assistant).
Eg, I want to say Alexa, Good Night, and either activates a scene, sets a "asleep" binary sensor to "on" so that it my motion sensors can check for that binary sensor and not turn on certain lights?
I have the same thing here.
For my " *Alexa, I'm going the Bed* " and " *Alexa, I'm awake* " those turn off and on an *input_boolean.awake_mode.* All automation, states and anything else that needs it, run off that.
For those I use Routines in the APP. I show how to setup Routines in another of my videos:
czcams.com/video/25-VCm66tVs/video.html
@@3ATIVE going to check that out, thank you!
Hmm... can't seem to get color AND white temperatures to work at the same time. I can either use "rgb_color": msg.rgb or "color_temp": msg.ct, but not both at the same time (get an API error about using multiple values in the same group of exclusions). Using just the "rgb_color" one in my function will only have Alexa set my lights to color shades (red, blues, etc.). Using traffic nodes right now to ghetto rig it (hey it works, lol), but any ideas for a proper fix? Thanks for the video btw! :)
Yeah, I think you'll have turn one off and the on. But, the colour temperature is a whole other set of things to add to the function node. I didn't include it as I only have RGB Lights.
When I get time I'lll have a look at implementing CT - In the mean time, lemme know if you make any progress.
@@3ATIVE This is the code I was able to come up with that seems to work. Hope it helps others having the same issue!
github.com/technowizard79/Node-Red-Alexa-RGBW-Code
I've updated the Function node code to work with "white" See the GitHub link in the video description.
@@Technowizard79 This code does work for color and temperature. However, it does not work to turn the lights off. The reason is, by the time the second "if" is executed the msg.payload has already been changed by the first "if". I had to move the turn off "if" first, and only then run the first "if" of the code on the else side.
@@crls2 Interesting... it worked for me just fine, as the 2nd "if" just overwrites the the previous payload condition change (when true of course) prior to the return msg. All my RGBW lights are now switched over to Tasmota, so now I use the built in Hue emulation (which is what this is) for those... advantage of that is that it works even if my HA/Node Red server is down, and it automatically only shows abilities that are setup on the device (e.g. Alexa won't show color or dimming if the light/switch doesn't already support it). Glad you got it working though! :)
how do you setup the discovery of the new device in alexa?
Say; 'Alexa, Discover devices'
@@3ATIVE do need hue emulation on in HA for this to work?
@@peterperez28 Dude, everything you need to know is explained in the video. You need nothing more than the Node-Red node.
@@3ATIVE Listen, I get that.. However, followed the video to the "T" and alexa doesnt discover any new devices.. So im trying the process of elimination to get to the root of the issue. Any suggestions would be appreciated.
@Peter Perez Are you using Nabu Casa?
Looks lovely and all but I can't get it to work. I have copied your code exactly except I put my light in there I want to turn off. I added a debug node after the call service node for the light and this is the error I get:
msg : string[82]
"call service node is missing api "domain" property, not found in config or payload"
I tried leaving the domain field on the call service node blank and I tried it with homeassistant in that field just like your video. Same result. I am pretty sure I have it copied word for word as in the video. Any help you could offer would be appreciated!
You're need the Domain called somewhere... The only thing I can think of that'll give you that error is that your light is not setup properly - Is an actual 'Light' or are you trying to control a 'Switch' ??
@@3ATIVE I deleted everything that I set up watching this video and then started at the very beginning again and it is working now. I think what the problem was was that I had created the flow on a crowded tab. I then copied the flow to a blank tab and neglected to delete the original flow from the crowded tab. It's all good now! Thanks for getting back to me and for explaining how to do this. I expect to use this a lot.
Speaking of flows and tabs, is there some way to organize these so that I don't have dozens of tabs? Is there a way to hide (and unhide when changes are needed to be made) to keep things "cleaner"?
@@johnhale5527 oh that's great news, glad you got it sorted - would have quite hard to fault find from here lol.
Also, I'm so happy to hear my little video helped another person.
@@johnhale5527 On the Flow organisation, I've not seen a way to hide a Flow/Tab... I guess we're stuck with scrolling. đ€Ș
cool is there a way to have question and answers depending upon the day of the week. Trying to build a skill to ask alexa "what bins to put out today" monday food, tuesday paper weds normal thurs plastic friday food, sat sun none
I think so. I would make routine for: "Alexa, What bins to put out today" that triggers an Alexa device in Node Red. Then, using 'Function' node with 'Big timer' (for the days) have a custom TTS with the relevant reply.
Here you go, I made it for you :)
czcams.com/video/LPOkBC2yxto/video.html
@@3ATIVE Thanks man still having trouble User error somewhere
How does work with Alexa enable devices?
Not sure why you need to - They're already 'Alexa Enabled' LOL
@@3ATIVE I want to be able to see them in HA
@@percywbell3503 This doesn't add any devices to HA so, unless there's an integration for your Alexa enabled device(s) to get them in to HA, it won't.
anybody know what to do if port 80 is already used error "unable to start on port 80" i have tried looking on sharkwire for the port the alexa is connected too. but if i put in the port number its finds still no joy
From what I've seen, you'll need to change it to something like '8080' then use IPtable to re-direct.
@@3ATIVE USER ERROR - i only have a echo dot and not an echo with a built in hub
@@AndyShrimpton-GaaTech Oh, did you get it sorted out then?
@@3ATIVE Hello again YES IT'S WORKING. I have tested it with a Gen 2 echo DOTs and it worked. The Gen 3 I could not get to work, it makes an error in the alexa app on my phone. I am not sure of the problem but i was running HA in a DOCKER on an UNRAID server. I now have installed HA on a VM on the UNRAID server and it now works. Time to start playing and have so fun.
@@AndyShrimpton-GaaTech Oh superb...Glad you got it worked out. I too have a VM running hassio on my unraid server.
Thanks for the feedback, I'll be sure to remember it in case anyone else faces the same issues.
does this still work for you now because I would like to make custom scenes for Alexa
Yep, it still works for me dude, I use it everyday. đ
does it work with echo show 8
@@olivername I don't have one but, I don't see why not.
have you seen this error with 502 bad gateway? won't let me open webpage thanks Oliver
@@olivername I have... try restarting.
problems - I have installed the alexa media player and filled in the required email and password. It is connected because I can see all my echo devices in the integration. I have installed the node-red-contrib-amazon-echo nodes into node-red. I created a flow that duplicates the flow in your video. It works, but it only works if I have the home assistant skill activated in the echo app. I have a nabu-casa account that I subscribed to before I discovered your video. I would like to stop using it. Sooo.... If I have the alexa skill activated, the flow works. If I don't have the alexa skill activated, the flow causes Alexa to say "I don't understand that". One last thing. If I have the alexa skill activated and then I say the words in the echo device, it works. If I disable the alexa skill and the say the words in the echo device, it still works but if I create another flow with a different name in the echo device node, it does not recognize the new one until I reactivate the alex skill.
Sorry Jim, you are not the first....
From the video description:
"*** PLEASE NOTE: If you have Nabu Casa, it takes precedence over the node-red nodes I show. ***"
What are you running Home Assistant on? I'm running Home Assistant with Node red on a Raspberry pi, and Alexa doesn't find new devices.
I have a VM running hassio on my unraid server.
@@3ATIVE I can't seem to get it to work. Shows up as a Philips Hue, and want to link. Great video!!
@@jasonallan3074 Well that's a start, all my devices show as Phillips Hue Lights In the Alexa app too. So, it sounds like you're done. đ
@@3ATIVE Last question, I have echo dot 2 and 3 and the app, seems not able find new devices any pointer to I should be looking for or at?
@@3ATIVE Very good tutorial...I like to have more understanding that if it is already working the same way with Philip Hue App/ By Emulated Hue, then what is the plus by these nodes...@3ATIVE VFX Studio, please put your ideas.
This is because I can not add the device without
Philips Hue App /Emulate Hue in HA Thank you.
could I send a screen shot of mine Alexa picks up the device but the controls not working thanks
Sure, go ahead.
@@3ATIVE hi I have the Tuya strips lights liked in with node red. and I want to have the modes like flashing and chasing in node red with Alexa if you have done it with other lights could you show me the code or how its done thanks Oliver
@@olivername While all devices are seen by Alexa as Lights, you can only control: On / Off / Colour / Brightness. So you won't be able to control effects directly.
A work-around would be to set up another Alexa device node, with the same name as your Light + the Effect name E.G.: "Kitchen Light Slow Fade" . You could then use that on a 'Call Service' node to turn on your Light with the said Effect applied.
@@3ATIVE on the code of the device node Effect E.G Bedroom light1 Fade is that right
@@olivername Yep, that's it.
I can't make it work. Home assistant is in VirtualBox. Everything works except Alexa. Maybe I should open some ports on the router. Alexa can't find any devices. In Home assistant, I was prompted to configure philips hue. I don't know if it is about location but I'm from EU. I don't have any smart home skills in alexa app. Amazon Echo Hub is online. I don't use Nabu Casa.
đ€ It may indeed be the Hue stuff, I don't use it myself but I've heard that uses port 80 too. Lemme know what you find.
@@3ATIVE I understand but I don't have any devices. I don't have philips hue or anything else. I only have Shelly 1 and Alexa. I just started to be interested in Smart Home. After adding Amazon Echo Hub to Node Red, I was prompted to set up Philips Hue.
@@przemo171 hmmm, that's annoying... lemme see what I can find out too.
@@3ATIVE Ok, it works but I don't know why. I broke HA and had to reinstall it. I only installed File editor, HACS, Samba share, ShellyForHass and Node-RED and for some reason everything works.
@@emanueledebenedittis3393 I think the request to configure the HUE hub is normal. You have to ignore it. I don't understand why sometimes Alexa's voice control works and sometimes it doesn't. I have reinstalled HA 10 times and approximately half the time, voice control works. I mean, if it works, it always works. If Alexa cannot find the devices, it won't be found with this installation. That's how it is with me.
What is the solution to this error: "unable to start on port 80"?
From what I can find, Port 80 is being used elsewhere by your hardware so you need to change it to something like '8080' and use IPtable to re-direct.
Likely need to Turn off emulated_hue
@@3ATIVE did it work i have the same problem
@@AndyShrimpton-GaaTech I'm not sure what 'it'is... I don't have a problem with my setup so, I can't suggest any fix. Sorry.
Port 80 is been used in your config. Most probably for Emulated Hue. Remove that one and install everything from the scratch.I had the same issue.
hmm, doesnt work for me. Alexa never discovers the devices I create with nodes.
Sorry to hear that Ken. I guess there's something different about your setup that's different from ours.
this just stopped working for me today ugh
Sorry to hear that. đą Maybe, something change in your setup??
I hope you find the problem soon - I couldn't live without my Alexa. đ€
Thank you for the video, but for the love of all that is holy please do not say her name ("Alexa") in your videos. It makes it unwatchable without my house going crazy.
Thanks chris, I'm happy you likes the tutorial.
Also, LMAO - Sorry about that, I do keep meaning to mute the trigger word... I will do my best from now on. đ
Outdated now
I don't see how, it still works fully for me.
@@3ATIVE on HassOS they changed the pallet to a new one, and you can't access this one anymore. I think it's being held on with legacy support. The new pallet is node-red-contrib-alexa-home-skill
@@oblivitv1337 Just install the one he lists in the description, I just installed it myself. In 'manage palette' there are two tabs (nodes, install). Just use the 'install' tab.
Ugh, I really want to watch your video but you say Alexa so many times it makes it difficult to watch. Just some advice put you should edit the wakeword out.
This is an old video and it's something I do now.
At the time I didn't think it was gonna be an issue. After-all anyone can hit the mic off button on their devices.. However, it seems many are (for some reason) unable to do so. :)
@@3ATIVE True, just that I have a few Echo's within hearing distance, and it's rather annoying to go around and turn the mic off each time I watch one of these videos. Glad that you do it now. :)
@@J-D248 Headphones! LMAO Sorry, just trolling ya đđ
- It was pointed out by a few other viewers too that their Echos would trigger, some were quite vocal in voicing their anger.
Yeah, now I lower the volume where I say the "A" word and flash it on the screen instead. It's a little more effort to edit but, worth it to keep my views (and their Echos) happy. đ