Simple Google Home AND Siri Voice Integration with CBus via Homebridge

Discussion in 'Voice Control' started by JasonY00, Sep 21, 2019.

  1. JasonY00

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    138
    Likes Received:
    31
    Location:
    Sydney
    Hi everyone,

    I have been playing around with Homebridge with CBus for some time and have it working well with Siri control of my C-Bus and other non-C-Bus devices. Everyone knows about this already.

    However, I was also wanting Google Home to control my C-Bus as well but had no luck. The Home Assistant option on a Raspberry Pi with all of the other configurations required to get it to interface to C-Bus seemed just too much for only wanting voice control via Siri/Google of C-Bus.

    I finally come across the excellent Homebridge plugin homebridge-gsh, which is a "Homebridge to Google Smart Home" interface. It is extremely simple to install via npm and requires only one prerequisite which is the "Homebridge Config UI X" plugin (homebridge-config-ui-x). The "homebridge-config-ui-x" plugin is essentially a web based interface for Homebridge and this is required to install and link the google voice service to homebridge to control c-bus.

    Both URL's below for easy reference.

    https://github.com/oznu/homebridge-gsh
    https://github.com/oznu/homebridge-config-ui-x

    So now, I can control c-bus (and other homebridge accessories) via both Siri (ipads, iphones and Homepod) and Google home devices. It's early days yet, but it seems to work just fine. I have not tested scenes yet, but I am slowly testing c-bus devises one at a time.

    Generally, this could be set up for any client and they can choose which path to go down with voice control siri/google or both.

    I do not have or need Alexa support for homebridge. I have included a link below (which I have not tested) which would be the trifecta!

    https://github.com/NorthernMan54/homebridge-alexa

    Hope this helps. Its simple which works for me.

    Cheers

    Jason
     
    JasonY00, Sep 21, 2019
    #1
    MarkB, Ian and Wonkey like this.
  2. JasonY00

    lcrowhurst

    Joined:
    Dec 2, 2004
    Messages:
    278
    Likes Received:
    98
    Location:
    Sydney, NSW, Australia
    Hi Jason

    I have setup homebdridge and added in alexa the other day, the setup was extremely easy , the instructions given with the plug in are easy to follow, basically install hombridge-alexa (I already use Homebridge-congig-ui-x which I encourage anyone using home bridge to install as it is an excellent plugin), setup an account on homebridge.ca, install the Amazon skill https://www.amazon.com/Northern-Man-54-Homebridge/dp/B07B9QMTFQ, then reach for new devices and run through the devices setup.

    Now you have encourage me to install google voice, so Ill have all 3 running :)

    Ive also added in cognian synchromesh wireless dali (cognian.com) to my wiser shac/nac (another device i also recommend anyone with CBus to have).
     
    lcrowhurst, Sep 21, 2019
    #2
  3. JasonY00

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    138
    Likes Received:
    31
    Location:
    Sydney
    Hi Laurence,

    great news that this helped. It seems to be pretty solid and I can use siri natively (via our iphones, ipads and a homepod) or google via a google home mini or google home app on my iphone. Both work remotely. Just a heads up that google does not support any where near as many device types as homebridge but I only wanted it for commands to turn things on and off. I do all of my remote sensing from my iphone. i.e. cameras, motion detectors and reeds.

    The only problem I ran into was that I started to run into problems with the Home app not being able to register or hold onto my homebridge accessory when I first configured the google plugin. This was fixed by adding the
    "mdns": {"interface": "192.168.x.y"}, line into my config.json file. I did not have this problem previously and it was very solid. My homebridge runs on Windows 10 as I have a server that I do all of my c-bus device config from (it has Toolkit, PICED, CIRCA, TICA , C-Gate, etc. installed and also runs my Inner Range Insight programming tool. It seemed easier to just have homebridge here as well as much as I do like playing with Raspberry Pi's. I can even see and manage my old Concept 4000 panel via siri<->homebridge<->cbus<->concept.

    I have been working on a Magic Mirror with a Raspberry Pi. I have embedded the google assistant so I can now tell the mirror to control my c-bus! Not being able to do this before was definitely a first world problem...

    I will remember your advice re:alexa if I ever get one!

    Cheers

    Jason
     
    JasonY00, Sep 23, 2019
    #3
  4. JasonY00

    Wonkey

    Joined:
    Aug 3, 2004
    Messages:
    450
    Likes Received:
    46
    Location:
    Adelaide
    Hi Jason
    Thanks for highlighting this solution, not being a software guy it took me a while to figure out all of the prerequisites like getting the config.json file written correctly.
    So after a day of messing about I can now turn on my lounge lights via my google mini.
    Doesn't sound like a lot but its a positive start for me.
    The questions
    1. Do I have to enter each group address into config file and then change which room it lives in the app, or is there a quicker way?
    2. At present I have this running on an old netbook (win 10), have you guys got this running on a RP?

    Colin
     
    Wonkey, Sep 23, 2019
    #4
  5. JasonY00

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    138
    Likes Received:
    31
    Location:
    Sydney
    Hi Colin,

    With the Homebridge-CBus plugin, there was an option where the plugin would automatically create a list of C-Bus group addresses from your C-Gate instance using what is called a "Unified Accessory List" See here under the that heading: https://github.com/anthonywebb/homebridge-cbus
    (You may have already done this, so apologies if I am starting at the beginning)

    The file that is created is C:\Users\<some-name>\.homebridge\my-platform.json

    You then copy and paste information from this file (remembering to enable each device) into your config.json file and your cbus devices should appear auto-magically in homebridge and be available next time you start it up. This is how it happens on an apple device. The config.json file is temperamental so edit it carefully with a good text editor. Atom is good for this (its free). Don't use notepad/wordpad/word.

    With the google option, I used the google home app on my iphone to move each device to a particular room. This is a one at a time option, but all of the c-bus groups also automatically appear.
    You can also see them in the homebridge web interface under the accessories tab.
    I have this running on a Windows 10 rack mounted machine and its pretty solid.

    Screen Captures attached... Apple Home App.PNG Google Home App.PNG
    Google automatically groups the lights in a room so I have shown them in detail view.

    Hope this helps. Let me know if you need anything else. The internet has much smarter people than me and I have gotten a lot of tips for most of my config. Happy to pass them on.

    Cheers

    Jason
     
    Last edited: Sep 23, 2019
    JasonY00, Sep 23, 2019
    #5
  6. JasonY00

    Wonkey

    Joined:
    Aug 3, 2004
    Messages:
    450
    Likes Received:
    46
    Location:
    Adelaide
    Hi Jason thanks for the help. Do you have any advice or words of wisdom that help make the system better.
    Also have you noticed that homebridge icons dont all function ( shutter control has no control and fans just on and off). Voice control via google work ok
    Colin
     
    Wonkey, Sep 26, 2019
    #6
  7. JasonY00

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    138
    Likes Received:
    31
    Location:
    Sydney
    Hi Colin,

    You are correct that fans just have an ON/OFF option. I can live with this as my fans are only bathroom exhaust fans and only require this function.

    As far as shutters go, i have somfy/acmeda powered internal roller blinds that are run by changeover relays (the old way) and Shutter relays (the new and easier way) My changeover relays didn't work in google, I may just set them up as two separate UP/DOWN trigger accessories that run the interlocks in a scene in a Wiser/Touch Screen. As for the shutter relays, I also have the homebridge-wiser plugin. This presents the shutter relay accessories as ON/OFF switches and these work just fine only for UP/DOWN.

    I'm going to move all of my basic lighting/dimmers to the homebridge-wiser plugin and all of the other stuff (blinds, fans, alarm, motion,scene toggles etc.) to the homebridge-cbus plugin. This is because I have almost 200 accessories to control/monitor and I would like some more order than I currently have.

    Hope this helps.

    Cheers

    Jason
     
    JasonY00, Sep 27, 2019
    #7
  8. JasonY00

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    138
    Likes Received:
    31
    Location:
    Sydney
    Hi Lawrence,

    You threw down the gauntlet so I accepted the challenge. I have also installed the Alexa plugin and (with the addition of the Alexa app on my phone to test it) it is running like a charm as you have suggested. However, I decided to go up to "11" and thought about Cortana control in Windows. Many may ask why, but the answer is "because it's there".

    Well, it works! (with two small caveats.)

    Alexa and Cortana can call each other and act as conduits for each others commands. In Cortana, you just ask Cortana to "call" Alexa and then tell Alexa do do something. That is the first caveat. You have to say "Hey Cortana....Open Alexa". Alexa pops up and then you just say what you want. eg. "Turn the study light on" and off you go.

    The setup is quote simple, however you must set your region and language in Windows to United States and United States English (you can still have Australian formats for dates etc and spelling). This is because the Alexa "Skill" for Cortana only works for the US region. This is the second caveat and required some mucking around. It will probably change eventually. The first time you call Alexa you just have to log into your Amazon account to create the link. I used my original Amazon login that I have had for about 15 years to buy books. After that you are off and running. Alexa can also call Cortana, but I didn't bother with this option as its mostly for calender, email, etc.

    This means that if I am in front of my desk, my phone is in the other room and I can't be bothered to get up, I just talk to my WIndows 10 PC or Laptop. If Alexa can do it, Cortana can too.

    So that is the Quadrella for voice control of C-bus via homebridge no matter what your device, Windows 10 computer, Tablet, Phone or Smart Speaker!

    "Hey Siri" <-> homebridge <-> C-Bus
    "OK Google" <-> homebridge <-> C-Bus
    "Alexa" <-> homebridge <-> C-Bus
    "Hey Cortana, Open Alexa" <-> homebridge <-> C-Bus

    Cheers

    Jason
     
    JasonY00, Sep 27, 2019
    #8
  9. JasonY00

    ariesnaceno

    Joined:
    May 31, 2012
    Messages:
    25
    Likes Received:
    0
    Location:
    philippines
    ariesnaceno, Oct 7, 2019
    #9
  10. JasonY00

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    138
    Likes Received:
    31
    Location:
    Sydney
    Yes, I use homebridge-wiser. Almost no configuration and seems solid for both Wiser 1 & 2, but it is off-topic for this thread. Perhaps ask in the Wiser forums for advice.

    Cheers

    Jason
     
    JasonY00, Oct 8, 2019
    #10
  11. JasonY00

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    138
    Likes Received:
    31
    Location:
    Sydney
    Hi Everyone,

    Further to my original email above about Siri/Google integration, I have added a "contact sensor type" to Homebridge-cbus with (Anthony's) the original programmers approval and support.

    A contact sensor is basically a reed switch (or any other on/off sensor from C-Bus). Its only for status and does not support an action. It can be displayed as a Door/Gate, Blind, Garage Door, Contact Sensor or Window in the Home app. There are several animated icons to choose from for most of these options. You can also ask Siri what the status is of the sensor. eg. "Hey Siri, what's the status of the front door?" and she will reply. Screen shots below.

    Contact Sensor.PNG Siri Status.PNG

    The current update for homebridge-cbus with this sensor type is available for download. Configure the sensor as a "contact" sensor in your config.json file. eg:

    "type": "contact",
    "application": 57, (I use App 57 for Home Security from my Concept 4000 panel)
    "id": 51,
    "name": "Back Door",
    "enabled": true

    and tailor your contact sensor type and icon in the Home App.

    I hope to write some more types for Irrigation, temperature, current etc. I currently have the temperature sensor working as a proof of concept but its on the C-Gate temperature application 25 and not measurement application 228. Getting it going required a few changes to the underlying C-Gate interface which removed some integer variable type checks to support a real variable for temperature and I wasn't comfortable with this. I hope to remedy this so that the sensor can be more universally applied and include many types of sensors from the General Input Unit The measurement application sends data differently to the temperature application as it uses Channels for each device which makes reading the data a little more complicated. Its going to test my limited programming skills to get it going...

    Anthony is a legend for writing the homebridge-cbus plugin!

    Cheers and hope this helps anyone out there.

    Jason

    P.S. I haven't checked what google or Alexa think of it yet...
     
    Last edited: Oct 17, 2019
    JasonY00, Oct 16, 2019
    #11
  12. JasonY00

    chromus

    Joined:
    Jan 27, 2014
    Messages:
    422
    Likes Received:
    50
    Location:
    Perth
    Great work Jason, I am looking for Temperature readouts, I was planning on having dummy dimmers with the %age showing the temp in Degress using code on the cbus side, but if you have the know how reading temps straight out would be an awesome addition and possibly even allow automation based on if temp > [setpoint] then [Do Something]
     
    chromus, Nov 1, 2019
    #12
  13. JasonY00

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    138
    Likes Received:
    31
    Location:
    Sydney
    Hi Chromus,

    screen shots below of the c-bus temp sensor in the home app:
    [​IMG] [​IMG]
    I also have a smoke detector accessory that I have submitted to Anthony (homebridge-bus programmer) for inclusion in homebridge-cbus.

    Although the temp sensor works, it requires the temperature sensor to be set up for the C-Gate temperature application 25 and not measurement application 228 as described in an earlier post. This adds anther level of complexity in the homebridge-cbus plugin to parse the command and get and interpret the data.

    If you just want to initially use it for a "proof of concept" I can tidy up some of the debugging mess and load the current temperature application version of homebridge-cbus into my github repository for you to play with. I do want it to be on the measurement application but that requires a further rewrite of the homebridge-cbus plug in to facilitate the extra channel level query in this application. That is, the command has to go from a "get 254/25/5 Temperature" command to a "get 254/228/5/1 Data" command where 254 is my network, 25 or 228 is the appropriate application, 5 is my temp sensor device number and 1 is the channel number. The data output is also different eg. response is "300 //PROJECT/254/25/5: Temperature=26.5" to something like "300 //PROJECT/254/228/5/1: Data=26500,-3,0,1402"

    This requires some data massaging and I am learning to program in Node.js as I go along...I haven't programmed for 20 years and its moved on a little since then!

    In the config.json file the accessory would need to have the channel number. In homebridge-cbus I have to decide whether to have a lookup table for the measurement unit type reported by cbus (ie 0 = Celsius, 1 = Amps, etc as per the c-gate manual) or hard code it in the accessory definition and ignore what c-gate tells me it thinks it is. So something possibly like:

    {
    "type": "temperature",
    "application": 228,
    "id": 5,
    "channel": 1,
    "units": 0, (Degrees Celsius in C-Gate)
    "name": "Test Temp"
    }

    Let me know if you want to try what I have and I can let you know what files to upload to your homebridge-cbus folder from my github and you can add the sensor into your config.json file. Bear in mind though that Homekit does not yet support automation based on temperature sensors! For this you can download the free Elgato Eve app from the App Store and create temperature based automation there. I haven't done this yet, but I understand this is how it has to be done.

    Will have a play when the kids are asleep...

    Cheers

    Jason
     

    Attached Files:

    JasonY00, Nov 2, 2019
    #13
  14. JasonY00

    discjockeyr

    Joined:
    Jan 9, 2007
    Messages:
    59
    Likes Received:
    0
    Hi Guys, here it seems that is something interesting but reading the posts i did not manage to understand how i can done this. I have configure a PI with homebridge some time ago and i am controlling the c-bus from apple homekit. So, if i understand correctly, i can also add google home assistant to my setup? Can i add this on the same PI that already running homebridge? and how can i do this?

    Thanks in advance
     
    discjockeyr, Dec 2, 2019
    #14
  15. JasonY00

    Wonkey

    Joined:
    Aug 3, 2004
    Messages:
    450
    Likes Received:
    46
    Location:
    Adelaide
    Wonkey, Dec 3, 2019
    #15
  16. JasonY00

    Senthil

    Joined:
    Aug 5, 2019
    Messages:
    1
    Likes Received:
    0
    I am to integrate Cbus systems with Google home, is there any devise available? As I can see some developments in this area, I would like to know what is the best and available in recent times.
     
    Senthil, May 6, 2020
    #16
  17. JasonY00

    chromus

    Joined:
    Jan 27, 2014
    Messages:
    422
    Likes Received:
    50
    Location:
    Perth
    RPi 4 4GB running Homebridge or OpenHab.
     
    chromus, May 6, 2020
    #17
  18. JasonY00

    chromus

    Joined:
    Jan 27, 2014
    Messages:
    422
    Likes Received:
    50
    Location:
    Perth
    Ok so a bunch of new things to know:
    The Yays
    1 - HOOBS breaks Ubiquiti Unifi.
    2 - Homebridge UIX is now being actively developed again.
    3 - Homebridge CBUS got integrated temp sensor, bell press and a few other forked add-ons integrated into the main release.

    The Nays
    4 - Running Homebridge in anything lower than a 3B+ is rapidly becoming unworkable due to Node and Java overheads.
     
    chromus, Aug 3, 2020
    #18
  19. JasonY00

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,435
    Likes Received:
    64
    Location:
    Adelaide
    Why is this a "Yay"?
     
    NickD, Aug 4, 2020
    #19
  20. JasonY00

    chromus

    Joined:
    Jan 27, 2014
    Messages:
    422
    Likes Received:
    50
    Location:
    Perth
    @NickD - Shud have been a NAY, but I was mid migraine and thought @JasonY00 would get a lol from it, obs missed its mark.

    The Yays
    1 - HOOBS breaks Ubiquiti Unifi.
    1 - Homebridge UIX is now being actively developed again.
    2 - Homebridge CBUS got integrated temp sensor, bell press and a few other forked add-ons integrated into the main release.

    The Nays
    3 - HOOBS breaks Ubiquiti Unifi.
    4 - Running Homebridge in anything lower than a 3B+ is rapidly becoming unworkable due to Node and Java overheads.
     
    chromus, Aug 4, 2020
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.