Author Topic: Bridge Amazon Echo to Vera, on github!  (Read 433118 times)

Offline Ramias

  • Sr. Member
  • ****
  • Posts: 275
  • Karma: +7/-5
Re: Bridge Amazon Echo to Vera, on github!
« Reply #30 on: April 28, 2015, 03:42:30 pm »
Where do we put the File and do we do anything with it after we download it?

I'm getting the following error.

C:\Windows\system32>java -jar -Djava.net.preferIPv4Stack=true amazon-echo-bridge
-0.1.0.jar --logging.level.com.armzilla.ha.upnp=DEBUG --logging.file=ha.log --up
np.config.address=192.168.1.100 >log.txt
Error: Unable to access jarfile amazon-echo-bridge-0.1.0.jar


EDIT: I got past that part buy just running the file. I can check the browser and I get the info on my light.

I'm currently stuck on getting Echo to "DISCOVER" my deivces. Keeps saying shes not finding it. Firewall off I checked I will not swear "run netstat -ano | find "8080", netstat -ano | find "1900", netstat -ano | find "50000"." and stoped a few things till it was clear, then ran the java and still no luck yet.

I don't think  you can just dbl click and run the JAR file

looks like your cmd prompt was just in the system32 dir.  Change to the dir where the JAR file is and run the command line again.

Online integlikewhoa

  • Master Member
  • *******
  • Posts: 5449
  • Karma: +145/-305
Re: Bridge Amazon Echo to Vera, on github!
« Reply #31 on: April 28, 2015, 05:04:51 pm »
Where do we put the File and do we do anything with it after we download it?

I'm getting the following error.

C:\Windows\system32>java -jar -Djava.net.preferIPv4Stack=true amazon-echo-bridge
-0.1.0.jar --logging.level.com.armzilla.ha.upnp=DEBUG --logging.file=ha.log --up
np.config.address=192.168.1.100 >log.txt
Error: Unable to access jarfile amazon-echo-bridge-0.1.0.jar


EDIT: I got past that part buy just running the file. I can check the browser and I get the info on my light.

I'm currently stuck on getting Echo to "DISCOVER" my deivces. Keeps saying shes not finding it. Firewall off I checked I will not swear "run netstat -ano | find "8080", netstat -ano | find "1900", netstat -ano | find "50000"." and stoped a few things till it was clear, then ran the java and still no luck yet.

I don't think  you can just dbl click and run the JAR file

looks like your cmd prompt was just in the system32 dir.  Change to the dir where the JAR file is and run the command line again.

It looks like it was running fine for me, but how can I check? The Jar file was on the desktop at the time.

I can run this  http://192.168.1.100:8080/api/devices and before running it I would get a website not available.
After running it but before running this tool  "http://www.swensensoftware.com/im-only-resting" I get a response but fairly empty with no device on it. After running the tool I get a much longer print out with the device name and info all in.

Seems to me I got it right up until getting ECHO to discover it.

Offline Ramias

  • Sr. Member
  • ****
  • Posts: 275
  • Karma: +7/-5
Re: Bridge Amazon Echo to Vera, on github!
« Reply #32 on: April 28, 2015, 05:11:33 pm »
Where do we put the File and do we do anything with it after we download it?

I'm getting the following error.

C:\Windows\system32>java -jar -Djava.net.preferIPv4Stack=true amazon-echo-bridge
-0.1.0.jar --logging.level.com.armzilla.ha.upnp=DEBUG --logging.file=ha.log --up
np.config.address=192.168.1.100 >log.txt
Error: Unable to access jarfile amazon-echo-bridge-0.1.0.jar


EDIT: I got past that part buy just running the file. I can check the browser and I get the info on my light.

I'm currently stuck on getting Echo to "DISCOVER" my deivces. Keeps saying shes not finding it. Firewall off I checked I will not swear "run netstat -ano | find "8080", netstat -ano | find "1900", netstat -ano | find "50000"." and stoped a few things till it was clear, then ran the java and still no luck yet.

I don't think  you can just dbl click and run the JAR file

looks like your cmd prompt was just in the system32 dir.  Change to the dir where the JAR file is and run the command line again.

It looks like it was running fine for me, but how can I check? The Jar file was on the desktop at the time.

I can run this  http://192.168.1.100:8080/api/devices and before running it I would get a website not available.
After running it but before running this tool  "http://www.swensensoftware.com/im-only-resting" I get a response but fairly empty with no device on it. After running the tool I get a much longer print out with the device name and info all in.

Seems to me I got it right up until getting ECHO to discover it.

I suspect the --upnp.config.address=192.168.1.100 and is needed by the echo, thus it was part of the instructions.  Pretty sure double clicking the Jar in Windows is not enough to make this work completely.

Online integlikewhoa

  • Master Member
  • *******
  • Posts: 5449
  • Karma: +145/-305
Re: Bridge Amazon Echo to Vera, on github!
« Reply #33 on: April 28, 2015, 05:20:50 pm »
I have tried to move the file to the system 32 folder and I have the same run error. Funny thing is when i manually try to run it in that folder like i did on the desktop I also get that same error.

Currently running http://192.168.1.100:8080/api/devices in a browser returns this.


Code: [Select]
[{"content":[{"id":"5202227b-f354-4092-bc52-cb1e38ecec6b","name":"Dining Table Light","deviceType":"switch","offUrl":"http://192.168.1.212:3480/data_request?id=action&output_format=json&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0&DeviceNum=52","onUrl":"http://192.168.1.212:3480/data_request?id=action&output_format=json&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1&DeviceNum=52"}],"facets":[],"totalElements":1,"totalPages":1,"size":1,"number":0,"sort":null,"first":true,"last":true,"numberOfElements":1}]
Please give me more ideas to get it to run via command promt

Online integlikewhoa

  • Master Member
  • *******
  • Posts: 5449
  • Karma: +145/-305
Re: Bridge Amazon Echo to Vera, on github!
« Reply #34 on: April 28, 2015, 05:22:25 pm »
192.168.1.100 is the static address I have set for my desktop windows 8.1 server which is where I'm running this at.

Online integlikewhoa

  • Master Member
  • *******
  • Posts: 5449
  • Karma: +145/-305
Re: Bridge Amazon Echo to Vera, on github!
« Reply #35 on: April 28, 2015, 05:28:09 pm »
looks like your cmd prompt was just in the system32 dir.  Change to the dir where the JAR file is and run the command line again.

Ok I understood you now, I moved the file to c:\ to keep it simple

did a cd\ in the CMD (C:\ now) and now I got it to run just fine. Off to test


EDIT:

This is what I get.


C:\>java -jar -Djava.net.preferIPv4Stack=true amazon-echo-bridge-0.1.0.jar --log
ging.level.com.armzilla.ha.upnp=DEBUG --logging.file=ha.log --upnp.config.addres
s=192.168.1.100 >log.txt
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
        at java.lang.Thread.run(Unknown Source)Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
        at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:157)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
        at com.armzilla.ha.SpringbootEntry.main(SpringbootEntry.java:14)
        ... 6 more
« Last Edit: April 28, 2015, 05:38:03 pm by integlikewhoa »

Offline Ramias

  • Sr. Member
  • ****
  • Posts: 275
  • Karma: +7/-5
Re: Bridge Amazon Echo to Vera, on github!
« Reply #36 on: April 28, 2015, 05:51:47 pm »
what version of Java?

Or maybe some weird permissions issue when running from the root of C:.  Maybe try to put the JAR in a folder and run it from there?

Online integlikewhoa

  • Master Member
  • *******
  • Posts: 5449
  • Karma: +145/-305
Re: Bridge Amazon Echo to Vera, on github!
« Reply #37 on: April 28, 2015, 06:32:16 pm »
what version of Java?

Or maybe some weird permissions issue when running from the root of C:.  Maybe try to put the JAR in a folder and run it from there?

I'm running JAVA version 8 update 45

I got her to see the light!
 
I shut down the computer and started all over. I think some of my errors above might be due to the fact it was already running. I did move it to c:\Echo folder and then ran it. No more error after that and I did check out the log it creates in the same folder.

I guess this will be good enough for testing now. I don't like leaving the CMD open and I also have turned off PLEX and Torrents right now due to seeing them in the port checker. Not sure if I turn them on if everything will quit. But I guess if this works out good a PI might be the next move.

Online integlikewhoa

  • Master Member
  • *******
  • Posts: 5449
  • Karma: +145/-305
Re: Bridge Amazon Echo to Vera, on github!
« Reply #38 on: April 28, 2015, 08:55:49 pm »
What does the code look like for multiple device's? Can someone post up an example with more then one? Thanks

How about dimming lights?
« Last Edit: April 28, 2015, 09:06:36 pm by integlikewhoa »

Offline Ramias

  • Sr. Member
  • ****
  • Posts: 275
  • Karma: +7/-5
Re: Bridge Amazon Echo to Vera, on github!
« Reply #39 on: April 28, 2015, 10:38:49 pm »
I just have two so far; uploaded one then uploaded the other.  My echo is in the living room so I really only have it do actions/scenes relevant for that location right now.

Offline EOppie

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +1/-0
Re: Bridge Amazon Echo to Vera, on github!
« Reply #40 on: April 28, 2015, 10:53:32 pm »
Okay, gave up on the Synology, followed the instructions for windows...

How do I do this part?  You can use the Vera app on your phone to trigger discovery, or forget previously discovered devices if you have a collision.

Offline Ramias

  • Sr. Member
  • ****
  • Posts: 275
  • Karma: +7/-5
Re: Bridge Amazon Echo to Vera, on github!
« Reply #41 on: April 28, 2015, 10:54:35 pm »
Should have read use the Echo app on your phone, not Vera app.

Offline EOppie

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +1/-0
Re: Bridge Amazon Echo to Vera, on github!
« Reply #42 on: April 28, 2015, 10:57:07 pm »
Should have read use the Echo app on your phone, not Vera app.

Gotcha, so in otherwords, it should see it when asking it to discover devices.  Guess I need to figure out what is being blocked :-)

Offline EOppie

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +1/-0
Re: Bridge Amazon Echo to Vera, on github!
« Reply #43 on: April 28, 2015, 11:23:03 pm »
Figured it out,  added a lamp, and it discovered!

Whoopie!

Asked Alexa to turn the pole lamp on, and it worked...but Echo then said "Sorry I couldn't reach the device or group named pole lamp" however it still turned the lamp on or off.  Spoke the error both times.

Any idea on how to correct it?  It is funny since it works and turns the device on and off, but still gives an error.
« Last Edit: April 29, 2015, 12:00:40 am by EOppie »

Online integlikewhoa

  • Master Member
  • *******
  • Posts: 5449
  • Karma: +145/-305
Re: Bridge Amazon Echo to Vera, on github!
« Reply #44 on: April 28, 2015, 11:41:05 pm »
Is there a limit of 10 devices?

My discovery seemed to stopped wanting to add any devices as soon as it hit 10.

Anyone have more then 10?

Also How do you delete one of the devices?

I had to add each one, one at a time..... Is there a faster way?
« Last Edit: April 29, 2015, 01:18:34 am by integlikewhoa »