Please login or register.

Login with username, password and session length
Advanced search  

News:

The X10Hub (PiX10Hub) is here! Created by the Community, for the Community.:)% #:)

Pages: 1 2 [3]

Author Topic: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support  (Read 1080 times)

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 174
  • Posts: 6813
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #30 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.
Logged
This is the golden age of home automation. Many will miss it.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 263
  • Posts: 9343
  • I don't work for X10, I use it successfuly!
    • Tuicemen Software
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #31 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.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 174
  • Posts: 6813
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #32 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.
Logged
This is the golden age of home automation. Many will miss it.

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1026
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #33 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.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1026
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #34 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.
Logged

lviper

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 10
  • Posts: 294
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #35 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.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 263
  • Posts: 9343
  • I don't work for X10, I use it successfuly!
    • Tuicemen Software
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #36 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.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 174
  • Posts: 6813
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #37 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) 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.
« Last Edit: August 14, 2018, 02:59:00 PM by HA Dave »
Logged
This is the golden age of home automation. Many will miss it.

lviper

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 10
  • Posts: 294
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #38 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.

Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1026
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #39 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.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 17
  • Posts: 1655
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #40 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...

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1026
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #41 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.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 17
  • Posts: 1655
Re: My Attempt at X10 on a Raspberry Pi using HA with Wireless Support
« Reply #42 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.
Pages: 1 2 [3]
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.