Please login or register.

Login with username, password and session length
Pages: 1 2 3 [4] 5

Author Topic: Install X10 on Home Assistant on Raspberry Pi-Instructions  (Read 21082 times)

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #45 on: August 01, 2018, 07:20:59 AM »

All good
 I had used the latest heyu v2.11-rc3 and it was in ~/src/heyu-2.11-rc3 so modified to suit, so all good.

All now working.

Time to dc3dd an image and pishrink it so I can tinker with HA configuration.yaml and see what it does.


Can it (HA ) upload stuff to the CM11 ? or is it merely a controller?

Wont be able to actually test it for real at my home yet.   I am at my fathers home, on a spare bed in the dining room, doing this flat on my back with lots of metal work in a broken leg after motorcycle accident in Czech Republic just under a month ago.  But I got my 'spares box, brought here and have rigged a temp network in my room here on the big old dining table, with a spare RPi and spare X10 stuff.  When I can make the stairs and can get home, I'll have the Pi setup and ready to go
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #46 on: August 01, 2018, 08:14:27 AM »

All good
 I had used the latest heyu v2.11-rc3 and it was in ~/src/heyu-2.11-rc3 so modified to suit, so all good.

All now working.

Time to dc3dd an image and pishrink it so I can tinker with HA configuration.yaml and see what it does.


Can it (HA ) upload stuff to the CM11 ? or is it merely a controller?

Wont be able to actually test it for real at my home yet.   I am at my fathers home, on a spare bed in the dining room, doing this flat on my back with lots of metal work in a broken leg after motorcycle accident in Czech Republic just under a month ago.  But I got my 'spares box, brought here and have rigged a temp network in my room here on the big old dining table, with a spare RPi and spare X10 stuff.  When I can make the stairs and can get home, I'll have the Pi setup and ready to go

No all your timers and macros will be controlled from HA and not downloaded to your x10 controller. In fact make sure you clear out any timers and macros currently stored there so it doesn't conflict with HA. You can do that operation with Heyu.

If you want a tidy unit to work with I suggest buying the Raspberry Pi Zero W. You'll have wifi, Bluetooth and the x10 controller all in one neat bundle size wise. Once you get stuck into HA you'll see the power of HA that can be easily achieved.

Hopefully this post will help others to get started with HA. We were a while getting there but you've learnt a bit. The Systemd service is so like the MS Dos batch file and can control so much so easily.

Enjoy. Need to get back to the day job.  >!
Logged

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #47 on: August 01, 2018, 10:02:49 AM »


No all your timers and macros will be controlled from HA and not downloaded to your x10 controller. In fact make sure you clear out any timers and macros currently stored there so it doesn't conflict with HA. You can do that operation with Heyu.

Damn, that is a shame... maybe I'll give HG a try too. Tuiceman seems to think I can do that uploading from it.


HG will do everything you want, and from the looks of things much easier to setup then HA.
HG has a Bridge addon but I use HA-Bridge with it


This whole saga started because I wanted to upload a macro with a delay to reboot the router with a simple delay command from within a heyu macro. Was trying to avoid another 'layer' IE the Pi, and just do all the control timers etc from within the CM11 memory.Only started down the HA/ HG route to upload macros to the CM11.  The Pi3 though is small enough, dont see the need to go for a Pi Zero.

ANy way I'll play about with HA for a bit..got 6 months off work with this broken leg so plenty of time to test stuff out.

Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #48 on: August 01, 2018, 10:17:16 AM »


Damn, that is a shame... maybe I'll give HG a try too. Tuiceman seems to think I can do that uploading from it.


HG will do everything you want, and from the looks of things much easier to setup then HA.
HG has a Bridge addon but I use HA-Bridge with it
No you miss under stood me Or I misunderstood you. I don't believe you can upload anything to the CM11 with HG
You can create the macros your looking to do very easily though.
 My reply about doing what you want was in response to this post:
I'm sure I can get you running HG on your Pi in less then 20 mins. Obiously creating a whole HA setup would take much longer depending on devices, timers, macros. But setup for simple turning on/off x10 devices is very simple point and click.

is it just as easy to get HG to allow Alexa to control the x10 lights with HG? or HA

At the moment i have Heyu and HA-Bridge Philips Hu emulator and Alexa, so I can jsut say Alexa turn on X or Y and it works.

Reading this morngin about doing it with HA, seems taht youhave to have Apache Server, create 'Alexa Intents' some subscription cloudn account and all sorts of stuff....way to much.

ONly reason I wondered about HA or HG or mochad was to see if I could use a CM15.

At present, as of last night I have  my system running with a CM11 and all works OK, apart from how to set a macro with a delay inthe middle
My response was more to your wondering about the CM15 as I don't own a cm11
« Last Edit: August 01, 2018, 10:23:46 AM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #49 on: August 01, 2018, 10:34:59 AM »

From my past experiences the only program that could successfully upload macros and timers to the CM11/CM12 was Active Home Pro. Clearly you weren’t after a full blown home automation system if you only wanted to reboot your router.

A simple cron job on the Raspberry Pi could handle that.

Anyway the instructions on how to install HA using the CM11/CM12 controller are all here and proven to work. The CM15 will work too with a few mods. The CM17 will work too.

You now have another platform to work with X10 and that’s me done for the moment >!
Logged

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #50 on: August 01, 2018, 11:16:40 AM »

No you miss under stood me Or I misunderstood you. I don't believe you can upload anything to the CM11 with HG


Phew..just in time, was just about to start trying to get HG installed
Probably my fault, I explained a lot in my first Hello post, and then each subsequent post sort of ended up getting mixed up as to what was what..


You can create the macros your looking to do very easily though.
I was more after having the macro within the CM11 though, rather than running on another device ( the Pi)

Only have small one bedroom apartment and full home control for 7 or 8 lights plus TV etc, router NAS and no heating to control etc would be a bit much.  Main aim was to reboot router and the PtMP network bridge AP devices (that are in the attic) in two ways, schedule and manual firing of reboot cycle Currently I can turn off router remotely (TIP10RF) but cant then turn it back on because the router is down.  The Trigger Macro and script options of the CM11 are ideal without needing the Pi.


From my past experiences the only program that could successfully upload macros and timers to the CM11/CM12 was Active Home Pro.

Heyu and its x10conf and x10,sched files and the heyu upload command do a damn good job, except for the fact you cannot add a delay within the middle of a macro :(.

Clearly you weren't after a full blown home automation system if you only wanted to reboot your router. 


A simple cron job on the Raspberry Pi could handle that.
and since I already do have one Pi setup to do the Alexa-HA Bridge-Heyu-X10 control., yes that may be the way to go , but really was hoping to avoid having the router reboot option on the Pi..wanting to get it as far'downstream ' as possible.  and the router does not have a reboot option in its GUI
 

You now have another platform to work with X10 and that’s me done for the moment >!
And that is a good thing, something to keep me occupied while the broken leg sorts itself and before the motorbike gets hauled back from Prague  >!
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #51 on: August 01, 2018, 11:43:25 AM »

If you really wish to have a macro on your CM11 that has a delay in it there may be a work around depending on the delay you require. I'm not familiar with Hey U or the CM11 but if it is just a small delay you need you may try adding commands to none existent X10 modules between the Off - On commands to the router. You'd have to experiment with the amount of extra steps required to get your required delay and to see if it is possible that way.

Other wise I believe your going to have to use Windows and either  ActiveHome or ActiveHome Pro to upload the macro to the CM11.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #52 on: August 01, 2018, 12:18:37 PM »

Yes, that is how it is at the moment, but it is a horrible ‘ugly solution, a string of non-existent device .  Think I have posted that some where on here before.

But since I have all this time on my hands and am confined to barracks  with leg up until the bones mend,I thought I’d try and find a correct way to do it.

Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #53 on: August 01, 2018, 12:29:53 PM »

If you have the TIP10RF it can be all done from there. Ethernet connection directly into your router. Just a little tip for future reference. Along with your problem also mention what equipment you have at your disposal. Helps users here to provide simpler solutions.

Reminds me of the guy who tried on ten rain jackets in the shop then bought an umbrella  :)%
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #54 on: August 01, 2018, 12:44:01 PM »

Why not just upload two timers to the Cm11? One for On and one for Off ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #55 on: August 01, 2018, 02:42:47 PM »

Brace yourself.... ;)

Just a little tip for future reference. Along with your problem also mention what equipment you have at your disposal. Helps users here to provide simpler solutions.

Since you asked, I'll give a run down,  but it gets too unwieldy and complicated mentioning all the irrelevant stuff when I know exactly what I need a solution to, and not looking for other ways to do it.  I have other ways already but they are 'messy ways.

I wanted to see if there was with  Heyu or other app to create a macro with a delay in the middle and not at the beginning.



If you have the TIP10RF it can be all done from there. Ethernet connection directly into your router.

Reminds me of the guy who tried on ten rain jackets in the shop then bought an umbrella  :)%

I understand what you are saying, and why, but no, it would only complicate matters if I had mentioned the 10 Sonos speakers in 4 different locations, Ubiquiti/Deliberant APC5 point to multi point bridge system, connecting to the 4 different 'sites ' on the farm to the flat (camp/bbq area , stables/ workshop) greatest distance 3/4 of a mile, closest about 300 meters, the 4 Netgear switches switches and WiFi AP's, CTV system, etc  None of which have any bearing on the problem in hand.


The TIP10RF, I connect to via my phone app, over the mobile data, via no-ip.com DDNS to my home router, which is directly connected to the TIP10RF.  So yes, I can turn off the router via the TIP10RF..but then with the router down cannot send the next command to turn it back on.  The Trigger function in conjunction with a macro directly in the CM11, can then be used to handle the router reboot.

The router is on b6, and a delay caused by a string of false devices (f8) is just a horrid kludge of a way to do it.  The macro ends up as

macro cycle_router 0 off b6; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; on b6

I had asked the question on here, this thread, but had no replies and the quest to find an answer spread to this thread, and as with all these things, we all get led down 'diversions' ..like trying to install HA in the misguided hope that HA will allow programming of a 'action/delay' action string.   Heyu only seems to allow to upload a macro consisting of 'Name/delay/action; action;action etc'




There are two reboot options going on here,
 1) a scheduled one (as Tuicemen mentioned) Timer on the CM11 off, then minimum 1 minute later Timer on
2)the occasional need to reboot the bridge components, and ideally the router too, when doing work at the farm , on the CCTV etc etc , if the Sonos is playing a bit 'choppy'

Can do it via one single command from the iPhone TIP10RF app, send one single command (h1), received via the TIP10RF sent as RF to the RF receiver, converted to a power line signal, received by the CM11, which has h1 set as a TRIGGER to run the horrid macro above with all the fake devices
TRIGGER h1 on cycle_router


heyu can upload

macro | name | delay | action(s)

but it cannot from what I can see upload

macro | name | action(s) | delay | action(s)


I seem to remember he Windows program AHP being able to insert a delay within a macro, so the CM11 is capable of storing  them, it just seems that heyu cannot upload them.   I was trying to find a *nix command line / style way or basic app to upload the macro as I wanted it. 



Was a seemingly simple question that I did not think warranted a full explanation of my complete system and all it components.

Now maybe you see why I did not post everything ..just asked the basic question....

There are lots of other ways < I was looking for a solution to one specific part
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #56 on: August 01, 2018, 03:36:33 PM »

Brace yourself.... ;)

Just a little tip for future reference. Along with your problem also mention what equipment you have at your disposal. Helps users here to provide simpler solutions.

Since you asked, I'll give a run down,  but it gets too unwieldy and complicated mentioning all the irrelevant stuff when I know exactly what I need a solution to, and not looking for other ways to do it.  I have other ways already but they are 'messy ways.

I wanted to see if there was with  Heyu or other app to create a macro with a delay in the middle and not at the beginning.



If you have the TIP10RF it can be all done from there. Ethernet connection directly into your router.

Reminds me of the guy who tried on ten rain jackets in the shop then bought an umbrella  :)%

I understand what you are saying, and why, but no, it would only complicate matters if I had mentioned the 10 Sonos speakers in 4 different locations, Ubiquiti/Deliberant APC5 point to multi point bridge system, connecting to the 4 different 'sites ' on the farm to the flat (camp/bbq area , stables/ workshop) greatest distance 3/4 of a mile, closest about 300 meters, the 4 Netgear switches switches and WiFi AP's, CTV system, etc  None of which have any bearing on the problem in hand.


The TIP10RF, I connect to via my phone app, over the mobile data, via no-ip.com DDNS to my home router, which is directly connected to the TIP10RF.  So yes, I can turn off the router via the TIP10RF..but then with the router down cannot send the next command to turn it back on.  The Trigger function in conjunction with a macro directly in the CM11, can then be used to handle the router reboot.

The router is on b6, and a delay caused by a string of false devices (f8) is just a horrid kludge of a way to do it.  The macro ends up as

macro cycle_router 0 off b6; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; off f8; on f8; on b6

I had asked the question on here, this thread, but had no replies and the quest to find an answer spread to this thread, and as with all these things, we all get led down 'diversions' ..like trying to install HA in the misguided hope that HA will allow programming of a 'action/delay' action string.   Heyu only seems to allow to upload a macro consisting of 'Name/delay/action; action;action etc'




There are two reboot options going on here,
 1) a scheduled one (as Tuicemen mentioned) Timer on the CM11 off, then minimum 1 minute later Timer on
2)the occasional need to reboot the bridge components, and ideally the router too, when doing work at the farm , on the CCTV etc etc , if the Sonos is playing a bit 'choppy'

Can do it via one single command from the iPhone TIP10RF app, send one single command (h1), received via the TIP10RF sent as RF to the RF receiver, converted to a power line signal, received by the CM11, which has h1 set as a TRIGGER to run the horrid macro above with all the fake devices
TRIGGER h1 on cycle_router


heyu can upload

macro | name | delay | action(s)

but it cannot from what I can see upload

macro | name | action(s) | delay | action(s)


I seem to remember he Windows program AHP being able to insert a delay within a macro, so the CM11 is capable of storing  them, it just seems that heyu cannot upload them.   I was trying to find a *nix command line / style way or basic app to upload the macro as I wanted it. 



Was a seemingly simple question that I did not think warranted a full explanation of my complete system and all it components.

Now maybe you see why I did not post everything ..just asked the basic question....

There are lots of other ways < I was looking for a solution to one specific part

I'll leave that one with you. That's definitely for another day  >*<

I just want to tidy up this post and keep it on topic for Home Assistant installation. You got there in the end even if it wasn't quite what you were looking for. We know the install instructions so they can act as a guide for others.
Logged

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #57 on: August 01, 2018, 04:00:39 PM »

please delete all the irrelevant bit of my posts...like most of it !! ;D   ...or I can go back and do it? keep your thread on track
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #58 on: March 22, 2019, 10:34:02 AM »

This is an old thread, but probably the most relevant one.  I just wanted to post on my experience thus far with HA.  Instead of using a bare Raspbian image and installing HA or installing Hass.IO, I opted to try using the Hassbian image.  This image is basically Raspbian with HA preinstalled plus some useful utilities that are HA specific.  I believe it will give the best of both worlds (easy setup of Hass.IO and flexibility/configuration of manually installed HA).

Since it does not have the capability like Hass.IO to just click a button and install components, you still have to do that through the shell.  That's unavoidable if you want X10 since there is no component within Hass.IO for HeyU or Mochad that I could locate.  I did have an issue getting up and running with X10 since HA didn't automatically install the Mochad interface component the tutorial suggested would happen.  But, once I installed it (sudo pip3 install pymochad), the modules popped up and functioned as expected in HA.  It's easy to see what's going on with X10 since you can simply watch from the shell (nc localhost 1099).  If it pops up there, it was received.  If not, it wasn't.  Simple!

My next step will be getting Mochad_dispatch configured or testing the following command:
Code: [Select]
/bin/nc -d localhost 1099 | /usr/bin/awk -W interactive ' /HouseUnit:/ && /Func:/ { system("mosquitto_pub -q 1 -t /X10/"$6" -m "$8) } ' &

Mochad sees all X10 traffic but HA doesn't see RF by default.  From reading, I believe this is because X10 sends RF in one command vs 2 for PLC.  I don't see why this couldn't be addressed by forking Mochad in such a way that HA could see both, but I haven't looked that far yet and, since there appear to be other solutions, I likely won't.

In any case, outside of the one niggle with PyMochad not installing, HA seems like a great system.  Lots of useful comments on their forum and all of it current and active.  Reminds me of the old HG forum before it was transferred to Google+ and basically killed off.

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: Install X10 on Home Assistant on Raspberry Pi-Instructions
« Reply #59 on: March 22, 2019, 10:48:46 AM »

No problem with reviving old threads...I never understand why people get excited by people doing that.  Ig it is still relevant info to the topic..whty create a new thread.

Thanks for th at..

not heard of mochad before ..or the HA image you mention

I only have basic X-10 devices...will Mochad be of any use to me?  not even googled it yet.


OK...Found this

https://www.home-assistant.io/components/mochad/

but still...no idea what mochas actually does...why would I need it ?

I control my stuff either with a standard x-10 remote or by using Alexa...

what extra, functionality will Mochad bring ?
Logged
Pages: 1 2 3 [4] 5
 

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