Jump to content

Amazon Echo and ISY


madmartian

Recommended Posts

Scyto,

 

All my RPi's run headless.  I use tightvnc to control them from my office desktop.

 

Yes the-Dvera is the address of the endpoint you want the bridge to talk to.  When you set uip the onURL and the OffURL you include the userid password as in

 

http://admin:admin@192.168.1.229/rest/. . .

 

Yes you need to handcraft the URL's . . . but I will be distributing a new configuration system that runs on a PC. It queries the ISY for its configuration and automatically fills in the URL's after you select a device, scene or a program from a drop down list.  All you need to provide is the friendly name for Alexa, the device type (switch is what I use)  and the Rest commands starting with /rest/. . .   The app fills in all the rest. It allows for complete configuration of multiple ha-bridge systems, finds the ISY and all the bridges automatically.

 

In my rc.local file which starts the bridge I automatically determine the IP address of the RPi and set it accordingly in the start command in rc.local as follows:

 

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
 
echo "Running the RC.local Bash script"
 
# Print the IP address and set $_IP with the IP address to use later
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi
 
echo "Starting the Echo Bridge Emulator" 
nohup java -jar -Dvera.address=192.168.1.229 -Dupnp.config.address=$_IP /home/pi/echobridge/ha-bridge-0.4.2.jar > /home/pi/echobridge/log.txt  2>&1 &
 
echo "Starting the tightvncserver"
/etc/init.d/tightvncserver start
 
echo "The RC.local Bash script has completed"
 
exit 0
 

Have fun!

Link to comment

Scyto,

 

All my RPi's run headless.  I use tightvnc to control them from my office desktop.

 

Yes the-Dvera is the address of the endpoint you want the bridge to talk to.  When you set uip the onURL and the OffURL you include the userid password as in

 

http://admin:admin@192.168.1.229/rest/. . .

 

Yes you need to handcraft the URL's . . . but I will be distributing a new configuration system that runs on a PC. It queries the ISY for its configuration and automatically fills in the URL's after you select a device, scene or a program from a drop down list.  All you need to provide is the friendly name for Alexa, the device type (switch is what I use)  and the Rest commands starting with /rest/. . .   The app fills in all the rest. It allows for complete configuration of multiple ha-bridge systems, finds the ISY and all the bridges automatically.

 

In my rc.local file which starts the bridge I automatically determine the IP address of the RPi and set it accordingly in the start command in rc.local as follows:

 

<cut>

 

Thanks, I like you IP address fix in your rc.local (that said I may post issue to the GitHub - one shouldn't really have to do that - the code is faulty as it defaults to 127.0.1.1 which is an illegal address, I suspect it is supposed to be 127.0.0.1 for the loopback....

 

I guess the -cp parameter (instead of the -jar parameter) is not needed as I now realize that the java app has no interactive UI.  If it did we would need to run with -cp instead of -jar.

 

The Dvera address has no purpose in an ISY environment, that parameter is used to retrievie devices from the vera directly, it would be nice if bw systems made their code query the ISY directly too!  That said it needs to be set to something or the logs log exceptions.  I actually have a Vera and pointed it to that.  So now I can address the ISY or the Vera.

 

Personally I am lazy and not gonna hand code all my devices/scenes - luckily the ISY to HUE Mapper works just fine to populate the ha-bridge (not surprising as it as a fork of the original 'emulator'.  I am unclear why bw systems copied the code rather than fork it properly?)  though it has a bug as it used 'set' when a scene is added instead of 'cmd' - minor to change, but without that scenes don't work :-)

 

I will let him know about that.  Now all we need is the bw systems code to interrogate the IST directly :-)

 

Thanks for your help, got it working with one scene.  Now  the rest!

Link to comment

I'm glad someone else had an issue with the emulator code being copied to the bridge instead of just forked. I would be annoyed if that was my code, which is one reason I have not chosen that route. But hopefully the original author was involved in that decision.

 

ISYHelper automatically configures the fauxmo bridge from the ISY devices spoken property, and controls scenes from the spoken property of the scene controller.

 

I am close to getting multiple fauxmo's running on the same RPi so it can do more than 16 devices. I am also working with the author of a forked version of the hup-upnp and should get that working soon. I have it working with my harmony hub, so it shouldn't be much more to get the echo to recognize it.

 

Sent from my Nexus 7 using Tapatalk

Link to comment

Definitely want to hear how you get on!  I just went and researched the spoken property.Can that be set in the ISY admin UI or only by REST?

 

Guess I need to go look at the ISYHelper (I have an android tablet somewhere :-) )

 

With fauxmo does it emulate more device types than just lights like the hue emulators do?  If it does would that give echo more control options?

 

alex

Link to comment

Sorry, different ISYHelper, I named mine before I saw there was an old unsupported Android app with that name :-( Yes in the Admin UI, right click on a device and select notes, inside that popup is an option to set the spoken property, and with ISYHelper you can set it to 1 which means the same as the device name. Fauxmo can control anything, but only currently understands on and off, but I use that to control my harmony hub with Maker thru ifttt.

http://forum.universal-devices.com/index.php?/topic/16787-ISYHelper:-Interface-older-foscam's,-Maker-IFTTT,-Amazon-Echo,-and-more

Link to comment

Does Ha bridge work with the isy or only vera?

I downloaded the latest Bridge 4.2 and have the bridge running on my Windows server, but nothing is populating from the isy.

Did change the ip address in the jar launch to the isy address.

 

What am I missing ? ( Other than half a brain this morning)

Link to comment

Does Ha bridge work with the isy or only vera?

I downloaded the latest Bridge 4.2 and have the bridge running on my Windows server, but nothing is populating from the isy.

Did change the ip address in the jar launch to the isy address.

 

What am I missing ? ( Other than half a brain this morning)

 

Yes, I have two of them running on a single Windows 7 PC and up to over 60 devices now.  I changed the port and responding port on the second one to 8070 and 50001.

 

So to start the second one I use "java -jar -Dvera.address=isyaddress:port -Dupnp.config.address=ipaddressofwin7pc -Dupnp.strict=false -Dserver.port=8070 -Dupnp.response.port=50001 ha-bridge-0.4.2.jar"  I have the two identical folders for the bridges except the startup script and the database.

 

I do not know what you mean by "nothing is populating from the ISY".  You have to use the IP address with port of the bridge to add devices from a browser.  The mapper does not work with the bridge that I know of.  I could be wrong though.

 

I am using a mix of scenes, devices and programs.  One program called panic sets of the home alarm which could be invaluable if a home intrusion happened and the alarm was not set.  Would be nice if I didn't have to say "Turn on panic" but I hope the ISY guys will change all that once they get their module completed.

 

I have noticed a couple of issues though.  I have to refresh the manual add device before entering it or it will not write it to the database file.  Also, when using two of them, you have to discover devices multiple times sometimes to get Echo to recognize all of them.  I have 44 on one before it stopped recognizing any more and I have over 20 on the second so far.

 

Also, the test buttons don't seem to work in the browser either.

Link to comment

You don't need to run two instances, you can run one.

 

The Dvera.address parameter is only used for Vera, defining to point at the ISY does nothing other than populate the defaults on the manual tab.

 

If you use ISY mapper to create your ISY devices the mapper will put the right IP address in the URL or if you do it manually you can specify the IP address when you write the URL definition.

 

I have single instance controlling both Vera and ISY.

Link to comment

Thanks btreinders

Got the other half of my brain back just before you posted and tried the configurator...

It does work but in my initial tests it is leaving the ISY password info as admin:admin, this is a configurator issue that I need to check into.

Are you using the ISY mapper? It has bug if not run as admin that leaves setting as admin:admin.

Link to comment

You don't need to run two instances, you can run one.

 

The Dvera.address parameter is only used for Vera, defining to point at the ISY does nothing other than populate the defaults on the manual tab.

 

If you use ISY mapper to create your ISY devices the mapper will put the right IP address in the URL or if you do it manually you can specify the IP address when you write the URL definition.

 

I have single instance controlling both Vera and ISY.

 

Thanks!  Yeah I guess that makes sense.  But the reason I run two is because the Echo stopped recognizing after 44.  Running a second one allows me to get 44+44 hopefully (66 total so far).  I might even try running more than two to get more.  I don't have that many devices but I do like to add multiple entries for the same device so the family doesn't have to get it exactly right.  Like Turn on the receiver outside and Turn on the outside receiver etc....  The kids are adopting it quickly but the wife still hasn't.   :(  I think she'd like to kill Alexa with all the "Discovery is complete....."   :)

Link to comment

But the reason I run two is because the Echo stopped recognizing after 44.  Running a second one allows me to get 44+44 hopefully (66 total so far).  I might even try running more than two to get more.  I don't have that many devices but I do like to add multiple entries for the same device so the family doesn't have to get it exactly right.  Like Turn on the receiver outside and Turn on the outside receiver etc....  The kids are adopting it quickly but the wife still hasn't.   :(  I think she'd like to kill Alexa with all the "Discovery is complete....."   :)

 

Oh that makes total sense, i like the idea of 'variations'  i wonder if the eventual UDI skills server might allow loose matches.

 

For me i still only have one scene added to show the wife and get feedback, i suspect i will add only a few scenes for major activities like prepping the house for night, turning off/on groups of lights (like when leaving the kitchen to go to the home theater and ones hands are full).   With 40+ devices in the house i am never going to remember strict naming of all of them!

Link to comment

I just posted on my web site the first iteration of my configuration system for the Amazon Echo. This program runs only on Windows PC's. I have only run it on Windows 7 but there is no reason it should not run on Windows 8 or 10. It has a complete GUI that is not Browser based. It will locate your ISY and read its complete configuration. It will locate all your Emulators; ha-bridge, and probably the older one also. It downloads their databases. It deals with multiple emulators and allows you to choose which emulator is to get a device you wish to add to the set. It has a reasonable manual that explains how it works, and how to use it.  It is on my web site as an installation package. 

 

Feel free to download and try it.  My web site is www.the-gordons.net. look for the link to programs and downloads on the main page towards the bottom. It should be easy to find after you follow that link. I have used it to set up my home system with the Amazon Echo but only using devices.  I have not tried scenes or programs but that should also be fine.

 

I support anything I write (within reason) and appreciate any feedback. 

Link to comment

Is it possibly to use the same room name to call light On/Off in two different houses, using the same Amazon account.?

 

I have isy994+Echo setups in vacation house and main house. Let's say both houses have dining room. When I set up 2d Echo , I added 2d dining room under the same name assiming that it should not be a problem since it is a different house, different ISY, different computer running bridge and different echo. However, echo added to my Amazon account 2d entry called "dining room" and reported that there are 2 dining rooms on the list when I tried to call it. Even more, all my 1st house rooms can be called from the 2d house, which is kind of cool but I am not sure I want it.

 

It seems that the problem is the same Amazon account. No matter how many Echos I add and where they are located, or how many bridges I run, Echo store all the commands (e,g, room names) in a common list under my account. Is there a way around this without setting up a 2d Amazon account? I do not want to name differently the same type of rooms in 2 houses... Thanks.

Link to comment

I have just updated my ha-bridge emulator configuration tool on my web site. It will now handle multiple emulators on the same machine (Raspberry Pi) and contains the correct start up lines for this to be possible. It runs with the 'New' Emulator developed by bwssystems (www.bwssystems.com) It should run with versions 0.4.2 or greater.  I am using version 0.4.3

 

In my home I have a lot of mini remotes and keypads controlling things. For example, the ceiling lights in the master bedroom can be controlled by my iPads, my iPhone, A wall dimmer switch and a a mini-remote. To keep all the led's in sync I use scenes heavily. Now with the Amazon Echo using the same scenes everything still stays in sync. I am currently running over 90 scenes/devices/programs distributed over the 4 bridges.  I am Smiling!

Link to comment

Okay, I just need a little more info. Send me your ini file as you have modified it. It sounds like it did not find and download your ISY data.

Also send me the log file it wrote. It should be in the same directory as the executable. send it to barry@the-gordons.net.  I have not yet installed pretty error traps and will be doing that shortly.  Also, how do you organize your ISY? Single level folders, nested folders  etc?

Link to comment

Thanks!  Yeah I guess that makes sense.  But the reason I run two is because the Echo stopped recognizing after 44.  Running a second one allows me to get 44+44 hopefully (66 total so far).  I might even try running more than two to get more.  I don't have that many devices but I do like to add multiple entries for the same device so the family doesn't have to get it exactly right.  Like Turn on the receiver outside and Turn on the outside receiver etc....  The kids are adopting it quickly but the wife still hasn't.   :(  I think she'd like to kill Alexa with all the "Discovery is complete....."   :)

 

Just thought I'd provide an update about multiple emulators.  I am over 100 devices (spoken commands) now with 3 ha-bridges running on one PC with no ill effects to the PC or to the Echo.  I guess I will keep going until I find a limit or run out of commands.  Looking forward to using Barry's configuration tool if it will work with multiple emulators running on a single PC.

 

It has been trial and error when it comes to deciding what commands to use.  Seems Alexa has issues with things named almost the same thing.  If I have a TV, a TV inside, an inside TV,  a TV outside and an outside TV, she will always ask which one which is annoying because she gets it right the second time.  Removing just the one that is TV cures the problem.  Having a program to turn on the Directv receiver by saying Turn on ABC resulted in multiple devices as well.  I had to name it Ay BC vice ABC or A B C to get her to stop asking which one.  ESPN, NBC and CBS were fine.  Had to name The Weather Channel TWC because any time you say weather she just gives a current weather status.  CNN had to be C N N to work right.  She also has issues with anything with music or volume in the command, which makes sense but it sure would be nice to overcome this somehow.  Settled on Receiver Up and Receiver Down.

Link to comment

The stop being reported has to do with the ISY configurations.  Everyone takes a slightly different approach. I am working on the problem with one person. I have posted a newer version but I do not believe it fixes the issue.

 

The program handles multiple emulators on the same machine or multiple emulators on multiple machines. It allows you to select an emulator when you add a device, or let it pick the emulator with the smallest number of devices. I am running 4 emulators on a single RPi with no issue. The program allows for add, delete, move and update. move will move  device from one emulator to another. Update will allow you to change things about a device e.g. its friendly name. It allows for Custom end points different than the ISY994, but you have to write your own endpoint. The configuration system merely sets up the correct values for the URL when you provide the IP:port of your endpoint.

Link to comment

I have just updated the program on my web site. The bug was caused by the assumption that all ISY users store their devices in folders which represent rooms.

 

If you have previously installed the program, then unzip the archive on my web site and then unzip the CAB file. A cab file is just a renamed zip archive. The executable from the CAB file should now replace the executable that you installed.  

 

Appreciate any feedback regarding its operation. I would especially like to see the log file which is also stored in the execution folder.

Link to comment

I now have the 4 Emmulators (ha-bridge 0.4.3)  and a copy of stunnel the SSL wrapper, and tightvncserver all running on a single RPi. If you want a copy of the Micro SD (16 Gig) which can be easily loaded into a RPi model 2 to duplicate the configuration I am using,  contact me via eMail. 

 

You will need to tell me how to send it to you.  If you want it electronically you will need to supply an account at a transfer service like sendspace or dropbox through which I can send it. Or I will give you my postal address where you can send a blank 16G microSD card and a self addressed return envelope. I will burn your card and send it back to you.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...