Apple homekit integration!

Discussion in 'Voice Control' started by ievolve, Nov 7, 2016.

  1. ievolve

    srpage

    Joined:
    May 9, 2009
    Messages:
    8
    Likes Received:
    0
    Hi,
    Have installed Homebridge on a PI and it has been running flawlessly for a couple of days now.
    C-Gate is running on my media sever but will look to move that over to the PI in the coming week.
    As above, response times are nice and quick.
    I have fans and blinds all through the house, so it will be great once they are incorporated into the plugin.
     
    srpage, Nov 18, 2016
    #21
  2. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    This makes me pretty stoked to have someone else enjoying the code I worked so hard on! I can say as well, thing have been rock solid for me. I dont have any fans or blinds but will look into what it would take to add them. And, for those looking for just the PI image, we have some holidays coming up next week and I may have some more time to devote to trying to create that.
     
    ievolve, Nov 18, 2016
    #22
  3. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    @srpage, can you help me document the CGate commands needed to control your fan? If I can get those I think I can add the fan support pretty easy. Window covering control is in there too if you care to start a ticket to start to track those. If I can get the CGate commands for interacting with the fan (I assume they are similar to the lighting commands?) then I can wire stuff up.

    https://github.com/anthonywebb/homebridge-cbus/issues/2
     
    ievolve, Nov 18, 2016
    #23
  4. ievolve

    srpage

    Joined:
    May 9, 2009
    Messages:
    8
    Likes Received:
    0
    Great.
    I'll get something to you in the next couple of days.
     
    srpage, Nov 21, 2016
    #24
  5. ievolve

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    132
    Likes Received:
    0
    Hi ievolve,

    Up and running with a Pi and the homebridge but having some difficulties connecting the accessories. They come up on the Ipad but they say no response. The Pi screen says

    CbusStatusPacket {
    raw: '401 Bad object or device ID.',
    channel: 'controlStream',
    type: 'unknown',
    source: 'cbus' }

    I configured the json file as per yours and just replaced the name and ID number with the address out of cbus. I wonder whether the Cgate on the Pi has connected with the CNI as I am not sure where I would put this IP address in the cgate on the pi?

    Any thoughts ?


    Glen
     
    Last edited by a moderator: Nov 21, 2016
    GlenF, Nov 21, 2016
    #25
  6. ievolve

    Ambro

    Joined:
    Nov 23, 2010
    Messages:
    110
    Likes Received:
    3
    Location:
    Adelaide
    Awesome ievolve; really excited about this - great work mate.

    +1 for the PI3 & Cgate image too.
     
    Ambro, Nov 21, 2016
    #26
  7. ievolve

    Ambro

    Joined:
    Nov 23, 2010
    Messages:
    110
    Likes Received:
    3
    Location:
    Adelaide
    Okay - got it working through a RPI3 and a home server I'm running

    Super Stoked - cheers ievolve. LEGENDARY.

    ohhhh ...... to open my gates and roller door through geofencing ..... ahhhhh (in theory now).

    OMG - siri turns my lights on/off & dims to a percent .... :D (actually working as I type).

    WOW. but lets move on....

    I know this isn't the appropriate area to address problems but I'm new to this stuff & maybe in github issues posting I've messed things!... :eek:

    problem so far:

    dimmer likes to dim up and down with the dimming function in the home app, also if I press off it turns off however - on does not restore to previous levels.

    When looking at the homebridge output on the RPI I can see a response to setstate 0 works all the time. setstate 1 works only when it has been dimmed to off - it sets brightness to 100. If I toggle on/off the setstate 1 is triggered but the set brightness to 100 does not trigger.

    Also I've deleted the motion sensor out of the config.json because I'm not quite sure how you've set it with a group address - can you elaborate on how to use motion please.

    Cheers again,
    Ambro
     
    Ambro, Nov 24, 2016
    #27
  8. ievolve

    lcrowhurst

    Joined:
    Dec 2, 2004
    Messages:
    277
    Likes Received:
    98
    Location:
    Sydney, NSW, Australia
    Great work

    Great work ievolve I've now got it working on a rpi 3 with cgate installed on it as well. Works amazingly well. Now to add geofencing :)
     
    lcrowhurst, Nov 25, 2016
    #28
  9. ievolve

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    132
    Likes Received:
    0
    Hi ievolve, thanks for all your work. Thanks to some advice from Ambro I now have it working and it is great.

    I am having a bit of a problem though where the controls work (ie turn a light on) but then wont turn it off. If I turn the light off manually, it does not pick this up either. If I go into the dimmer elements it works fine but not the on/off for the relay lights.

    Is there some obvious config I have missed somewhere that would cause this?

    Glen
     
    GlenF, Dec 1, 2016
    #29
  10. ievolve

    Ambro

    Joined:
    Nov 23, 2010
    Messages:
    110
    Likes Received:
    3
    Location:
    Adelaide
    I think this is a bug GlenF as I've sort of said the same thing a couple posts up. My advice is to try geofencing in the time being. Make a group address which is a virtual (dummy) group for arriving and leaving. I you have a logic device then you can get it to do things when its triggered and once that's done you can set the group to OFF again (homekit can't pulse a group address as yet I believe). Also don't forget to put the dummy group in a spare logic spot in an output device and grey it out so that the MMI gremlins are kept at bay.
     
    Ambro, Dec 2, 2016
    #30
  11. ievolve

    71monaro

    Joined:
    Aug 6, 2010
    Messages:
    81
    Likes Received:
    1
    Location:
    Adelaide
    using 5500pcu

    Can I run Homebridge and CGate on a RPi and connect via USB to a 5500PCU? or if not, use a USB to Ethernet NIC adaptor? rather than have to purchase a 5500CN. I read internally the PCU, PCI and CN are pretty muchl the same, just edge interface different.
     
    Last edited by a moderator: Dec 4, 2016
    71monaro, Dec 3, 2016
    #31
  12. ievolve

    lcrowhurst

    Joined:
    Dec 2, 2004
    Messages:
    277
    Likes Received:
    98
    Location:
    Sydney, NSW, Australia
    Hi Glen I also had this,
    1) Delete the files inside the /var/homebridge/persist folder.
    2) delete the homebridge from your iPhone
    3) restart cni (if using cni)
    4) restart homebridge (or raspberry pi)
    5) re add home bridge to iPhone

    It should now work
     
    lcrowhurst, Dec 5, 2016
    #32
  13. ievolve

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    132
    Likes Received:
    0
    Thanks Lawrence,

    Tried it twice but still the same. It is odd that each light works first time and then wont update. If I go into the dimmer part it works but not on the on / off area. If I restart Homekit it gets all the status right and work for the first time again. Does anyone think there might be something in the CNI config that is not reporting status back? I remember configuring the serial interface and you had to send a string to it to get it into reporting mode?

    Thanks anyway

    Glen
     
    GlenF, Dec 5, 2016
    #33
  14. ievolve

    lcrowhurst

    Joined:
    Dec 2, 2004
    Messages:
    277
    Likes Received:
    98
    Location:
    Sydney, NSW, Australia
    I had the same issue, it worked perfectly if I manually started the homebridge service etc, but not on autostart up. It wasn't an issue with the CNI config, It was an issue with the homebrige service starting at startup.

    Can you try this :

    Once your pi has started. if you type in a terminal windows :

    sudo systemctl stop homebridge
    sleep 2
    sudo systemctl daemon-reload
    sudo systemctl enable homebridge
    sudo systemctl start homebridge
    sudo systemctl status homebridge
    sleep 10


    close and reopen homekit on your phone

    Does it then work correctly?
     
    lcrowhurst, Dec 6, 2016
    #34
  15. ievolve

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    132
    Likes Received:
    0
    Thanks again Lawrence, I have not installed Homebridge as a startup service as I am just testing. I currently just run is in the putty window directly.
     
    GlenF, Dec 8, 2016
    #35
  16. ievolve

    abg

    Joined:
    Dec 25, 2007
    Messages:
    208
    Likes Received:
    2
    Location:
    Sydney
    Pi3 Problem ?

    I have had this running successfully on my iMac for some time but moving it to a Pi has been more problematic (for me anyway). I have homebridge running and can add the accessories on the Home app (with the pi connecting to C-Gate on a separate computer which is used for HomeGate etc) but the accessories in Home never update their status and eventually end up as 'No Response'

    Any clues greatly appreciated. (I've done the normal deleting of cache files and restart of c-gate computer without luck).
     
    abg, Dec 16, 2016
    #36
  17. ievolve

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    132
    Likes Received:
    0
    Sounds like you have the same problem as me abg. I have tried most things with no luck so have shelved it for a while. Hopefully, ievolve might have an idea what is happening
     
    GlenF, Dec 19, 2016
    #37
  18. ievolve

    guyb

    Joined:
    Dec 29, 2016
    Messages:
    3
    Likes Received:
    0
    Location:
    Singapore
    Basic requirements

    Hi I have a Clipsal CBus lighting system throughout my apartment, and would love to integrate it into HomeKit.

    I have a MacMini media server, which I can use to run homebridge with your cbus plugin, however what additional component(s) do I need ?

    The Mac Mini is too far from the Cbus Din rails, so is it feasible to simply add a 5500CN2 or 5100CN2, and connect it up to my wifi router which is nearby the CBus board ?

    I assume if I do that, I do not need to run CGate software, is that correct ?

    Cheers
    Guy
     
    guyb, Dec 29, 2016
    #38
  19. ievolve

    guyb

    Joined:
    Dec 29, 2016
    Messages:
    3
    Likes Received:
    0
    Location:
    Singapore
    I got homebridge up and running on the MacMini last night, and installed a few plugins to experiment with. It was fun to control the TV using Siri !

    I also got CGate running on the MacMini, and got it talking to the homebridge cbus plugin, however without a CBus computer interface, I'm not able to try that out yet. I'm finding it difficult to find a Clipsal qualified technician/installer here in Singapore. Any hints would be most welcome.

    In the longer term, is CGate really required ? Is it possible to communicate directly from the homebridge plugin to a Clipsal 5500CN2 ?

    Cheers
    Guy
     
    guyb, Dec 30, 2016
    #39
  20. ievolve

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    132
    Likes Received:
    0
    Hi all,

    Think I might be doing something wrong so keen for any advice. After having issues with the raspberry Pi install where the initial on/off would work but it would not work after that I decided to do a setup on a Mac. Setup worked fine, with homebridge and Cgate working but I am still having the same issue. Initial startup is fine but it will not update status from switch changes and once the first action has occurred it will no longer work. The dimmers work fine for dimming but the on/offs still don't work.

    It seems like I am having issues with the communications between the CNI and cgate. Any thoughts on how to problem solve welcome.

    ps it was also in a different house.

    Glen
     
    GlenF, Jan 1, 2017
    #40
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.