QbusMQTT
A Qbus EQOweb to MQTT bridge
Purpose
This script acts a bridge between an MQTT broker and a Qbus home automation system (Eqoweb). By doing so, Qbus can be integrated into a home automation solution like Domogik, Hass.io, OpenHab or Domoticz. Node-RED is also quite interesting to easily setup automation flows and to connect other online services like IFTTT, PushOver, Alexa, Telegram...
How it works
There are three topics:
- MQTT_TOPIC_CHAN_NAMES : on startup it will show the channel with corresponding device name as configured in EqoWeb. This is helpful to determine how the names are formatted into topic names (lowercase, spaces replaced by _ ). e.g.:
# mosquitto_sub -h 192.168.1.30 -v -t qbus/channames/# qbus/channames/1/living_spots qbus/channames/2/living_wand qbus/channames/3/eetkamer_cen qbus/channames/4/eetkamer_spo qbus/channames/5/keuken_spots qbus/channames/6/keuken_eilan qbus/channames/7/keuken_kast qbus/channames/8/warme_bergin qbus/channames/9/koude_bergin qbus/channames/10/wc_onder qbus/channames/11/bureau_spots
- MQTT_TOPIC_CMND : topic to send a command, name of device is added to the end. Value is typically 0 for OFF, 255 for ON (switch). A dimmer can have any value in between.
# mosquitto_pub -h 192.168.1.30 -t qbus/cmnd/living_spots -m 10
translates to MQTT message
qbus/cmnd/living_spots 10
To retrieve the current state of all devices:
# mosquitto_pub -h 192.168.1.30 -t qbus/cmnd/update -m 0
- MQTT_TOPIC_STAT : topic to subscribe for EQOWeb events, e.g turning off living_spots results in following MQTT message
qbus/stat/living_spots 0
Thanks
This wouldn't be possible without the library written by Nico; thanks! https://github.com/nicojanssens/qbus-eqoweb-api
Installation
MQTT and EQOWeb configuration is set in .env file.
npm inpm run start