Ankündigung

Einklappen
Keine Ankündigung bisher.

Siri homekit solution

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Siri homekit solution

    Hi all,

    I justed wanted to share the plugin I built to connect your Loxone with Homekit / Siri easily. It is using a websocket connection for fast connectivity and it automatically loads all your controls.
    GitHub

    Make sure to log any issues in GitHub if you would find anything wrong!
    homebridge-loxone-ws - Websocket based Loxone plugin for homebridge

  • #2
    Very nice! I'll have a look at this for sure.

    There's just something I don't really understand. When I read the readme file on your Github page, it says to install it via a $sudo command. This makes be believe this runs on Linux? If so, how can I get this installed onto my iPhone to actually use it?

    I'm sorry if this is a stupid question, but I want to learn.

    Kommentar


    • COMHOME
      COMHOME kommentierte
      Kommentar bearbeiten
      Your iPhone will connect via Siri API with HomeBridge + this script from sam on a raspi. To Modify some settings, you can use the built-in Home App from Apple or "Eve" (more to read in github docs ).

    • Gast-Avatar
      Gast kommentierte
      Kommentar bearbeiten
      Hi, indeed as Comhome indicated, my setup is a raspberry pi hosting the homebridge, but any Linux server would do. For installation, just follow the readme's of Homebridge + the one of my plugin.

  • #3
    I took some time today (about 2 hours) and made my first experiences with Homebridge and your awesome plugin! Running on my Intel Nuc, Win10Pro64. It works like a charm with nearly zero-configuration! I can't believe, that i can talk to my home, nearly 9 hours after my first Apple Watch arrived... Awesome work, man!
    Loxone: 1xMS, 2xExt, 2xRelay, 1xDimmer, 1xMulti Extension Air
    Tree: 10xTouch, 8xBWM, 8xStellantrieb
    Air: 5xRauchmelder, 9xRGBW Dimmer, 2xRemote, 1xNanoIO, 1xBWM, 2xSmart Socket
    Audio: Music Server 8 Zonen + 1xVerstärker (12 Ausgänge)

    KNX: 2xGira Tastsensor 3 Komfort, 2xGira Bewegungsmelder Unterputz
    Internet: Ubiquiti Unifi Security Gateway (100MBit VDSL2 T-COM / 100MBit Unitymedia)
    Netzwerk: Ubiquiti Unifi Switch 24 (LAN) + 4xUnifi AP AC PRO (WLAN)
    Speicher: Synology DS416j (4x6TB, Raid5)

    Kommentar


    • topbite
      topbite kommentierte
      Kommentar bearbeiten
      Hi comhome,

      I'm a complete linux newbie - you installed homebridge and plugin on a win1064bit System? How does it work?

    • COMHOME
      COMHOME kommentierte
      Kommentar bearbeiten
      Works well. For Installation, just follow the instructions

  • #4
    After installing and starting homebridge i get this output:
    Code:
    Loading 0 accessories...
    [12/8/2016, 7:15:05 PM] [Loxone] LOXONE WS: connect
    /usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/node-lox-ws-api/lib/API.js:80
            that._auth.authorize();
                      ^
    
    TypeError: Cannot read property 'authorize' of undefined
        at Connection.<anonymous> (/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/node-lox-ws-api/lib/API.js:80:19)
        at emitNone (events.js:86:13)
        at Connection.emit (events.js:185:7)
        at WebSocketClient.<anonymous> (/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/node-lox-ws-api/lib/Connection.js:67:14)
        at emitOne (events.js:96:13)
        at WebSocketClient.emit (events.js:188:7)
        at WebSocketClient.succeedHandshake (/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/websocket/lib/WebSocketClient.js:335:10)
        at WebSocketClient.validateHandshake (/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/websocket/lib/WebSocketClient.js:319:10)
        at ClientRequest.handleRequestUpgrade (/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/websocket/lib/WebSocketClient.js:248:14)
        at emitThree (events.js:116:13)
    What could be the reason?

    Kommentar


    • COMHOME
      COMHOME kommentierte
      Kommentar bearbeiten
      Seems there is an error in the config.json - Are you sure you filled in the correct Loxone Miniserver User data?

    • Thotti
      Thotti kommentierte
      Kommentar bearbeiten
      Thank you. Yes, was an error in config.json. Now it works! Great job. :-)

  • #5
    I got another issue, happening between 30 minutes and 8 hours... on sunday, i updated the plugin to 1.0.2. From that point on, the script is stopping after a while, bringing this exception.

    C:\Users\Admin\AppData\Roaming\npm\node_modules\ho mebridge-loxone-ws\node_modules\node-lox-ws-api\lib\Connection.js:80
    that._ws.connection.sendUTF('keepalive');
    ^

    TypeError: Cannot read property 'sendUTF' of undefined
    at null._repeat (C:\Users\Admin\AppData\Roaming\npm\node_modules\h omebridge-loxone-ws\node_modules\node-lox-ws-api\lib\Connection.js:80:28)
    at wrapper [as _onTimeout] (timers.js:275:19)
    at Timer.listOnTimeout (timers.js:92:15)
    Maybe you have any idea? Thx
    Zuletzt geändert von COMHOME; 17.12.2016, 00:04.
    Loxone: 1xMS, 2xExt, 2xRelay, 1xDimmer, 1xMulti Extension Air
    Tree: 10xTouch, 8xBWM, 8xStellantrieb
    Air: 5xRauchmelder, 9xRGBW Dimmer, 2xRemote, 1xNanoIO, 1xBWM, 2xSmart Socket
    Audio: Music Server 8 Zonen + 1xVerstärker (12 Ausgänge)

    KNX: 2xGira Tastsensor 3 Komfort, 2xGira Bewegungsmelder Unterputz
    Internet: Ubiquiti Unifi Security Gateway (100MBit VDSL2 T-COM / 100MBit Unitymedia)
    Netzwerk: Ubiquiti Unifi Switch 24 (LAN) + 4xUnifi AP AC PRO (WLAN)
    Speicher: Synology DS416j (4x6TB, Raid5)

    Kommentar


    • #6
      Hello,
      I had the same issue. It's something inside the websocket library, I created a GitHub issue for this.

      Kommentar


      • #7
        Hi,
        very nice plugin and setting up is so easy. Awesome work.

        Kommentar


        • #8
          Just installed the plugin on my Raspberry and it works :-))
          Great job, thank you very much.

          I would add a link to your script on the Loxone wiki, i hope thats o.k.?

          Miniserver, 1-wire, KNX, Pollin AVR-net-io

          Kommentar


          • Gast-Avatar
            Gast kommentierte
            Kommentar bearbeiten
            thanks. sure!

        • #9
          Hello Together


          that is a real great tool

          i just get it to work

          cheers
          Zuletzt geändert von Cosmit; 14.01.2017, 15:05.

          Kommentar


          • #10
            worked like a charm, installed on an Ubuntu 16.04 VM. Thanks!

            Kommentar


            • #11
              Hi guys, I tried to install homebridge on the loxberry project to test the script. Something is going wrong:

              Code:
              root@loxberry:~# npm install -g --unsafe-perm homebridge
              /usr/local/bin/homebridge -> /usr/local/lib/node_modules/homebridge/bin/homebridge
              
              > mdns@2.3.3 install /usr/local/lib/node_modules/homebridge/node_modules/mdns
              > node-gyp rebuild
              
              make: Entering directory '/usr/local/lib/node_modules/homebridge/node_modules/mdns/build'
                CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
              make: g++: Command not found
              dns_sd_bindings.target.mk:149: recipe for target 'Release/obj.target/dns_sd_bindings/src/dns_sd.o' failed
              make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 127
              make: Leaving directory '/usr/local/lib/node_modules/homebridge/node_modules/mdns/build'
              gyp ERR! build error
              gyp ERR! stack Error: `make` failed with exit code: 2
              gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
              gyp ERR! stack     at emitTwo (events.js:106:13)
              gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
              gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
              gyp ERR! System Linux 4.4.13-v7+
              gyp ERR! command "/usr/local/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
              gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/mdns
              gyp ERR! node -v v6.11.1
              gyp ERR! node-gyp -v v3.4.0
              gyp ERR! not ok
              /usr/local/lib
              └── (empty)
              
              npm ERR! Linux 4.4.13-v7+
              npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "install" "-g" "--unsafe-perm" "homebridge"
              npm ERR! node v6.11.1
              npm ERR! npm  v3.10.10
              npm ERR! code ELIFECYCLE
              
              npm ERR! mdns@2.3.3 install: `node-gyp rebuild`
              npm ERR! Exit status 1
              npm ERR!
              npm ERR! Failed at the mdns@2.3.3 install script 'node-gyp rebuild'.
              npm ERR! Make sure you have the latest version of node.js and npm installed.
              npm ERR! If you do, this is most likely a problem with the mdns package,
              npm ERR! not with npm itself.
              npm ERR! Tell the author that this fails on your system:
              npm ERR!     node-gyp rebuild
              npm ERR! You can get information on how to open an issue for this project with:
              npm ERR!     npm bugs mdns
              npm ERR! Or if that isn't available, you can get their info via:
              npm ERR!     npm owner ls mdns
              npm ERR! There is likely additional logging output above.
              
              npm ERR! Please include the following file with any support request:
              npm ERR!     /root/npm-debug.log
              npm ERR! code 1
              Anyone any ideas?

              Kommentar


              • tholle
                tholle kommentierte
                Kommentar bearbeiten
                Hi Scrati, u'll need a compiler like e.g. g++-4.9.

                >sudo apt-get install g++-4.9

              • Scrati
                Scrati kommentierte
                Kommentar bearbeiten
                Hi tholle, I already installed the compiler...maybe something went wrong with that. if I type "g++-4.9 -v" I get an answer at least.

            • #12
              Ok guys, I got a hint from this side:

              The error states that no g++ is available but it is but only known as g++4.9 hence I typed the following:
              Code:
               sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9

              Kommentar


              • #13
                Thank you for the hint and sharing the link to the solution.

                Hope, everything is working well now.

                tholle

                Kommentar


                • #14
                  Hi there, I have Homebridge up and running and the script as well. I established a new user granted with the rights on window blinds, lights. Finally it should not exceed the max items of 100 - actually 69. Nevertheless some items are missing, e.g. main light in guest bath room is missing while the light at the mirror ist there. Main bathroom is missing completeley. All have the same category and rights for homebridge user.

                  How can I figure out what is going wrong there?

                  Kommentar


                  • #15
                    Hi Scrati

                    if you habe more then one time a light called with the same name it will be in the config but will only show up once.
                    Homebridge is only sorted by names and not rooms.
                    Rename the main light with the associated room in the Lox Config and it will show up with in the HOME app

                    Kommentar


                    • Scrati
                      Scrati kommentierte
                      Kommentar bearbeiten
                      Thanks a lot. I will have a look at it. It seems like this is the reason.
                      Nevertheless this would lead to a weird usability of the Loxone App? e.g.: "bath main light" when I am already in the bathroom tab.
                  Lädt...
                  X