Announcement

Collapse
No announcement yet.

HomeSeer and Apple Siri (HomeKit) the easy way

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HomeSeer and Apple Siri (HomeKit) the easy way

    Hey guys, there's another 42 page thread discussing where Apple HomeKit (Siri) stands, but I'm sure most of you won't want to read all of that. So, before I give you some good news, I'll give you a quick summary on where things currently stand -

    There are two pieces involved -

    First - HomeSeer can work with Siri through this thing called HomeBridge and a HomeSeer plugin (developed by some very smart people). Through extensive effort this can work on Windows too, but it works much better on Linux. However, Linux is not effortless either. There are many components involved.

    Second - Once you have HomeBridge working, then there's the second very cumbersome part, where you have to find all of your devices in HomeSeer one by one, and create this file called the "config.json" file. It is extremely error prone and takes forever to setup.

    There used to be some plugins for HomeKit, but HomeSeer decided to pull those off due to some Apple licensing issues. Fragel (the plugin developer), has been trying to get certified by Apple, but it's been months and that may or may not ever happen.

    That brings us to now -

    While we wait for a plugin, in order to make HomeKit as effortless as possible, I decided to bundle all the current development into a preconfigured Raspberry Pi image and to create a Windows app to generate the config.json file for the most common device types (Dimmable Lights, Non-Dimmable Lights/Switches, Door Locks, and Garage/Gates). My Windows app also controls the Raspberry Pi, so you won't even need a monitor/keyboard plugged into it.

    The First Piece -
    - This is the FULLY configured Raspberry Pi image. It already has the latest version of everything, and it's shrunk to fit on a SD Card as small as 2GB (compressed image is only 279MB).
    - HomeBridge will automatically start when it boots, and it's designed so you don't even need a monitor & keyboard for it.
    - Download the RPi image from here - https://drive.google.com/open?id=0B3...WlVc054QmZZNFk
    - Extract it with WinRAR - http://www.rarlab.com/download.htm
    - Burn to a mini SD Card with - Win32 Disk Imager - https://sourceforge.net/projects/win32diskimager/

    The Second Piece -
    - This is the Windows app that automatically generates the config.json file.
    - The latest version has an Advanced option, where you can customize the strings and values, and decide which type of devices it should query (I'll be adding more device types soon). I have numerous Z-Wave devices by different vendors, and it works with all of them, but for non-zwave devices, you might have tweak the strings and values a bit.
    - Once you have the correct JSon file, the app can automatically upload it to your RPi
    - Download the app from here - https://drive.google.com/open?id=0B3...ThDbTRsOHJRRjg
    - Then extract and run it.

    Little more detailed instructions

    Raspberry Pi -
    - I've tested the Image on a Raspberry Pi 3. I'm hoping it works on older models too, but I'm not sure.
    - You shouldn't have much trouble creating the image. You just extract and burn. But if you need detailed instructions on how to create an RPi image, have a look here - https://www.raspberrypi.org/document...ages/README.md
    - Once you have your image burnt on a SD Card, stick it into your RPi, plug in your network, and power it up.
    - It takes less than a minute to boot up.

    Windows App -
    1. Click on the "First Boot" button. All this does is to expand your Raspberry Pi image to take up the entire SD Card space and reboot the device.
    2. Enter your HomeSeer information
    3. Click on "Advanced" button and select the device types you want to generate config file for
    4. Click on "Generate Config"
    5. If all goes well, it should generate. If not, it should tell you which device caused an error. Locate the device with that reference ID in HomeSeer.
    - Click on the device in HomeSeer
    - Click on the "Advanced" tab, make sure the "Device Type String" matches what's in the app.
    - Also, click on the "Status Graphics" tab, and make sure your values match what's in the app (on, off, heat, cool, auto, etc.)
    6. Once the config is generated, click on "Upload Config"

    Hopefully, that's it. Now you just need to configure the Home app on your phone. If you can't figure it out, let me know and I'll write up some basic instructions.

    This has been under development for 2 months now, and a lot of issues have been ironed out (I'm sure there are many more issues), but if you want more detail and to see how others have gotten it working, start on this page - https://forums.homeseer.com/showthre...177016&page=38

    Let me know if u have any issues. I'll be happy to help.

    #2
    Jumper, this image works amazingly well,, however I'd like to install this on a PI I already have which I'm using for local GPIO control. Is it possible for you to tell us what I need to install onto another pi to get this up and running (so I don't have to have a dedicated pi just for this??

    Thanks

    Jim

    Comment


      #3
      I pretty much followed this guide to get it working, plus some additional customization to get it working with my Windows app - https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi. It's not too bad, but it might be easier to bring your GPIO configuration to this image.

      Comment


        #4
        I added MQTT to your build and it all works sweet!

        Comment


          #5
          Thank you!

          Thank you for all your work on this! Just ordered my Homeseer and finally ditching my Vera Plus. You have saved me countless hours of doing all this myself as without Homebridge I would not have come over to Homeseer.

          Comment


            #6
            Problem with Garage Doors "Opening" Constant

            I am having a problem where my garage doors say "Opening" constantly. My garage doors are virtual devices which have 0 for closed and 255 for opened.

            In homekit if I press the garage door button it goes from "opening" to closed. Then the function of the garage door works. But it always seems to get itself to a state of "Opening". While the devices in homeseer report accurately.

            Is anyone else experiencing anything like this?

            Thanks

            Comment


              #7
              @copperlab, you might need more than one value for stateOpenValues and stateClosedValues. In HomeSeer, click on your garage device, then click on "Status Graphics", and see which values are listed for Open/Close. Finally, adjust your config.json file accordingly. For example mine, needs two values for each -

              {
              "ref": 196,
              "type": "GarageDoorOpener",
              "name": "Garage",
              "stateRef": 196,
              "statusUpdateCount": 15,
              "stateOpenValues": [
              100, 1
              ],
              "stateClosedValues": [
              200, 2
              ],
              "controlRef": 196,
              "controlOpenValue": 100,
              "controlCloseValue": 200,
              "uuid_base": "GarageDoor196"
              }

              Comment


                #8
                Originally posted by jumper4000 View Post
                @copperlab, you might need more than one value for stateOpenValues and stateClosedValues. In HomeSeer, click on your garage device, then click on "Status Graphics", and see which values are listed for Open/Close. Finally, adjust your config.json file accordingly. For example mine, needs two values for each -

                {
                "ref": 196,
                "type": "GarageDoorOpener",
                "name": "Garage",
                "stateRef": 196,
                "statusUpdateCount": 15,
                "stateOpenValues": [
                100, 1
                ],
                "stateClosedValues": [
                200, 2
                ],
                "controlRef": 196,
                "controlOpenValue": 100,
                "controlCloseValue": 200,
                "uuid_base": "GarageDoor196"
                }
                I've tried this a bunch of different ways. And can't seem to get the devices to just say Opening... I will post my config. And maybe someone can point me in the right direction.

                The config is pretty basic. It is a z-wave relay that pulses when switched on. And a tilt sensor on the garage door. Homeseer reports perfectly. using the events below. But this home bridge is just saying opening... . That is until I click the door. Then it will go to closed on iPhone. And will report properly for a time but whenever there is nothing cached in home kit on the iPhone. And it goes to the home bridge to get statuses it goes back to opening...

                Here is the default config.json portion. I have tried the suggestion above. But seems to make no difference.

                EDIT: Just realized my pictures are from two different doors. I have three garage doors. All events are the same. So just know that I have events for each door and devices for each door and they do line up and work with homeseer. Thanks.

                {
                "ref": 253,
                "type": "GarageDoorOpener",
                "name": "Garage Door Middle",
                "stateRef": 253,
                "statusUpdateCount": 15,
                "stateOpenValues": [
                255
                ],
                "stateClosedValues": [
                0
                ],
                "controlRef": 253,
                "controlOpenValue": 255,
                "controlCloseValue": 0,
                "uuid_base": "GarageDoor253"
                },
                Attached Files

                Comment


                  #9
                  Im running windows 7 embedded on a S6 Pro home troller. What exactly do I need to do to get Siri and Homeseer working together for windows. Im a little confused if all steps are windows or just some are. I used to have fragile plugin but had to do a system restore and lost it and its not available anymore

                  A detailed outline of everything to do would be amazing.. Thank you

                  Comment


                    #10
                    Need your help Jumper

                    Hey Jumper

                    I did all your steps and it appears everything was done right. Now when I open the window app and follow your steps I get below error messages. Please help!



                    See the end of this message for details on invoking
                    just-in-time (JIT) debugging instead of this dialog box.

                    ************** Exception Text **************
                    System.IO.FileNotFoundException: Could not load file or assembly 'Renci.SshNet, Version=2016.0.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106' or one of its dependencies. The system cannot find the file specified.
                    File name: 'Renci.SshNet, Version=2016.0.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106'
                    at HomeBridgeConfigMaker.Form1.btnFirstBoot_Click(Object sender, EventArgs e)
                    at System.Windows.Forms.Control.OnClick(EventArgs e)
                    at System.Windows.Forms.Button.OnClick(EventArgs e)
                    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
                    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
                    at System.Windows.Forms.Control.WndProc(Message& m)
                    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
                    at System.Windows.Forms.Button.WndProc(Message& m)
                    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(M essage& m)
                    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Mes sage& m)
                    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

                    WRN: Assembly binding logging is turned OFF.
                    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                    Note: There is some performance penalty associated with assembly bind failure logging.
                    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



                    ************** Loaded Assemblies **************
                    mscorlib
                    Assembly Version: 4.0.0.0
                    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
                    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
                    ----------------------------------------
                    HomeBridge Config Maker
                    Assembly Version: 1.0.0.0
                    Win32 Version: 1.0.0.0
                    CodeBase: file:///C:/Users/homeseer/Desktop/HomeBridge%20Config%20Maker/HomeBridge%20Config%20Maker.exe
                    ----------------------------------------
                    System.Windows.Forms
                    Assembly Version: 4.0.0.0
                    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
                    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
                    ----------------------------------------
                    System.Drawing
                    Assembly Version: 4.0.0.0
                    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
                    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
                    ----------------------------------------
                    System
                    Assembly Version: 4.0.0.0
                    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
                    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
                    ----------------------------------------
                    System.Xml
                    Assembly Version: 4.0.0.0
                    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
                    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
                    ----------------------------------------
                    Accessibility
                    Assembly Version: 4.0.0.0
                    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
                    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
                    ----------------------------------------

                    ************** JIT Debugging **************
                    To enable just-in-time (JIT) debugging, the .config file for this
                    application or computer (machine.config) must have the
                    jitDebugging value set in the system.windows.forms section.
                    The application must also be compiled with debugging
                    enabled.

                    For example:

                    <configuration>
                    <system.windows.forms jitDebugging="true" />
                    </configuration>

                    When JIT debugging is enabled, any unhandled exception
                    will be sent to the JIT debugger registered on the computer
                    rather than be handled by this dialog box.

                    Comment


                      #11
                      I should also note Im using a S6 home troller with embedded windows 7. And I have my boot drive as a 16GB flash drive. Is this possible with my setup?

                      Comment


                        #12
                        @copperlab, I have a similar setup to yours for my gates (a relay switch and sensor), and it works fine. However, I have the garage door device setup a little differently. I don't have opening/closing states, and for my Control Use, I have "Door Lock" and "Door Unlock" instead of on/off. Maybe that's why yours isn't working. This is how I have mine setup -
                        Attached Files

                        Comment


                          #13
                          @csullivan2005, this requires two pieces. One is the Raspberry Pi 3, which you can buy from Amazon for around $35, and a Windows computer to create the configuration file and to control the Raspberry Pi. This can be any Windows computer though, because you only need the Windows app for the initial configuration. Once you get it working, you don't need the Windows app anymore. I'm not sure how it will work on Windows 7 Embedded, but you do need to have .Net 4.0 installed, and all files from the zip file need to be extracted in the same folder. If you have another computer laying around with a normal version of Windows (I've tested it with Windows 10), see if you can run it on that.

                          Comment


                            #14
                            Jumper

                            I have no experience with raspberry Pi


                            Is there an amazon link you can send me of a good one to get. Do I need it in a case? So do I just hook up an ethernet to the raspberry PI 3? Do I need to have it connected to my computer at all? Besides inserting SD card into it do I need to do anything else with it. If inserting an SD Card and ethernet into it is all I need to do than I can definitely handle that. I do have net 4.0 installed

                            Thanks!
                            Chris

                            Comment


                              #15
                              Also will this setup work with the incoming Apple homepod?

                              Comment

                              Working...
                              X