Interfacing Alexa with Reactor via Routines and Dimmer VS
-
Does it also spare you having to go through those godforsaken steps I mentioned earlier (Vera > Logout > Name > Alexa Setup > enable/rename devices > Finish > Alexa app > Discovery)? Cuz that would be wonderful, lol. Have added it to my Reading List.
-
@librasun said in Interfacing Alexa with Reactor via Routines and Dimmer VS:
Does it also spare you having to go through those godforsaken steps I mentioned earlier (Vera > Logout > Name > Alexa Setup > enable/rename devices > Finish > Alexa app > Discovery)? Cuz that would be wonderful, lol. Have added it to my Reading List.
Probably not, because, as I read it, Vera is the problem......
Openluup is nothing like that bad.
C
-
@catmanv2 said in Interfacing Alexa with Reactor via Routines and Dimmer VS:
Does it also spare you having to go through those godforsaken steps I mentioned earlier (Vera > Logout > Name > Alexa Setup > enable/rename devices > Finish > Alexa app > Discovery)? Cuz that would be wonderful, lol. Have added it to my Reading List.
Probably not, because, as I read it, Vera is the problem......
Is it not as easy as creating the links to the devices in the HA bridge, then asking alexa to discover devices?
-
Ha-bridge is really plug&play. There’s also a docker image available.
-
LibraSunreplied to therealdb on Apr 14, 2021, 8:22 PM last edited by LibraSun Apr 14, 2021, 4:50 PM
@therealdb said in Interfacing Alexa with Reactor via Routines and Dimmer VS:
Ha-bridge is really plug&play. There’s also a docker image available.
On the promise of that, I have spent the past hour trying to get HA-Bridge up and running on my Synology NAS (using the "latest" downloaded image, and launching it from the Docker GUI), but no joy just yet.
Oh, it runs alright. And I've got all the ports, environment variables, volumes, etc. set up according to all the online FAQs I've read... but, alas, I cannot get anything to come up when I access <my_nas_ip>:8080 (the recommended port, mapped to 8080 in the container).
Looks like I might have to roll up my sleeves, spend a few days reading and understanding Linux and SSH commands, downloading the needed JAR file, and trying alternative install methods through PuTTY.
C'mon Docker, things were supposed to "just work"! Anyone else got HA-Bridge working through the Synology NAS > Docker > GUI > Advanced Settings approach??
UPDATE: I immediately switched over to another Image file, from linuxserver/habridge (which had not appeared in the GUI before when I searched for 'ha-bridge' with the hyphen), and now I've got a working Container! Will experiment more tomorrow.
-
Nice @librasun, looking forward to hearing how you make out.
-
LibraSunreplied to MikeReadington on Apr 14, 2021, 9:17 PM last edited by LibraSun Apr 14, 2021, 5:22 PM
@mikereadington said in Interfacing Alexa with Reactor via Routines and Dimmer VS:
Nice @librasun, looking forward to hearing how you make out.
Haha, baby steps. I managed to configure HA-Bridge to see my Vera Plus, at which point it listed all known Devices (nice). But when I went to "Build" one of those devices -- my "Test Dimmer" which I spoke about earlier -- two things immediately went oddly:
(a) HA-Bridge referred to it as "Virtual Dimmer 21" (its name upon creation in Switchboard, but long ago since renamed to "Test Dimmer" in Vera and honored by MSR GUI)
(b) After I clicked "Add Bridge Device", upon clicking "TEST ON", I got a "Request Error" message (error 404), but the log isn't helpful in determining what exactly is going wrong.
Like I always say, one step forward, two steps back.
UPDATE: Happily, just by giving things time to settle (while I wrote this post), something must have improved. Now when I click "TEST ON" or "TEST OFF" I get a success message:
Request Executed: success [{"success":{"/lights/100/state/on":true}}]
Yay!?
P.S. I ran Alexa > Discovery, but she "Could not find any new devices" (my naive hope was that she would discover the "Test Dimmer Switch" newly added to my Bridge Devices). Does this mean I need to map Port 80 of my NAS to HA's internal 8080 port, or something along those lines? I read lots of discussions about this, but the various "solutions" were inconclusive.
-
Following you on this @librasun. I had never done anything with docker until MSR, so I have catching up to do in general.
-
Seems the current hiccup -- AND THERE ALWAYS IS ONE IN HOME AUTOMATION, RIGHT? -- is that many HA-Bridge users report their Alexa no longer "Discovering" devices. And that's my current issue. Reading the Interwebs feverishly in hopes of a solution.
Guess what I'm also saying is, "Try not to be the first kid on the block to try something new or different." Thank god we have Google.
-
@therealdb said in Interfacing Alexa with Reactor via Routines and Dimmer VS:
Yes, you have to map port 80.
In an ironic twist, Docker for Synology NAS will not permit me to change HA-Bridge to listen on port :80, because it "conflicts with other things" in essence. Namely, if you go to <nas_ip>:80, the NAS pushes you up to its secure port :5000.
Not even sure whether this can be worked around, so I'll hang tight for now. Sounds like RaspberryPi users have it easier in this instance.
-
That sounds like it might be an issue indeed. Not sure how that might be addressed as, by my understanding, Alexa needs to access on port 80.
I guess you might be able to move the NAS functions on port 80 to something else?
C
-
LibraSunreplied to CatmanV2 on Apr 15, 2021, 1:54 PM last edited by LibraSun Apr 15, 2021, 10:06 AM
@catmanv2 said in Interfacing Alexa with Reactor via Routines and Dimmer VS:
I guess you might be able to move the NAS functions on port 80 to something else?
Not readily so, I'm afraid. Checked all settings, and HTTP is already sitting at port :5000 while HTTPS listens to :5001 (and you can set automatic redirects from one to the other).
But nothing allows you to assign (or de-assign) port :80 to free it up for use by an application. Back to square one unless Google tosses be a bone (such as this gem) on solving this.
-
Just use lighttpd on the Vera system as a reverse proxy.
From the HA-bridge doc:
server.modules += ( "mod_proxy" ) proxy.server = ( "/api" => ( ( "host" => "127.0.0.1", "port" => "8080" ) ) )
Just insert your syno IP address and port. It's necessary only during the discovery but leaving it as-is should work. otherwise, do it on a PI or similar.
-
toggledbitswrote on Apr 15, 2021, 2:21 PM last edited by toggledbits Apr 15, 2021, 10:22 AM
If you go into the port settings for the container (click the container and hit Edit), you'll see there's a "Local Port" and "Container Port". Docker tunnels from one to the other; that is, it receives on the local port and passes the data into the container on the container port. When the container writes to a connection open on the container port, it comes out of the NAS on the local port.
You can set the "Local Port" to another unused port. That usually is all you need, unless the container itself publishes or uses URLs with the port it thinks it should be on, but a well-written container/app will let you change the port via configuration somehow as well.
-
LibraSunreplied to toggledbits on Apr 15, 2021, 2:35 PM last edited by LibraSun Apr 15, 2021, 10:43 AM
@toggledbits In theory, yes, but Synology specifically has port :80 locked down tight (entire treatises have been written about unlocking it, but they are deep dives indeed). They only want it to work as a listening port for nginx which instantly redirects to :5000 for the DSM UI.
I'll give the advice from @therealdb a whirl once I decipher what it all means and where it goes. Such as by digesting this post.
THANKS, gents.
-
@therealdb said in Interfacing Alexa with Reactor via Routines and Dimmer VS:
Just use lighttpd on the Vera system as a reverse proxy.
OK, I admit defeat after racking my brain and reading the docs to try figuring out where the lines you quoted actually go on the Vera. (I do get the IP:port substitution part(s)!)
Something tells me this involves using WinSCP into Vera and editing some file, perhaps? I'm just scared of screwing something up unless I'm told explicitly what steps to follow.
Thanks for the suggestion, though, and sorry I'm not more tech savvy. (Linux-speak in particular is alien to me, no matter how hard I try to follow along.)
-
toggledbitswrote on Apr 15, 2021, 4:31 PM last edited by toggledbits Apr 15, 2021, 12:32 PM
You're missing what I'm saying. You can move the HA-Bridge container to a different port so it doesn't conflict with DSM's use of 80 by reassigning the local port in the container configuration. The only trouble that may create is if the HA-Bridge itself self-reflects at that port, either by making requests of itself, or publishing the port to others for JSONP or other forms of callback, in which case, you need to tell HA-Bridge it's on a different public port, and well-behaved apps have configuration for that.
-
@librasun said in Interfacing Alexa with Reactor via Routines and Dimmer VS:
Something tells me this involves using WinSCP into Vera and editing some file, perhaps? I'm just scared of screwing something up unless I'm told explicitly what steps to follow.
chances are high. maybe what Patrick is suggesting is easier.
30/42