autoSteve has an amazing project on Github that pulls in all your C-Bus items into Home Assistant, with auto discovery and comprehensive documentation.
The problem I found as a newb to HA & C-Bus, the documentation scared me off so I thought I would help other newbs with a simple version for first time users with a more limited scope. The idea of this guide is for people who may not be familiar with C-Bus to get their first set of lights into Home Assistant. Once that is done, you should have a basic understand and the rest of the autoSteve’s documentation can take you further. This guide only uses two scripts and 1 add-on and can be up and running in 15mins
What do you need?
C-Bus controller that supports LUA (SHAC/NAC/AC2/NAC2). These are generally the network controllers, if you have an older controller that needs a serial cable (or the Wiser), this is not the guide for you.
HAOS not HA Core
If you don’t have a controller I purchased the 5500AC2 which works excellently and this is what I used for the guide, it is pricey but also the most reliable solution from my research.
Prepare Home Assistant
Create your MQTT user
Settings → People → Users (tab at the top)
Add User
Username: matt
Password: (what ever you want, just remember it you will need it later)
Log into your controller and we will install a script
Scripting → Resident → Add new script
Script Name: MQTT send receive
Sleep: 0
Active: Yes
Category: blank
Description: What ever you want
Click the Editor icon against the script
On the project on Github click into the MQTT send receive script, copy it and paste it into the script on your controller
Edit the first few lines under change to suit environment
IP is the IP of your HASS instance
Username and password is what we used before for the user we setup
The other items you should be able to leave if your setup is standard
Save & close
Setup your object(s)
All your lights will be auto discovered in HA once setup
Navigate to Objects and you should see all your lights
Click on the name of the first device you want to setup
Under Keywords enter
MQTT, light, pn=, img=mdi:lightbulb,
For example
MQTT, light, pn=Bathroom Lights, img=mdi:lightbulb,
Hit Save
Head over to Home Assistant
Settings → Devices → MQTT → x Devices
You should now see your light in here as your named it. If you don’t reload MQTT
Now setup all your objects the format is pretty simple
MQTT - Tells the script to include this object, so anything you don’t want in HA just don’t update
light - what sort of object it will appear in HA as
pn - name
img - the icon HA will use, you can ignore this or change it in HA
Now that you are done, head over here and donate to autoSteve to say thanks
There is also a lot more you can do with these scripts, including non-light devices, google integration and hue support. Check out Steve’s documentation for that.
Thanks for responding Lee. I have done all of that but I am not sure how to actually make it Go Live. Am I missing something at the end of the build or should HA simply start seeing the CGate
I worked out what I was missing - I had not tagged anything, but now I have I am still not seeing them in the MQTT - Ive pinged the CGAT from HASS, so I know they can communicate/
I have a quick question on using scenes, I have this working with some simple lights on and off but I’m trying to use it to set scenes too. I have created some presets in the cbus for 0%, 25%, 50%,75% & 100%, this uses triggers for the scenes 0/202/14, 0/202/15/ 0/202/16, 0/202/17 & 0/202/18.
If I publish cmnd/cbus/write/0/202/17/ with a payload of ON, nothing happens.
I ended up creating booleans and then buttons from them. I also have an automation triggered when the boolean state changes, this activates the scenes.
Can anyone help with my fault, I am new to this.
My 5500AC2 seems to be communicating
(* string: Connected to Mosquitto broker )
but HA can’t seem to find the controller
The new connection 172.30.32.2 doesn’t line up with network or AC2 at 192.168.50.130.
Did you get to the bottom of this? I’ve had my SHAC for several years and I’ve got lights on 56, blinds on 70, triggers on 202 and some user parameters (that the CBUS automations use).
I really like to be able to import all of these and write back to 56, 70 and 202. Do I just update to:
In a previous integration, SmartVoice, that used a web server to integrate with Amazon Alexa I was able to treat all of these like dimmed lights and just send and receive 0-255 state.