HomeKit for Control4

Why HomeKit?

So you have Control4, why would you need HomeKit?

Good point, two reasons I can think of.

  1. Using HomeKit you can program your system to do things quickly and easily using your phone.
  2. You can use Siri!!!

Siri is something that I didn’t care about so much before, its not accurate enough that I would let it fail to find something on the web before I had to google anyway. But when I want a very specific action, its great. Saying “Bedroom Lights On”, or “Switch House Off” is pretty deterministic. Its not like it can get it wrong, and it can’t be done quicker than any other method from where ever you are. Better still if you have an Apple Watch it means you can control your house without taking your phone out of your pocket.

But Control4 doesn’t support HomeKit. Will they in the future? Who knows, they don’t support an external API yet, so I’m not going to wait.

Luckily its fair easy to set this up using some Open Source running on a computer as a piece of middleware between HomeKit and Control4.

The Raspberry Pi is perfect for the job – https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi
There is a pre-built image for the Pi here – https://s3.amazonaws.com/c4drivers/homebridge-pi.img.zip

How it fits together?

Simplistically HomeKit has a couple of parts. Firstly it runs on Apple iOS devices (and Apple TV/Apple Watch) and it runs on devices that support its protocols.

On iOS it contains a common database that holds all the information about the devices. Once you populate the database it can be accessed by any application, with Siri being one of those.

Each of the devices you have are called an Accessory. Some Accessories have native support for HomeKit, some don’t and for those you need a Bridge to access them.
With Control4 obviously it doesn’t support HomeKit so you need a Bridge to access the devices in Control4. It would be nice if they added a bridge directly into the home controller, but what are the chances?

So we need to create a bridge between HomeKit and Control4.

HomeKit -> Bridge -> Control4 -> Devices

Lets Start at the End

We have to start at the Control4 side to make things work. The first thing is that we need a way of being able to run commands on devices in Control4 via some sort of API.

The best way to do this is to have a driver where we can send commands to it and have it run commands on the Control4 side.

Luckily there was already a driver to do this, its here http://untestedhacks.com/2013/web-events-driver/

There are some downsides to it, mainly that it has no security. What that means is that anyone on your network would be able to send commands to the system without any authentication or encryption. You need to take a view if this is a problem. The worst that can happen is down to you. If you only create commands to turn lights on and off, then thats the worst someone could do. But if you create commands to do things like disabled your house alarm, then someone can do that if they get access to your network. Ideally Control4 would implement an API that uses authentication and encryption, but that doesn’t seem likely with the closed system. You could try building this into the driver, but I didn’t see anyway of changing the CreateServer function to run SSL – so you are going to have to build your own.

Once you have grabbed the driver then you need to install it, doesn’t matter where you put it as its unseen from any normal users interface.

You can then go to programming and select the driver in composer, then you can select Command Received underneath it.

Screen Shot 2015-10-29 at 18.21.41

How the driver works is that when you send a http request to http://home-controller:8080/YOURCOMMAND the COMMAND variable contains whatever you put for YOURCOMMAND.

This means that in your Script you can match the command that you are sending, and then run some action on it.

Screen Shot 2015-10-28 at 14.49.01

You can try this by dragging this into the script, then having it do something like this example here which turns off the lights in my study when I send a http request to http://192.168.1.11:8080/study_off
Obviously replace the 192.168.1.11 with the IP address of your director.

Screen Shot 2015-10-28 at 14.50.16

Go ahead and test that its working from your web browser by putting this into the web browser. You should see the following if it works

Connection Successful.
Command: study_off

Thats it, all you need to do is create different commands for each of the things that you want to control with HomeKit. If you are doing lights, then just create an on and off for each of them. Or a room off for each room etc. Like this

Screen Shot 2015-10-28 at 14.54.14

Its going to take a bit of time to do this, I created all my COMMAND EQUAL TO first, then added the actions afterwards to stop going back and forward, but still it will take some time.

Lets add the Bridge

The next thing that needs to happen is we need to add a bridge to work between HomeKit and Control4.

To do this you need a computer where you can install Node. Node is the environment for running Javascript programs, which the bridge we will use runs in. It supports most platforms, so you can run it on your windows or mac desktop, or install it on a Linux device – like a Raspberry Pi.

I’ve built an image for the raspberry pi which you can get from here:
https://s3.amazonaws.com/c4drivers/homebridge-pi.img.zip (the md5 is 4f35686b1f87916f142ca5fcfaab463e)

Once you have imaged your pi you can access it with ssh pi@homebridge.local (username pi, password raspberry).

If you want to do it yourself instructions for the Raspberry Pi are at the following link https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi

To do it manually on something else follow this:

Get Node and install it from http://nodejs.org

Once you have installed Node the next thing you need is HomeBridge. You can get this from here: https://github.com/nfarina/homebridge

You can install using

npm install -g homebridge
npm install -g homebridge-http

On Windows platforms you will need to install git – http://www.git-scm.com/downloads
On Linux you will need to install missing packages
On Mac OSX you may need to install Xcode from the app store.

Once you have completed this you just need to configure the bridge.

Configuring HomeBridge

All the configuration that needs to be done goes in the config.json file to find out where this file needs to be run the homebridge command, it when it fails it will tell you where the config.json should be. If you are using the raspberry pi image the config.json is in /home/pi/.homebridge

homebridge

The file is in json format and an example is this:

{
 "bridge": {
 "name": "Your Homebridge",
 "username": "CC:22:3D:E3:CE:31",
 "port": 51826,
 "pin": "031-45-154"
 },
 
 "description": "This is an example configuration file",

 "platforms": [],

 "accessories": [
 {
 "accessory": "Http",
 "name": "Study Lights",
 "on_url": "http://192.168.1.11:8080/study_on",
 "off_url": "http://192.168.1.11:8080/study_off",
 "http_method": "GET",
 "username": "username",
 "password": "password"
 },
 {
 "accessory": "Http",
 "name": "Master Bedroom Light",
 "on_url": "http://192.168.1.11:8080/master_on",
 "off_url": "http://192.168.1.11:8080/master_off",
 "http_method": "GET",
 "username": "username",
 "password": "password"
 }
 ]
}

As you will be editing this file, its good practise to paste the contents into http://jsonlint.com to make sure that you haven’t made any mistakes in the formatting.

For the first section you can specify the name of the bridge, enter a username if you like – but the default will work fine. The pin is used for authenticating the bridge into HomeKit, and you can change it but keep the format the same.

The next part we will be changing will be for each of your devices that you created commands for. If you remember earlier you tested your commands from the web browser http://192.168.1.11:8080/study_off
These are the commands that you will need to change here for the off and on url to match. You should also change the name to be something that Siri will like, although if that becomes an option we can create scenes later for specific commands.

Just be careful of the formatting if you don’t know json format. If you want to add another device, then you would need to add a comma in-between each section like this

 },
 {

Once this is done you can start the HomeBridge by running the command

homebridge

from the command line.

Or if you are using the raspberry pi image homebridge is set to run as a service. So you can stop, start or restart it with

sudo /etc/init.d/homebridge [stop start restart]

Lets link it to HomeKit

The final step is to link it to HomeKit. iOS doesn’t come with its own app to setup the HomeKit database, but there are plenty out there. I’ve been using Eve from Elegato and its perfect.

Elgato Eve on the App Store – iTunes – Apple

When you first open it you will be asked to Add Accessory

IMG_2401

Then you will need to give your home a name, keep it simple something that Siri will understand

IMG_2406

Its then going to find your HomeBridge on the network, so select it

IMG_2403

It will then want to pair it and warn you its not certified, what can you do about that?

IMG_2404

To add the Accessory you will need to enter the PIN (same as in the config.json file). You are best entering it manually, its too much hassle trying to get it to recognise the screen.

IMG_2405

Then choose the default room, or Add another Room to your house.

Click Next and its all done.

You can then give it a try by running Siri and saying “Study Lights On”. If it doesn’t work straight away, then give it a minute or so, it seems to need this for backend synching to happen.

But everything is a light?

In the eve app everything will appear as a light because the Http accessory is for controlling lights. This can also cause some problems when adding things like garage doors because Siri wants it to be a specific type before it will do anything.

I spent a couple of hours writing a http driver for other things, which was a bit hit and miss because for things like garage doors the driver has to show the state, check for obstructions etc.

Then I realised actually you just need to add devices using the on or off url, for open or closed. Then to make it work for Siri you can create a scene using the Eve app. When you create a scene Siri doesn’t care about the device type it just seems to do what you called the scene. So I have a scene called “Open Garage Door” which sets the garage door accessory to be on, and another called “Close Garage Door” which sets the garage door accessory to be off.

So the only problem with everything being a light is if you want to use the Eve app to control your devices. But seeing as you have the C4 app why would you?

All Done

You should be all done, but there is more you can do from the iOS side now. If you want to add specific commands to group different things together you can go to settings in Eve and add Scene’s. The nice thing I found about Scenes is that you can enter your own command names in here and Siri will respond to what you called the Scene.

If you want to allow the rest of the family to use Siri on their devices you can go to users and invite people. They will now be able to use Siri as well.

Hope it all works for you.

Advertisements

69 thoughts on “HomeKit for Control4

  1. Thank you so much for your detailed guide! After iOS 9 broke my siriapi8 configuration, I have been without Siri control of my house. I am now back in business! In case this helps others, it took me a few tries to figure out to map different control4 video sources without creating a custom scene in Eve for each. I.E.I don’t just want to turn on the “study”, I want to choose the video source as well. To do this, I created an accessory in the config.json file for each source.

    As an example, I have an accessory called “Blu-ray in the study” and one called “Tivo in the study”. Now I can tell Siri “turn on blu-ray in the study” and it triggers my control4 event to “watch tivo in the study”

    Liked by 1 person

  2. Hello and thank you for sharing this guide.
    Could you please confirm the rasp pi image file you created and offered for download? While the md5 verifies. Each time I attempt to unzip (Win) or (unarchive Mac) I receive an error.

    Like

    1. I just downloaded it on my mac and it works fine, sorry can’t be more help

      $ md5 homebridge-pi.img.zip
      MD5 (homebridge-pi.img.zip) = 4f35686b1f87916f142ca5fcfaab463e

      $ unzip homebridge-pi.img.zip
      Archive: homebridge-pi.img.zip
      inflating: homebridge-small.img

      $ md5 homebridge-small.img
      MD5 (homebridge-small.img) = c584b6a784be9be698b1f65a1c36573d

      Like

  3. I’m stuck after getting Homebridge set up on my Ubuntu-server-running-through-Virtualbox. I’ve downloaded Eve and it can’t find the homebridge!

    What do I do from here?

    I’ve tried getting homebridge installed on Windows through Git-hub, but it can’t install it because it can’t find Python (even though I have it installed).

    I’m at a roadblock.

    Like

    1. Maybe you should try with the raspberry pi image, its all built and setup to get going straight away.

      Is the homebridge service running on the ubuntu server? Or can you not get it to start?
      If it is then have you got the interface on virtual box as a NAT or as a bridge?
      You’ll need it to be a bridge so its on the same network as your iPhone, otherwise it won’t be able to find it.

      Like

  4. Thanks. I have your pi image running on a pi2b. When executing the homebridge command. It appears to load, but shows this error:
    Homebridge is running on port 51826.
    events.js:141
    throw er; // Unhandled ‘error’ event
    Error: listen EADDRINUSE :::51826

    Since the EVE app will not find any accessories. I assume this error has something to do with it.

    Like

  5. Hi,

    I did put the image in the raspberry pi. Did configure the .js file and uploaded it after checking it in the JSONLint site. I phone app is installed and it has detected the homebridge.
    Now once i run the homebridge command i am getting an error and siri keeps saying sorry, I didn’t understand what you mean. When i am putting the same address in the browser action is happening as intended. Please help.

    Error I am getting:

    /home/pi/.homebridge$ 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
    *** 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
    Loaded plugin: homebridge-http
    Registering accessory ‘homebridge-http.Http’

    Loaded config.json with 6 accessories and 0 platforms.

    Loading 0 platforms…
    Loading 6 accessories…
    [Great Room Dish] Initializing Http accessory…
    [Great Room Apple TV] Initializing Http accessory…
    [Great Room Fire TV] Initializing Http accessory…
    [Great Room Chromecast] Initializing Http accessory…
    [Great Room Bluray] Initializing Http accessory…
    [Great Room Home Theater] Initializing Http accessory…
    Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
    [30;47m [0m
    [30;47m ┌────────────┐ [0m
    [30;47m │ 031-45-154 │ [0m
    [30;47m └────────────┘ [0m
    [30;47m [0m
    Homebridge is running on port 51826.
    events.js:141
    throw er; // Unhandled ‘error’ event
    ^

    Error: listen EADDRINUSE :::51826
    at Object.exports._errnoException (util.js:874:11)
    at exports._exceptionWithHostPort (util.js:897:20)
    at Server._listen2 (net.js:1234:14)
    at listen (net.js:1270:10)
    at Server.listen (net.js:1366:5)
    at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:58:19)
    at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:132:20)
    at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:347:16)
    at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:50:16)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:42:10)

    Like

    1. As in the instructions above to stop/start or restart you need to use the following on the pi image
      sudo /etc/init.d/homebridge stop
      sudo /etc/init.d/homebridge start
      sudo /etc/init.d/homebridge restart

      Like

  6. That has already been done. Pi was restarted ( stop/start/and restart). Evo did detect it and i was able to install the device. Problem is i think siri. I have given command for everything to siri, but no luck. No clue what has been going wrong.

    Please advise.

    Like

    1. Just to clarify the error you showed indicated that you already have homebridge running, thats why I mentioned that you start/stop/restart using those commands, not by entering “homebridge”.

      If you could add them with the Eve app, then homebridge is working. Using the eve app can you turn anything on or off?
      If you can then homekit is setup properly.
      However if saying to siri “Switch bedroom light on” doesn’t work, but it does from Eve, then I’m not sure what to suggest. Thats purely on the apple side, so you could open a support case with them and tell them Siri isn’t controlling your homekit devices.

      Like

    2. Hello Ish, if I am add my experience. As I was having similar issues with Siri. Only getting the “I’m sorry …” message.
      For me I had to make sure that the accessory http entries in the config.json file were correct. More to the point that there would be something at that address to generate a response. IE: Your Control4 controller and related Events driver. I myself could not get the web_events driver to work on my controller. I tried various ports. So, I am currently using the fee based driver from houselogix. Works well.
      You will not get Siri to work. As c4driver has stated, if you can’t get Eve app to control your device, Siri can’t either.
      Assuming that your json file has been installed on your pi and Eve app has registered your homebridge accessories. You should be able to press the On / Off buttons in Eve app. That state should change. If so, then try to command Siri.

      Like

  7. Scott,

    Thanks for your advise. I finally figured out by playing with different ports. The app is working now but siri is still being stubborn and not responding.

    Guess with check more and if it doesn’t work, then will look at houselogix.

    Thanks to all

    Like

    1. Ok, if you are getting the “Sorry …” message from Siri. The obvious is to confirm that you’re using the same wording for the request as you have assigned to your accessory.
      One more thing to try is to set the Eve app in the background before addressing Siri. Apparently a foreground active Eve will interfere with Siri’s ability to communicate with Eve. Try that and if you get an affirmative response, then all is well.
      However, there may be another reason for the negative response. I have found that if your Eve doesn’t get a response to it’s HTTP GET message, ie: your C4 controller/driver isn’t functioning, you will get a sorry message from Siri. One thing to test is that you can manually control your accessory within Eve. If upon changing the power state you do not get a “warning” icon. Then it seems that Eve and your driver are communicating. Regardless if you have any actions programmed at the C4 side.
      I hope this helps.

      Like

      1. Scott,

        thank you so much for the info. I have finally figured it out and it is running fine. My only issue is that if i turn on the dish, the control 4 app or the remote still thinks that the system is off and I am unable to change the channel and same is with the music, if i want to change the station. Any suggestion guys?

        Like

      2. Thank you so very much great SCOTT! I edited the port to 8001 using notepad++ and it worked!
        It takes quite a while to first identify the homebridge though, (then changed 51826 to 51827, sudo reboot, stop, start, restart and quickly paired the homebridge)
        However I found 2 issues: 1. Lights act to Siri command but Siri says: Sorry, I wasn’t able to identify the accessory. I did the similar settings as in the instruction, put lamp_on and lamp_off in both C4 programming and config.json, I told Siri to “Turn on the lamp”, always got sorry msg from her(lamps turned on indeed).
        2. I set it up the night before and when I came by this morning, connected to the network, was not able to command from either Siri or eve app(says unreachable), restarted homebridge then got connected(is it normal behaviour and if not how to prevent this?). I am wondering how steady the pi runs the homebridge for the past few month for you guys? Thank you for any response in advance.

        Like

      3. Hi folks, some update. I’m using scenes from eve app, this way no longer get “Sorry” msg.
        And apple TV is great for anywhere access as long as you have Internet connection. Very fast response!

        Like

    2. Hi I had the same problem with web events driver, the port 8080 is open but gives no response. Did you use driverworks to edit the port? I changed: local HTTPPORT = 8001 in driver.lua but do not know how to save it as usable .c4i file.
      Tried using HTTP bridge driver from Houselogix and get that URL to control devices by typing in http://controllerIP:7070/v1/event/TRIGGER1, but in eve app I cannot power on/off lamp, it shows Homekit accessory not responding…
      Any thoughts? Thanks guys!

      Like

      1. To edit the web events driver. Use an editor like notepad++. Then in composer use the update driver feature and select the newly edited driver file. Once the update completes. Exit composer. Use system manager to disable and re-enable director on your primary controller. Use a port scanner app (like portqryui) to “see” if your primary is now “listening” at that port. This will at least tell you that your C4 setup should be ready to accept commands from your RasPi Homekit.

        Like

  8. Ish
    The issue may be in how you are handling the web event driver command. We’ll assume that you have bindings for this video source and TV video display. Also, let’s say you have two accessories defined in your homekit bridge for “Bedroom TV” and “Dish Channel”. Each accessory has an On and Off state. Because of the On/Off nature doesn’t really fit what we need for AV control. I have found that it is easier to use the SCENES feature of the Eve app to facilitate this and make speaking the command a bit more normal. So lets create a “Watch Dish” and “Channel Up”, “Channel Down” scenes. Where watch dish calls out bedroom TV ON, channel up calls out dish channel ON and channel down calls dish channel OFF. We’ll follow suit here in your config.json bridge file; make sure that you send tv_on, channel_on, channel_off. http get commands.
    OK, so to you question, if you have a TV device and a dish satellite receiver bound to each other and in a room and appropriate controls methods set. Now within your C4 project. Assuming you are using the web events driver. Go to programming and define a conditional for each of the expected event commands; tv_on, channel_on, channel_off. For example when tv_on is received “Select Satellite as the video source in the bedroom”. Speak “Hey Siri, Watch Dish”. This basically is you pressing Watch Satellite on a UI and should, turn on the TV, set the input and turn on the satellite set top box. In turn C4, system wide, should now show the bedroom as on to the satellite. Same goes for changing the channel. Add, If channel_on is received “Push channel up on the bedroom satellite”. Now speak “Hey Siri, Channel Up”. C4 will advance your channel by one on the dish satellite receiver. To round out the experiment add a tv_off.
    As for music, follow the same, just remember to “Select an Audio Source” to play/hear in the room. You may have to choose your wording carefully, as Apple/Siri may try to launch “music” from within itself.
    I hope this helps.

    Liked by 1 person

  9. Hi There, thanks for this writeup. I’ve made it as far getting the pi running and loading the C4 driver. When I load Eve and connect to the homebridge to add the accessory it always says the code is invalid. I’ve tried changing it and nothing works. Any ideas?

    Like

    1. A couple of ideas.

      1) After changing the code in the config.json file, did you restart homebridge? You will need to do this for the settings to take affect.
      2) I imagine you did 1, so the other thing to do is to delete homekit from your iPhone and start again. You can do this from Settings > Homekit.

      I have encountered 2 before a couple of times when I initially set it up. I can’t remember if I uninstalled eve while doing it, but maybe best to be sure.

      Like

  10. Hey Ryan,
    Guys this works and works well. If you dont have a programming backgorund, you wont get it. I got mine running, it broke, I fixed it by deleting it from iphone and reinstalling it. I have programming for 50 accessories and didnt want to lose those.
    Watch this

    Thanks dude

    Like

  11. Mine worked. You saw the video above. Now its throwing an error everyone gets. This is it:

    Homebridge is running on port 51826.
    events.js:141
    throw er; // Unhandled ‘error’ event
    ^

    Error: listen EADDRINUSE :::51826
    at Object.exports._errnoException (util.js:874:11)
    at exports._exceptionWithHostPort (util.js:897:20)
    at Server._listen2 (net.js:1234:14)
    at listen (net.js:1270:10)
    at Server.listen (net.js:1366:5)
    at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:58:19)
    at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:132:20)
    at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:347:16)
    at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:50:16)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:42:10)

    Like

    1. The error means that there is already an instance of homebridge running.

      You need to make sure you run it as a service using the following to stop/start/restart it
      sudo /etc/init.d/homebridge stop
      sudo /etc/init.d/homebridge start
      sudo /etc/init.d/homebridge restart

      If you forgot and say stopped it, then started it again just by entering
      homebridge
      then you will need to stop that instance and run in with one of the above commands.

      You can always see if there is an existing copy of homebridge running by entering
      ps aux | grep homebridge

      This is what I get
      root 388 0.0 0.7 7616 3128 ? S 11:41 0:00 sudo -u pi homebridge
      avahi 396 0.2 0.5 3972 2644 ? Ss 11:41 0:00 avahi-daemon: running [homebridge.local]
      pi 444 14.7 6.6 131672 29424 ? Sl 11:41 0:16 homebridge
      pi 943 0.0 0.4 4256 1940 pts/0 S+ 11:43 0:00 grep –color=auto homebridge

      You can then stop each instance with
      kill [the first number from the list above]

      But the easiest way is to reboot if you get into a mess, then it will be running automatically on startup and you can go back to using the commands at the start to stop/start/restart

      This is based on you running the image I provided on the raspberry pi, other OS will be slightly different, but the problem is still the same (more than 1 instance of homebridge running)

      Like

  12. Shit. I’m so stupid. It worked right after it dawned on me there were two instances running. Then I got your post.
    Now its not working though.
    I can send links via browser and that works fine.
    None of the app will find my bridge. I think I’ve gummed up the saved settings so I’ve reset the iphone and reinstalled Eve.
    No luck. It doesnt find the bridge.
    I know its running and running correctly. My JSON is perfect. What the FUCK could I be missing? We’re talking like 15 hours here.
    What do you know about this project ?
    https://github.com/brutella/hc

    Anyways, Any help appreciated.
    I had it working so nicely before with my huge custom json file.

    Like

  13. PS, this is what I get

    avahi 377 0.0 0.2 4008 2556 ? Ss 17:30 0:00 avahi-daemon: r unning [homebridge.local]
    root 1052 0.0 0.3 6780 3192 pts/0 S 18:20 0:00 sudo -u pi home bridge
    pi 1062 3.8 3.4 134120 32384 pts/0 Sl 18:20 0:03 homebridge
    pi 1080 0.0 0.1 4276 1840 pts/0 S+ 18:21 0:00 grep –color=au to homebridge

    Like

  14. I’m also working on brutellas solution on another Pi. Know anything about that? (see link above).
    I’m wiping my Iphone and starting over. It can’t be the json file cause it was working fine. I only have one instance running but still no mas on finding the bridge. Very odd.
    I have Pi 2’s, the latest ones. do I need to update the image?

    Like

  15. I’ve not tried it, seems like you need to write the accessory communication yourself, shouldn’t be too hard, but a bit more programming than is needed with homebridge.

    I just say put back a blank json file to rule it out, always worth troubleshooting with something simple.

    The image should work fine with all different pi’s.

    Like

  16. I got it. It had to do with icloud and keychain. Had to reset/restore iphone and ipads. Erase Icloud and Keychain. Too many commands got caught up in the cloud I guess and Siri wasnt sending the right info to the bridge. At one point I would turn on a light and the TV channel would change too, even though the programming didnt call for that.
    You have my email address. Let’s communicate directly by email. I’m a C4 programmer with access to all their tools and toys along with Composer Pro.
    I’d like to expand on what youve done and check state of trigger with 2-way communications.
    Email me.

    Mike

    Like

  17. Good morning guys,

    Got a quick question. I want to run homekit to control my vera connected devices. The homebridge on that also runs on port 51826. Is it possible to run the control4 homebridge on a different port? If yes then how to change it and how to find out what ports are available that i can switch to?

    Thanks again for all the help.

    Like

    1. Does the vera software run on the same computer as you running homebridge?
      If so then you will need to change the port, if not then you won’t. Don’t meant to patronise if you already understand this.

      However you should be able to change the port as I believe that it is announced in the bonjour messages, so other devices will be told what port it is on.

      Like

    1. Thats strange.

      I just did
      sudo /etc/init.d/homebridge stop
      edited the config.json to change the port to 61826 then
      sudo /etc/init.d/homebridge start

      and it worked.

      Like

  18. Hey,

    Waiting for an email so we can communicate directly, but in the meantime I got some more info.

    According to apple, you can only setup one ios device at a time. Then the cloud will setup the rest as they sync.

    My problem was I was setting up iphones and ipads at the same time. Thats a no no I guess. You can only setup 1 device per homekit and the rest on your account will follow when they are plugged in and not used so they can sync with cloud.

    Hope that helps people avoid what happened to me.

    Email me

    Schrady (Mike)

    Like

  19. I’ve added the driver to C4 (I know it’s added because if I go to re-add it it says it’s the same version) but when I “Manage Drivers” I don’t see it in the list. (Composer 2.8.1) and I can’t find “Web Events Driver” in the Programming Device List (the first and second screenshots) even if searching. So it’s like my driver is installed, but not enabled. I am missing something right in front of me.

    Like

  20. I installed the driver. I am confident that the drivers is installed because it will say it is the same version if I try and re-install it.

    The driver does not appear in the Manage Drivers on Composer 2.8.1.

    I also can’t find the Web Events in the Programming section like you have in screenshot 1 and 2.

    It’s like my driver is installed but not enabled or recognized.

    Any ideas for me?

    Like

    1. If you are in System Design then select a room where you want to put the driver.
      Then in “Items” on the right hand side, click Search and put in “web events” and search.
      You should see the driver is found if its in your system.
      Then double click it, it will be added to the room.

      Now if you go to programming it will be in the room where you added it.

      Like

    1. To be honest I’ve never tried as I’ve not got a pi 3. However if you provide more info on what happens when booting we may be able to find out whats wrong.

      Do you have a screen connected to it so you can see?

      Like

      1. I tried on a 3. It doesn’t boot for me either but I was able to install on the required components and get it to (mostly) work.

        It wasn’t worth it. It’s not 2-way. I could use Siri to turn someone on or off, but whatever HomeKit app you were using would be incorrect if you didn’t use Siri both times.

        Forfor example, turn something on with Siri and off with C4 and the local HomeKit DB would think it was still on.

        It’s perfectly fine if you commit to using Siri both ways to control something.

        Like

      2. Its not two way, but the main purpose is for using Siri, not homekit apps.
        If I want to change something using an app I use the C4 App, which obviously has two way control.
        If I want to an action, I use siri and say turn lights on.
        I don’t say, hi siri are the lights on? ok, turn them on.

        Like

      3. I understand. I wasn’t using the (silly) HomeKit apps either other than to understand the current “state” of the HomeKit DB vs the current state of C4.

        Sorry I wasn’t more clear.

        The driver works great and the Pi3 install not all that hard armed with modest Linux/UNIX experience and/or patience.

        It’s a good look into the future of C4, I hope. It’s super fun to talk to the phone to control C4.

        And with Amazon Alexa, the upcoming Google appliance and similar, as well the rumored native HomeKit app in IOS7 all interacting with the “do it yourself” bottom end “home automation” “internet of things” type appliances, I hope to see C4 do something official and supported.

        I have a huge investment in my C4 installation and am an enthusiast and product champion (not a dealer or integrator.)

        Like

  21. I completely agree with you. Its a shame that we have to cobble together something like this 😦

    Homekit integration should be in the C4 system today, maybe Alexa too, or IFTTT and Google Home when it comes.

    I’m the same as an enduser with a big setup covering everything I could think of, but over time I worry that I should be looking at something else. If they just built an API for example it would let everyone else integrate easily – but they don’t. The closed shop will stop C4 growing as a company.

    Like

    1. You are so right. I heard they have some change coming soon for their app store and they def know about the Siri control stuff. The guy who wrote the web server driver has been a member of driver development team in control4. I am not sure how soon for the change, but I know that they had discussion already to make C4 Homekit ready

      Liked by 1 person

  22. Can anyone please leave a hint why sometimes Siri responds positively but slow to command action.
    It’s like you need to trigger it the first time then after the first command goes through everything’s fine. Anyone with the same glitch?
    I used to install Kodi, VNC, SSH, blah blah servers onto the same Pi , plus plugging it into a switch after the other switch, and it causes me trouble :S,

    Then I made Pi a dedicated server and assign a router port to it.
    This cuts 90% of the slowness issue.
    I have no idea about this glitch so I blame Homekit server or sleepy Rpi 🙂

    Like

  23. Does anyone else have problems using scene with multiple commands to the driver? The commands in the driver will work if you call one command at a time. But if you have two commands in a HomeKit scene then only one command will fire off. Any ideas?

    Like

  24. Hello C4Driver

    Thanks for writing this detailed post. Your post got me started on Siri-Control4 integration :).

    Since this didn’t support two-way sync, over the weekend I built a new driver and plugin. It only supports lights right now. I hope you can try it out and let me know your feedback. Here are the links:
    Control4 driver: https://github.com/itsfrosty/control4-2way-web-driver
    Homebridge plugin: https://github.com/itsfrosty/homebridge-c4-plugin

    Btw both driver and plugin are opensource and free to use.

    Like

  25. I’m new to this idea but have a Control4 system I want to try it on. However I’m missing some understanding here – you say to test “http://192.168.1.11:8080/study_off” from a broswer – where the IP is the address of the C4 box (ok, I can find this by scanning the network) but how do you know what the various devices are called – for instance in your example “study_off”. My Control4 dealer hasn’t been very helpful so far in my life so I doubt there is any help there… Is there an easy way to get a listing of the commands available? thanks – Jon

    Like

    1. You need to define this in the programming on the controller. I think the problem for you will be if you don’t have access to composer pro. I did read on c4forums that someone was developing a better driver to do all of this automatically – it may be best for you to get that driver installed by your dealer then you won’t need to do any programming.

      Like

      1. Supposing I had composer pro wouldn’t I still need a user / password for the system? How tightly is it locked down? I have been assuming that since its proprietary they won’t issue access to me but maybe I’m wrong…

        Like

  26. The username/password for composer pro isn’t for your system (although there may be a password on your system – but you can get that from the dealer). The username/password for composer pro is to validate you have a dealer account and gets verified with control4 online.

    Like

  27. You will need Composer Pro to add the driver, not sure if you can do the programming with HE.

    I’ve been speaking with someone who has developed a production system based upon all of this. I’m going to test it out and will update the article if it all works well. The hope is that you will just need to get a driver added, then you won’t need composer to do anything – no programming.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s