Homebridge for HomeKit hack

Posted on
Wed Oct 21, 2015 11:25 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Homebridge for HomeKit hack

The RESTful API, unfortunately, predates the IOM (introduced in Indigo 5 and what allows this flexibility) and as such doesn't have access to properties like that. So the property manager route wouldn't work. It also has no searching/filtering mechanism.

It does, however, respect the remote display flag, so using that flag will control what's returned in the API as well as what's shown in Indigo Touch and other clients (I think DomoPad respects it as well). While not specific, it should help filter out unwanted devices.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Oct 21, 2015 12:45 pm
rycardo offline
Posts: 53
Joined: Jul 10, 2015

Re: Homebridge for HomeKit hack

It does, however, respect the remote display flag, so using that flag will control what's returned in the API...


I like this idea, I already use the remote display tick box, so I wouldn't need to do anything extra, whether it's maintaining array(s) or adjusting the names using dgarozzo's idea.

Jay, should devices with Remote Display unticked be returned by the RESTFUL API? Some of mine are, but not others.

Posted on
Wed Oct 21, 2015 1:57 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Homebridge for HomeKit hack

No - if the remote display is unchecked they shouldn't be returned by the RESTful API. If you find some examples of devices that are, let us know the details.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Oct 21, 2015 6:53 pm
dgarozzo offline
Posts: 132
Joined: Jan 08, 2009

Re: Homebridge for HomeKit hack

jay (support) wrote:
No - if the remote display is unchecked they shouldn't be returned by the RESTful API. If you find some examples of devices that are, let us know the details.


Being that the unchecked devices aren't returned by the api, no changes would need to be made. I do see a "displayInUI" boolean flag in the response. Are you saying that value will always be 'true'? If so, kind of a pointless flag.

Posted on
Wed Oct 21, 2015 10:49 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Homebridge for HomeKit hack

jay (support) wrote:
No - if the remote display is unchecked they shouldn't be returned by the RESTful API. If you find some examples of devices that are, let us know the details.


Correct. The Homebridge Indigo platform module uses the Indigo RESTful API, so it only knows about devices with remote display checked. So you can exclude devices from Homebridge by unchecking Remote Display for the ones you want to exclude.

-Mike

Posted on
Fri Oct 23, 2015 5:57 pm
rycardo offline
Posts: 53
Joined: Jul 10, 2015

Re: Homebridge for HomeKit hack

Hey Jay,

I just did a quick check, and the RESTFUL API is returning devices that have the Remote Display unticked.
In the model column they are identified as:

    Remote Button - SlimFire KR19A (these are the EZX10RF buttons)
    -- undefined -- (these are the Beacon Plugin devices)
    RemoteLinc 2 8-Scene (these are Insteon Mini-Remotes with 8 buttons)
    EZX10RF Wireless Sensor Receiver (The EZX10RF device)


Whilst the Beacon plugin makes it through even though unticked, my other plugins do not.

If you need more information, or want a devices RESTFUL file or more info,let me know.

Rycardo

Posted on
Sat Oct 24, 2015 5:54 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Homebridge for HomeKit hack

Hello geniuses of the home bridge integration!

I've been able to spend some time working on this and i've found two areas that might need a little TLC. Firstly it'd seem that if you've got any undefined Z-Wave devices (ala place holders) they will stop the HomeBridge from being added to HomeKit. This also seems to apply even if they're set to not be remote display (they show up in the list of found devices when home bridge starts). Deleting them and clearing the persistent items folder resolves the issue.

Secondly, and i'm not sure if this is home bridge or the plugin i use for heating control (SmartDevices). If i set it to show it'll appear in HomeKit, with a target temp of whatever it was set to on Indigo (which is in celsius), however the 'Displays Units' will be set to Fahrenheit. If i tell home kit to set the temperature to say 25ºC that'll send a command to indigo to set the target temp in fahrenheit. Unfortunately i don't have any 'real' heating devices to test it with to identify if it's a HomeBridge issue or a SmartDevices plugin issue (which'd be harder to sort if it is as the developer seems to have disappeared :( )

Computer says no.

Posted on
Sat Oct 24, 2015 9:14 am
rehafer online
Posts: 279
Joined: Feb 08, 2013

Re: Homebridge for HomeKit hack

I have a Z-wave placeholder that may be causing my problems as well. Can someone point me to the persistent items folder so I can clean it and try again?



Sent from my iPhone using Tapatalk

Posted on
Sat Oct 24, 2015 9:59 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Homebridge for HomeKit hack

rycardo wrote:
    Remote Button - SlimFire KR19A (these are the EZX10RF buttons)
    -- undefined -- (these are the Beacon Plugin devices)
    RemoteLinc 2 8-Scene (these are Insteon Mini-Remotes with 8 buttons)
    EZX10RF Wireless Sensor Receiver (The EZX10RF device)


I have some theories: the undefined device probably still has it's configured flag set to false and the default value of "true" for display in UI. In the UI, we understand that an unconfigured device is by default not capable of being enabled or displayed remotely so we base our logic partly on that. However, the RESTful API doesn't know about that flag since it predates it and it's letting those through.

The RemoteLinc is a pure controller (it has no display state nor other responding functionality) and we filter those out automatically in Indigo Touch - but clearly we're not filtering them out of the RESTful call.

I believe you'll be able to filter out these devices using a combination of their properties. I don't believe any device that doesn't provide a standard action (i.e. sensors, custom devices, etc) would be useful to have in HB, right? If that's true, then one of the following properties should be true or the device can be ignored:

Code: Select all
   "typeSupportsDim": false,
   "typeSupportsHVAC": false,
   "typeSupportsOnOff": false,
   "typeSupportsSpeedControl": false,
   "typeSupportsSprinkler": false,


If you only add devices that have one of those flags set, then I think you're good to go. Further, however, I'm not sure that HK knows anything about sprinklers so I'm not sure letting those through would be useful. I think HK knows about thermostats maybe. Speed control devices are also probably not used in HK. The FanLinc does respond to on/off so it would get picked up that way.

If you want to let through "official" sensor devices, filter on "typeSupportsSensorValue". That won't let through custom plugin devices (like weather stations) for instance (unless they've specified themselves as sensor devices, which most don't). I don't think HK can use generic sensors for anything (yet), or if it does how you'd map the Indigo sensor value to the value expected by HK. That'll be an exercise for you... ;)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Oct 24, 2015 11:47 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Homebridge for HomeKit hack

The more I think about it the more I think we need a mini indigo plugin to manage how HomeBridge sees devices, etc. Something that can define what devices it can see and not see, define what kind they are (as in Open garage door rather than turn on garage door) and also define what that devices name is in HomeKit. Who's up to the challenge? ;)


Sent from my iPad using Tapatalk

Computer says no.

Posted on
Sat Oct 24, 2015 12:36 pm
miked0809 offline
Posts: 8
Joined: May 16, 2014

Re: Homebridge for HomeKit hack

I've been able to get the Homebridge server working with a Harmony Hub, but when I add Indigo into the Homebridge config.json file, I am not able to add Homebridge as an accessory to my Homekit (using MyTouchHome) on my iPhone. After entering the PIN on my phone, I get "Adding Failed - Incorrect accessory setup code". I thought maybe it was because one of my Indigo devices was causing a problem, so I disabled remote display for all but one, but I still cannot get it to work.

Here is the output when I startup my Homebridge server:


Sat, 24 Oct 2015 18:20:26 GMT Accessory [Homebridge] Creating new AccessoryInfo for our HAP server
Sat, 24 Oct 2015 18:20:26 GMT Accessory [Homebridge] Creating new IdentifierCache
Sat, 24 Oct 2015 18:20:26 GMT EventedHTTPServer Server listening on port 51826
ad more about it here:
https://github.com/nfarina/homebridge/w ... tion-Guide
_____________________________________________________________________

Loading 1 platforms...
[Indigo] Initializing Indigo platform...
[Indigo] Discovering Indigo Devices.
Loading 0 accessories...
[Indigo] Discovered LampLinc: Den Bookshelves
[Indigo] Initializing platform accessory 'Den Bookshelves'...
[Indigo] Loaded services for Den Bookshelves
Scan this code with your HomeKit App on your iOS device:
^[[30;47m ^[[0m
^[[30;47m ┌────────────┐ ^[[0m
^[[30;47m │ 031-45-154 │ ^[[0m
^[[30;47m └────────────┘ ^[[0m
^[[30;47m ^[[0m


And here is my config.json:
Code: Select all
{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "123-45-678"
    },

    "description": "This is an example configuration file with all supported devices. You can use this as a template for creating your own configuration file containing devices you actually own.",

    "platforms": [
      {
          "platform": "Indigo",
          "name": "Indigo",
          "host": "imac.local",
          "port": "8176",
          "username": "xxxxxxx",
          "password": "xxxxxxxx"
      }
    ],

    "accessories": [

    ]
}


As soon as I remove the Indigo settings in config.json (and add back in Harmony settings), all is good again.

Any ideas?

Thanks,
MikeD

Posted on
Sat Oct 24, 2015 2:51 pm
chrismenke offline
Posts: 9
Joined: Dec 27, 2013

Re: Homebridge for HomeKit hack

Can HomeBridge only connect with one iOS device? My wife's phone is not seeing the accessory...I can try to spin up multiple process if so...

Posted on
Sat Oct 24, 2015 3:02 pm
miked0809 offline
Posts: 8
Joined: May 16, 2014

Re: Homebridge for HomeKit hack

I got my "Adding Failed..." problem solved... I had changed the PIN in config.json to something other than the default, and even though I was typing it in correctly, it wouldn't accept the non-default code. Once I changed it back to the default in config.json and restarted, I was able to get my Indigo configuration working <shrug>.

Can HomeBridge only connect with one iOS device? My wife's phone is not seeing the accessory...I can try to spin up multiple process if so...

You have to go into HomeKit (Settings --> HomeKit) on your phone and share control of your HomeKit with your wife's iCloud account. Her phone doesn't need the MyTouchHome app - or any other HomeKit apps installed - for it to work on hers through Siri.

Posted on
Tue Oct 27, 2015 12:43 pm
rehafer online
Posts: 279
Joined: Feb 08, 2013

Re: Homebridge for HomeKit hack

durosity wrote:
The more I think about it the more I think we need a mini indigo plugin to manage how HomeBridge sees devices, etc. Something that can define what devices it can see and not see, define what kind they are (as in Open garage door rather than turn on garage door) and also define what that devices name is in HomeKit. Who's up to the challenge? ;)


Sent from my iPad using Tapatalk

I would agree, if only for troubleshhoting. I realized that I'm using three different protocals and a dozen different plugin-ins; any one of which, or one device therein, could be causing my problems. I'm looking to set aside a block of time to check them one-by-one.

Posted on
Wed Oct 28, 2015 5:43 pm
rehafer online
Posts: 279
Joined: Feb 08, 2013

Re: Homebridge for HomeKit hack

I must confess to a "derp" moment; in hopes of saving others. I sat down to begin removing random devices, and while scrolling through an X10 address caught my eye. I still have some 10 year old modules still in the system. Removing them solved my pairing problem.
Be forewarned by my tale of derp.



Sent from my iPhone using Tapatalk

Page 7 of 10 1 ... 4, 5, 6, 7, 8, 9, 10

Who is online

Users browsing this forum: No registered users and 11 guests

cron