X10 Community Forum
💬General Category => General Discussion => Topic started by: Bruce-Crozier on March 03, 2018, 02:29:36 AM
-
Hello, I am a long-time user of x10 modules, but have recently begun integrating an Amazon 'dot' alexa device into my x10
environment via ha-bridge and am having problems that I hope someone in this group can help me to resolve.
Current configuration: x10 commander on Windows 10 PC >>> CM19a >>> TM751, etc.
Planned configuration: Alexa dot >>> WiFi >>> ha-bridge >>> x10 commander >>> CM19a >>> TM751, etc.
X10 commander is running on my Windows 10 PC, and it can successfully control my x10 modules such as TM751 via the USB interfaced CM19a.
I am now trying to use ha-bridge-5.1.0.jar to interface the alexa dot to x10 commander, and can't seem to define a bridge device correctly.
The commnd strings
xxx.xxx.x.xxx:8086/?x10command=DEVICE~sendrf~%22A1%20ON%22%27 and
xxx.xxx.x.xxx:8086/?x10command=DEVICE~sendrf~%22A1%20OFF%22%27
work correctly when pasted into a web browser, controlling the TM751 On and Off, respectively.
ha-bridge appears to start correctly under java 8, and I can successfully access its configuration
tool at localhost:8091 and can create bridge devices, such as:
Name = test-lamp
Device Type = custom
On items.target item = xxx.xxx.x.xxx:8086/?x10command=DEVICE~sendrf~%22A1%20ON%22%27
On items.Http Verb = GET
Off items.target item = xxx.xxx.x.xxx:8086/?x10command=DEVICE~sendrf~%22A1%20OFF%22%27
Off items.Http Verb = GET
The 'add bridge device' works and the new bridge device is listed as:
on=false,bri=false,hue=0,sat=0,effect=none,ct=153,alert=none,colormode=xy,reachable=true,XYList=[0.3146,0.3303]
Then, the alexa app on my cell phone successfully 'discovers' the new device ...
However, the 'Test On' and 'Test Off' buttons in ha-bridge both fail, with a message like:
Request Error. Please look in your habridge log: error {"type"."3","address":"/lights/1","description"."Could not find url.","method_name":"/lights/1"}
My assumption is that I am somehow incorrectly configuring the bridge device, but I have tried a lot of variations with no
success, and am now hoping that someone in this forum might be able to help me identify and fix the error.
Thanks, Bruce Crozier B:(
-
Figuring out scripts in HA-Bridge can be a bit tricky, that's why I was asked to create Alex10.
Alex10 uses the AHP SDK just like X10 commander but it is not a server.
Alex10 creates the scripts for you but won't create them for x10commander.
If you wish to use X10commander you'll need to play with the scripts.
It has been a while since configuring a web call script in HA-Bridge and that was done for a Sonoff module so the call was different.
However if X10commander and HA-Bridge are running from the same PC the issue may be the IP
you don't say what the on/off type is set for but it should be "HTTP Device"
The ON Target Item should be http://127.0.0.1:8086/?x10command=DEVICE~sendrf~%22A1%20ON%22%27
I can't remember if the (HTTP://) was required
You could access the SDK directly as well sending the trigger to AHCMD.exe
>!
-
While I don't recommend using the AHCMD for repetitive actions due to its failure rate it is located in
C:\Program Files (x86)\Common Files\X10\Common and may work fine for simple Alexa commands