X10 Community Forum

💬General Category => Mac/Linux & Open Source and the X10 Home => Raspberry Pi, Arduino & other SBC => Topic started by: lviper on July 25, 2018, 09:00:27 AM

Title: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on July 25, 2018, 09:00:27 AM
Figured I would post my results thus far at trying to get wireless support in my home assistant setup on a raspberry pi.
I followed petera's post to setup X10 in HA on a RPi.
http://forums.x10.com/index.php?topic=30407.0

Instead of using HeyU I used Mochad which supports the cm15a. Mochad works fine in HA and is supported, but doesn't give me anyway to use my old palm pads or motion sensors to turn lights on or off. I use motion sensors to trigger events a lot. I also use my ds10a sensors to trigger events as well. I did discover mochad_dispatch that when used with mochad, it will publish the RF mochad receives to HA via an mqtt broker. The problem I have found is no support for regular wireless. It only supports the security RF signals. So this route is still a no go for me.

I've been reading some more and I'm thinking I may be able to get HeyU to offer wireless support for palm pads and non-security motion sensors using my WGL W800USB. I will have to disable my current system to test things since I'm currently using cm11a and w800usb devices. This will slow my testing down. But from what I have researched so far, HeyU will see the RF commands from the w800usb and I can send that to HA with scripts from HeyU.

It may be a little while but I will post my results when I have them.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on July 25, 2018, 09:13:48 AM
Before you started using the CM15 with the Raspberry Pi did you reset it to factory settings with AHP?
Did you set the transcieved house codes?
From my understanding if AHP was configured not to transceive any specific house codes these will also be ignored when not running AHP or using other software.
Try connecting your CM15 to a PC running AHP and in hardware configuration set it to trancieve all house codes and use the specific option not Auto, then update the interface. >!
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on July 25, 2018, 01:05:44 PM
Before you started using the CM15 with the Raspberry Pi did you reset it to factory settings with AHP?
Did you set the transcieved house codes?
From my understanding if AHP was configured not to transceive any specific house codes these will also be ignored when not running AHP or using other software.
Try connecting your CM15 to a PC running AHP and in hardware configuration set it to trancieve all house codes and use the specific option not Auto, then update the interface. >!

No, it's not that. I did actually connect my cm15a to my windows computer that has AHP on it. I cleared the memory and set the transceive to none as mochad instructs. Mochad on its own will by default transceive all house codes and it does work. Problem is the status of the device isn't updated in HA nor can I execute HA automations from the received RF. Mochad receives the RF from both regular and security, but there isn't any way to get those received signals in to HA. You can use mochad_dispatch to do it but it only does the security signals. I need both.

I've looked further in to HeyU and as long as it recognizes my w800usb (which is the usb version of the w800rf32), I should be able to accomplish what I want and keep the state status (on or off) updated in HA. Problem is like I mentioned earlier, I'm currently using the cm11a and w800usb so I would have to rob them for testing.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Brian H on July 25, 2018, 01:08:30 PM
In my tests.
Setting Transceived to None. No X10 RF commands are resent onto the power lines. Even standing alone with no computer connected.

I am also not familiar with the program you are using. It sounds like if the CM15A received an X10 RF command. The software decides to send it back on the power lines and not a CM15A hardware decision.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on July 25, 2018, 01:27:54 PM
I admit I have no experience with mochad.
I didn't think anything could change the Cm15 hardware settings other then AHP.
Seeing Security signals and reporting security RF is different then regular X10.
Setting not to transcieve doesn't stop the CM15 from seeing RF it stops it from converting RF to PLC which would render remotes useless.
If your palmpads and other X10 remotes are working then mochad is able to tell the Cm15 to trancieve.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: petera on July 25, 2018, 01:48:09 PM
Figured I would post my results thus far at trying to get wireless support in my home assistant setup on a raspberry pi.
I followed petera's post to setup X10 in HA on a RPi.
http://forums.x10.com/index.php?topic=30407.0

Instead of using HeyU I used Mochad which supports the cm15a. Mochad works fine in HA and is supported, but doesn't give me anyway to use my old palm pads or motion sensors to turn lights on or off. I use motion sensors to trigger events a lot. I also use my ds10a sensors to trigger events as well. I did discover mochad_dispatch that when used with mochad, it will publish the RF mochad receives to HA via an mqtt broker. The problem I have found is no support for regular wireless. It only supports the security RF signals. So this route is still a no go for me.

I've been reading some more and I'm thinking I may be able to get HeyU to offer wireless support for palm pads and non-security motion sensors using my WGL W800USB. I will have to disable my current system to test things since I'm currently using cm11a and w800usb devices. This will slow my testing down. But from what I have researched so far, HeyU will see the RF commands from the w800usb and I can send that to HA with scripts from HeyU.

It may be a little while but I will post my results when I have them.

I imagine if you deploy this platform in HA it should deal with you standard x10 sensors https://www.home-assistant.io/components/switch.rpi_rf/

Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on July 25, 2018, 02:04:34 PM

I imagine if you deploy this platform in HA it should deal with you standard x10 sensors https://www.home-assistant.io/components/switch.rpi_rf/
That will work however it requires two extra hardware components wired into a Pi. They however would also enable controlling more then X10 devices.
The Cm15 should be able to do what Iviper wishes with out any extra hardware.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: petera on July 25, 2018, 02:29:27 PM

I imagine if you deploy this platform in HA it should deal with you standard x10 sensors https://www.home-assistant.io/components/switch.rpi_rf/
That will work however it requires two extra hardware components wired into a Pi. They however would also enable controlling more then X10 devices.
The Cm15 should be able to do what Iviper wishes with out any extra hardware.

I've a few cheap RF sensors that transmit via the CM15 to Homegenie using the RF addon without any extra hardware. What other hardware are you suggesting is needed.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: dhouston on July 25, 2018, 02:32:41 PM
They however would also enable controlling more then X10 devices.
There are very few other devices using 310MHz RF.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on July 25, 2018, 02:57:37 PM
They however would also enable controlling more then X10 devices.
There are very few other devices using 310MHz RF.
What petera pointed to specifies 433 / 315 MHz
Quote
The rpi_rf switch platform allows you to control devices over 433/315MHz LPD/SRD signals with generic low-cost GPIO RF modules on a Raspberry Pi.
@ petera the code you linked to is for extra RF modules wired to the Pi board itself I doubt it would work with the Cm15.
The more I read posts of other users attempts to run X10 on a Pi  the more I realize HG is the way to go.
I've yet been unable to do what I want with HG and it is getting some development being done on the BE version.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: petera on July 25, 2018, 03:29:13 PM
They however would also enable controlling more then X10 devices.
There are very few other devices using 310MHz RF.
What petera pointed to specifies 433 / 315 MHz
Quote
The rpi_rf switch platform allows you to control devices over 433/315MHz LPD/SRD signals with generic low-cost GPIO RF modules on a Raspberry Pi.
@ petera the code you linked to is for extra RF modules wired to the Pi board itself I doubt it would work with the Cm15.
The more I read posts of other users attempts to run X10 on a Pi  the more I realize HG is the way to go.
I've yet been unable to do what I want with HG and it is getting some development being done on the BE version.

Did you mean Home Assistant or Home Genie. I was using Home Genie extensively for a few years but as development stalled and was forked nothing other than methods of packaging seemed to have progressed.

I got more done in week using Home Assistant than I did in three months using Home Genie. It's all down to active development and community input.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on July 25, 2018, 03:56:25 PM
I don't use Home Assistant so I was referring to HG.
From what I can see all these Linux Home Automation are only expanding due to users sharing their plugin codes and ways of doing things.
HGBE may only be developing it the installer route for now but with out users sharing stories and ways to do things a single developer is unlikely to add code for something they never will use or even test.
Since I started using HG (which hasn't been long) I've managed to increase HG to use devices not previously controlable.
True this may not be directly and requires HA-Bridge but that is no different then Home Asistant or Hey U.

 


Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: petera on July 25, 2018, 04:48:38 PM
I don't use Home Assistant so I was referring to HG.
From what I can see all these Linux Home Automation are only expanding due to users sharing their plugin codes and ways of doing things.
HGBE may only be developing it the installer route for now but with out users sharing stories and ways to do things a single developer is unlikely to add code for something they never will use or even test.
Since I started using HG (which hasn't been long) I've managed to increase HG to use devices not previously controlable.
True this may not be directly and requires HA-Bridge but that is no different then Home Asistant or Hey U.

It's all down to personal choice in the end. I did recommend Home Genie at one stage but would be users are just passing through, draining as much information as possible and moving on without contributing anything. That's not the community spirit. Maybe in time when experienced developers come back on board it will start to evolve again.

I still have a basic Home Genie setup in place but with other pieces of hardware I have in place that don't work well with it I migrated my main home automation setup to Home Assistant which works with it very well.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on July 25, 2018, 05:29:50 PM
Many developers look forward to suggestions or "how do I.." posts, these usually result in some sort of advancement in the software.
I use to like software that had lots of options hardcoded in but that quicly makes the software become boated.
I rather like the option to add only apps(programs,pluggins) you need, it keeps the software running at optimum performance.

Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on July 26, 2018, 06:31:36 AM
In my tests.
Setting Transceived to None. No X10 RF commands are resent onto the power lines. Even standing alone with no computer connected.

I am also not familiar with the program you are using. It sounds like if the CM15A received an X10 RF command. The software decides to send it back on the power lines and not a CM15A hardware decision.

I don't actually want the cm15a to transceive anything. I want it to receive the RF from both standard and security wireless, then send it to HA to be processed. HA would then send the PL out the cm15a. My problem is getting the wireless signals received sent to HA. I see the signals coming in to mochad, but mochad doesn't have a way to send it to HA. THat's where mochad_dispatch comes in. It will send the received RF from security to HA for processing but not standard wireless. So no palm pads or motion sensors.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Brian H on July 26, 2018, 07:23:51 AM
Sounds like you have it set to what you wanted.
I am not familiar with the software and it ability to take a received RF massage. Then act on it.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on July 26, 2018, 08:34:45 AM
Well, here's a little update. This isn't my ultimate plan as I would like everything under one roof, but I did have some success using the wireless control of my current system to send an x10 command from a palm pad to HA and turn on a zigbee smart bulb.

I'm running a program call Home Control Assistant using a cm11a for plc and a w800usb for wireless reception. In HCA I have the option to create programs that can be triggered by wireless reception. In those programs I can send HTTP Post commands. I was using this with IFTTT's webhooks service. Press F6 on and HCA sends to IFTTT which sends the on command to Wink. It would take 2 to 3 seconds for the light to turn on.

Now I have HCA send directly to HA using the rest api and the same light turns on in about 1 second. I have Wink connected to HA.

I did one more test. I have a zwave/zigbee stick setup in HA. I setup a test sengled smart bulb directly in HA using the zigbee stick. Running the same http post the light turns on instantly, no delay at all.

So if I can't get HA and HeyU setup like I want, I at least have an alternative. It won't be my ideal setup as I'll have to run 2 systems, but at least I'm all locally controlled without any delays.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on July 26, 2018, 09:40:49 AM
Well, here's a little update. This isn't my ultimate plan as I would like everything under one roof,.......

So if I can't get HA and HeyU setup like I want, I at least have an alternative. It won't be my ideal setup as I'll have to run 2 systems, but at least I'm all locally controlled without any delays.
Glad to see you have a way to get things done at least.
 I also like everything under one roof. Having to use two systems to do what you want is not ideal.
It would make me look to an alternate software options which may do what I wish.

I continue to watch this thread with interest as I'd like to test run HA. However if you can't get HA performing how you like with the Cm15 then it probably isn't for me. For now HomeGenie is doing what I want and I don't plan on moving to something else other then for testing purposes.


Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: docbell on July 26, 2018, 11:49:05 AM
So if I can't get HA and HeyU setup like I want, I at least have an alternative. It won't be my ideal setup as I'll have to run 2 systems, but at least I'm all locally controlled without any delays.

If I understand correctly, you are trying to get HA to listen for X10 rf commands from palm pads, motion sensors, (possibly) SS13A-type wall switches, and so on. If that's wrong, or you have found a solution, you can stop reading. Otherwise, this suggestion comes with a disclaimer: I have no experience with HA or the CM15A. All I know is what I have read and have learned from working with a CM19A and mochad on a Raspberry Pi.

I think  you need something like https://github.com/upsert/lutron-caseta-pro, which was designed to listen for Lutron devices over tcp. Since mochad returns X10 commands on port 1099, it should be possible to modify this HA component for your purpose. There seem to be several threads on the HA forum related to listening on a tcp port. Apparently, it is not a solved problem, and you would be doing the community a service if you could sort it out.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on July 27, 2018, 06:12:52 AM
So if I can't get HA and HeyU setup like I want, I at least have an alternative. It won't be my ideal setup as I'll have to run 2 systems, but at least I'm all locally controlled without any delays.

If I understand correctly, you are trying to get HA to listen for X10 rf commands from palm pads, motion sensors, (possibly) SS13A-type wall switches, and so on. If that's wrong, or you have found a solution, you can stop reading. Otherwise, this suggestion comes with a disclaimer: I have no experience with HA or the CM15A. All I know is what I have read and have learned from working with a CM19A and mochad on a Raspberry Pi.

I think  you need something like https://github.com/upsert/lutron-caseta-pro, which was designed to listen for Lutron devices over tcp. Since mochad returns X10 commands on port 1099, it should be possible to modify this HA component for your purpose. There seem to be several threads on the HA forum related to listening on a tcp port. Apparently, it is not a solved problem, and you would be doing the community a service if you could sort it out.

You are correct in your thoughts. And what you suggest is interesting but I'm not a programmer and could not begin to know how to modify any HA component.

All I know and as you stated, mochad returns x10 commands on port 1099. Funny thing is if I restart HA for config changes, my x10 lights I have in HA update with the current status. So for example, if I turn on a light using a palm pad, HA has no idea it was turned on but mochad does. If I restart HA the status of that light now shows on. So it looks like somehow HA is reading something from mochad, just not in real time.

I also know there was a script written to work with mochad that listens to mochad for just the RF from security and then sends it to HA via mqtt. That is probably a better candidate for modification. But again, I'm not a programmer so I have no clue what I'm doing. I can only hack my way through what is out there in it's current state in hopes it will do what I want.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on July 27, 2018, 06:21:50 AM
To add on my last. Still wishing I was a programmer. May it would be possible to modify HeyU to support the cm15 by using mochad somehow.

My mind is dreaming again.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on July 27, 2018, 07:08:53 AM
There is a Mochad thread on the forum here where users were using mochad with the cm19 and cm15 in Hey U.
A search should turn it up.
But if you have Hey U working with the CM15 I'm not sure why you'd want Home Assistant running too. ::) :'
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on July 27, 2018, 07:27:39 AM
There is a Mochad thread on the forum here where users were using mochad with the cm19 and cm15 in Hey U.
A search should turn it up.
But if you have Hey U working with the CM15 I'm not sure why you'd want Home Assistant running too. ::) :'

I'll search for the thread, thanks.

I currently do not have HeyU working with the cm15. It was a thought that if it could be modified to work with the cm15 then I could maybe make it work how I want.

Here is an old thread in the HA forums that seems to have a lot of info. I'm reading it again for the 3rd time as there is a lot to digest.
https://community.home-assistant.io/t/adding-x10-support/2264 (https://community.home-assistant.io/t/adding-x10-support/2264)
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on August 11, 2018, 07:55:28 AM
Just wanted to give a quick update. I said it would be a while before I finally tested my cm11 and ws800usb on my pi running heyu and home assistant. Well, I finally shut down the current system and attached the cm11 and w800usb to my pi. Fired up heyu and viola! it works. THe only config I did so far was add the tty directives in the heyu config file for both the cm11 and the tty_aux for the w800usb. And I was turning lights on and off with my palmpads. I was also seeing all my ds10a'a reporting in.

I haven't attacked the configs much yet. Just added a few lights to HA. Heyu does use a state engine so if I turn a light on with a palmpad it will reflect this in HA with a 10 or 20 second delay. Of course I'll still never know the light was turned on manually at the switch, but I knew that.

I'll pass along more when I have time to play with the setup some more. Have to mow the grass and get to the honey-do list.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: petera on August 12, 2018, 06:15:16 AM
Just wanted to give a quick update. I said it would be a while before I finally tested my cm11 and ws800usb on my pi running heyu and home assistant. Well, I finally shut down the current system and attached the cm11 and w800usb to my pi. Fired up heyu and viola! it works. THe only config I did so far was add the tty directives in the heyu config file for both the cm11 and the tty_aux for the w800usb. And I was turning lights on and off with my palmpads. I was also seeing all my ds10a'a reporting in.

I haven't attacked the configs much yet. Just added a few lights to HA. Heyu does use a state engine so if I turn a light on with a palmpad it will reflect this in HA with a 10 or 20 second delay. Of course I'll still never know the light was turned on manually at the switch, but I knew that.

I'll pass along more when I have time to play with the setup some more. Have to mow the grass and get to the honey-do list.

Could a TM751 do the job for you. All you needed was something to inject the RF codes into the PL and Heyu/HA looks after the rest.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on August 13, 2018, 08:41:08 AM
I haven't attacked the configs much yet. Just added a few lights to HA. Heyu does use a state engine so if I turn a light on with a palmpad it will reflect this in HA with a 10 or 20 second delay. Of course I'll still never know the light was turned on manually at the switch, but I knew that.

Could a TM751 do the job for you. All you needed was something to inject the RF codes into the PL and Heyu/HA looks after the rest.

No, what I meant to say is when a light that uses a ws467 is turned on manually at the switch, HA will never know about it.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on August 13, 2018, 08:53:12 AM
I did have a little time to play this weekend. I was able to identify all my ds10a sensors in heyu and give them an alias label. Heyu even recognizes the low battery signal from the ds10a.

I also setup mqtt binary sensors in HA for each of my sensors. I then set heyu to use the command line to publish the state of the sensors to HA. So now I can use the sensors in HA to trigger automations.

Next I need to setup the binary sensors for all my ms16a motion sensors and publish their on/off states from heyu. Then I will have everything ready to setup and create the automations from my old system. Its funny how the smallest of things you had setup in a system you miss when they aren't setup in the new system. Just the simple chime sounding when someone steps on the porch. Or a light blinking on the off when the front door is opened. But I'm almost there. We'll see what this week brings as I play and learn during my down time at work.

BTW, in case anyone wants to know. I'm using mosquitto as my mqtt broker running on the same pi as HA and Heyu. Mosquitto has a command line tool called mosquitto_pub that you can use in a Heyu script to publish stuff to HA. Real simple to use and fast.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: HA Dave on August 13, 2018, 09:19:18 AM
It's really nice to have the new PI experts on board here at the X10 forums! I think you may well be the future of X10.

I am a long-time user of X10 and computerized Home Automation. Just got Home Genie running last night. I have tons to learn.

But I was wondering... if Home Genie is actually/originally/written for Widows.. what OTHER similar programs will run on a PI? would AHP? Would BVC (or any of Tuicemen's X10 programs)?
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on August 13, 2018, 12:58:29 PM
It's really nice to have the new PI experts on board here at the X10 forums! I think you may well be the future of X10.

I am a long-time user of X10 and computerized Home Automation. Just got Home Genie running last night. I have tons to learn.

But I was wondering... if Home Genie is actually/originally/written for Widows.. what OTHER similar programs will run on a PI? would AHP? Would BVC (or any of Tuicemen's X10 programs)?

Oh heck, please don't consider me a PI expert. I'm a far cry from that. I'm just a PI hack. I try by error. When I find something that works I just use that for the next item even if there may be a better or proper way to do it.

As for windows programs on the PI, there is a stripped down windows version. I think it's called windows iot or something like that. I don't know much about it. I've only seen it mentioned a few times and haven't looked in to it.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on August 13, 2018, 01:02:34 PM
Well, had a little time this morning. I got all my motion sensors setup in HA and Heyu scripts are publishing the on/off events to them. So they are now available to use as triggers for automations. I also have the security remotes setup in Heyu and publishing arm/disarm states to HA.

Guess now it's time to learn home assistant automation. Think I'll start with something simple and see if I can make my chime go off whenever the porch motion comes on. I miss that the most. My wife even said the porch chime is broken.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: HA Dave on August 13, 2018, 02:18:17 PM
... I'll start with something simple and see if I can make my chime go off whenever the porch motion comes on. I miss that the most. My wife even said the porch chime is broken.

The WAF (Wife Approval Factor) is a big deal and has been discussed extensively here over the years.

I [recently] began an improvement of my setup.... by disassembling it. Which doesn't sound too intuitive (or smart). but it was the direction of last resort. I was running two laptops, each with it's own software, and each with it's own X10 interface.... plus a hardwired speaker setup. Not to mention the Wink Hub and the MyQ internet device (for the garage door). Then I added 3 Amazon Echo/Alexa devices as well as a Homeseer Hometroller and it's own CM15A. 

It was (and still is) a great setup. But it was too complex and I felt the only way I could improve on the setup's function was to start over.
 
It was the Homeseer Hometroller that allowed my X10 to work with Alexa. Previously... I had Voice Control using a forum member created windows based software, BVC (one of the laptops + a CM15A). I like the Alexa function better (even the 3 year old granddaughter can use it). So I took BOTH laptops off-line (the other one ran AHP) as well as the wired speakers.

Long story only slightly shortened:  In the end, the setup is greatly simplified, and functions wonderfully [better]. The only "benefits of the previous setup" that was loss.... is a couple of voice warning/announcements (over the speaker system). So.... ONE of these announcements is the one my wife misses and mentions regularly. 


I am working on it.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on August 13, 2018, 05:28:05 PM
But I was wondering... if Home Genie is actually/originally/written for Widows.. what OTHER similar programs will run on a PI? would AHP? Would BVC (or any of Tuicemen's X10 programs)?
I'm not sure HG was originally developed for Windows but more as a universal OS program (Mono made that possible).
The AHP drivers are Windows specific so My understanding is that can't be ported over to Linux.
However other programs that use the SDK could be reprogramed to use the universal drivers. they would most likely need to be rewritten in another language which is compatible with Mono, docker or Linux.
Sadly there is some Windows drivers that just can't be ported over B:(
I've thought about attempting to do something with one of my programs to make it compatible with Linux however the days just are never long enough. In the end it may be easier t just start from scratch or just expand on open source code already out there.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: HA Dave on August 13, 2018, 06:05:45 PM
…….. however the days just are never long enough. In the end it may be easier t just start from scratch or just expand on open source code already out there.

It's that darn metric time you guys use (it shorts you nearly a liter an hour). I've heard... it even causes Aurora Borealis in some places.


Thx for the response.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: petera on August 14, 2018, 07:22:18 AM
But I was wondering... if Home Genie is actually/originally/written for Widows.. what OTHER similar programs will run on a PI? would AHP? Would BVC (or any of Tuicemen's X10 programs)?
I'm not sure HG was originally developed for Windows but more as a universal OS program (Mono made that possible).
The AHP drivers are Windows specific so My understanding is that can't be ported over to Linux.
However other programs that use the SDK could be reprogramed to use the universal drivers. they would most likely need to be rewritten in another language which is compatible with Mono, docker or Linux.
Sadly there is some Windows drivers that just can't be ported over B:(
I've thought about attempting to do something with one of my programs to make it compatible with Linux however the days just are never long enough. In the end it may be easier t just start from scratch or just expand on open source code already out there.

Yes Home Genie was originally created in the Windows .Net environment. In fact one of the current project maintainers is a Windows man.

The xtenlib handles x10 fine in Home Genie. AHP drivers as you say are proprietary to AHP and don't work in the Linux environment so that won't be an option.

If you were going to embark on something new I'd recommend using Python if you haven't already done so.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: petera on August 14, 2018, 07:29:16 AM
It's really nice to have the new PI experts on board here at the X10 forums! I think you may well be the future of X10.

I am a long-time user of X10 and computerized Home Automation. Just got Home Genie running last night. I have tons to learn.

But I was wondering... if Home Genie is actually/originally/written for Widows.. what OTHER similar programs will run on a PI? would AHP? Would BVC (or any of Tuicemen's X10 programs)?

Homegenie was indeed developed in Windows originally.

There are many home automation out there that were too. One that you seem to be familiar with, HomeSeer is a typical example.

I think you can safely say that AHP won't be running under Linux anytime soon.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on August 14, 2018, 09:14:19 AM

Long story only slightly shortened:  In the end, the setup is greatly simplified, and functions wonderfully [better]. The only "benefits of the previous setup" that was loss.... is a couple of voice warning/announcements (over the speaker system). So.... ONE of these announcements is the one my wife misses and mentions regularly. 


I just discovered yesterday while searching for my blue iris camera to home assistant integration that I can actually use the camera motion to trigger an HA automation that will use TTS and cast to my google home and announce "There is someone at the front door." How cool is that!

You mention simplifying your system which is one reason I started with HA. I have a google home, android tv, fire tv, some echo dots, wink hub, smartthings on my nvidia shield and lutron caseta. I was tired of all the different systems and depending on the cloud. So enter HA. Everything except lutron caseta is now integrated in HA and local. Except of course voice control from alexa and google. So now I can use my x10 remotes or open HA's frontend on my phone and control everything without an internet connection. HA is so darn powerful but the learning curve is huge.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: Tuicemen on August 14, 2018, 10:01:46 AM
HA is so darn powerful but the learning curve is huge.
I think that is true with most open source Linux software.  :(
If the community shares what they have accomplished the software keeps expanding.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: HA Dave on August 14, 2018, 02:49:02 PM
I just discovered yesterday while searching for my blue iris camera to home assistant integration that I can actually use the camera motion to trigger an HA automation that will use TTS and cast to my google home and announce "There is someone at the front door." How cool is that!

Very cool. I was using an X10 floodlight and BVC (Bills Voice Commander) to announce "activity in the backyard" I had purchased a 16bit voice that "read" all my announcements using BVC.

You mention simplifying your system which is one reason I started with HA. I have a google home, android tv, fire tv, some echo dots, wink hub, smartthings on my nvidia shield and lutron caseta. I was tired of all the different systems and depending on the cloud.

Yes.... my setup was too complex. But I didn't disassemble it to simplify it. As we build our setups we can end-up working around what was once a great idea. I think that was where I was at with my Home Automation. Sometimes... the only way to make a setup better... is to discard the old setup and start over... I think (actually it's an old management concept).

The cloud is merely a glimpse of the coming Internet2. The old World Wide Web is.... nothing more than interconnected computers... communicating with each other largely at the direction of human controllers. Computers are far too fast to be stifled by our own [human] limitations. These machines (all processor driven devices) can easily earn their keep.... if we just free them enough to do some work for us. I am a BIG FAN of cloud computing and all the great things it can do for individuals and mankind as a whole.

I know.... the Ned Ludd Armies (the Luddites (https://study.com/academy/lesson/luddites-during-the-industrial-revolution-definition-lesson-quiz.html)) still fight the old fight that kept the poor naked in the streets. But I welcome the change that will certainly benefit humans... everywhere. The cloud... is what allows me/us to use just these simple tiny (RBPi) devices... to do so much. 

.....the learning curve is huge.

Yes. The curve is difficult.... and endless... IMHO.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: lviper on August 15, 2018, 04:54:01 PM
I now have all my X10 devices, remotes and automations setup and running in home assistant. I not only can use a palmpad, ms16 motion sensor or ds10a sensor to control a x10 light, I can also use them to control my sengled zigbee lights. Once I figured out how to setup the automations is was a cake walk.

While doing all this I had some thoughts for other ways to achive some if not all of this functionality if you don't have a w800usb from wgl design.

One way is to use an tm751 or other x10 wireless to plc transceiver and a cm11a with heyu, mosquitto and home assistant. Of course this would only work with regular wireless devices since these transceivers don't support security devices. But using motion sensors and remotes, the transceiver will put those commands on the powerline where the cm11a and heyu can pick them up and act on them. For example, put a motion sensor on M1. When it's sent to the powerline heyu will see M1 On and you can write a script to publish that to home assistant with mqtt. Now HA has a sensor that can be used as a trigger.

If you wanted another possible way to have it all, you could use a cm11a with heyu, cm15a with mochad and mochad_dispatch, mosquitto mqtt broker and home assistant. This could get complicated because you want the power of heyu with it's state engine and scripting but is doesn't support the cm15a. So you add in the cm15a with mochad and mochad_dispatch to get support for the wireless security devices. Remember, mochad and dispatch do not support sending regular wireless reception to HA. So you would use mochad and mochad_dispatch with the cm15a to publish the security sensors to HA. and forward the regular motion sensors to the powerline for heyu to pick up.

THe reason you don't want to just use mochad to put your x10 devices in HA is mainly because mochad doesn't have a state engine which basically means HA will not know if a light was turned on outside of HA. If HA didn't turn the light on and it is on you actually have to turn it on in HA just so you can turn it off. So for example, if you turn a light on with your palmpad (A1) you would have to set mochad to forward that command to the powerline and your light would turn on but HA doesn't know it. So if you add in the cm11a with heyu, and setup your x10 lights in HA with heyu, HA will now know it was turned on and you could use it as a trigger.

I hope everyone can understand what I'm trying to say. I'm not always good at explaining things like this. I mostly learn as I go and my mind wonders sometimes. I just knew some people wanted a way to use the cm15a. I tried but just couldn't get the level of integration I wanted. Currently I do with my current setup.

If you wanted to do this like my current setup, you would still setup your Rpi with Heyu as petera so kindly posted instructions for. All you need to add is the mosquitto mqtt broker and set it up in HA. Then you can run a heyu script to use mosquitto_pub to publish the on and off state, or alert and clear states of your sensors and remotes to HA. I can share an example config if anyone plans to go down this road but here is the basics.

You have a ms16 motion sensor set to A1.
You add a MQTT binary sensor to HA with the topic x10/motion/sensor and a payload of ON and OFF.
In heyu you setup a script upon reception of A1 to run mosquitto_pub to publish a message of ON to the mqtt topic of x10/motion/sensor.
Instantly the motion sensor you setup in HA shows motion.

Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: petera on August 15, 2018, 07:22:11 PM
I now have all my X10 devices, remotes and automations setup and running in home assistant. I not only can use a palmpad, ms16 motion sensor or ds10a sensor to control a x10 light, I can also use them to control my sengled zigbee lights. Once I figured out how to setup the automations is was a cake walk.

While doing all this I had some thoughts for other ways to achive some if not all of this functionality if you don't have a w800usb from wgl design.

One way is to use an tm751 or other x10 wireless to plc transceiver and a cm11a with heyu, mosquitto and home assistant. Of course this would only work with regular wireless devices since these transceivers don't support security devices. But using motion sensors and remotes, the transceiver will put those commands on the powerline where the cm11a and heyu can pick them up and act on them. For example, put a motion sensor on M1. When it's sent to the powerline heyu will see M1 On and you can write a script to publish that to home assistant with mqtt. Now HA has a sensor that can be used as a trigger.

If you wanted another possible way to have it all, you could use a cm11a with heyu, cm15a with mochad and mochad_dispatch, mosquitto mqtt broker and home assistant. This could get complicated because you want the power of heyu with it's state engine and scripting but is doesn't support the cm15a. So you add in the cm15a with mochad and mochad_dispatch to get support for the wireless security devices. Remember, mochad and dispatch do not support sending regular wireless reception to HA. So you would use mochad and mochad_dispatch with the cm15a to publish the security sensors to HA. and forward the regular motion sensors to the powerline for heyu to pick up.

THe reason you don't want to just use mochad to put your x10 devices in HA is mainly because mochad doesn't have a state engine which basically means HA will not know if a light was turned on outside of HA. If HA didn't turn the light on and it is on you actually have to turn it on in HA just so you can turn it off. So for example, if you turn a light on with your palmpad (A1) you would have to set mochad to forward that command to the powerline and your light would turn on but HA doesn't know it. So if you add in the cm11a with heyu, and setup your x10 lights in HA with heyu, HA will now know it was turned on and you could use it as a trigger.

I hope everyone can understand what I'm trying to say. I'm not always good at explaining things like this. I mostly learn as I go and my mind wonders sometimes. I just knew some people wanted a way to use the cm15a. I tried but just couldn't get the level of integration I wanted. Currently I do with my current setup.

If you wanted to do this like my current setup, you would still setup your Rpi with Heyu as petera so kindly posted instructions for. All you need to add is the mosquitto mqtt broker and set it up in HA. Then you can run a heyu script to use mosquitto_pub to publish the on and off state, or alert and clear states of your sensors and remotes to HA. I can share an example config if anyone plans to go down this road but here is the basics.

You have a ms16 motion sensor set to A1.
You add a MQTT binary sensor to HA with the topic x10/motion/sensor and a payload of ON and OFF.
In heyu you setup a script upon reception of A1 to run mosquitto_pub to publish a message of ON to the mqtt topic of x10/motion/sensor.
Instantly the motion sensor you setup in HA shows motion.

I will say that Home Assistant does have a wide variety of previously developed solutions which require little or no programming experience to implement. With this in mind it has to be an obvious choice for anyone with basic X10 setups who feel they would like to build upon and add other aspects of home automation to their setup without getting too involved in the technical aspects of their project.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: bkenobi on August 16, 2018, 02:11:45 PM
I will say that Home Assistant does have a wide variety of previously developed solutions which require little or no programming experience to implement. With this in mind it has to be an obvious choice for anyone with basic X10 setups who feel they would like to build upon and add other aspects of home automation to their setup without getting too involved in the technical aspects of their project.
And that is exactly what a good HA program should provide.  It should be relatively easy to get a basic installation working.  It should provide some example code to do more advanced things.  And, based on that code and an active community, a driven user should be able to do some amazing things given enough free time and coding talent.  That's what HG was early on, but with the community drying up a lot and the code base never expanding to what I hoped...
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: petera on August 16, 2018, 02:23:21 PM
I will say that Home Assistant does have a wide variety of previously developed solutions which require little or no programming experience to implement. With this in mind it has to be an obvious choice for anyone with basic X10 setups who feel they would like to build upon and add other aspects of home automation to their setup without getting too involved in the technical aspects of their project.
And that is exactly what a good HA program should provide.  It should be relatively easy to get a basic installation working.  It should provide some example code to do more advanced things.  And, based on that code and an active community, a driven user should be able to do some amazing things given enough free time and coding talent.  That's what HG was early on, but with the community drying up a lot and the code base never expanding to what I hoped...

At this stage it might be worth trying out Home Assistant if you have not already done so. Id imagine it would be a breeze for you.
Title: Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
Post by: bkenobi on August 17, 2018, 11:10:38 AM
I'm going to when I get the time.  Summer has so many chores that go along with it since the days are so long.  In another couple months it'll be dark before and after work so I'll have lots of time.