Indigo / Node-Red / Alexa

Posted on
Mon Jan 20, 2020 8:32 am
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: Indigo / Node-Red / Alexa

I've only gone and blown the bulb as I have been turning it on and off so much! :x

Posted on
Mon Jan 20, 2020 2:33 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Indigo / Node-Red / Alexa

jay (support) wrote:
If you don't mind my asking, how did you get the listener working on port 80? macOS generally blocks any user apps from using protected ports (of which 80 is one).

I found this on the Node-RED requirements page:
Node-RED docs wrote:
Amazon Echo Hub node is starting a service listening on port 80 which requires Node-Red process to be started with root user.

so it looks like they get around the port 80 limitation by running it as root.

Image

Posted on
Mon Jan 20, 2020 2:55 pm
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: Indigo / Node-Red / Alexa

Is that a problem?
matt (support) wrote:
Amazon Echo Hub node is starting a service listening on port 80 which requires Node-Red process to be started with root user.
so it looks like they get around the port 80 limitation by running it as root.


Or just a limitation of how Indigo runs that it cant, or you dont allow?

Posted on
Mon Jan 20, 2020 3:09 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Indigo / Node-Red / Alexa

The macOS won't let any process that isn't running as root listen for incoming connections on port 80 (or other lower/system ports). Running it as root is a solution (and the only sol'n we have so far for port 80 access), albeit not the safest one.

Image

Posted on
Mon Jan 20, 2020 3:31 pm
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: Indigo / Node-Red / Alexa

Found a better solution for the on/off rather than brightness.

Using the rbe function you can route actions only when a parameter changes. Therefore I route changes to the msg.on payload to set on or off, and changes to the brightness to the set brightness indigo set device.

Still a few steps, but works well.

I have also found how to add 2 rules, so I can run different indigo actions depending on the on or off trigger.

Its not obvious, but you can use keyboard shortcut to copy and paste selected tools. So select the porch 6 tools, copy, paste, and edit 3 tools to point to a new room. Takes less time than indigo to set up the flow for a new room.

I think it would be messy to manage for the number of rules and triggers most of us have in indigo, but its a nice interface and I imagine easier to program up complex rules than indigo without scripts.
Attachments
Screenshot 2020-01-20 at 21.28.02.png
Screenshot 2020-01-20 at 21.28.02.png (197.74 KiB) Viewed 3165 times

Posted on
Mon Jan 20, 2020 9:47 pm
Barilko offline
Posts: 12
Joined: Feb 29, 2016
Location: Ontario, Canada

Re: Indigo / Node-Red / Alexa

Thanks siclark. Nice find on the Report By Exception (rbe) node. I'm back in business with on/off and dimming.
Now I just have to copy this a bunch of times and make a few edits to the devices for each room/switch. I've been living like a caveman and picking up my phone to dim the lights for months. One time I even had to stand up and walk to the switch :D
Attachments
Screen Shot 2020-01-20 at 10.46.26 PM.png
Screen Shot 2020-01-20 at 10.46.26 PM.png (72.61 KiB) Viewed 3151 times

Posted on
Mon Jan 20, 2020 9:50 pm
Barilko offline
Posts: 12
Joined: Feb 29, 2016
Location: Ontario, Canada

Re: Indigo / Node-Red / Alexa

...just adding some screenshots of the rbe and change nodes if anyone else is trying to work this out.
Attachments
Screen Shot 2020-01-20 at 10.43.27 PM.png
Screen Shot 2020-01-20 at 10.43.27 PM.png (81.11 KiB) Viewed 3151 times
Screen Shot 2020-01-20 at 10.43.50 PM.png
Screen Shot 2020-01-20 at 10.43.50 PM.png (81.74 KiB) Viewed 3151 times
Screen Shot 2020-01-20 at 10.44.31 PM.png
Screen Shot 2020-01-20 at 10.44.31 PM.png (95.53 KiB) Viewed 3151 times

Posted on
Tue Jan 21, 2020 3:23 pm
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: Indigo / Node-Red / Alexa

This is brilliant. Thank you so much.

Probably a very basic question, but what is the process for saving everything? If I close my browser window, does that close stuff down? Presumably not, but I'd rather not risk it.

And what about on restart? I assume I need something to start node-red. Do I also need a way of loading the pallet?

Posted on
Tue Jan 21, 2020 3:48 pm
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: Indigo / Node-Red / Alexa

It saves it when you deploy, although you can also export the flows in a few different ways as extra backup.

As for restart, I had been wondering the same thing, so am trying it now!

Posted on
Tue Jan 21, 2020 4:15 pm
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: Indigo / Node-Red / Alexa

Its actually the terminal window you need to keep open. It doesnt auto restart after a reboot. You need to open a terminal window and type node-red.

Must be a way to automate that.

Edit, here you go. https://nodered.org/docs/faq/starting-node-red-on-boot

Edit 2: 2 reboots and it starts up each time.

Posted on
Tue Jan 21, 2020 4:54 pm
Colly online
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: Indigo / Node-Red / Alexa

siclark wrote:
Once deployed, I had to change teh Key from On/Off State to brightness to get it to show my a list of all the ItemNames.

I'm having the same issue and haven't managed to get it to show my list of items. Any suggestions?

Posted on
Tue Jan 21, 2020 5:26 pm
Colly online
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: Indigo / Node-Red / Alexa

Colly wrote:
siclark wrote:
Once deployed, I had to change teh Key from On/Off State to brightness to get it to show my a list of all the ItemNames.

I'm having the same issue and haven't managed to get it to show my list of items. Any suggestions?

Further update - I can see list of Actions & Variables but not Devices.. Not sure what's going on..
Working great for what I've managed to set up.

Posted on
Tue Jan 21, 2020 5:34 pm
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: Indigo / Node-Red / Alexa

A couple of times it took a free clocks on the drop down to get it populated.
Interestingly I’ve just tried on my iPhone and it was instantly populated there.

Posted on
Tue Jan 21, 2020 5:42 pm
Colly online
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: Indigo / Node-Red / Alexa

Tried multiple times and now have all my devices displayed. No logic to it but working none the less. Thanks for the response.

Posted on
Tue Jan 21, 2020 5:44 pm
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: Indigo / Node-Red / Alexa

Guessing you’ve got lots and it’s just slow at pulling them over

Who is online

Users browsing this forum: No registered users and 11 guests