Jump to content

HomeKit Support via HomeBridge - Siri Voice Control


rayzor

Recommended Posts

  • 2 months later...
Posted

So what would it take to get this integrated in the ISY? 

 

Should we do a gofundme or something? ISY needs homekit and Alexa support and it should have been the first player on the market to offer it. 

Posted

cyberk,

 

We have already submitted our application to Amazon for Echo integration. Waiting for certification.

 

We have no plans on supporting HomeKit simply because we will be forced to have new hardware which will cost $$$$$ while not knowing what the ROI would be for things that can already be done without it.

 

With kind regards,

Michel

Posted

Wonder if something similar to what's beeing done for Homeseer could be implemented with the ISY

 

And I know that there is a thread fairly similar here in regards to Homebridge and Siri integration.

But in light of the new node.js that was just created for the ISY, in conjunction with Homebridge and possibly Polyglot (which I am not sure of it's capabilities)

I wonder if something could be crafted to give us the next closest thing to HomeKit.

 

If you want to see what users from the Homeseer forum are doing, Just read posts from user Stipus here:

http://forums.homeseer.com/showthread.php?t=177016&highlight=homebridge

 

Thanks

Bernie

Posted

My thoughts exactly, which is why I provided an updated platform to Homebridge to support ISY (it uses my node.js library isy-js).

 

It improves on the existing ISY support by adding:

  • More devices. 
  • Elk alarm panels and elk sensors.
  • Live updating of device status.
  • Ability to screen out devices from HomeKit. 

If you have a Raspberry Pi you can follow these instructions to get Homebridge up and running:

https://github.com/cflurin/homebridge-shims/wiki/Minimalist-Homebridge-on-a-Raspberry-Pi

 

You will need to take these additional steps / change the above steps as follows:

  1. Add the isy-js dependencies to your package.json and then do an npm install. These additional dependencies need to be added because HomeBridge does not list all dependencies for all their platforms:
    1. faye-websocket
    2. sax
    3. restler
    4. isy-js
  2. ​Configure the isy-js platform by following the instructions in the isy-js platform documentation here

Run homebridge and add the homebridge to your HomeKit network and viola!

 

P.S. You can also configure homebridge to run in the background and automatically at startup on your Raspberry Pi following the instructions here

  • Like 1
Posted

I've got the bridge up and working for the most part.  Thanks for this!  I've noticed a couple of bugs.  I have several devices with a tilde (~) in the name.  This is so that they are hidden from the ISY webpage and from Mobilync.  The iPhone doesn't seem to discover anything if any devices have a tilde - at least HMCatalog won't.  I can work around this by disabling these hidden devices while discovering.  The second bug that I'm encountering is that the bridge crashes anytime I try to query a device through Siri ("Hey Siri, are the kitchen lights on?"), or through HMCatalog.  The crash is "TypeError: Object #<Object> has no method 'query'"  Does the query function work for anyone else?

Posted

In reviewing the instructions for this, it appears the Harmony hub is NOT supported.  Is that correct?

 

-Xathros

Posted

@SCOCO

 

Good catch on the query functionality. I'll do an update to support this. Will take me a few days likely. 

 

On the hidden devices you could hide all devices with a ~ in them by adding the following entry to the isy-js config section..

 

                { "nameContains": "~", "lastAddressDigit": "", "address": ""}

 

This will cause all devices which have a tilde in them somewhere to be ignored automatically -- no need to disable. 

Posted

@Xathros 

 

The software being discussed in this has been extended to support ISY but also supports a bunch of other types of home automation systems. Unfortunately, looking at the platform list here it doesn't look like Harmony Hub is one of the supported platforms.

 

You could always contribute a platform module to support it if there is an API on the hub. A quick google search shows that there is a node.js library for interfacing with the harmony hub here: https://github.com/swissmanu/harmonyhubjs-client. No idea if it works -- but if it does someone could author a homebridge platform to support it. 

 

 

Hope this helps. 

Posted

@SCOCO - I tested with my home setup this morning and the query functionality is working for me. I tested your exact query above (which happens to work in my house as well.. :)) and it returned the state.

 

A few questions for you -- 1) What version of iOS are you using, 2) Are you up to date on Homebridge? (i.e. how long ago did you clone it from github?).

Posted (edited)

Heads-up. Homebridge just completely refactored how it's plug-ins work. The good news is it's easier to get it running.

 

If you have node installed on the system you just need to:

  1. npm install -g homebridge
  2. npm install -g homebridge-isy-js
  3. Run `homebridge`. It will error out asking you for a config.
  4. Put a config.json file in the ~/.homebridge directory.
  5. Run `homebridge`.
Edited by rodtoll3
  • Like 1
Posted

I'm having issues getting Homebridge working. Receiving the following ...

 

Loading 1 platforms...

[Wink] Initializing Wink platform...

Loading legacy platform Wink

[Wink] Fetching Wink devices.

Loading 0 accessories...

response in http: {"data":{"error":"invalid_grant","error_description":"This client is not permitted to use the password grant type"},"errors":["invalid_grant: This client is not permitted to use the password grant type"],"pagination":{},"error":"invalid_grant","error_description":"This client is not permitted to use the password grant type"}

response in http:  

SyntaxError: Unexpected end of input

    at Object.parse (native)

    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-legacy-plugins/node_modules/wink-js/index.js:62:19)

    at emitNone (events.js:72:20)

    at IncomingMessage.emit (events.js:166:7)

    at endReadableNT (_stream_readable.js:905:12)

    at doNTCallback2 (node.js:450:9)

    at process._tickCallback (node.js:364:17)

raw message  

/usr/local/lib/node_modules/homebridge-legacy-plugins/platforms/Wink.js:87

          for (var i=0; i<devices.data.length; i++){

                                 ^

 

TypeError: Cannot read property 'data' of undefined

    at /usr/local/lib/node_modules/homebridge-legacy-plugins/platforms/Wink.js:87:34

    at /usr/local/lib/node_modules/homebridge-legacy-plugins/node_modules/wink-js/index.js:198:7

    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-legacy-plugins/node_modules/wink-js/index.js:69:7)

    at emitNone (events.js:72:20)

    at IncomingMessage.emit (events.js:166:7)

    at endReadableNT (_stream_readable.js:905:12)

    at doNTCallback2 (node.js:450:9)

    at process._tickCallback (node.js:364:17)

 

Here's what my config.json file looks like ...

 

{

    "bridge": {

        "name": "Homebridge",

        "username": "CC:22:3D:E3:CE:30",

        "port": 51826,

        "pin": "031-45-154"

    },

 

    "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": "Wink",

            "name": "Wink",

            "client_id": "YOUR_WINK_API_CLIENT_ID",

            "client_secret": "YOUR_WINK_API_CLIENT_SECRET",

            "username": "your@email.com",

            "password": "WINK_PASSWORD"

        }

    ],

 

    "accessories": [

    ]

}

 

 

I'm using all the default values from the config-sample.son file. Is that right?

 

Any help would be appreciated. 

  • 2 weeks later...
Posted

Hi everyone,

I have a ISY994i that I am using as a controller for three LampLincs and about a dozen SwitchLincs. I am able to control each of the devices individually as well as in groups, using scenes, via the ISY’s built-in web-based (Java) interface. I also use Mobilinc HD on my iPad and iPhone to control the devices and scenes.

I’ve just installed the latest version of HomeBridge on a Raspberry Pi 2 B along with homebridge-isy-js. When I start the HomeBridge server, it initializes the ISY platform as well as the LampLincs, but does not seem to pick up on the SwitchLincs. Am I missing something?
 

pi@raspberrypi ~ $ tail -f /var/log/homebridge.log
[ISY994i] Initializing platform accessory 'Downstairs Hall Lamp'...
[ISY994i] Initializing platform accessory 'Study Lamp'...
[ISY994i] Initializing platform accessory 'Upstairs Hall Lamp'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 123-45-678 │     
    └────────────┘    
                       
Homebridge is running on port 51826.

Any guidance/advice would be greatly appreciated!
 

Posted

Since the ISY runs linux, any chance of adding node.js functionality to the native OS so those of us willing to experiment could?

ISY doesn't run Linux....
Posted

Like markinpgh, I have my homebridge up and running.  I have close to 40 devices and only 5 show up.  Not even all my lamplincs show up.

 

Any thoughts?

Loaded plugin: homebridge-isy-js
Registering platform 'homebridge-isy-js.isy-js'
---
Loaded config.json with 0 accessories and 1 platforms.
---
Loading 1 platforms...
[isy99i] Initializing isy-js platform...
[isy99i] Initializing platform accessory 'Driveway Alert Sensor'...
[isy99i] Initializing platform accessory 'Garage Door Open.Close'...
[isy99i] Initializing platform accessory 'Great Room Table Lamp (A)'...
[isy99i] Initializing platform accessory 'Great Room Torchere Lamp'...
[isy99i] Initializing platform accessory 'Garage Floor Fan'...
[isy99i] Initializing platform accessory 'Sitting Room Torchere Lamp'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
 

Posted

For the benefit of others,

 

I got all my devices to show up by looking at the nodes on the ISY at http://<isy ip address>/rest/nodes, then editing the isydevicetypes.json file located in /usr/local/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isydevicetypes.json to add each missing node.

 

The type tag in the nods list has to match a tag in the isydevicetypes.json file, those missing nodes appear to be easily added by copying a like device and adjusting the type tag in the json file.

 

I have more to learn about the valid Homekit types in order to get things like leak sensors and motion sensors full operational, but now that I have the basics of how the devices are identified, I'm on my way.

  • Like 1
Posted

DavidG's suggestion worked for me. Homebridge is now able to locate all of the SwitchLincs and LampLincs via the ISY. Thanks so much!!!

 

Does anyone know if it is possible to get Homebridge to recognize ISY scenes?

  • 2 weeks later...
Posted

Does anyone know if it is possible to get Homebridge to recognize ISY scenes?

This is very important to me.  Using scenes is the only way to keep all the keypad lights in sync with each other.

Posted

I haven't seen scenes, homebridge basically ports the devices over.  Then inside the homekit compatible app on your iDevice you create rooms and zones to group the devices.  Homekit is smart enough to then make logical groups.  For example, create a room called great room, then put three lights in it.  You can tell Siri to turn on the great room lights and they all come on, likewise, Siri, turn off the great room lights works.  Turn on the indoor lights also works for all rooms in the indoor zone.

 

You can also setup scenes in the iDevice app.  The examples in the Eve app are Good Morning, Good night, I'm home and I'm leaving.

 

I found I needed the Insteon+ app to initially setup my Homebridge device, then I use Eve and iDevices to control and manage them.

  • 1 month later...
Posted (edited)

This is very important to me.  Using scenes is the only way to keep all the keypad lights in sync with each other.

I could get scenes working in HomeBridge but were not very flexible when say setting the brightness of a light in the scene from a scene off state. The keypadlinc would not update.

 

This bugs the hell out of me but I was determined to come up with a solution.

 

As a workaround I am making programs on the ISY which keep everything in sync.

SwitchLincs are easy... example

Main Hallway - [ID 0035][Parent 0033]

If
        Status  'Main Hallway' is On
 
Then
        Set 'Main Hallway Slave' On
 
Else
        Set 'Main Hallway Slave' Off
 

Keypadlincs are trickier. They CANNOT have their buttons turned on/off via normal Insteon commands. But the good news is you can call the scene again and it will sort out the lights. The only issue is IF there is a dimmer in the scene and you change the brightness of the device manually then the program will detect and running the scene will revert back to the original on level it was set at.

Solution for Keypadlincs is to just add the one key into a scene by itself. This example is of a key that controls a switchlinc dimmer for kitchen chandelier. Normally with ISY it works good but now I can use HomeKit and turn on the kitchen chandelier... ISY detects and runs the scene on or off based on the chandelier setting:

Kitchen Chandelier - [ID 0034][Parent 0033]

If
        Status  'Kitchen Chandelier' >= 1%
 
Then
        Set Scene 'KPL Sync Scenes / Kitchen KPL Chandelier Key' On
 
Else
        Set Scene 'KPL Sync Scenes / Kitchen KPL Chandelier Key' Off
 

The only device in that scene is the Kitchen KPL Key which in my case is KLA

Anther button I have on my keypadlinc is Kitchen POTS which is a switchlinc dimmer so I will have to make another scene and program to set those.

 

 

Note that you can also do similar thing in HomeKit using triggers and scenes and I successfully did this using switchlinc relays in my hallway but could not do the same for keypadlincs because those require scenes in ISY. Therefore it is best to let ISY handle this all.

 

I am now going through and creating programs and tweaking it all. When done I think I can ignore certain devices to import into HomeKit (like the slaves) to avoid confusion.

Edited by brians
Posted (edited)

I haven't seen scenes, homebridge basically ports the devices over.  Then inside the homekit compatible app on your iDevice you create rooms and zones to group the devices.  Homekit is smart enough to then make logical groups.  For example, create a room called great room, then put three lights in it.  You can tell Siri to turn on the great room lights and they all come on, likewise, Siri, turn off the great room lights works.  Turn on the indoor lights also works for all rooms in the indoor zone.

 

You can also setup scenes in the iDevice app.  The examples in the Eve app are Good Morning, Good night, I'm home and I'm leaving.

 

I found I needed the Insteon+ app to initially setup my Homebridge device, then I use Eve and iDevices to control and manage them.

I was able to add it using Eve and didn't need Insteon+ app

 

Also if you remove the home bridge from you Home in IOS, it doesn't seem to detect again and I found solution is to delete the file in ~/.homebridge/persist/

Then it works

I also updated from node 4.0.0 to 5.4.0. I tried doing a npm rebuild but didn't seem to work. I uninstalled, updated node, then reinstalled home bridge and hombridge-isy and my home kit still worked from my iPhone. This is good so we should be able to upgrade easily without reconfiguring much.

 

If I rename a device on ISY then it doesn't update in HomeKit though, even restarting HomeBridge it doesn't. Anyone know of a solution? - EDIT... I notice if I remove or add a device it reflects the change in HomeBridge. Therefore I can just edit the config.json file temporarily to ignore the device, run hombridge, exit, remove the ignore and re-run and it adds in the new name. For a quick solution in the IOS app Home (for testing different names with Siri), just add the service name of the device (this is the one that it uses for Siri) - other apps like iDevices or Eve can't access this in HomeKit or get it backwards.

Edited by brians
  • 2 months later...
Posted

Trying to get this setup and running and I keep getting this error.

[root@automation ~]# homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
[Wed Mar 16 2016 13:45:21 GMT-0400 (EDT)] Loaded plugin: homebridge-isy-js
[Wed Mar 16 2016 13:45:21 GMT-0400 (EDT)] Registering platform 'homebridge-isy-js.isy-js'
[Wed Mar 16 2016 13:45:21 GMT-0400 (EDT)] ---
[Wed Mar 16 2016 13:45:21 GMT-0400 (EDT)] Loaded config.json with 0 accessories and 1 platforms.
[Wed Mar 16 2016 13:45:21 GMT-0400 (EDT)] ---
[Wed Mar 16 2016 13:45:21 GMT-0400 (EDT)] Loading 1 platforms...
[Wed Mar 16 2016 13:45:21 GMT-0400 (EDT)] [isy-js] Initializing isy-js platform...
2016-2-3#13:45:21- Device: ZW 002 Binary Sensor type: 4.32.1.0 is not specifically supported, returning generic device object.
2016-2-3#13:45:21- Device: ZW 002 Multilevel Sensor type: 4.32.1.0 is not specifically supported, returning generic device object.
2016-2-3#13:45:21- Device: ZW 002 Energy Meter type: 4.32.1.0 is not specifically supported, returning generic device object.
2016-2-3#13:45:21- Device: ZW 003 Repeater type: 4.15.1.0 is not specifically supported, returning generic device object.
2016-2-3#13:45:21- Device: ZW 004 Repeater type: 4.15.1.0 is not specifically supported, returning generic device object.
2016-2-3#13:45:21- Device: ZW 005 Binary Sensor type: 4.32.1.0 is not specifically supported, returning generic device object.
2016-2-3#13:45:21- Device: ZW 005 Multilevel Sensor type: 4.32.1.0 is not specifically supported, returning generic device object.
2016-2-3#13:45:21- Device: Main Floor Thermostat type: 1.1.0.0 is not specifically supported, returning generic device object.
2016-2-3#13:45:21- Device: Upstairs Thermostat type: 1.1.0.0 is not specifically supported, returning generic device object.

/usr/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isy.js:404
        if (response instanceof Error || response.statusCode != 200) {
                                                 ^
TypeError: Cannot read property 'statusCode' of null
    at Request.<anonymous> (/usr/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isy.js:404:50)
    at Request.emit (events.js:98:17)
    at Request.mixin._fireError (/usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:207:10)
    at ClientRequest.<anonymous> (/usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:246:14)
    at ClientRequest.emit (events.js:95:17)
    at Socket.socketOnData (http.j

My config file looks likes this.. 

Any help...

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

    "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",

    "platforms": [
       {
            "platform": "isy-js",
            "name": "isy-js",
            "host": "192.168.X.X",
            "port": "80",
            "username": "admin",
            "password": "secretpasswordshhhhdonttell",
            "elkEnabled": false,
            "useHttps": false,
            "debugLoggingEnabled": true,
            "includeAllScenes": true
        }
    ]
}
Guest
This topic is now closed to further replies.

×
×
  • Create New...