[SOLVED] Amazon Echo Support

Forum to discuss X10 Commander iPhone/iPod/iPad/Android client for X10 Devices

[SOLVED] Amazon Echo Support

Postby bedwards1000 » Tue Oct 25, 2016 2:45 pm

Is there any hope for Alexa controlled X10 lights? This seems to be the closest thing I have found. It could possibly use a phone app that you could monetize as a bridge. Preferably something that could use the CM19A interface since I already own it.
bedwards1000
 
Posts: 1
Joined: Tue Oct 25, 2016 2:40 pm

Re: Amazon Echo Support

Postby Melloware » Mon Nov 07, 2016 8:28 am

So the echo plugin would have to communicate with our PC app. Basically the same API the Android/iPhone app uses to communicate to our PC app would just be Amazon Echo sending the commands. If time were infinite i would write the Echo plugin myself.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11037
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Amazon Echo Support

Postby jason » Fri Dec 09, 2016 5:05 pm

I have been a mellow ware customer for a few years now. I'd be willing to pay more for this functionality. Echo could easily breath life back into x10 if you wrote this. Echo first then Google's. X10 stuff is about to get cheap with people moving to wifi enabled devices and I don't want to start shelling out $38 per new device since I own a lot of reliable x10. Thanks
jason
 
Posts: 13
Joined: Fri Dec 09, 2016 5:01 pm

Re: Amazon Echo Support

Postby jason » Fri Dec 09, 2016 5:23 pm

Is the API publicly available so that someone in the community can write this?
jason
 
Posts: 13
Joined: Fri Dec 09, 2016 5:01 pm

Re: Amazon Echo Support

Postby TerryOhr » Sun Dec 18, 2016 5:10 pm

I would truly love that and would be willing to pay for it. Since the X10 Commander server is just sitting there waiting for requests from iPhones or Androids, what's one more client? Since the Amazon Echo Dot is less than $40 I think the market could be large.
TerryOhr
 
Posts: 8
Joined: Tue Sep 10, 2013 3:21 pm

Re: Amazon Echo Support

Postby Melloware » Mon Dec 19, 2016 8:08 am

Great news! Alexa is now supported if you follow these instructions...

1. Download HA Bridge from here https://github.com/bwssytems/ha-bridge

2. From the command line start the app "java -jar ha-bridge-3.5.1.jar". Note you will need JDK8 installed.

3. In the browser type "http://localhost" that brings up the web interface of the bridge.

4. Find the tab called "Manual Add" and create a new New Device lets call it "Bedroom". In the On and Off URLs area enter the following as HTTP GETS:
On: http://192.168.56.1:8086/?x10command=DE ... lc~A4%20ON
Off: http://192.168.56.1:8086/?x10command=DE ... c~A4%20OFF

Note: 192.168.0.10 is the IP of where X10 Commander is running and 8086 is the port, A4 is the house code. You can see this on the X10 Commander UI.

5. Click "Add Device" button once you are satisfied.

6. On the Main tab of HA Bridge you will now see your device. Try it out by clicking the Test On and Test Off buttons to make sure the communication is working!

7. Now tell Alexa "Alexa, discover my devices". It will discover the Bedroom!

8. Now tell Alexa "Alexa, turn on Bedroom" etc.

That's it! Any questions or issues the great HA bridge is doing most of these work see their help and issues for any problems!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11037
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Amazon Echo Support

Postby jason » Mon Dec 19, 2016 11:02 am

You rock! I jumped in right away when you posted this this morning but am getting hung up at the point of entering http://localhost (I literally entered that text and hit return, is that right?) into my browser. When I do that the web service does not launch for me. So I suspect that the jar is not completing something? Here is what I got when I ran the jar file from command.


C:\Users\Jason>java -jar ha-bridge-3.5.1.jar
2016-12-19 08:39:38,541 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridg
e (v3.5.1) starting....
2016-12-19 08:39:38,560 [main] INFO com.bwssystems.HABridge.BridgeSettings - re
ading from system properties
2016-12-19 08:39:38,632 [main] INFO com.bwssystems.HABridge.BridgeSettings - Ad
ding 192.168.1.106 as our default upnp config address.
2016-12-19 08:39:38,632 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridg
e initializing....
2016-12-19 08:39:38,646 [main] INFO com.bwssystems.HABridge.SystemControl - Sys
tem control service started....
2016-12-19 08:39:38.789:INFO::Thread-0: Logging initialized @659ms
2016-12-19 08:39:38,877 [main] WARN com.bwssystems.HABridge.dao.DeviceRepositor
y - Error reading the file: data\device.db - Does not exist or is not readable.
continuing...
2016-12-19 08:39:38,886 [main] INFO com.bwssystems.HABridge.devicemanagmeent.De
viceResource - HABridge device management service started....
2016-12-19 08:39:38,923 [main] INFO com.bwssystems.HABridge.upnp.UpnpSettingsRe
source - Hue description service started....
2016-12-19 08:39:38,939 [main] INFO com.bwssystems.util.UDPDatagramSender - Ini
tializing UDP response Seocket...
2016-12-19 08:39:38,956 [main] INFO com.bwssystems.util.UDPDatagramSender - UDP
response Seocket initialized to: 50000
2016-12-19 08:39:38,978 [Thread-0] INFO spark.webserver.JettySparkServer - == S
park has ignited ...
2016-12-19 08:39:38,985 [Thread-0] INFO spark.webserver.JettySparkServer - >> L
istening on 0.0.0.0:80
2016-12-19 08:39:38.995:INFO:oejs.Server:Thread-0: jetty-9.3.z-SNAPSHOT
2016-12-19 08:39:39,108 [Thread-0] ERROR spark.webserver.JettySparkServer - igni
te failed
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:32
6)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNet
workConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java
:244)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:384)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:68)
at spark.webserver.JettySparkServer.ignite(JettySparkServer.java:131)
at spark.SparkInstance.lambda$init$0(SparkInstance.java:341)
at java.lang.Thread.run(Unknown Source)
jason
 
Posts: 13
Joined: Fri Dec 09, 2016 5:01 pm

Re: Amazon Echo Support

Postby Melloware » Mon Dec 19, 2016 11:38 am

Your HTTP port 80 is blocked or in use. So do this...

java -jar -Dserver.port=8090 ha-bridge-3.5.1.jar

That sets it to Port 8090 so now you can do http://localhost:8090. Give it a shot!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11037
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Amazon Echo Support

Postby jason » Mon Dec 19, 2016 12:30 pm

That worked for the port! Now the webserver is running and I completed the fields. I entered the URLs that apply to my environment and the default port of 6003. I chose GET from the HTTP verb:

But when I test in the web server UI I get error JSON at postion 0.

Are there any other fields/variables that I am missing? Can you post a screen shot from your Manual Add screen? THanks!
jason
 
Posts: 13
Joined: Fri Dec 09, 2016 5:01 pm

Re: Amazon Echo Support

Postby Melloware » Mon Dec 19, 2016 12:52 pm

Try and switch the Type from JSON to application/xml. I will try it tonight when I get home to see if did set any other settings.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11037
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Amazon Echo Support

Postby Melloware » Mon Dec 19, 2016 2:13 pm

OK the problem is we need to encode the space with %20 like...

Code: Select all
http://192.168.56.1:8086/?x10command=DEVICE~sendplc~A1%20ON


Code: Select all
http://192.168.56.1:8086/?x10command=DEVICE~sendplc~A1%20OFF
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11037
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Amazon Echo Support

Postby jason » Mon Dec 19, 2016 2:33 pm

Thanks! I look forward to that. I think the Screen shots may help. I've tried every variable that I could guess but still get errors. It could very well be something simple that I am missing.
jason
 
Posts: 13
Joined: Fri Dec 09, 2016 5:01 pm

Re: Amazon Echo Support

Postby jason » Mon Dec 19, 2016 3:55 pm

Here is a screen shot of how my fields look. I think I must be missing something. https://www.dropbox.com/s/yvh03nfh6ehlayw/JasonHAbridge.JPG?dl=0
jason
 
Posts: 13
Joined: Fri Dec 09, 2016 5:01 pm

Re: Amazon Echo Support

Postby Melloware » Mon Dec 19, 2016 4:05 pm

OK try this...

Code: Select all
http://192.168.56.1:8086/?x10command=DEVICE~sendplc~%22A1%20ON%22


Also try the same URL in your web browser.. You should get a response like...

Code: Select all
Bedroom:A1:Power Line:0
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11037
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Amazon Echo Support

Postby jason » Mon Dec 19, 2016 4:27 pm

Update: I put that in my browser and got this https://www.dropbox.com/s/krxvg066vk1lomf/BrowserURLexecution.JPG?dl=0

Here is an updated screen of the HA Bridge UI: https://www.dropbox.com/s/yvh03nfh6ehlayw/JasonHAbridge.JPG?dl=0

Here is my X10 commander Host screen so you can double check my HOST name. I am supposed to use the IP host name from this right? : https://www.dropbox.com/s/ganzqhmtsozuq66/JasonsX10commander.JPG?dl=0
jason
 
Posts: 13
Joined: Fri Dec 09, 2016 5:01 pm

Next

Return to X10 Commander

Who is online

Users browsing this forum: No registered users and 1 guest

cron