Please login or register.

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

Author Topic: X10 on the Raspberry Pi running Home Assistant  (Read 10221 times)

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #15 on: July 27, 2018, 12:24:49 PM »

The home theater is where alot of linux software has been focused arround.
This is realy one of the aspects that drove me to using a PI.

Yep. The RBPi units can even function as a streaming media player as well... or so I've read... with the right app DL's. I've pretty much finished my theater up-date/upgrade. Although the Blue Ray player buffered on me during an episode of Sherlock the other day.... so now I am fishing some CAT6 that direction to get a direct internet connection to the player. 

I had ran across an amp with build-in HDMI switching at a yard sale (of all places). It was a model I had been looking at buying new. This got me rolling on an upgrade with a new projector and Blue Ray player with media streaming built-in (it really simplifies the whole viewing process). This allowed/enabled/forced me to go with a bigger screen (110"). So I got a fixed (spring tensioned) screen. So... the only thing that I kept... was the speakers and my old original Harmony 628 remote. The old remote took all the new device changes and programed on-line as always. 

I've already moved the old projector (Infocus ScreenPlay 4800) into my man-cave. I now have a cineplex. I hope to use old projector to project large cycling videos for a (hopefully tolerable) training experence in cold months. PLUS to use as a monitor for a Pi.



« Last Edit: July 27, 2018, 12:29:24 PM by HA Dave »
Logged
Home Automation is an always changing technology

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #16 on: July 28, 2018, 05:23:41 AM »

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
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #17 on: July 28, 2018, 06:43:45 AM »

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 as it has more device control like the Broadlink RM
Doing a simple x10 macro with a delay is as simple as turning on the macro wizard and point and clicking the modules you wish.
The wizard auto adds a small delay between steps which you can add to or remove.
I now use HG + a CM15A at both my off grid and city places. My city place runs a Pi Zero W embedded in the CM15A
http://forums.tuicemen.net/index.php?topic=1291.0
I have Alexa control at both places.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #18 on: July 28, 2018, 09:50:28 PM »

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 as it has more device control like the Broadlink RM
Doing a simple x10 macro with a delay is as simple as turning on the macro wizard and point and clicking the modules you wish.
The wizard auto adds a small delay between steps which you can add to or remove.
I now use HG + a CM15A at both my off grid and city places. My city place runs a Pi Zero W embedded in the CM15A
http://forums.tuicemen.net/index.php?topic=1291.0
I have Alexa control at both places.

As a user of both Home Genie for four years and a recent adopter of Home Assistant, for the non technical user, Home Assistant is a lot easier to navigate and a lot more productive in a lesser time span in my opinion. The user base is a lot larger and for those looking for quick solutions to problems without having to drill too far in I'd have to say Home Assistant would be my choice of front ends.

Purely from an X10 point of view the setup in Home Assistant was so simple. I'm looking at this from the typical AHP users point of view wishing to migrate to an alternative platform. Obviously this can be best judged by how quickly a non user of a product can be up and running.

Myself and a couple of others had suggested here using Home Genie on a number of occasions even offering to help with setups but the uptake was quite slow. Home Genie development has all but stalled and while there are promises of further development in the future, the emphasis seems to be on rewriting the base code which in effect will be a completely different product.

Yes you can use Home Genie in its current format but I feel that you will end up patching it, something along the lines that is currently happening with AHP. Time will tell no doubt but I wouldn't like users to be investing their time and energy into something that may well disappear.
Logged

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #19 on: July 29, 2018, 01:42:10 AM »

I have Alexa control at both places.

If you have the time, would you be able to give more information on that please.  From what I had been reading it is no easy task, needing to write Alexa 'Intents'  or a lot of manual coding for each device, Apache Server,building custom Alexa Skill etc.  It all sounded very complex.


https://community.home-assistant.io/t/alexa-integration-with-homeassistant-guide/38012
https://www.home-assistant.io/cloud/alexa/


blog.thescorpius.com/index.php/2016/03/25/x10-amazon-echo-ifttt/
blog.thescorpius.com/index.php/2016/11/19/control-x10-amazon-echo-smart-home-skill/

Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #20 on: July 29, 2018, 07:43:13 AM »

I have Alexa control at both places.

If you have the time, would you be able to give more information on that please.  From what I had been reading it is no easy task, needing to write Alexa 'Intents'  or a lot of manual coding for each device, Apache Server,building custom Alexa Skill etc.  It all sounded very complex.


https://community.home-assistant.io/t/alexa-integration-with-homeassistant-guide/38012
https://www.home-assistant.io/cloud/alexa/


blog.thescorpius.com/index.php/2016/03/25/x10-amazon-echo-ifttt/
blog.thescorpius.com/index.php/2016/11/19/control-x10-amazon-echo-smart-home-skill/


There are a few ways to set Alexa up for using multi places but I don't use Home Assistant so using Alexa with its bridge is foreign to me.
I never did any of that.
I use HA-Bridge running on a Pi at both locations mainly because of X10 but it is possible to use just one HA-Bridge. Using one bridge isn't very stable as your depending on ideal internet connections in both places which is rare for me. Luckily HA-Bridge has a HA helper https://github.com/bwssytems/ha-bridge#home-assistant-names-and-ip-addresses

Do you wish to control devices in two places from one place or just control devices from the location your in?
Will you have an instance of HA running in both places?

One way you require two Amazon accounts or be very specific in device names if just one amazon account is .
I've done it both ways.
Amazon remembers all IPs you connect your devices from so talking from one in New York can be connected to one in British Columbia.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #21 on: July 29, 2018, 08:47:28 AM »


Ah sorry, misunderstanding there.  Sorry. 
I was not asking about multi place control

I meant to say ask how did you get Alexa to interface with the X10 stuff...so you could say  stuff like
"Alexa, turn on bathroom light"

as opposed to the bloody convoluted

"Alexa, ask XYX to turn on bathroom light"

All of the ways I had seen (in the links I put up) showed it was damn complicated, either Apahce, php, subscription based services, writing Custom Alexa Skills or similar.


I have tried the auto setup of Hass.io, but that just fails every time,  it starts trying to connect via IPV6 and the WLAN.  Downloaded the auto setup image, wrote to clean formatted card, but it would not run beyond the trying to connect via WLAN left it for over an hour..

So,  creating a new clean lite image from scratch now and will clone it and then try both HG and HA.
Looking at this for the HA instal:
https://www.home-assistant.io/docs/installation/raspberry-pi/



Oh..will either HA or HG talk to a CM11  over USB, or are they strictly CM15 apps?

 
« Last Edit: July 29, 2018, 08:50:23 AM by npaisnel »
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #22 on: July 29, 2018, 10:10:05 AM »

Both HA and HG support the CM11.
Configuring to enable Alexa support for X10 is easy using HA-bridge no mater what software your using to control X10.
If there is a helper for the software it makes it a little easier however you only need to know the command you would enter into a terminal window to turn on/off a x10 device.
In HA-Bridge click add device to bring up the device configuration window and type in the info Name of device,on call, off call, and Dim call if you need that click add to the right of each call then go back to the top and click add device.
Then from your Alexa app click add device or just ask Alexa to discover devices.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #23 on: July 29, 2018, 11:15:24 AM »

Configuring to enable Alexa support for X10 is easy using HA-bridge no mater what software your using to control X10.
If there is a helper for the software it makes it a little easier however you only need to know the command you would enter into a terminal window to turn on/off a x10 device.
In HA-Bridge click add device to bring up the device configuration window and type in the info Name of device,on call, off call, and Dim call if you need that click add to the right of each call then go back to the top and click add device.
Then from your Alexa app click add device or just ask Alexa to discover devices.


I have been running it like that for many months now with the HA-bridge config page and that all works fine.

I'd carry on like that but no one here seems to be able to answer my queries about the x10.conf or x10.sched files in order to create delays within macros as uploaded by 'heyu upload' command.  I've read the man pages back to front and can't really make head or tail of them.

I'd like to try HA or HG too, so persevering with the install of that on the Pi at the moment. 
The Hass.io image install method does not  work as suggested  it just freezes trying to connect vai IPV6 and WLAN totally ignoring the eth0 hardwired LAN.

On second attempt at running the 'Alternative python method ' for installing HA, but that too eventually gets to a point where it does not return to the virtual command prompt. 
The config page appears on http://ipaddress:8123 but back at the instllation command prompt it seems to hang.

If i reboot the machine no matter where I type 'hass' again..I cannot re launch the HA.


Edit:
second attempt at installing HA via the manual method and it has hung again at ...see code below.  I'll leave it a few hours now to see if it continues.  cmd prompt does not re appear


Code: [Select]
2018-07-29 15:49:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1972873776-3>
2018-07-29 15:49:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1972873776-4>
2018-07-29 15:50:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.97, elevation=32.04, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, old_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=292.03, elevation=32.28, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, entity_id=sun.sun>
2018-07-29 15:51:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.91, elevation=31.81, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, old_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.97, elevation=32.04, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, entity_id=sun.sun>
2018-07-29 15:51:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.91, elevation=31.81, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, old_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.97, elevation=32.04, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, entity_id=sun.sun>

« Last Edit: July 29, 2018, 11:57:13 AM by npaisnel »
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #24 on: July 29, 2018, 08:43:07 PM »

I originally posted the manual HA install instructions as this is the easiest version of HA to add other 3rd party solutions. You do understand that you are running HA in a virtual environment on the Raspberry Pi. Have a good read upn on HA so you have a good handle on the basics.

The best place to get answers on all things HA is over on their community page. I only posted my experience of HA here just in case someone was looking for a modern platform to setup X10 on.
Logged

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #25 on: July 30, 2018, 03:22:24 AM »

I never got passed that hang in the installation, so on third attempt I just pulled the plug on the Pi and re booted.

I can get to the HA WebGUI from  another machine on port 8123, so it does seem to be working.  :) 

Now to connect the CM11 and work out how to upload timers and schedules to it from HA


You do understand that you are running HA in a virtual environment on the Raspberry Pi.

Yes I had read that but as for why that is needed or what the implications are I have zero idea.  Will it not run within the Pi itself without the virtual bit?

The best place to get answers on all things HA is over on their community page.

Oh goody ;)  another forum to register on  :)


Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #26 on: July 30, 2018, 01:39:37 PM »



Quote
I have been running it like that for many months now with the HA-bridge config page and that all works fine.

I'd carry on like that but no one here seems to be able to answer my queries about the x10.conf or x10.sched files in order to create delays within macros as uploaded by 'heyu upload' command.  I've read the man pages back to front and can't really make head or tail of them.

I'd like to try HA or HG too, so persevering with the install of that on the Pi at the moment. 
The Hass.io image install method does not  work as suggested  it just freezes trying to connect vai IPV6 and WLAN totally ignoring the eth0 hardwired LAN.

On second attempt at running the 'Alternative python method ' for installing HA, but that too eventually gets to a point where it does not return to the virtual command prompt. 
The config page appears on http://ipaddress:8123 but back at the instllation command prompt it seems to hang.

If i reboot the machine no matter where I type 'hass' again..I cannot re launch the HA.


Edit:
second attempt at installing HA via the manual method and it has hung again at ...see code below.  I'll leave it a few hours now to see if it continues.  cmd prompt does not re appear


Code: [Select]
2018-07-29 15:49:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1972873776-3>
2018-07-29 15:49:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1972873776-4>
2018-07-29 15:50:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.97, elevation=32.04, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, old_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=292.03, elevation=32.28, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, entity_id=sun.sun>
2018-07-29 15:51:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.91, elevation=31.81, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, old_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.97, elevation=32.04, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, entity_id=sun.sun>
2018-07-29 15:51:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.91, elevation=31.81, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, old_state=<state sun.sun=above_horizon; next_midnight=2018-07-30T00:06:27+00:00, next_noon=2018-07-30T12:06:28+00:00, next_rising=2018-07-30T06:02:57+00:00, next_dawn=2018-07-30T05:41:08+00:00, friendly_name=Sun, next_setting=2018-07-29T18:10:01+00:00, azimuth=291.97, elevation=32.04, next_dusk=2018-07-29T18:31:51+00:00 @ 2018-07-29T15:37:14.160879+00:00>, entity_id=sun.sun>

Your session of Home Assistant is not hanging looking at your log. Have you gone to your browser bar and typed in the local address for Home Assistant on your Raspberry Pi. Typically the address that your Raspberry Pi occupies on your network. As an example if your local address of your Pi is

192.168.0.60 you would type in your browser bar 192.168.0.60:8123

8123 is the port that Home Assistant is listening on.

Try this and report back.

edited by Tuicemen to fix quote and read ability
« Last Edit: July 30, 2018, 01:52:18 PM by Tuicemen »
Logged

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #27 on: July 30, 2018, 03:38:18 PM »



Try this and report back.

edited by Tuicemen to fix quote and read ability

yes I did get to the HA page and it was running. It found a Google Chromecast device on the TV and I was able to send text to it to 'speak ' from the TV.

I did not have heyu installed on that installation though and installing it afterwards, HA did not detect it in any way.  Tried adding HA-bridge too, but that failed when trying to run as a service

So have started with a fresh Rasp Stretch Lite and doing it in the order you suggest..Heyu first..no HA-bridge and then HA.


Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #28 on: July 30, 2018, 03:45:39 PM »



Try this and report back.

edited by Tuicemen to fix quote and read ability

yes I did get to the HA page and it was running. It found a Google Chromecast device on the TV and I was able to send text to it to 'speak ' from the TV.

I did not have heyu installed on that installation though and installing it afterwards, HA did not detect it in any way.  Tried adding HA-bridge too, but that failed when trying to run as a service

So have started with a fresh Rasp Stretch Lite and doing it in the order you suggest..Heyu first..no HA-bridge and then HA.

Yes that's why I posted them in that order. If you follow those instructions exactly you should have a working version of Home Assistant with X10. Once you have confirmed that it is working you can setup the service so it starts on boot. You won't have to start Home Assistant manually before you access it through the Web Api.
Logged

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 63
Re: X10 on the Raspberry Pi running Home Assistant
« Reply #29 on: July 30, 2018, 03:53:24 PM »

Yes that's why I posted them in that order. If you follow those instructions exactly you should have a working version of Home Assistant with X10. Once you have confirmed that it is working you can setup the service so it starts on boot. You won't have to start Home Assistant manually before you access it through the Web Api.

Your links though for points 2-4 are all to the same page though the text implies that they should be different links
Logged
Pages: 1 [2] 3
 

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