This package contains a simple Homebridge service implementation that can control Homebridge switches. In my personal setup, this is used in place of SSRs to control pumps and heating elements. Zigbee switches have been installed and integrated with Homebridge via Zigbee2MQTT and homebridge-z2m
To set this up, create a Digital Actuator in your service, without assigning it a channel. Our code will act as the channel, taking signals and sending them to Homebridge to turn a switch on or off.
You need to provide:
mqtt-host
- the host of the MQTT server. In my case, this is just the IP addres of my Brewblox serverblock-name
- the block name of the digital actuator you created abovehomebridge-host
- the IP or FQDN of the Homebridge serverhomebridge-port
- the port that the Homebridge server runs onhomebridge-auth-code
- the auth code of the Homebridge server, retrieved from the Homebridge server homepagehomebridge-device
- the name of the Homebridge device / swtich that will be controlled by the digital actuator blockservice
- the name of the Brewblox service that contains the block-name
To add the setup to your docker-compose, a sample entry looks like this:
boil-heating-element:
image: ghcr.io/jmgasper/brewblox-homebridge:develop
privileged: true
restart: unless-stopped
command: --port 5002 --mqtt-host=192.168.1.36 --block-name="Boil Heating Element" --homebridge-host="192.168.1.158" --homebridge-port=51887 --homebridge-auth-code="123-45-678" --homebridge-device="Brew Elements left" --service="brew-room"
volumes:
- type: bind
source: /etc/localtime
target: /etc/localtime
read_only: true