back to the rack

openhac4

Home Assistant entities, appearing in Control4 as devices the system treats as its own.

ver
1.2.3
lic
MIT
src
Lua
rel : release published
repository releases

openhac4 is an open source Control4 DriverWorks suite that brings Home Assistant entities into Control4 as native devices. State changes on the Home Assistant side are pushed to Control4 in real time over the websocket API, and most drivers are controllable from Control4 interfaces and programming.

There is no cloud and no license server. The controller talks to your Home Assistant instance over the LAN and to nothing else. It is an independent implementation, published under MIT.

The suite

  • gateway
  • light
  • switch
  • binary sensor
  • sensor
  • lock
  • cover
  • garage
  • fan
  • climate
  • humidifier
  • alarm
  • vacuum
  • media player
  • media source
  • select
  • event

Seventeen files ship in a release: the gateway plus sixteen device drivers. Most appear in Navigator; sensor, media player, select and humidifier are programming and status devices rather than navigator devices.

What it does

two-way, live
The gateway holds a websocket to Home Assistant, so a light changed in HA updates in Control4 immediately, and the reverse holds too.
imports your layout
Import Rooms turns Home Assistant areas into Control4 rooms. Import Devices then creates the child drivers for the entities in them.
version enforcement
The gateway refuses child drivers whose version does not match it exactly, and names every mismatch in a dedicated property, so a half-updated project cannot sit there misbehaving quietly.
opt-in update check
Off by default. When enabled, the result appears in the driver's version property. Nothing phones anywhere unless you ask it to.
built by CI
Releases are built from a tag by GitHub Actions, with guards on the asset count and on the tag matching the version file.

Install

Download the .c4z files from the latest release, or build them yourself:

# output lands in dist/, one c4z per driver
python3 build.py

In Composer Pro, add every .c4z file, not just the gateway. That only loads them into Composer's driver database; you do not place them by hand. Then add the Home Assistant Gateway to a room, point it at your instance and authenticate, and use its Import Rooms and Import Devices actions.

Import Devices can only create a driver already present in Composer's database, which is the reason the first step loads all of them.

Specification

Version 1.2.3
License MIT
Language Lua, Control4 DriverWorks
Artifact Seventeen .c4z files: a gateway and sixteen drivers
Target Control4 X4. OS 3.4.x may work but is not a gate
Requires Composer Pro, and Home Assistant reachable from the controller
Build Python 3.9 or newer
Network LAN only. No cloud, no license server
Source github.com/cajunflavoredbob/openhac4