X10 Bridge is Released [Obsolete]

Sure, happy to share, I am attaching the two files. [credits to the guy, who originally wrote it, it was easy for me to modify it as per my needs.]

Basically these are the two main changes I did in the code.

  1. ability to make http call.

  2. also I added the ability on device level for making plc or rf command. Because in my home some devices works better on plc and some on rf , so wanted to set it on individual device.

this is the method I added to make web calls. (also part of attached file too.)

private def callWebApi(transfermethod1, code1, command1)
{
def queryMap=[
transfermethod: transfermethod1,
code: code1,
command: command1,
dimlevel:ā€œ1ā€
]
def params = [
uri: ā€œhttp://${settings.webapiIpAddress}/x10restapi/sendcommandā€,
query: queryMap
]

try {
log.debug(params)
httpPost(params) { resp ->
log.debug ā€œresponse data:1 ${resp.data}ā€

}
} catch (e) {
log.debug ā€œsomething went wrong: $eā€
}
}

Also in my case, this is how the webapi look like.
http://IPAddress/x10restapi/SendCommand?transferMethod=sendrf&code=o1&command=on&dimlevel=50

you can modify code to construct your url.

please donā€™t hesitate to ask any further questions you may have.

Regards,
Sarfraz Sheikh

1 Like

Fantastic. Was able to modify and get mine working also! Works great.

Thank you!

Nice good to know :slight_smile:

Thanks to this thread and a great post on homeausomation, I got the Raspberry Pi installed and running, and I can now control over a dozen X10 lights and (more importantly) heaters in my camp which is an hour away. It seems to be solid, although I notice a delay of up to 10 seconds between pressing the button and having the light or heater relay change state.

The SharpTools widgets seem to lose their state over time for X10-bridge-connected devices unfortunately, but itā€™s not the end of the world.

Thank you to all involved who created, modified, and shared this development.

1 Like

Any chance this would work with a CM17A Firecracker module?

So am I correct in understanding that my smartphone talks to the Smartthings hub, which talks via wireless or LAN to the Raspberry Pi, which talks to the X10 world via USB?

And your software takes the Smartthings Hub communications, and bridges it to USB / 10?

Thanks!

Iā€™m very interested in this project. I may be doing something wrong, but I didnā€™t see any attachments to your post. Iā€™m not sure exactly what to do with the code you posted. Iā€™m guessing you add it to the X10 Bridge Smart App, which I did. But you have to call the method from within the code. Can you post some details, or perhaps the entire Smart App?

Thanks
Jon

I did not write this but yes your description is correct.

If anyone still cares. :slight_smile: I got x10 working with Smartthings and it was easier than anything I have seen so farā€¦ I am going to post this on a few of the fours that asked about x10 and smartthings (so some of you may see this post twice) Enjoy my first Smartthings video https://youtu.be/yApSfnPbZpI

2 Likes

Here is another method that uses HA-Bridge with Mochad. HA-Bridge emulates a Hue bridge on your local network, so this method not only works with Smartthings but Alexa and Google Home etc can also directly discover X-10 devices.

1 Like

IS there something on my end or the hub update that went on this past Thursday killed the link between the X10 bridge and SmartThings??/
It had been working flawlessly for me for the past year or so that i had it up and right after the update is not responding any more.
If i fire up mochad directly from my raspberry pi terminal window i can still control the lights just fine turn them on off dim themā€¦however the ST app and Alexa etc do not control them anymore however they reply with ā€œOkā€ and ā€œI have turn X light onā€ .
Nothing on my network has changed the piā€™s Ip address is fixed i can log into it, the hub is online obviously, just no communication between the two and like i said just before the update when live it was flawless better than when X10 was new. any one using this has had any similar symptoms??

Denis