X10 automation?

thanks for this detailed analysis, very helpful, any idea how I go about getting ssh access to the container the armbian software wizard installed the docker/HA into?

Also would this be the reason that when I updated my configuratiom.yaml file with the x10 devices that they dont appear on my dashboard, I’d assumed they would independent of the heyu problem?

PS just noticed following in my logs…


2020-09-13 10:06:20 ERROR (MainThread) [homeassistant.components.light] Error while setting up x10 platform for light
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 184, in _async_setup_platform
await asyncio.shield(task)
File “/usr/local/lib/python3.8/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/x10/light.py”, line 45, in setup_platform
x10_command(“info”)
File “/usr/src/homeassistant/homeassistant/components/x10/light.py”, line 32, in x10_command
return check_output([“heyu”] + command.split(" "), stderr=STDOUT)
File “/usr/local/lib/python3.8/subprocess.py”, line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/usr/local/lib/python3.8/subprocess.py”, line 489, in run
with Popen(*popenargs, **kwargs) as process:
File “/usr/local/lib/python3.8/subprocess.py”, line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/usr/local/lib/python3.8/subprocess.py”, line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘heyu’


It won’t help because the heyu installation script uses the make command and (as far as I know) it doesn’t exist in the homeassistant container.

I suspect the X10 integration was designed to work with a version of Home Assistant that is not a docker container (i.e. Home Assistant Core installed in a python virtual environment).

oh ok, I’ll think I’ll reinstall armbian but this time install via…

curl -sL https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh | bash -s

thanks

How do you foresee re-installation will help?

i assume above script wont be in a docker container so after installation restore my HA config from backup, and then install heyu again via ssh… hopefully then HA will see my heyu…

???

That script installs Home Assistant Supervised which is what you are currently using. Home Assistant Supervised runs Home Assistant in a docker container.

The only installation method that doesn’t run Home Assistant in a docker container is Home Assistant Core.

I actually installed it via armbian’s own “softy wizard” which installed it automatically for me (including auto docker setup)…

https://docs.armbian.com/User-Guide_Armbian-Config/

From Armbian config’s wiki page:

Screenshot from 2020-09-17 09-35-14

Key phrase there is “within Docker”.

also this time for reliability/performance, before installing HA, I’ll be using armbians built in script to move the OS over to the attached sata drive from the sdcard (my bananapi has a built in sata port)

None of that addresses the limitations I’ve mentioned. :man_shrugging:

I’ll be honest, I’ll only be using the HA for quick mobile control of all my chromecast devices around the home, and also my electricity provider gives agile pricing (https://octopus.energy/agile/) and someone has created a guide for setting up HA to automatically switch on/off devices when the hourly electric price goes below a certain figure (in my case a x10 unit atttached to my immerison heater)

few weeks ago, there were actually hour slots at night were the agile price went below zero and people were being paid for using electricty … mad corvid consequence world!

PS I already control my X10 devices using homegenie, have been using it for several years years reliably… I even voice control my old x10 devices using a combo of google mini’s and ifft google asistant recipies calling my homegenie via webhooks :slight_smile:

Looks like you don’t need my help anymore. Good luck.

thanks, its your guidance that gave me a “solution” :slight_smile:

Then I suggest you mark my post with the Solution tag to help other users find it. It will spare them the time and frustration of discovering Heyu is inaccessible when Home Assistant runs in a docker container.

It does indeed. Works perfectly in the Virtual Environment install

Just to confirm Heyu works fine in a Virtual Environment install (or whatever it’s called these days, Home Assistant Core I think) on the same machine once the Heyu service daemon is set up correctly.

Just search the forum here for previous posts on the subject.

I think you may have skipped a few of my posts because that’s already been established (and is not the installation method I was referring to when I stated that it doesn’t work).

What doesn’t work is when Home Assistant runs in a docker container, which happens to be three out of the four official installation methods … and the way harrys is running it. Heyu exists outside the container, in his armbian OS, where it’s not accessible to the X10 integration (running inside the container). If there’s a way to make it accessible, I don’t know how.

Yes I was just confirming with him that as a user of Heyu in a Home Assistant environment that it does in fact work for me.

I imagine if @harrys had realised that Home Assistant Core (previously called a virtual environment) was the quickest and easiest route to go to get Heyu working in HA with his simple X10 HomeGenie setup that’s the route he would have chosen. The fact that he chose a Docker install initially was more by accident than design.

I’m sure he will in due course mark the fact that Heyu is not an option in Docker but will indeed work with HA Core.

Your previous post was a direct reply to me (the post’s upper right hand corner shows that). :man_shrugging: Then you direct replied to harrys.

Harrys will have to decide if getting the X10 integration to work is worth losing all the management conveniences provided by the docker-based installation methods.

When I have a moment, I may submit a PR to amend the X10 integration’s documentation. It should advise users that it only works with the Home Assistant Core installation method.

@harrys, I just created an addon to allow control of X10 via CM11. This should allow you to convert to Home Assistant OS without losing X10 connectivity

It uses MQTT to control the X10 devices, using Heyu under the covers, so all you’d need to do is convert your old X10 entries over to MQTT entries. It also updates state in HA correctly when using X10 remotes. Note only ON and OFF are supported, no dimmers (the old HA X10 didn’t really support them either from what I found).

I wrote this for a friend of mine who also still has some old X10 devices in use and who wants to convert from the ‘venv’ style (hard for him to support with lack of Linux knowledge) to Home Assistant OS.

I’d also be willing to package ‘mochad’ into a addon if there is still interest.

Here’s the forum post with details:

Home Assistant Add-On: X10 (CM11) to MQTT Gateway - Home Assistant OS - Home Assistant Community (home-assistant.io)