Jump to content

Amazon Echo and ISY


madmartian

Recommended Posts

Posted

If my understanding is correct then I need someone to send me the information for their account so I can check out the code I need to write to read the Harmony configuration. This assumes I can query the account in the cloud without the actual hub present on my LAN. Blueman2?? 

Barry,

 

Let me know if you need/want my account info and I will email to you.  I am of course happy to do whatever testing, etc you need.  I wish I had an extra hub as I would send that to you.  I just hate to take this one from my wife!  It works so well!

Posted

Based on what bwssystems has done I should enough to do most of the development and unit testing.  Probably won't start till Monday, should not be too hard to integrate a harmony hub emulator in to my systems. After I have it all operating in the hub's development mode all email you and you can send me the info so I can double check my code and the portions dealing with talking to the cloud

Posted

This is really great, Barry (and BWS Systems)!  You are both going above and beyond here.  Barry, you should really consider going with the Harmony hub.  I have been using a far more complex (and higher end) remote set up for my own viewing room (as opposed to my wife's), but plan to move to the harmony hub after seeing how much better the integration can be with other devices.  Only downside is that Harmony is more consumer grade and has dumbed-down some of the features compared to pro-grade remotes.  But I can live with that.  

Posted

I have done a lot of work with UDI (ISY) and it is tightly integrated into my systems iPads, iPhones, (iDevices) etc.  Individual TV's are all IR based and either the Pronto Pro's or the iDevices working with a Global Cache unit handle them completely.  The Theater stands alone with the various subsystems having different control paradigms all controlled by a small (Asrock) PC. The PC may be controlled from the iDevices which then supply the UI, but mainly by a dedicated Pronto PRO 9800. I do not believe voice control will work well in the theater other than for starting the activity. On the Pronto, a single button press starts the Theater activity handling the playing of startup music as the system warms up, dimming lights, lowering shades, etc.  

Posted

barrygordon (I do not believe voice control will work well in the theater other than for starting the activity.)

 

 

You'd be surprised.  I just turned up the Denon to 0 db  during the NFL game and she heard every command I spoke.  I did speak a little louder than normal but not yelling and I do sit fairly close to it.  I assume very intense movie scenes would present a problem though.

Posted

Blueman2

 

I need to speak to you about the incorporation of the Harmony into the Configuration system.  I need to understand a few things about the Harmony Hub. I am able to pull and process all the configuration items for Activities and Devices in development mode from the Restful Bridge. I have questions on just what you would like to see displayed for activities and for devices

 

I assume for activities you want to be able to start and stop them as if they were scenes on an ISY, and for devices you want to be able to "push buttons". I am not sure exactly what I need to send to the hub device, but I have a pretty good idea.  Send me an email and I will send you my phone number so we can talk.  I am on the East coast

 

Barry

Posted

I need help getting my Raspberry Pi working with Barry's program and the Hue emulator.  I have installed the echo bridge java program ha-bridge-0.4.9 on the Pi, it runs and .db database is formed.  Barry's AWS_Config.exe works on my Windows 10 platform, but only if I give it the exact IP address of the Pi in the AWS_config.ini file (not sure why discovery doesn't work with the Pi, maybe that's a tell tale why Echo doesn't see the Pi)

 

I see all devices programs etc. in AWS_Config correctly, the .db is populated with my devices created by AWS_Config.  But the Echo absolutely can't find any of these devices.  Is there a Pi setting I'm missing?  Anybody have a possible solution?

 

Thanks!

Starmanj

Posted

I assume you did the special setup for the echo when you first got it.  I suspect a wi-fi problem regarding the search since the search from the configuration program does not work, but its not a wi-fi problem per se as the configuration program once told where the Pi is has no trouble talking to it.  I suspect something is inhibiting the search, possibly the router.  The Echo finds the emulator via a search also, so that is a pretty good indication that the search isn't working. There have been several posts on this subject both on this board in this forum, this thread so search the thread.  There have also been posts in other forums that have discussed router issues. 

 

Does the emulator's (on the Pi) show anything? check the log file.  It is probably in the same folder as the jar. I force the log files into a foder called logs when I start the jar from rc.local.  My start line looks as follows (without debugging): 

 

nohup java -jar -Dvera.address=192.168.1.229 -Dupnp.config.address=$_IP -Dserver.port=8083 -Dupnp.response.port=50003 -Dupnp.device.db=/home/pi/echobridge/data/device83.db /home/pi/echobridge/ha-bridge-0.4.9.jar > /home/pi/echobridge/logs/log83.txt 2>&1 &

 

and wityh debugging turned

 

nohup java -jar -Dvera.address=192.168.1.229 -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG -Dupnp.config.address=$_IP -Dserver.port=8084 -Dupnp.response.port=50004 -Dupnp.device.db=/home/pi/echobridge/data/device84.db /home/pi/echobridge/ha-bridge-0.4.9.jar > /home/pi/echobridge/logs/log84.txt 2>&1 &
 
Note: $_IP is set in my rc.local file to be the IP of the machine that it is running on. The following code does that:
 
# Print the IP address
_IP=$(hostname -I) || true                                          # this is the line that does the work
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi
Posted

Yep that's what I have in my rc.local file.  IP address is returned correctly.  I have connected the Echo to two different wifi access points, one of them on the primary router, so I'm stumped why the echo can't see it...

Posted

I have bwssystems restful-harmony and the amazon-echo-ha-bridge running and seems to be working well. 

I can say "Alexa, turn on the TV" and it works great!

The only thing I can't figured out is how do you turn it off.  I know I need to use the activity "PowerOff" but how is everyone else setting that up.  Do you have to setup another word such as "TV OFF" and say something like "Alexa, turn on TV Off"? 

 

What is everyone else doing?

Posted

Dropped back in on this thread and am really excited to see all that is going on.  I decided to upgrade to the most recent version of the Bridge to take advantage of the new features and stability.  Unfortunately, I have not had much luck getting the Configurator working.  I am getting the dreaded "Run-Time error '13': Type Mismatch".  Had no luck with any of the UpNp searches, but that does not really bother me as static mappings will work find for me.

 

Windows 10

AWS_Config Version: 2.0.68

Emulator: ha-bridge-0.4.10

ISY: 5.0.2

 

Emulator is running on a PI.  Below is my log file from when it runs.  The error happens as soon as it attempts ISY Initialization.  Any Ideas on what is going on?

AWS Configuration System version: 2.0.68 Started at 10/26/2015 23:04:42
AWS Emulator Configuration System is starting, Debug mode = All ISY DVC

********************************* Copy of the Ini File ***********************************
[System]
My Browser         = C:\Program Files (x86)\Google\Chrome\application\chrome.exe
My Echo            = echo.amazon.com/#settings/connected-home
show scene folders = true
Debug              = All ISY DVC
'Emulators          = 4, 10   ' first number is the maximum number of emulators to look for, the second the number of seconds to look.
[Emulators]
192.168.2.11:8080=Bridge1
[UDI ISY994]
ISY Userid = ******
ISY Password = ******
Location	   = 192.168.2.50.80
'[Custom Endpoints]
'EndPoint1=192.168.1.204:8087
[Device Types]
Controller         = 0 
Dimmer             = 1   
Switch             = 2
Network            = 3
Irrigation         = 4
Climate            = 5
Pool               = 6
Sensors            = 7
Energy             = 9
Shades             = 14
Access             = 15
Security           = 16
X10                = 113
'                         ' If you have other types of Zwave devices that have an On/off operation they may be added here 
[Zwave Categories]
id=0,   name=Uninitialized
id=101, name=Unknown
id=102, name=Alarm
id=103, name=AV Control Point
id=104, name=Binary Sensor
id=105, name=Class A Motor Control
id=106, name=Class B Motor Control
id=107, name=Class C Motor Control
id=108, name=Controller
id=109, name=Dimmer Switch, dim=true
id=110, name=Display
id=111, name=Door Lock
id=112, name=Doorbell
id=113, name=Entry Control
id=114, name=Gateway
id=115, name=Installer Tool
id=116, name=Motor Multiposition
id=117, name=Climate Sensor
id=118, name=Multilevel Sensor
id=119, name=Multilevel Switch
id=120, name=On/Off Power Strip
id=121, name=On/Off Power Switch
id=122, name=On/Off Scene Switch
id=123, name=Open/Close Valve
id=124, name=PC Controller
id=125, name=Remote
id=126, name=Remote Control
id=127, name=AV Remote Control
id=128, name=Simple Remote Control
id=129, name=Repeater
id=130, name=Residential HRV
id=131, name=Satellite Receiver
id=132, name=Satellite Receiver
id=133, name=Scene Controller
id=134, name=Scene Switch
id=135, name=Security Panel
id=136, name=Set-Top Box
id=137, name=Siren
id=138, name=Smoke Alarm
id=139, name=Subsystem Controller
id=140, name=Thermostat
id=141, name=Toggle
id=142, name=Television
id=143, name=Energy Meter
id=144, name=Pulse Meter
id=145, name=Water Meter
id=146, name=Gas Meter
id=147, name=Binary Switch
id=148, name=Binary Alarm
id=149, name=Aux Alarm
id=150, name=CO2 Alarm
id=151, name=CO Alarm
id=152, name=Freeze Alarm
id=153, name=Glass Break Alarm
id=154, name=Heat Alarm
id=155, name=Motion Sensor
id=156, name=Smoke Alarm
id=157, name=Tamper Alarm
id=158, name=Tilt Alarm
id=159, name=Water Alarm
id=160, name=Door/Window Alarm
id=161, name=Test Alarm
id=162, name=Low Battery Alarm
id=163, name=CO End Of Life Alarm
id=164, name=Malfunction Alarm
id=165, name=Heartbeat
id=166, name=Overheat Alarm
id=167, name=Rapid Temp Rise Alarm
id=168, name=Underheat Alarm
id=169, name=Leak Detected Alarm
id=170, name=Level Drop Alarm
id=171, name=Replace Filter Alarm
id=172, name=Intrusion Alarm
id=173, name=Tamper Code Alarm
id=174, name=Hardware Failure Alarm
id=175, name=Software Failure Alarm
id=176, name=Contact Police Alarm
id=177, name=Contact Fire Alarm
id=178, name=Contact Medical Alarm
id=179, name=Wakeup Alarm
id=180, name=Timer
id=181, name=Power Management
id=182, name=Appliance
id=183, name=Home Health
id=184, name=Barrier
********************************** End of the Ini File ***********************************

PnP The uPnP search was unable to find a UDI ISY device. Please Check Connections
PnP Using Declared Emulator at address 192.168.2.11:8080, Name=Bridge1
PnP System located 1 Emulator at adress 192.168.2.11
****************************************************************************************************

HUE Initialization Process Beginning, time now is 23:04:57
 
HUE Getting list of devices from HUE Bridge1 at 192.168.2.11:8080
 
DBG SendToHUE has started, Bridge: Bridge1, message size=78, time=23:04:57
DBG Message sent=GET /api/devices HTTP/1.1(CR)(LF)Host: 192.168.2.11:8080(CR)(LF)Connection: Keep-Alive(CR)(LF)(CR)(LF)
HUE socket connected
HUE Socket SendProgress Fired: ***** Bytes Sent=78;  Data Sent=, socket state=7 (Connected)
HUE Socket SendComplete Fired, socket state=7 (Connected)
HUE Data Arrival, byte count=123, socket state=7 (Connected)
HUE Data Arrival, byte count=7, socket state=7 (Connected)
DBG SendToHueBridge: HUE data Received, Socket Closed
******************************************************************************************************
 
ISY Initialization Process Beginning, time now is 23:04:59

Posted (edited)

cmacnichol,

 

I believe you have an error in your ini file.  In the UISY994 section you have:

Location     = 192.168.2.50.80

That can't be right to many octets. I think what you want is:

Location     = 192.168.2.50:80

 

That explains the type 13 error, and is why I put a copy of the ini file into the log file.

Edited by barrygordon
Posted

RaginBajin,

 

I am making a change to the configuration program to aid those with both a ISY994 and a Harmony Hub.  Should be ready in about a week.

 

For Harmony activities, the onURL ( which is what gets sent with "Alexa, Turn on...") will start the activity and the offURL which is sent when you say "Alex, Turn off...") will turn stop the activity. My understanding is that to turn off or stop an activity the JSON is merely {"activityid":"PowerOff"} as only one activity at a time can be running on the Harmony hub.

 

When the new version is ready (probably by Friday) I will announce it here.

Posted

 had a similar issue a few revs back where discovery would NOT work with wired on the Pi

Switched to wireless and it worked, you might try that

..Barry

Do you mean I need to get a wifi adapter for the Pi?  My Pi is wired now, which I would think is a superior solution...

Posted

Barry-

My log file is below, I think it looks normal, not sure why Echo doesn't see it.  I have connected Echo to both my wifi AP's, on is Tomato the other is DDWRT, neither work:

[main] INFO com.bwssystems.HABridge.HABridge - Starting setup....
[main] INFO com.bwssystems.HABridge.devicemanagmeent.DeviceResource - HABridge device management service started.... 
[Thread-0] INFO spark.webserver.SparkServer - == Spark has ignited ...
[Thread-0] INFO spark.webserver.SparkServer - >> Listening on 0.0.0.0:8080
2015-10-24 22:37:46.832:INFO:oejs.Server:Thread-0: jetty-9.0.z-SNAPSHOT
2015-10-24 22:37:47.255:INFO:oejs.ServerConnector:Thread-0: Started ServerConnector@41755d{HTTP/1.1}{0.0.0.0:8080}
[main] INFO com.bwssystems.HABridge.hue.HueMulator - Hue emulator service started....
[main] INFO com.bwssystems.HABridge.upnp.UpnpSettingsResource - Hue description service started....
[main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener starting....
[main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener running and ready....
 

 

 

 

 

I assume you did the special setup for the echo when you first got it.  I suspect a wi-fi problem regarding the search since the search from the configuration program does not work, but its not a wi-fi problem per se as the configuration program once told where the Pi is has no trouble talking to it.  I suspect something is inhibiting the search, possibly the router.  The Echo finds the emulator via a search also, so that is a pretty good indication that the search isn't working. There have been several posts on this subject both on this board in this forum, this thread so search the thread.  There have also been posts in other forums that have discussed router issues. 

 

Does the emulator's (on the Pi) show anything? check the log file.  It is probably in the same folder as the jar. I force the log files into a foder called logs when I start the jar from rc.local.  My start line looks as follows (without debugging): 

 

nohup java -jar -Dvera.address=192.168.1.229 -Dupnp.config.address=$_IP -Dserver.port=8083 -Dupnp.response.port=50003 -Dupnp.device.db=/home/pi/echobridge/data/device83.db /home/pi/echobridge/ha-bridge-0.4.9.jar > /home/pi/echobridge/logs/log83.txt 2>&1 &

 

and wityh debugging turned

 

nohup java -jar -Dvera.address=192.168.1.229 -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG -Dupnp.config.address=$_IP -Dserver.port=8084 -Dupnp.response.port=50004 -Dupnp.device.db=/home/pi/echobridge/data/device84.db /home/pi/echobridge/ha-bridge-0.4.9.jar > /home/pi/echobridge/logs/log84.txt 2>&1 &
 
Note: $_IP is set in my rc.local file to be the IP of the machine that it is running on. The following code does that:
 
# Print the IP address
_IP=$(hostname -I) || true                                          # this is the line that does the work
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

 

Posted

I did think that the format was odd, but that was what the config format specified in the word doc.  I updated it to the correct format with no luck however.  Still getting the same error in the same place, no difference in the log file.

 

Location   = 192.168.2.50:80

 

Any other ideas?

 

Also looking into why UpNp is not working at all on my network.

 

 

cmacnichol,

 

I believe you have an error in your ini file.  In the UISY994 section you have:

Location     = 192.168.2.50.80

That can't be right to many octets. I think what you want is:

Location     = 192.168.2.50:80

 

That explains the type 13 error, and is why I put a copy of the ini file into the log file.

Posted

Starmanj,

 

You are correct, wired is the better solution. Does your router have the wifi radio built in or do you use separate wired WAPS (wireless access point)? There is definitely strange going on with your network.

Posted

Cmacnichol,

 

I will double check the word doc, if it states there is a period between the ip and port it is a typo, it should be a colon. I assume the ISY admin console is working fine. Send me an email at barry@the-gordons.net. I will send you a copy of config with additional debugging by return email in order to try and pinpoint your problem. If upnp search is not working I suspect you have a network issue although with the location specified there should not be a search taking place unless the IP address or port specified for your ISY is incorrect

Posted

 

Barry-

My log file is below, I think it looks normal, not sure why Echo doesn't see it.  I have connected Echo to both my wifi AP's, on is Tomato the other is DDWRT, neither work:

[main] INFO com.bwssystems.HABridge.HABridge - Starting setup....
[main] INFO com.bwssystems.HABridge.devicemanagmeent.DeviceResource - HABridge device management service started.... 
[Thread-0] INFO spark.webserver.SparkServer - == Spark has ignited ...
[Thread-0] INFO spark.webserver.SparkServer - >> Listening on 0.0.0.0:8080
2015-10-24 22:37:46.832:INFO:oejs.Server:Thread-0: jetty-9.0.z-SNAPSHOT
2015-10-24 22:37:47.255:INFO:oejs.ServerConnector:Thread-0: Started ServerConnector@41755d{HTTP/1.1}{0.0.0.0:8080}
[main] INFO com.bwssystems.HABridge.hue.HueMulator - Hue emulator service started....
[main] INFO com.bwssystems.HABridge.upnp.UpnpSettingsResource - Hue description service started....
[main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener starting....
[main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener running and ready....

 

 

What is the command line you are using and also w description of your ip's and what IP is your echo. That will help debug this.

 

Thanks

Posted

Cmacnichol,

You were correct, the word doc had a typo.

The log file shows the following after the printout of the ini file:

********************************** End of the Ini File ***********************************

PnP UsingPnP The uPnP search was unable to find a UDI ISY device. Please Check Connections

Declared Emulator at address 192.168.2.11:8080, Name=Bridge1

PnP System located 1 Emulator at adress 192.168.2.11
***********************************************************************************************

The line that says:

PnP UsingPnP The uPnP search was unable to find a UDI ISY device. Please Check Connections

is understandable because of the bad location item (. instead of :) . If that has been connected, a uPnP search should not be attempted for the ISY.  It should now state:

        "PnP A UDI ISY994 was declared to be at location " + ISY_IP + ":" + ISY_Port, "", True

you stated that the log file did not change.  If the log file did not change then the Location line item was not properly read.  Please send a copy of the log file that corresponds to the run of config with the location line correct.

 

You should modify your ini file in the following manner:

Remove any line that has a single quote in column 1. The single quote makes what follows a comment

Remove the line "Show Scene Folders = True"  as that is the default condition and there is no longer a "false" option.

 

I have a version of the program witgh more debugging, but I want to see the new log file first.

 

Thanks

Posted

Got it working.  Found the cause as well and was able to reproduce it.

 

When I entered the IDY Location Line I used a 'Tab' to move to the = section to line them up.  It appears when it parses the ini that it does not like this.  I removed the tab and just used space bar to line the = sign up and it is now working. It is always the smallest thing,

 

Now if I could get Discovery working on my network I would be happy.  Think I need to tear it down and test it incrementally as not even Wireshark is giving me what I need.

Posted

Thanks Barry-

I made some changes and echo now finds the wired RPI2.  I am now using jar .10 version, added the debug command you specified, sudo apt-get upgrade; I have no idea which of these things fixed it, but now Echo finds the RPI2!

 

Argh, I hate it when things start to work and I have no idea why...

 

Starmanj

Posted

Barry - thanks for all the great work you and the community have done on the Echo integration.  I've got an extensive Insteon setup with an ISY994i and an Echo arrivng tomorrow.  Other than the local network setup, dedicated PC requirement and free aspect of the community solution, do you know of any major capability differences between that and what UDI is working on (availability tbd)?   IE - anything more I can "do" with the community solution?  Appreciate your perspective!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...