Siri / HomeKit support for Domoticz

Moderator: leecollings

ivom74
Posts: 52
Joined: Wednesday 03 September 2014 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by ivom74 »

I overwrite /home/pi/homebridge/platforms/Domoticz.js with the file from the forum.
Now I get the following error: Error: Cannot find module '../lib/HAP-NodeJS/accessories/types.js

How can I install this?

Code: Select all

> [email protected] start /home/pi/homebridge
> node app.js

Starting HomeBridge server...
*** 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>
Loading 1 platforms...
module.js:338
    throw err;
          ^
Error: Cannot find module '../lib/HAP-NodeJS/accessories/types.js'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/pi/homebridge/platforms/Domoticz.js:32:13)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

npm ERR! Linux 4.1.4-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v0.12.6
npm ERR! npm  v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'node app.js'.
npm ERR! This is most likely a problem with the homebridge package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node app.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls homebridge
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/homebridge/npm-debug.log
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

Follow the wiki procedure and NodeJS will be installed.
Not using Domoticz anymore
ivom74
Posts: 52
Joined: Wednesday 03 September 2014 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by ivom74 »

G3rard wrote:Follow the wiki procedure and NodeJS will be installed.
I did that, and it looks like it's installed. The directory node.js contains 1 file: node_latest_armhf.deb

Code: Select all

pi@raspberrypi ~/node.js $ node -v
v0.12.6


[code]pi@raspberrypi ~/node.js $ sudo dpkg -i node_latest_armhf.deb
(Reading database ... 96771 files and directories currently installed.)
Preparing to replace node 0.12.6-1 (using node_latest_armhf.deb) ...
Unpacking replacement node ...
Setting up node (0.12.6-1) ...
Processing triggers for man-db ...
What did I miss? by the way, thank you for your fast reply. Really nice the help I get on this forum !
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

I would suggest you do a new full install following the wiki. In the log there is also an error regarding homebridge.
Not using Domoticz anymore
ivom74
Posts: 52
Joined: Wednesday 03 September 2014 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by ivom74 »

G3rard wrote:I would suggest you do a new full install following the wiki. In the log there is also an error regarding homebridge.

I think i have to wait for a complete image for raspberry pi 2. I did a fresh install on the pi 1 and didn't get it to work. On the pi 2 it worked a little bit, just warnings but now i got errors. After copy of the Domoticz module file it doesn't work anymore.

I really like this application, works nice to control by voice.
ivom74
Posts: 52
Joined: Wednesday 03 September 2014 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by ivom74 »

G3rard wrote:I would suggest you do a new full install following the wiki. In the log there is also an error regarding homebridge.
I wonder what command installs the /home/pi/homebridge/lib directory? I tried a clean install before but didn't find this directory??

Is it a link or something?
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

I don't have that lib folder.

Maybe you can check this link for install on a Pi https://github.com/nfarina/homebridge/w ... spberry-Pi
Not using Domoticz anymore
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

A new bridged mode is implemented lately https://github.com/nfarina/homebridge/w ... tion-Guide

Anyone tried this already? And does that mean changes to Domoticz.js have to be made?
Not using Domoticz anymore
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Siri / HomeKit support for Domoticz

Post by Eduard »

G3rard wrote:A new bridged mode is implemented lately https://github.com/nfarina/homebridge/w ... tion-Guide

Anyone tried this already? And does that mean changes to Domoticz.js have to be made?
Works great! In iOS HomeKit you only have to pair HomeBridge once! Every change (add or rename a switch for example) is updated after a restart of the HomeBridge service. You don't have to add all your switches one by one.
If you have for example 3 switches in a room, only adding HomeBridge in HomeKit wil actually add all 3 switches!!
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

Great, that's indeed a lot easier! Thanks for the feedback, will update to that new version as well.
Not using Domoticz anymore
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Siri / HomeKit support for Domoticz

Post by Eduard »

G3rard wrote:Great, that's indeed a lot easier! Thanks for the feedback, will update to that new version as well.

BTW, how do you upgrade to a new version? I did an new wget clone, npm install but that takes a long (compile-)time. Is there a faster way?
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

No idea yet how to upgrade, so I certainly don't know if there is a faster way...
Which steps did you follow?
Not using Domoticz anymore
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Siri / HomeKit support for Domoticz

Post by Eduard »

G3rard wrote:No idea yet how to upgrade, so I certainly don't know if there is a faster way...
Which steps did you follow?
I just renamed the HomeBridge folder to HomeBridge old and started to follow the Wiki to install from scratch

[EDIT] Also no problems anymore with the perstist-folder :D
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

I did the same, but got an error...

Code: Select all

/home/pi/homebridge/node_modules/HAP-NodeJS/lib/Accessory.js:159
      throw new Error("Cannot add a bridged Accessory with the same UUID as an
            ^
Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 89330305-7111-49e4-96e7-fc81521a1b39
Same issue as http://www.domoticz.com/forum/viewtopic ... 285#p52285.
Even if I only add one device to the room the issue is there...

This is my config.json

Code: Select all

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

    "description": "Configuration file for Domoticz platform.",
	
    "platforms": [
        {
            "platform": "Domoticz",
            "name": "Domoticz",
            "server": "192.168.1.102",
            "port": "8084",
	         "roomid": "11"
        }
    ],
    "accessories": [
    ]
}
Not using Domoticz anymore
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Siri / HomeKit support for Domoticz

Post by Eduard »

Should be fixed in the latest version, i did not test this yet.

My solution what to disable the get-scene code in Domoticz.js :D
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

I used the latest version, so the issue seems to be still there.
I will disable the scene part in Domoticz.js.
Not using Domoticz anymore
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Siri / HomeKit support for Domoticz

Post by Eduard »

G3rard wrote:I used the latest version, so the issue seems to be still there.
I will disable the scene part in Domoticz.js.
Sorry, it was in a test-branch. It is now merged into the master-branche. Please try again
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

Great, I just saw that on GitHub. Will try it this evening.

[Edit] New install worked. First still a issue in Eve (homekit app) when I had added scenes to the room. But when removing the scenes from the room it worked. The scenes are standard added to homekit.
Last edited by G3rard on Tuesday 25 August 2015 21:47, edited 1 time in total.
Not using Domoticz anymore
wokkelp
Posts: 24
Joined: Monday 24 August 2015 22:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by wokkelp »

Okay, I think I got it running now.
This is my output:
> [email protected] start /home/pi/homebridge
> DEBUG=* node app.js || true

*** 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=libdn ... ceRegister>
Starting HomeBridge server...
_____________________________________________________________________
IMPORTANT: Homebridge is in the middle of some big changes.
Read more about it here:
https://github.com/nfarina/homebridge/w ... tion-Guide
_____________________________________________________________________

Loading 1 platforms...
[Domoticz] Initializing Domoticz platform...
[Domoticz] Fetching Domoticz lights and switches...
Loading 0 accessories...
[Domoticz] Initializing platform accessory 'Eetkamer 1'...
[Domoticz] Loaded services for Eetkamer 1
[Domoticz] Initializing platform accessory 'Keuken 1'...
[Domoticz] Loaded services for Keuken 1
[Domoticz] Initializing platform accessory 'Woonkamer 1'...
[Domoticz] Loaded services for Woonkamer 1
[Domoticz] Initializing platform accessory 'Woonkamer 2'...
[Domoticz] Loaded services for Woonkamer 2
[Domoticz] Initializing platform accessory 'Woonkamer 3'...
[Domoticz] Loaded services for Woonkamer 3
[Domoticz] Initializing platform accessory 'Alles AAN'...
[Domoticz] Loaded services for Alles AAN
[Domoticz] Initializing platform accessory 'Alles UIT'...
[Domoticz] Loaded services for Alles UIT
EventedHTTPServer Server listening on port 51826 +0ms
I think it is working..?
But somehow I can't see anything popping up in Insteon or in Eve....
The devices are both in the same subnet.
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by G3rard »

wokkelp wrote:Okay, I think I got it running now.
This is my output:
I think it is working..?
But somehow I can't see anything popping up in Insteon or in Eve....
The devices are both in the same subnet.
Have you put scenes in the room in Domoticz? I had that and then it doesn't seem to work. Just remove the scenes from the room as they are imported anyway.
Then restart Homebridge and clear the Homekit on your iOS. Then it should work.
Not using Domoticz anymore
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest