I would like to use a Merrick X10 controller with Home Assistant. I wrote the driver in C++ and am looking for the easiest way to get it working with HA. (I’m new to home assistant, but can’t dive in until I can get my various X10 devices online).
The merrick controller is unique because it offers very high power output, reaching devices regular X10 controllers can’t reach. So just switching controllers isn’t desirable.
I figured the easiest way to integrated these might be to emulate the HEYU I/O but haven’t found a document explaining the interface. Can someone suggest how best I might integrate my own controller with Home Assistant?
If your driver can be designed to support MQTT (effectively it would be a bi-directional X10/MQTT translator), that would be an easy way to integrate it with Home Assistant because the existing MQTT integration supports lights, switches, binary_sensors, etc.
Minimally, the device needs a state_topic (Home Assistant subscribes to this topic to receive payloads from the X10 device) and a command_topic (Home Assistant publishes payloads to this topic to control the X10 device).
Example configuration for an X10 switch whose address is B8.
# Example of a minimal configuration.yaml entry for an MQTT Switch
mqtt:
switch:
- name: Pool Pump
state_topic: x10/b8/state
command_topic: x10/b8/set
If your driver publishes OFF to x10/b8/state Home Assistant will indicate switch.pool_pump is off.
If you turn on switch.pool_pump in Home Assistant, it will publish ON to x10/b8/set (which would be monitored by your driver and used to turn on the physical switch).
The payloads ON and OFF are defaults but can be changed to whatever you prefer using the payload_on and payload_off options: