Jump to content
C4 Forums | Control4

Homebridge Driver for HomeKit Support?


Joshua Pressnell

Recommended Posts

On 12/8/2016 at 10:56 AM, Joshua Pressnell said:

Ok... one more update.  For folks following along, an updated copy of the driver is here -> https://dl.dropboxusercontent.com/u/13324724/homebridge.c4z

I'm updating the "current driver version" value on my server this afternoon, so any existing installs of older driver versions will stop functioning.  Please update your projects to use the updated copy at the link here.

Also, I've updated the homebridge control4 plugin.  On your homebridge servers please "sudo npm install -g homebridge-control4" and make sure your installed version is 1.0.12.

This update includes support for Door Locks.  Also, I expanded support to attempt to find lights and dimmers by generic proxy, so that if they're not picked up by the specific driver names, they'll still be found and output in the config.  Devices identified this way will be classified as lights (not dimmers), so if you have a dimmer that's picked up and mis-identified, you'll need to manually modify the config.json to account for it.

Any questions, let me know.  Cheers.

Hwy there,

 

I have had something similar running in my house for over a year.

How is this different? How hard would it be to take down what I have a and set this up?

this is the link. I've modded it, but this is basically it

https://c4drivers.wordpress.com/2015/10/28/homekit-for-control4/

 

 

Link to comment
Share on other sites


On 1/10/2017 at 9:03 AM, Joshua Pressnell said:

OK folks.  The latest copy of the driver is available here -> https://dl.dropboxusercontent.com/u/13324724/homebridge.c4z

This version plays nicely with my soon-to-be-released hardware appliance, and also extends the expiration date to 02/15/17.  At that point, my hardware should be finalized for production release, and I should have the production driver available on HouseLogix.

How much will it be? Will there an an instructional site?

Link to comment
Share on other sites

22 minutes ago, schrady said:

Hwy there,

 

I have had something similar running in my house for over a year.

How is this different? How hard would it be to take down what I have a and set this up?

this is the link. I've modded it, but this is basically it

https://c4drivers.wordpress.com/2015/10/28/homekit-for-control4/

 

 

Actually, I based my early efforts off of that post exactly. I started there and deemed it not sufficient enough for my purposes. 

First, with your approach there's no status feedback into HomeKit. If someone turns on the light at the switch or via C4, HomeKit will still list it as off. One of the big drivers for me to get home automation and smart switches in the first place was to *avoid* traditional 3 and 4 way switch setups where the state at any switch was random, and needing to turn on the switch in HomeKit just to turn it off again didn't make sense either. 

So then I updated the WebEvents driver to pull status back. That ended up being a nightmare, due to the need to asynchronously poll status, and I generally worked out that meant I could only have a single driver per device. So I had setup 50 copies of my "WebEventsStatus" driver, all on unique ports, and started tinkering with programming and bindings in each copy and copying those urls into the homebridge config. Nope. Not sustainable. And I'm not going to ask some user to pay for a dealer's time to do that setup, and no "regular user" will follow it enough to get it all right. 

So I worked out how to get everything working in one single driver instance with no programming required. My driver only requires a few setup properties (http port, etc) and then there's no further config/programming necessary in the driver or Control4. It also supports two way status back into HomeKit. 

In addition to that, I wrote my own homebridge plugin that directly interfaces with the driver. This means all of the hardware actually shows up the way it's supposed to in HomeKit. Garage Doors look like Garage Doors. You can see their status. You can open and close them without scenes. You can see your ceiling fan states, and control fan speed controllers and dimmer levels. 

And since I control the driver and the homebridge plugin, I'll also eventually be adding more security, via encrypted protocol signing. The protocol I'm using is already pretty cryptic, so it would be difficult for a snooper to do much, but it'll be better soon. 

Finally... I started this as a personal project, but I saw enough interest that I made the whole thing consumer focused. My web configuration portal doesn't require any Linux knowledge or JSON understanding. Login, press the "import config" button, then press "restart homebridge" button. That's all there is to it. But there are some advanced features that let you edit the raw config file if you want. My C4 driver requires no programming at all after the initial installation. If new devices are added in C4, just go to the web portal, click "import" and restart homebridge again. The device will then just appear in HomeKit. 

Last, but not least, I think you'll find transition to my product to be very easy. I'd make a backup of your project, just to be safe. Then you delete any copies of WebEvents you have (unless you're using it for non-HomeKit things too) and install my driver. I can provide you a Raspberry Pi image of my appliance setup for a quick clean install, if you want it, but you sound like you're technically savvy enough to not need it. Instead, you can just install my homebridge-Control4 plugin from npm yourself, and use the options in the C4 driver to print the proper config.json updates to the LUA console. Drop those into your homebridge setup (and remove the old HTTP devices) and you should be good to go, but you'll have to re-move all the devices into their proper rooms in HomeKit. 

Link to comment
Share on other sites

42 minutes ago, schrady said:

How much will it be? Will there an an instructional site?

Based on the link you posted, you probably don't need an instructional site. All the details you might need for setup are in the driver documentation once you install the driver. 

My overall concept is to support this as a "consumer-level" drop-in router, so I have an extensive user's guide for using my pre-configured bridge and web portal, and there's not a whole lot to configure yourself.

The pre-configured bridge will be $225 MSRP. The driver will be $175 MSRP. I will support dealers/tech folks who want to use their own hardware with my pre-configured pi image or docker container (web configuration portal, etc) for $50 per device. In your case, you already have a full bridge setup and knowledge of how to configure it and my homebridge-Control4 plugin is free on NPM, so you can probably get yourself fully setup on that side at no cost. Right now, the beta version of my driver (version and expiry locked) is free to try out and play with. Just let me know what you think of it. 

Link to comment
Share on other sites

Based on the link you posted, you probably don't need an instructional site. All the details you might need for setup are in the driver documentation once you install the driver. 

My overall concept is to support this as a "consumer-level" drop-in router, so I have an extensive user's guide for using my pre-configured bridge and web portal, and there's not a whole lot to configure yourself.

The pre-configured bridge will be $225 MSRP. The driver will be $175 MSRP. I will support dealers/tech folks who want to use their own hardware with my pre-configured pi image or docker container (web configuration portal, etc) for $50 per device. In your case, you already have a full bridge setup and knowledge of how to configure it and my homebridge-Control4 plugin is free on NPM, so you can probably get yourself fully setup on that side at no cost. Right now, the beta version of my driver (version and expiry locked) is free to try out and play with. Just let me know what you think of it. 

When will the docker be available?

Sent from my iPhone using Tapatalk Pro

Link to comment
Share on other sites

17 hours ago, Joshua Pressnell said:

Based on the link you posted, you probably don't need an instructional site. All the details you might need for setup are in the driver documentation once you install the driver. 

My overall concept is to support this as a "consumer-level" drop-in router, so I have an extensive user's guide for using my pre-configured bridge and web portal, and there's not a whole lot to configure yourself.

The pre-configured bridge will be $225 MSRP. The driver will be $175 MSRP. I will support dealers/tech folks who want to use their own hardware with my pre-configured pi image or docker container (web configuration portal, etc) for $50 per device. In your case, you already have a full bridge setup and knowledge of how to configure it and my homebridge-Control4 plugin is free on NPM, so you can probably get yourself fully setup on that side at no cost. Right now, the beta version of my driver (version and expiry locked) is free to try out and play with. Just let me know what you think of it. 

TY Joshua.....I'm a programmer too, but more Microsoft...Yeah, it sucks.

When will driver with no expire be out. I do have it running on a Pii 2 or 3 right now, so an image would be AWESOME!!

You are right though, I have to rig it to turn stuff off after I turn it on, ex mute on TV, skip commercials, whole home off, etc ect ect........

I want one with Siri and your two way feedback.

Does yours read directly off whats its called in Composer or do you add it in config file. I had to add all my devices manually in config file....A bitch to say the least.

 

 

Link to comment
Share on other sites

23 minutes ago, schrady said:

TY Joshua.....I'm a programmer too, but more Microsoft...Yeah, it sucks.

When will driver with no expire be out. I do have it running on a Pii 2 or 3 right now, so an image would be AWESOME!!

You are right though, I have to rig it to turn stuff off after I turn it on, ex mute on TV, skip commercials, whole home off, etc ect ect........

I want one with Siri and your two way feedback.

Does yours read directly off whats its called in Composer or do you add it in config file. I had to add all my devices manually in config file....A bitch to say the least.

 

 

I do Microsoft too, but try to avoid it.  I like embedded systems and control systems the most, but iOS and Mac work is where I make most of my living.

Well, you don't really *need* my image, but if you want the nifty web configuration console that makes everything super easy, it's a steal at $50.  You can download the image for a Pi3 here -> http://josh-firmware.s3.amazonaws.com/homebridge_1.0.1_pi3.tar.gz  Just make sure to run the raspberry-config command after you load it up to expand to the full size of your flash drive.  That's a compressed image.  When you boot it back up, it'll be at the address http://homebridge.local.  PM me for the default user/pwd setup, and to purchase a license for the web console, if you want it.

My setup reads everything straight out of my driver.  No configuration required.  Click "Import", then click "Restart Homebridge".  Done (in most cases).  You may need to adjust some things in the config, but that's easy to do from the web portal.

I'm still going through a beta period right now, trying to make sure I have as much "fully baked and ready" as possible.  I'm adding specific C4 devices as my beta users inform me of what they have, so that I can have the most robust auto-configuration possible, with the least amount of user input required.

Link to comment
Share on other sites

  • 2 weeks later...

For those following along at home, the last beta driver is scheduled to expire the day after tomorrow (the 15th).  I have put together an updated driver that is functional until April 1.  Scary, but arbitrary date.  This new version auto-detects the Clipsal drivers that some folks have used for "generic programming".  It also should auto-detect a few new dimmers (as dimmers) and locks.

Yes I still need to add thermostats and blinds.

I also updated the driver so that it *will not* output duplicate names during configuration import.  This was causing lots of confusion and the appliance to not be detected by HomeKit.  I still need to update the firmware in the appliance to disallow duplicates, and your can still manually rename devices to be duplicates, but if you just import the config from the director, any duplicates in Composer will now be auto-renamed with "Device 2", "Device 3", etc.

The latest driver is here -> https://dl.dropboxusercontent.com/u/13324724/homebridge.c4z

Link to comment
Share on other sites

FYI, folks, I'm still here.  Had to travel to NYC for a business meeting at my day job, so have been out of touch for a couple of days.  I'm back now, so will be working to drive the C4 driver over the finish line and get it posted to HouseLogix and will be working to finalize the last couple of glitches in the appliance firmware.

Link to comment
Share on other sites

I just used the Clipsal legacy light driver as a "virtual switch" in my project, and used programming to tie it to "wakeup alarm" variables.  I have a "wakeup" variable for each of my kids, and for the master bedroom.  If either kid has "wakeup" on, then the master bedroom "wakeup" automatically turns on.  If both kids "wakeup" is off, then the parent's wakeup auto-sets false.  Those variables are tied to a two-button keypad in the kid's bedrooms and are used as enable/disable controls for automatically ramping the room's lights and turning on wakeup music in those rooms.  All in all, pretty sweet.

Now I just need to figure out how to tie into the kid's school calendar, so the programming can automatically determine when the kids are off and have no school. Unfortunately, I doubt there's any centralized data format for that information, so I can't write a cute little generic driver for it... although I could write one just for my own kid's school system.

Link to comment
Share on other sites

  • 1 month later...
44 minutes ago, RobbieF said:

@Joshua Pressnell - Any news on that Docker image?

Sadly, not yet. It took me a while to get things straightened out to support more than 100 devices on a single appliance box, and I needed to get that worked out first. After that, it's thermostat support, as a few folks are waiting on that for purchase. Then I should be able to get the docker image out. 

Link to comment
Share on other sites

10 hours ago, digitaltrader said:

Amazing Driver!  I have a few devices connected to a CardAcess Heavy Duty Power Controller (pool pump, outdoor lights etc), is there anyway to get these discovered?

Do they function as basic switches? What I can do depends on how the drivers function. Worst case, you could install a generic switch driver and use programming to link the hardware states. 

Link to comment
Share on other sites

7 hours ago, digitaltrader said:

I bought your hardware...what needs to happen to get this setup?

Ok... so this will be a little tricky, but shouldn't be too bad. Here's the steps:

1) Identify the device ID values for the devices you're interested in. You'd do this by using Composer to mouse over the device, and jot down the device ID value  (likely a 3 digit number) and the driver file name  

2) Use advanced mode, and choose the option to edit the raw config.json file.  Copy the entire text, and save it to a text file. Pm or email me that file as an attachment, along with your list of device IDs and driver file names.

3) I'll send you an updated config.json file. You'll go back into the advanced options and delete what's there and replace it with what I send you, and save, then restart homebridge (one of the buttons)

4) That should add those new devices into the "default room" and if they work using a similar mechanism to the other C4 switches, it'll work straight up. If it doesn't work out of the box, I can look at the driver and work out what I need to add.

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Hi Joshua - whats the current status of this?  I have a spare Pi3  - how do I get started?  Do you have README or instructions posted somewhere?

edit - And add me to the list of those that want a Docker version as I have an unRAID server that would be ideal for this.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.