Siri / HomeKit support for Domoticz

Moderator: leecollings

Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by Heisenberg »

Hi, I need some help. After running 'npm run start' all the devices loaded correctly but then I get these errors. How can I solve this?

Code: Select all

 Accessory [Homebridge] Creating new AccessoryInfo for our HAP server +0ms
  Accessory [Homebridge] Creating new IdentifierCache +31ms
  EventedHTTPServer Server listening on port 51826 +229ms
[Domoticz] Initializing device with name Achterdeur...
[Domoticz] Loaded services for Achterdeur
/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: 4df14a6b-862e-43a3-9a65-cec791c7d4fd
    at Bridge.Accessory.addBridgedAccessory (/home/pi/homebridge/node_modules/HAP-NodeJS/lib/Accessory.js:159:13)
    at /home/pi/homebridge/app.js:145:26
    at Request._callback (/home/pi/homebridge/platforms/Domoticz.js:129:5)
    at Request.self.callback (/home/pi/homebridge/node_modules/request/request.js:373:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/home/pi/homebridge/node_modules/request/request.js:1318:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/home/pi/homebridge/node_modules/request/request.js:1266:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
EDIT: after applying this fix it worked: https://github.com/nfarina/homebridge/b ... omoticz.js
Last edited by Heisenberg on Tuesday 15 September 2015 23:45, edited 1 time in total.
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
MJanssen
Posts: 1
Joined: Wednesday 09 September 2015 21:00
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by MJanssen »

I cannot manage to boot on startup. Tried both ways described. With PM2 i can get it running manually, with the big advantage that i can close the ssh session. But when i reboot my raspberry, it's not auto starting.
When i do de ps x command after reboot, PM2 is not running. Who can help me?
shoulder
Posts: 5
Joined: Friday 04 September 2015 13:31
Target OS: Raspberry Pi / ODroid
Domoticz version: V2
Contact:

Re: Siri / HomeKit support for Domoticz

Post by shoulder »

Read this thread a hundred of times.. still I'm stuck.
Can anyone please help?

Code: Select all

Loading 1 platforms...
[Domoticz] Initializing Domoticz platform...
[Domoticz] Fetching Domoticz lights and switches...
Loading 0 accessories...
[Domoticz] Initializing platform accessory 'Golvlampa'...
[Domoticz] Loaded services for Golvlampa
[Domoticz] Initializing platform accessory 'Jordglob'...
[Domoticz] Loaded services for Jordglob
[Domoticz] Initializing platform accessory 'Marantz'...
[Domoticz] Loaded services for Marantz
  Accessory [Homebridge] Creating new AccessoryInfo for our HAP server +0ms
  Accessory [Homebridge] Creating new IdentifierCache +27ms
  EventedHTTPServer Server listening on port 51826 +100ms
/home/pi/homebridge/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^
Error: dns service error: unknown
    at Error (native)
    at new Advertisement (/home/pi/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/home/pi/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
    at Advertiser.startAdvertising (/home/pi/homebridge/node_modules/HAP-NodeJS/lib/Advertiser.js:43:30)
    at Bridge.Accessory._onListening (/home/pi/homebridge/node_modules/HAP-NodeJS/lib/Accessory.js:352:20)
    at HAPServer.emit (events.js:104:17)
    at HAPServer._onListening (/home/pi/homebridge/node_modules/HAP-NodeJS/lib/HAPServer.js:153:8)
    at EventedHTTPServer.emit (events.js:104:17)
    at EventedHTTPServer.<anonymous> (/home/pi/homebridge/node_modules/HAP-NodeJS/lib/util/eventedhttp.js:62:10)
    at Server.emit (events.js:104:17)

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 »

shoulder wrote:Read this thread a hundred of times.. still I'm stuck.
Can anyone please help?

Code: Select all

Loading 1 platforms...
[Domoticz] Initializing Domoticz platform...
[Domoticz] Fetching Domoticz lights and switches...
Loading 0 accessories...
[Domoticz] Initializing platform accessory 'Golvlampa'...
[Domoticz] Loaded services for Golvlampa
[Domoticz] Initializing platform accessory 'Jordglob'...
[Domoticz] Loaded services for Jordglob
[Domoticz] Initializing platform accessory 'Marantz'...
[Domoticz] Loaded services for Marantz
  Accessory [Homebridge] Creating new AccessoryInfo for our HAP server +0ms
  Accessory [Homebridge] Creating new IdentifierCache +27ms
  EventedHTTPServer Server listening on port 51826 +100ms
/home/pi/homebridge/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^
Error: dns service error: unknown
    at Error (native)
    at new Advertisement (/home/pi/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/home/pi/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
    at Advertiser.startAdvertising (/home/pi/homebridge/node_modules/HAP-NodeJS/lib/Advertiser.js:43:30)
    at Bridge.Accessory._onListening (/home/pi/homebridge/node_modules/HAP-NodeJS/lib/Accessory.js:352:20)
    at HAPServer.emit (events.js:104:17)
    at HAPServer._onListening (/home/pi/homebridge/node_modules/HAP-NodeJS/lib/HAPServer.js:153:8)
    at EventedHTTPServer.emit (events.js:104:17)
    at EventedHTTPServer.<anonymous> (/home/pi/homebridge/node_modules/HAP-NodeJS/lib/util/eventedhttp.js:62:10)
    at Server.emit (events.js:104:17)

I got the same problem here. Everything worked fine but now I got this error. I updated Domotica 3013, could that be a problem?

I think deleting settings will solve the problem but I really like to know how this is happened?
shoulder
Posts: 5
Joined: Friday 04 September 2015 13:31
Target OS: Raspberry Pi / ODroid
Domoticz version: V2
Contact:

Re: Siri / HomeKit support for Domoticz

Post by shoulder »


I've reinstalled everything and followed the wiki, but got the same error.
Which settings do you mean?
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 »

shoulder wrote:
I've reinstalled everything and followed the wiki, but got the same error.
Which settings do you mean?
The settings you made with the app on your smartphone (Insteon+, Eve).
On Iphone go to settings-> Privacy and then Insteon+. Here is a button to reset the settings.
shoulder
Posts: 5
Joined: Friday 04 September 2015 13:31
Target OS: Raspberry Pi / ODroid
Domoticz version: V2
Contact:

Re: Siri / HomeKit support for Domoticz

Post by shoulder »

ivom74 wrote:
shoulder wrote:
I've reinstalled everything and followed the wiki, but got the same error.
Which settings do you mean?
The settings you made with the app on your smartphone (Insteon+, Eve).
On Iphone go to settings-> Privacy and then Insteon+. Here is a button to reset the settings.
Never got it working with domoticz, but previously with z way (razberry). Giving it a second try!
And deleting the settings. Thanks!
shoulder
Posts: 5
Joined: Friday 04 September 2015 13:31
Target OS: Raspberry Pi / ODroid
Domoticz version: V2
Contact:

Re: Siri / HomeKit support for Domoticz

Post by shoulder »

shoulder wrote:
ivom74 wrote:
shoulder wrote:
I've reinstalled everything and followed the wiki, but got the same error.
Which settings do you mean?
The settings you made with the app on your smartphone (Insteon+, Eve).
On Iphone go to settings-> Privacy and then Insteon+. Here is a button to reset the settings.
Never got it working with domoticz, but previously with z way (razberry). Giving it a second try!
And deleting the settings. Thanks!
No! After clean install of domoticz image and following the wiki exactly. This is what I get:

Code: Select all

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...
[Domoticz] Initializing Domoticz platform...
[Domoticz] Fetching Domoticz lights and switches...
Loading 0 accessories...
[Domoticz] Initializing device with name Golvlampa...
[Domoticz] Loaded services for Golvlampa
Cannot find secret key, creating One...
/home/pi/homebridge/lib/HAP-NodeJS/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^
Error: dns service error: unknown
    at Error (native)
    at new Advertisement (/home/pi/homebridge/lib/HAP-NodeJS/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/home/pi/homebridge/lib/HAP-NodeJS/node_modules/mdns/lib/advertisement.js:64:10)
    at Object.startAdvertising (/home/pi/homebridge/lib/HAP-NodeJS/Advertiser.js:7:28)
    at Object.publishAccessory (/home/pi/homebridge/lib/HAP-NodeJS/Accessory.js:10:29)
    at createHAPServer (/home/pi/homebridge/app.js:167:15)
    at /home/pi/homebridge/app.js:92:17
    at Request._callback (/home/pi/homebridge/platforms/Domoticz.js:91:6)
    at Request.self.callback (/home/pi/homebridge/node_modules/request/request.js:373:22)
    at Request.emit (events.js:110:17)

npm ERR! Linux 4.1.6-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v0.12.1
npm ERR! npm  v2.5.1
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

King1987
Posts: 10
Joined: Tuesday 28 July 2015 22:04
Target OS: NAS (Synology & others)
Domoticz version: 2020.2
Contact:

Re: Siri / HomeKit support for Domoticz

Post by King1987 »

Hi Guys,

does anyone have installed this on a Synology? Homebridge is installed, but Nodejs is not working. (yes, on version 0.10 but we need 0.12) When we want to install 0.12 you need g++ but I can only find an old version (4.3 and you need 4.8 or higher) in ipkg.

Does anyone have a nice solution?

Thanks :mrgreen:
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 »

King1987 wrote:Hi Guys,

does anyone have installed this on a Synology? Homebridge is installed, but Nodejs is not working. (yes, on version 0.10 but we need 0.12) When we want to install 0.12 you need g++ but I can only find an old version (4.3 and you need 4.8 or higher) in ipkg.

Does anyone have a nice solution?

Thanks :mrgreen:
I did try it but couldn't get it working. It was some while ago so don't know anymore what didn't work.
However Nodejs 0.12 is part of the Synology packages. You could try that. Please share your results.
Not using Domoticz anymore
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: Siri / HomeKit support for Domoticz

Post by dannybloe »

G3rard wrote:
King1987 wrote:Hi Guys,

does anyone have installed this on a Synology? Homebridge is installed, but Nodejs is not working. (yes, on version 0.10 but we need 0.12) When we want to install 0.12 you need g++ but I can only find an old version (4.3 and you need 4.8 or higher) in ipkg.

Does anyone have a nice solution?

Thanks :mrgreen:
I did try it but couldn't get it working. It was some while ago so don't know anymore what didn't work.
However Nodejs 0.12 is part of the Synology packages. You could try that. Please share your results.
It should be possible to somehow use the mdns libs on synology. I also gave up on Syno for now. But I also cannot get it to work on my RPi B+. First I can't get node 0.12.x installed (4.0.0 works) and second installing homebridge still give me the middle finger as well... Still trying to compile for the zillionth time as I write this..... :roll:

Code: Select all

ipkg list | grep avahi
avahi - 0.6.30-1 - A system for multicast DNS service discovery, an implementation of Zeroconf.
so there's something for Syno.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
charlysquare
Posts: 5
Joined: Monday 05 May 2014 2:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by charlysquare »

Hi,
I have installed the last version of homebridge with domoticz 2563.
Here is my config.json :

Code: Select all

  GNU nano 2.2.6                File: config.json                              Modified  

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

    "description": "devices",

    "platforms": [
        {
            "platform": "Domoticz",
            "name": "Domoticz",
            "server": "127.0.0.1",
            "port": "8080",
            "roomid": 9,
            "loadscenes": 1
        }
    ],

    "accessories": [
    ]
}
And the error I'm encountering :

Code: Select all

> [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=libdns_sd&e=node&f=DNSServiceRegister>
Starting HomeBridge server...
_____________________________________________________________________
IMPORTANT: Homebridge is in the middle of some big changes.
           Read more about it here:
           https://github.com/nfarina/homebridge/wiki/Migration-Guide
_____________________________________________________________________

Loading 1 platforms...
[Domoticz] Initializing Domoticz platform...
[Domoticz] Fetching Domoticz lights and switches...
Loading 0 accessories...
[Domoticz] There was a problem connecting to Domoticz.
[Domoticz] There was a problem connecting to Domoticz.
pi@raspberrypi ~/homebridge $ 
I don't know where to start.. Any idea ?
Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by Heisenberg »

This is odd. I have been able to connect to Homebridge with Eve. Everything works ok. But when I try to connect a second iPhone to Homebridge via Eve it does nothing. Any help?

Edit: I solved this by removing EVE and installing Insteon+. By adding 'Guest user' in Insteon+ I now can use my iPhone and iPad to control via Siri. Wife is happy :)
Last edited by Heisenberg on Friday 18 September 2015 15:56, edited 3 times in total.
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by Heisenberg »

charlysquare wrote:Hi,
I have installed the last version of homebridge with domoticz 2563.
Here is my config.json :

Code: Select all

  GNU nano 2.2.6                File: config.json                              Modified  

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

    "description": "devices",

    "platforms": [
        {
            "platform": "Domoticz",
            "name": "Domoticz",
            "server": "127.0.0.1",
            "port": "8080",
            "roomid": 9,
            "loadscenes": 1
        }
    ],

    "accessories": [
    ]
}
And the error I'm encountering :

Code: Select all

> [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=libdns_sd&e=node&f=DNSServiceRegister>
Starting HomeBridge server...
_____________________________________________________________________
IMPORTANT: Homebridge is in the middle of some big changes.
           Read more about it here:
           https://github.com/nfarina/homebridge/wiki/Migration-Guide
_____________________________________________________________________

Loading 1 platforms...
[Domoticz] Initializing Domoticz platform...
[Domoticz] Fetching Domoticz lights and switches...
Loading 0 accessories...
[Domoticz] There was a problem connecting to Domoticz.
[Domoticz] There was a problem connecting to Domoticz.
pi@raspberrypi ~/homebridge $ 
I don't know where to start.. Any idea ?
Looks like a connection issue with Domoticz. Maybe changing the server address 127.0.0.0 to your Domoticz ip address?
Were you able to add Homebridge with Eve or Insteon+?
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
charlysquare
Posts: 5
Joined: Monday 05 May 2014 2:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by charlysquare »

Nope, changing to Domoticz IP 192.168.0.175 is not working.
Under Insteon+ nothing detecting, anyway homebridge is not even starting, I go back directly to the command prompt.
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 »

charlysquare wrote:Nope, changing to Domoticz IP 192.168.0.175 is not working.
Under Insteon+ nothing detecting, anyway homebridge is not even starting, I go back directly to the command prompt.
My config.json part for Domoticz looks like this:

Code: Select all

 "platforms": [
        {
            "platform": "Domoticz",
            "name": "Domoticz",
            "server": "192.168.1.102",
            "port": "8084",
         "roomid": "11"
        }
I have a older version without the possibility to enable/disable scenes.
Difference is that roomid is between quotes. Maybe you can try that (and also for loadscenes if still not working)?
Not using Domoticz anymore
charlysquare
Posts: 5
Joined: Monday 05 May 2014 2:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by charlysquare »

not better
Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Siri / HomeKit support for Domoticz

Post by Heisenberg »

charlysquare wrote:not better
Try updating Domoticz.js. Then sudo reboot and see if it helps:

https://github.com/nfarina/homebridge/b ... omoticz.js
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
User avatar
tcviper
Posts: 89
Joined: Monday 30 June 2014 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by tcviper »

I tried installing this now a few times, but when i do i keep hitting this error on RPI2:

pi@raspberrypi ~/node.js $ node -v
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node)
node: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.16' not found (required by node)

This right after doing:
mkdir node.js
cd node.js
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb

Anyone any idea on this?
R0cc0
Posts: 7
Joined: Monday 26 January 2015 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by R0cc0 »

tcviper wrote:I tried installing this now a few times, but when i do i keep hitting this error on RPI2:

pi@raspberrypi ~/node.js $ node -v
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node)
node: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.16' not found (required by node)

This right after doing:
mkdir node.js
cd node.js
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb

Anyone any idea on this?

I have the exact same issue, Also on Rpi2.
I'm using Domoticz 2.3013. Any ideas?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest