It run in console "x10cmd st | /bin/sed -n ‘s/.1=([0-1])./`/p’ " and do “x10cmd rf e1 on” in other console but still doesn’t show anything
I write this script below, but it shows “Switch On” in console, however when I integrate in HA never trigger. Any idea why?
Sorry. I missed this. Could you post the output from your X10 controller after sending it a status command? Trigger the device first so it shows up in the output as on.
Hi folks, just started playing around with HA and since I have a lot of old X10 components lying around I decided to test if I could get them up and running with HA. I installed a fresh Rasbian light image on my PI2, then Home Assistant All In One. I then installed heyu and added one lamp module for testing. In the interface it shows up - I am able to switch on the component but after a second or two the button goes back to “OFF” state. It does not seem that the HA interface remembers the state of the component - is this a known issue?
I also wonder if dimming is possible through HA/heyu setup - any tips here would be appreciated.
E.g. if the group is turned off, and you turn a member of the group on, it’ll flick on, turning the Lamp, or whatever on, and then flick off, leaving the lamp on.
I just removed the switch element of the group, I forget the option, it was hard to Google, so if this is your problem, and you want me to go check my config, do ask.
No I do not have the switch in a group, so I do not think this is a problem. I also have some Hue bulbs integrated and these work just fine. I suspect this is related to the X10 HA integration.
I will try to check logs (I assume they are somehwere) then to see if there is any more information available - I am new to both HA so I have a steep learning curve ahead of me
I have been able to switch the lamp module successfully on and off calling the service manually: light - turn_on/turn_off/toggle.
This is very late…
But the switch bounce-back in the web interface of HA happens when “heyu engine” either hasn’t been started or is broken some how.
You can check it’s working by running as the user that HA is running as:
heyu onstate A1
(A1 being a valid house code)
If it’s not running it’ll tell you, run it using:
heyu engine
I’m using a systemd script I found/modified to automate this.
I gave up on X10. Although initially I thought it would be great with the older wiring of my home (used X10 years ago in a different house), I quickly ran into power line bridge issues and then had difficulties integrating into HASS. I moved everything to Zwave (usb controller) and Zigbee (via wink) and have had great success.
On the flipside, I have a box of X10 if anyone wants to make an offer and expand their use of it.
And I believe it’s related to what you posted above. How do I edit the file above so it’s working in the right directory? HeyU works when I control it directly from the pi, but the lights don’t show up in Hassbian interface.
I know for homeassistant I’m launching from sudo systemctl start homeassistant so I believe they don’t operate in the same environment. How I get that to happen?
The solution ended up being when you install Heyu, there’s 4 options on where to put the config file. One limits HeyU specifically to the pi user, but option 3 lets all users view the config file. Once I did that, the whole thing started working.
Heyu is working. - modules are turning on / off as expected – however I am getting lots of the following errors in the error log. I have several of the older modules that may not be responding back …
<
2017-11-19 21:02:36 ERROR (MainThread) [homeassistant.helpers.entity] Update for light.front_lights fails
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 199, in async_update_ha_state
yield from self.async_device_update()
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 306, in async_device_update
yield from self.hass.async_add_job(self.update)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/light/x10.py”, line 96, in update
self._state = bool(get_unit_status(self._id))
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/light/x10.py”, line 38, in get_unit_status
output = check_output('heyu onstate ’ + code, shell=True)
File “/usr/lib/python3.5/subprocess.py”, line 316, in check_output
**kwargs).stdout
File “/usr/lib/python3.5/subprocess.py”, line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘heyu onstate H1’ returned non-zero exit status 1
/>
I have 50+ X10 devices. Light switches, Wall Plugs, Motion sensors, Remotes, Appliance Modules, and Lamp Modules. I am running Hassio, and would like to incorporate X10 into it.
Is there anyone that has X10 working with their Hassio???