Apple homekit integration!

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

  1. ievolve

    ICS-GS

    Joined:
    Nov 1, 2004
    Messages:
    347
    Likes Received:
    0
    Location:
    SE Melbourne
    Does it not create an issue when performing the OS upgrade check?
    (I’m very, very new to rpi)
     
    ICS-GS, Feb 9, 2018
  2. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    apt-get update and apt-get upgrade is OK.
    apt-get dist-upgrade will move from Jessie to Stretch.

    I believe it is the init.d script to start CGate which doesn't work on Stretch.
    Homebridge will shut down if CGate is not running.
     
    DarylMc, Feb 9, 2018
  3. ievolve

    71monaro

    Joined:
    Aug 6, 2010
    Messages:
    81
    Likes Received:
    1
    Location:
    Adelaide
    I keep breaking my Homebridge-Cbus set up! I have had it working a few times and when I start making changes (either power or config) I break it. All accessories show as being non-responsive. I have logged into RPi and done some reboots, removed my Home in Homekit. Not first time and tried many things so not sure what has fixed last couple times, but more importantly why it is breaking. Now Homekit cannot find the Hombebridge accessory just keeps searching (no failed message!). Question - is a working C-BUS 5500CN required to see Homebridge as an accessory? I cannot seem to connect to the CN with Toolkit either atm. not sure where fault is occurring.
     
    71monaro, Feb 13, 2018
  4. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    @71monaro
    If the phone cannot add the accessory you need to delete the persist folder and reboot.
    This needs to be done every time the accessory is deleted eg "Home" is removed from a phone.
    It's a situation you should try to avoid but when you delete the Home you have to do this.
    More info here "common issues".
    https://github.com/nfarina/homebridge

    I just tested to add a new accessory with CNI powered off and the new accessory did show up on the phone.

    If Toolkit cannot connect to the CNI there is a number of things to check.
    Check CNI IP address eg ping it or open webpage to verify it is on your network.
    Power off the PI then try connect Toolkit to the local CGate.
    If that does not work it points to a faulty CNI or user setup.

    Check your project network settings in Toolkit eg edit network to make sure CGate has the correct IP address for the CNI.

    If you set Toolkit to connect to a remote CGate on the PI check the CGate version is suitable for your Toolkit version..
    http://www2.clipsal.com/cis/technical/downloads/c-bus_toolkit

    If the PI had repeated power outages or incorrect shutdowns the SD image may need to be rewritten.
    Using a UPS would be a good idea.

    I'm not using a UPS or any cooling solutions to actually try to break Homebridge on the PI.
    There has been several power outages in the last 12 months and it has not caused any problem but it is possible.

    Keeping a back up of the image and then restoring makes things much easier.
    Then you also do not have to delete and re setup the Home.
     
    DarylMc, Feb 14, 2018
  5. ievolve

    71monaro

    Joined:
    Aug 6, 2010
    Messages:
    81
    Likes Received:
    1
    Location:
    Adelaide
    Thanks Daryl, I went to the persist folder once and deleted all 2 or 3 files that it contained. Not sure I have done it this time round. Will check.
     
    71monaro, Feb 14, 2018
  6. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    The github page also mentions on some occasions it may be necessary to change the username in config.json
    But try what you are doing first.
    I've made a lot of images and that is not very common.
     
    DarylMc, Feb 14, 2018
  7. ievolve

    71monaro

    Joined:
    Aug 6, 2010
    Messages:
    81
    Likes Received:
    1
    Location:
    Adelaide
    The persist folder is deleted, and has not re-appeared

    I tried to check Homebridge wasrunning so when connected to PI entering the command:

    pi@raspberrypi:~ $ service homebridge status
    ● homebridge.service - Node.js HomeKit Server
    Loaded: loaded (/etc/systemd/system/homebridge.service; enabled)
    Active: activating (auto-restart) (Result: exit-code) since Sun 2018-02-18 17:19:11 ACDT; 4s ago
    Process: 1359 ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS (code=exited, status=1/FAILURE)
    Main PID: 1359 (code=exited, status=1/FAILURE)
    pi@raspberrypi:~ $ service status all
    status: unrecognized service

    which told me it had failed I assumed so then try to start It

    pi@raspberrypi:~ $ homebridge
    /usr/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:35
    throw ex;
    ^
    Error: The module '/usr/lib/node_modules/homebridge/node_modules/mdns/build/Release/dns_sd_bindings.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 57. This version of Node.js requires
    NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or`npm install`).
    at Object.Module._extensions..node (module.js:598:18)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:24:20)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    pi@raspberrypi:~ $

    npm rebuild - did not help
    so going back to the pi update and upgrade step and reinstalling NODE and Homebridge onwards
     
    71monaro, Feb 18, 2018
  8. ievolve

    71monaro

    Joined:
    Aug 6, 2010
    Messages:
    81
    Likes Received:
    1
    Location:
    Adelaide
    says skip ser2sock instructions, if using a CNI. Is this same is a CN? and what is the ser2sock instructions to skip. Starts requiring file mods that I am struggling with achieving.
     
    71monaro, Feb 18, 2018
  9. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Sounds like you are having a go from scratch.
    You should do that.
    For any CBus Ethernet interface you don’t need to use the serial socket part of the instructions in the addicted to pi link.
    All the text files to be created are in my online folder and unless you know better you should use them because I have changed some compared to the guides in the links.
    The spreadsheet has all the links to the people who published the steps and well worth to read.

    The latest raspian stretch lite has some differences when starting services so I recommend to use raspian Jessie lite.
    Latest Node v8 introduced an error warning at Homebridge start for me so I am sticking with v7 for now.
     
    Last edited: Feb 18, 2018
    DarylMc, Feb 18, 2018
  10. ievolve

    jensenoz

    Joined:
    Jan 26, 2012
    Messages:
    11
    Likes Received:
    0
    Location:
    Greystanes
    I don't know if this question has been covered already.

    I've just setup my raspberry pi using the amazing instructions that DarylMc has kindly provided. I've been doing this at my work and get all the way to the end and noticed the Bridge is now visible in my Home app on my iPhone but none of the cbus "devices" are visible though. Can I assume this is because my raspberry pi is not on my cbus home network??

    I hope the above makes sense. ;)
     
    jensenoz, Jun 1, 2018
  11. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Sorry for the slow reply.
    I have moved home and don’t have any setup to test right now.
    Do you have some accessories set up in config.json?
     
    DarylMc, Jun 3, 2018
  12. ievolve

    Robert

    Joined:
    Jun 10, 2018
    Messages:
    49
    Likes Received:
    1
    I've just stumbled on this thread and it's something I'm keen to have a go setting up. When you said 'not a robust interface solution like something you might buy from a manufacturer' while not as robust is it currently the only option?

    Ok, something I'm going to have to understand better. Is there a reference somewhere I can read up on to understand this?

    Thanks,
    Rob
     
    Robert, Jun 10, 2018
  13. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    I haven’t been able to use Homebridge CBus for a while now because I shifted home but back in January it was all working fine for me.

    I mentioned caution regarding the project xml because if you use a remote CGate running on the PI and make some unit programming changes with CBus Toolkit then the project xml on your PC won’t be current.
     
    DarylMc, Jun 10, 2018
  14. ievolve

    Robert

    Joined:
    Jun 10, 2018
    Messages:
    49
    Likes Received:
    1
    Is this option possible with the Docker package only? Which only runs on certain hardware?

    Also do I still need Cgate running somewhere?

    Thanks,
    Rob
     
    Last edited: Jun 10, 2018
    Robert, Jun 10, 2018
  15. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    I’m not familiar with using docker but someone else may be able to give more info.
    Homebridge CBus talks to CGate so CGate has to be running somewhere.
    I’ve found Raspberry Pi3 hardware quite good to run both CGate and Homebridge.
     
    DarylMc, Jun 10, 2018
    arrikhan likes this.
  16. ievolve

    Robert

    Joined:
    Jun 10, 2018
    Messages:
    49
    Likes Received:
    1
    I'm willing to try a Raspberry Pi3 but it would be neater to not have another device to manage if possible.

    I only have CGate on my laptop currently which I don't leave running so will need to get both running on something else.
     
    Robert, Jun 10, 2018
  17. ievolve

    damian.dorbolo

    Joined:
    Jan 3, 2017
    Messages:
    8
    Likes Received:
    0
    Location:
    Melbourne
    Hi Guys

    a question that i hope someone has tried or may know

    with all the types of accessories such as light switch fan etc in home kit, is there a way in how the config.json is done with the c bus groups to allow the c bus group to rather than labeled labled light, it could be a roller door or door, etc.

    as i have cbus working with an integration to an alarm system, in which lighting groups cause action in the alarm panel, i have a roller door and a door on homekit, but because in homekit its a light or switch i have to say " turn on roller door or turn of" rather than open or close

    any advice would be appreciated

    thanks
     
    damian.dorbolo, Jul 7, 2018
  18. ievolve

    MadDude

    Joined:
    Aug 17, 2015
    Messages:
    21
    Likes Received:
    2
    Location:
    EU
    Hi guys,

    I think I have already asked this previousy but maybe someone has managed to use the shutter connected via a voltage free relay (not the shutter relay) as a curtain type in homekit?
     
    MadDude, Jul 12, 2018
  19. ievolve

    ZROD

    Joined:
    Oct 17, 2018
    Messages:
    4
    Likes Received:
    0
    Hi Guys,

    Got everything up and running on my pi - which is amazing I might add. However, I would like to integrate my sensor's into Homekit which I see is possible, however how do I assign a group address to a sensor via toolkit? All my sensor's have a unit address but I assume this isn't what is needed when integrating into homekit through my config.json…

    Any help would be appreciated!

    Cheers
     
    ZROD, Oct 17, 2018
  20. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi
    You can use the CBus motion sensor enable/disable group address to enable/disable the motion sensor.
    I used the switch type accessory eg
    { "type": "switch", "id": 2, "name": "OFFICE SENSOR OFF" },
     
    DarylMc, Oct 17, 2018
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.