X10 Bridge is Released [Obsolete]


(sarfraz) #21

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


(J.R.) #22

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

Thank you!


(sarfraz) #23

Nice good to know :slight_smile:


#24

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.


(Kendal Van Dyke) #25

Any chance this would work with a CM17A Firecracker module?


(Johnnie Holt) #26

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!


(Jon Smith) #27

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


(zraken) #28

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


(Nate Hales) #29

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


(Enis Hoca) #30

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.


(Denis Grabocka) #31

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