Apple homekit integration!

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

  1. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hello Damian
    I got a similar reply by inserting an invalid unused CBus group address into my config.json.
     
    DarylMc, Jan 27, 2017
    #61
  2. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    DarylMc, Jan 27, 2017
    #62
  3. ievolve

    JimNoble

    Joined:
    Jan 8, 2017
    Messages:
    5
    Likes Received:
    0
    Location:
    Hertfordshire, UK
    Yes, I've seen this. I'm fairly certain that I tracked this down to being caused by using the wrong id. I'd mistakenly used the id of a lighting group with a very similar name to the one I actually wanted, and it was one that wasn't actively being used (i.e. Not associated with any relay or dimmer channel).

    HTH,

    Jim
     
    JimNoble, Jan 27, 2017
    #63
  4. ievolve

    damian.dorbolo

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

    i have been trying to figure out what has been causing the issue now for days with no luck,


    as said before it was working flawlessly untill i added new groups

    i have now tried the following
    - stariting again from scratch
    - removing apple tv
    - clean up and redo cbus file and cgate folder
    - new config.jason

    is there a way to work out what group it doesn't like? as i cant pinpoint which group it is?

    thanks

    Damian
     
    damian.dorbolo, Jan 28, 2017
    #64
  5. ievolve

    damian.dorbolo

    Joined:
    Jan 3, 2017
    Messages:
    8
    Likes Received:
    0
    Location:
    Melbourne
    sorry Jim

    i just read your post again and saw you said "(i.e. Not associated with any relay or dimmer channel)."

    i am running about 10 Groups that arent linked to a Relay or Dimmer and are used as dummy groups that then are linked to my Alarm Panel via a High Level Inteface, are you saying that if these groups arent linked to a Relay or dimmer it wont work?

    Damian
     
    damian.dorbolo, Jan 28, 2017
    #65
  6. ievolve

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    130
    Likes Received:
    0
    Hi Damien,

    I had a similar issue and it turned out I had accidentally put a leading zero on my single digit addresses. It seems like somehow you have an addressing issue.


    Glen
     
    GlenF, Jan 28, 2017
    #66
  7. ievolve

    tobex

    Joined:
    Nov 3, 2006
    Messages:
    728
    Likes Received:
    0
    Location:
    Sydney, Australia
    The QNAP is running 24x7 and it has a direct nose.js support. Are you saying it is not a direct path to installation on a QNAP server in terms of existing source code ?

    If I were to translate the project to allow QNAP + node.js + Apple home integration kit to work together, would that still be plausible or am I missing the whole point ?

    Creating a new platform such as the Pi is actually harder for me than using what is already on site.

    By the way, do I need a specific lan interface for this ?
     
    tobex, Jan 29, 2017
    #67
  8. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi tobex

    Right from the start you have to consider that neither Clipsal or Apple support or guarantee Homebridge or Homekit to C-Bus operation.
    Previous posts point out the difficulties of this being a marketable add on at this point in time.
    Aside from all that setting up Homebridge has been a great learning experience about Linux and C-Gate for me.
    Homekit interface is OK but what is really special for me is Siri voice control.
    If Clipsal were to build a Homekit bridge I'm sure the user interface could be a lot better.

    Raspberry pi hardware is an insignificant cost to try it out in my opinion.
    The time involved to get the raspberry pi running was significant for me to be sure.
    I'm too scared I might break my file server to try it on my QNAP even if I'm sure it is possible.
    You could Google Homebridge setup for QNAP but if you have to ask I'm pretty sure Anthony's instructions and the links he provided are about as easy to follow as you are going to find.

    Homebridge connection to C-Bus is done through C-Gate.
    Apple Homekit talks to Homebridge and Homebridge talks to C-Gate.
    I'm sure most people are using a CNI for the C-Gate connection to C-Bus.
    You need C-Gate running somewhere and the device running C-Gate needs to be able to connect to a C-Bus interface.
    You could run C-Gate program on the device running Homebridge or remote C-Gate on for instance a Windows PC which already has your project and C-Gate installed.
    I have C-Gate running on a Windows PC and Homebridge running on a raspberry pi.
    What I have done so far is by no means finished.
    Some people have C-Gate running on pi.
    Looks like some have C-Gate running on an Apple Mac.

    Regards
    Daryl
     
    Last edited by a moderator: Jan 29, 2017
    DarylMc, Jan 29, 2017
    #68
  9. ievolve

    JimNoble

    Joined:
    Jan 8, 2017
    Messages:
    5
    Likes Received:
    0
    Location:
    Hertfordshire, UK
    All I can tell you is what happened with my system. I don't have anything else interfaced to cbus, so can't compare behaviour directly.

    The groups that caused that behaviour for me weren't being actively used. If I had to guess, I'd say when it tries to get a status update on those groups it can't because there's no dimmer or relay to check the state of. But I don't know how it works under the hood, so that's purely conjecture.

    Have you looked in the cgate and home bridge log files? You may get a clue as to which group is causing the issue.

    If you can, eliminate the groups that aren't on supported control devices (dimmers, relays, etc) to see if that fixes it. Otherwise you may have to add groups one by one and see when it fails.

    Jim
     
    Last edited by a moderator: Jan 29, 2017
    JimNoble, Jan 29, 2017
    #69
  10. ievolve

    damian.dorbolo

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

    You were spot on the money, as a test i added these groups to a relay with spare channels, and all worked flawlessly after this.

    for me its quite simple as i only have 8 of these groups which i can hook up to a 8ch low voltage relay quite simply, but for my boss which im doing the same for will have dramas, as he has about 40 groups !

    what was quite interesting was initially, the groups actually worked the first time for a day, then once i rebooted the homebridge was when the issue started

    thanks gain for you assistance with this
     
    damian.dorbolo, Jan 30, 2017
    #70
  11. ievolve

    tobex

    Joined:
    Nov 3, 2006
    Messages:
    728
    Likes Received:
    0
    Location:
    Sydney, Australia
    Sounds like a summer project for me. I will probably recycle an old (very old) serial port interface and remove it from the white box. My goal is to have a bunch of boards in a black box to run all this. I think I have some old 1990s white apple logo stickers I can stick on my black box.
     
    tobex, Feb 3, 2017
    #71
  12. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi tobex
    I have a CBus RS232 interface connected to Moxa serial device server.
    Any CBus interface which works with C-Gate will be sufficient
     
    DarylMc, Feb 3, 2017
    #72
  13. ievolve

    damian.dorbolo

    Joined:
    Jan 3, 2017
    Messages:
    8
    Likes Received:
    0
    Location:
    Melbourne
    `updating

    Hi Guys

    sorry but what is the best way to update to the new version homebridge-cbus, or does it involve uninstalling and re-installing? or just running the install command npm install homebridge-cbus?


    thanks
     
    damian.dorbolo, Feb 21, 2017
    #73
  14. ievolve

    tobex

    Joined:
    Nov 3, 2006
    Messages:
    728
    Likes Received:
    0
    Location:
    Sydney, Australia
    Never liked Moxa. Though Lantronix DIN modules are crazy expensive. I would probably go serial to serial where possible.

    Anyone tried a Tinker Board from ASUS ?
     
    Last edited by a moderator: Feb 25, 2017
    tobex, Feb 25, 2017
    #74
  15. ievolve

    simonhac

    Joined:
    Jan 8, 2017
    Messages:
    51
    Likes Received:
    0
    Location:
    Melbourne
    v0.5.7 released

    just a quick heads-up that v0.5.7 has been released:

    • adds support for switch accessories including optional activeDuration property, allowing simulation of 'bell press'
    • adds Unified Accessory List export -- downloads tag database from C-Gate, greatly simplifying the creation of configuration files
    • adds support for `enabled` property on accessories
    • plus lots of work to increase robustness, correctness and logging.


    logging.png
     
    simonhac, Feb 25, 2017
    #75
  16. ievolve

    simont

    Joined:
    Jul 14, 2009
    Messages:
    11
    Likes Received:
    0
    Location:
    Herne Hill
    Hi Damian,

    You could also try using any spare blocks on PIRs and switches.

    I did a job that interfaced to the HVAC via a PCI. The HVAC configuration software couldn't see the virtual groups I had created and there weren't enough spare relay channels so I put them on the 5753L's and problem solved.

    Simon.
     
    simont, Mar 2, 2017
    #76
  17. ievolve

    simonhac

    Joined:
    Jan 8, 2017
    Messages:
    51
    Likes Received:
    0
    Location:
    Melbourne
    damian and simon, i've tested homebridge-cbus extensively and there shouldn't be any need for assigning accessories to physical relays or blocks -- virtual channels should work just fine, but if not, please let me know so i can investigate further.
     
    simonhac, Mar 8, 2017
    #77
  18. ievolve

    simonhac

    Joined:
    Jan 8, 2017
    Messages:
    51
    Likes Received:
    0
    Location:
    Melbourne
    homebridge-cbus v0.5.8 released

    just a heads up that homebridge-cbus v0.5.8 has been released.

    this version provides homekit fan accessory support for the `L5501RFCP Sweep Fan Controller`.

    note that neither anthony nor i have clipsal fan controllers, so although it has been extensively tested against 'virtual' fan devices, we have not tested it against a real L5501RFCP.

    please raise an issue ticket if you encounter any problems or have suggestions on how to make homebridge-cbus any better.
     
    Last edited by a moderator: Mar 8, 2017
    simonhac, Mar 8, 2017
    #78
  19. ievolve

    Moricild

    Joined:
    Aug 12, 2010
    Messages:
    6
    Likes Received:
    0
    Location:
    Melb
    Getting started

    Hi all

    I wonder whether you can help me overcome the following issue.

    I have successfully got a CGate server going and have installed homebridge and homebridge-cbus on my Mac.

    When I go to start homebridge, however, I get an error but I don't understand what it means or how to fix it.

    The output is as follows.

    Matthews-iMac:/ Matt$ homebridge
    [3/11/2017, 9:22:20 PM] Loaded plugin: homebridge-cbus
    [3/11/2017, 9:22:20 PM] Registering platform 'homebridge-cbus.CBus'
    [3/11/2017, 9:22:20 PM] ---
    [3/11/2017, 9:22:20 PM] Loaded config.json with 0 accessories and 1 platforms.
    [3/11/2017, 9:22:20 PM] ---
    [3/11/2017, 9:22:20 PM] Loading 1 platforms...
    [3/11/2017, 9:22:20 PM] [CBus] Initializing homebridge-cbus.CBus platform...
    cbus:client Opening connection to C-Gate? +0ms
    [3/11/2017, 9:22:20 PM] Loading 0 accessories...
    cbus:client C-Gate connection open. +4ms
    cbus:client Connected to C-Gate server v2.10.6 (build 3145), syntax v1.0 +2ms
    cbus:client Configuring C-Gate session? +0ms
    cbus:client C-Gate session estabished and configured at 20023:127.0.0.1 +1ms
    cbus:platform Loading the accessories list? +0ms
    /usr/local/lib/node_modules/homebridge-cbus/index.js:186
    for (let config of this.config.accessories) {
    ^

    TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
    at CBusPlatform._createAccessories (/usr/local/lib/node_modules/homebridge-cbus/index.js:186:30)
    at CBusPlatform.<anonymous> (/usr/local/lib/node_modules/homebridge-cbus/index.js:166:28)
    at Carrier.<anonymous> (/usr/local/lib/node_modules/homebridge-cbus/lib/cgate-client.js:195:6)
    at emitOne (events.js:96:13)
    at Carrier.emit (events.js:188:7)
    at /usr/local/lib/node_modules/homebridge-cbus/node_modules/carrier/lib/carrier.js:24:12
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    Matthews-iMac:/ Matt$ ​

    My config.json is as follows:

    {
    "bridge": {
    "name": "My house",
    "username": "CC:22:3D:E3:CE:30",
    "port": 51826,
    "pin": "031-45-154"
    },

    "description": "HomeKit API config file.",


    "platforms": [
    {
    "platform": "homebridge-cbus.CBus",
    "name": "CBus",
    "client_ip_address": "127.0.0.1",
    "client_controlport": 20023,
    "client_cbusname": "SWINN",
    "client_network": 254,
    "client_application": 56,
    "client_debug": true,

    "accesories": [
    { "type": "light", "network": "254", "application": "56", "id": 53, "name": "Study" }
    ]

    }
    ],
    "accessories": [ ]
    }


    Any assistance would be much appreciated.

    Thanks and best wishes

    Matt
     
    Moricild, Mar 11, 2017
    #79
  20. ievolve

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    I'm not sure if this a version difference but your config.json looks a little different to mine.

    { "type": "dimmer", "id": "3", "name": "OFFICE DOWNLIGHTS" },
    { "type": "light", "id": "10", "name": "OFFICE AC" },
    { "type": "light", "id": "14", "name": "OFFICE OYSTER LIGHTS" },
    { "type": "light", "id": "23", "name": "SHED LIGHT" },
    { "type": "light", "id": "5", "name": "BEDROOM AC" },
    { "type": "dimmer", "id": "0", "name": "BEDROOM LIGHT" },
    { "type": "light", "id": "8", "name": "BEDROOM SENSOR" },
    { "type": "light", "id": "2", "name": "OFFICE SENSOR" },
    { "type": "light", "id": "4", "name": "OFFICE EXHAUST" }
     
    DarylMc, Mar 11, 2017
    #80
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.