Page 4 of 27

Re: Siri / HomeKit support for Domoticz

Posted: Saturday 13 June 2015 22:51
by simonrg
simon_rb wrote:Maybe I need to remove npm, node from the system completely and start again.. What would be the best way of doing that? Tried sudo NPM Unintsall but that didn't work
Your NPM installation looks ok, it appears to have a single file in the homebridge installation corrupted, but difficult to tell precisely a distance.

I would try to entirely reinstall homebridge.

Copy all the commands below into a terminal. These first move homebridge to homebridge1 and then repeat the complete installation as per the wiki and finally try to run homebridge again:

Code: Select all

cd ~
mv homebridge homebridge1
git clone https://github.com/nfarina/homebridge.git
cd homebridge
git submodule init
git submodule update
npm install
cd lib/HAP-NodeJS
npm install
cd ~/homebridge
cp ../homebridge1/config.json .
npm run start
P.S. it would be lot easier to follow your error messages into a code block, rather than upload a picture, as that way it is possible to check the full set of errors far more easily.

Re: Siri / HomeKit support for Domoticz

Posted: Saturday 13 June 2015 22:53
by simon_rb
Simonrg, ok I'll upload them from now on. Also I have just used the purge command to remove npm and node. Will try again.. Will also follow your commands. Thank you

Re: Siri / HomeKit support for Domoticz

Posted: Saturday 13 June 2015 23:40
by simon_rb
Same error codes and result.
Guess it's a no go on my raspberry pi...

Re: Siri / HomeKit support for Domoticz

Posted: Saturday 13 June 2015 23:52
by simonrg
It appears that there is a limit to how many devices homebridge can cope with. The original code fails with "port out of bounds", when I reduce the nextPort value in app.js from 51826 to 31826 my error disappears.

Now I just need to fix my iPhone to get the Keychain option back.

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 0:05
by simon_rb
Could that also be my problem? Saying that I ran it without a config.json file and had the same result.
This is from my debug log.

Code: Select all

GNU nano 2.2.6                                    File: /root/homebridge/npm-debug.log
9 verbose stack Exit status 
19 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1008:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
10 verbose pkgid [email protected] verbose cwd /root/homebridge12 error Linux 3.18.11+13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
14 error node v0.12.115 error npm  v2.5.116 error code ELIFECYCLE17 error [email protected] start: `node app.js`
17 error Exit status 118 error Failed at the [email protected] start script 'node app.js'.
18 error This is most likely a problem with the homebridge package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     node app.js
18 error You can get their info via:
18 error     npm owner ls homebridge
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 0:27
by simonrg
simon_rb wrote:Could that also be my problem? This is from my debug log.

Code: Select all

GNU nano 2.2.6                                    File: /root/homebridge/npm-debug.log
9 verbose stack Exit status 
19 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
.......
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
Doesn't look like it, if you look further up this thread you will see my very specific error message - port out of bounds.

What you have uploaded is I think part of the debug log which is helpful if npm itself is failing, but if the application is failing then the screen output before this is more useful - it should refer to files in the ~/homebridge path and give a specific error message, which may give a hint as to what is wrong.

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 0:31
by simon_rb
Thank you for your patience, is this better?

Code: Select all

Error: argument 8: port number is out of bounds.
    at Error (native)
    at new Advertisement (/root/homebridge/lib/HAP-NodeJS/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/root/homebridge/lib/HAP-NodeJS/node_modules/mdns/lib/advertisement.js:64:10)
    at Object.startAdvertising (/root/homebridge/lib/HAP-NodeJS/Advertiser.js:7:28)
    at Object.publishAccessory (/root/homebridge/lib/HAP-NodeJS/Accessory.js:10:29)
    at createHAPServer (/root/homebridge/app.js:167:15)
    at /root/homebridge/app.js:92:17
    at Request._callback (/root/homebridge/platforms/Domoticz.js:62:5)
    at Request.self.callback (/root/homebridge/node_modules/request/request.js:373:22)
    at Request.emit (events.js:110:17)

npm ERR! Linux 3.18.11+
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:

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 1:17
by simonrg
simon_rb wrote:Thank you for your patience, is this better?

Code: Select all

Error: argument 8: port number is out of bounds.
Yes, that's better it does look like the same error. Do you have hunderds of real devices, I do because of the way my system is configured? Or is your system full up with hundreds of Unknown devices?

Before modifying the code I would recommend removing the unknown devices from Domoticz, by turning off "Accept new hardware devices" and then going through your devices list deleting all unused / unknown devices. Then try npm run start.

If that doesn't work, then you can try my dumb tweak.

I edited app.js commented out the existing line and replaced it with the new line, as below:

Code: Select all

//var nextPort = 51826;
var nextPort = 31826;
If you do the same, then hopefully you will have a working homebridge.

BUT, I don't know if this will still work with homekit, because that bit I haven't been able to try, as I am unable to set the iCloud keychain on my IOS system.

There may be a reason why the nextPort was set at 51826 which I have wrecked.

Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 1:20
by simon_rb
I have 200 devices.. I'll try and trim it a bit.

But I have the same errors with homebridge not running even when I don't have a config file configured. So am I right in thinking it can't be the same error your having. For some reason homebridge won't run on my pi.

I've ran out of things to try now.

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 1:28
by simonrg
simon_rb wrote:I have 200 devices.. I'll try and trim it a bit.

But I have the same errors with homebridge not running even when I don't have a config file configured. So am I right in thinking it can't be the same error your having. For some reason homebridge won't run on my pi.

I've ran out of things to try now.
You need to post a lot more of your npm screen output to able to see what is going on with your system, do you get something like this:

Code: Select all

TCP server accepting connection on port: 61582
HAP Server is listening
[Domoticz] Initializing device with name Upstairs Mood 3...
[Domoticz] Loaded services for Upstairs Mood 3
TCP server accepting connection on port: 61928
HAP Server is listening
[Domoticz] Initializing device with name Upstairs Mood 4...
[Domoticz] Loaded services for Upstairs Mood 4
TCP server accepting connection on port: 62276
HAP Server is listening
[Domoticz] Initializing device with name Upstairs Mood 5...
[Domoticz] Loaded services for Upstairs Mood 5
TCP server accepting connection on port: 62626
HAP Server is listening
[Domoticz] Initializing device with name Upstairs Off...
[Domoticz] Loaded services for Upstairs Off
TCP server accepting connection on port: 62978
HAP Server is listening
[Domoticz] Initializing device with name XMAS...
[Domoticz] Loaded services for XMAS
TCP server accepting connection on port: 63332
HAP Server is listening
[Domoticz] Initializing device with name fred...
[Domoticz] Loaded services for fred
TCP server accepting connection on port: 63688
....then the errors????????
If so it is the same error, in which case try the change to app.js, suggested before.

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 1:29
by simonrg
simonrg wrote:
simon_rb wrote:I have 200 devices.. I'll try and trim it a bit.

But I have the same errors with homebridge not running even when I don't have a config file configured. So am I right in thinking it can't be the same error your having. For some reason homebridge won't run on my pi.

I've ran out of things to try now.
You need to post a lot more of your npm screen output (all from npm run start to final output on failure) to be able to see what is going on with your system, do you get something like this:

Code: Select all

TCP server accepting connection on port: 61582
HAP Server is listening
[Domoticz] Initializing device with name Upstairs Mood 3...
[Domoticz] Loaded services for Upstairs Mood 3
TCP server accepting connection on port: 61928
HAP Server is listening
[Domoticz] Initializing device with name Upstairs Mood 4...
[Domoticz] Loaded services for Upstairs Mood 4
TCP server accepting connection on port: 62276
HAP Server is listening
[Domoticz] Initializing device with name Upstairs Mood 5...
[Domoticz] Loaded services for Upstairs Mood 5
TCP server accepting connection on port: 62626
HAP Server is listening
[Domoticz] Initializing device with name Upstairs Off...
[Domoticz] Loaded services for Upstairs Off
TCP server accepting connection on port: 62978
HAP Server is listening
[Domoticz] Initializing device with name XMAS...
[Domoticz] Loaded services for XMAS
TCP server accepting connection on port: 63332
HAP Server is listening
[Domoticz] Initializing device with name fred...
[Domoticz] Loaded services for fred
TCP server accepting connection on port: 63688
....then the errors????????
If so it is the same error, in which case try the change to app.js, suggested before.

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 1:29
by simon_rb
I only get that if I use the config.json file.. However I have since removed that and I get the same error where homebridge won't start - even without finding any devices..

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 1:35
by simonrg
simon_rb wrote:I only get that if I use the config.json file.. However I have since removed that and I get the same error where homebridge won't start - even without finding any devices..
It is going to error without a config.json file, and I think the npm-debug.log file will look the same, because it doesn't capture the real error.

If all your screen output looks the same with or without the config.json file then you would have a different error.

BUT as you say it doesn't then (and you have a port out of bounds error), what counts is the bit referring to advertisment.js which is where homebridge fails, the lines after that tell you each of the functions which have called each other to call the ...DNSService..... which finally failed when it was called with a port out of bound value.

By changing the nextPort number in /home/pi/homebridge/app.js, I stop the port going out of bounds.

Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 1:58
by simon_rb
Getting an error message now saying it can't find module mdns however it is there as when I try to install it, it says it's installed and up to date. I'm going backwards lol

Edit:- working again now, this is the entire code from start to finish:-

Code: Select all

pi@raspberrypi ~ $ cd homebridge
pi@raspberrypi ~/homebridge $ npm run start

> [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=libd                                                                                        ns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not su                                                                                        pported (or only supported partially) in the Apple Bonjour compatibility layer o                                                                                        f Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libd                                                                                        ns_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 10 Sec...
[Domoticz] Loaded services for 10 Sec
Cannot find secret key, creating One...
TCP server accepting connection on port: 51826
HAP Server is listening
[Domoticz] Initializing device with name 120sec...
[Domoticz] Loaded services for 120sec
Cannot find secret key, creating One...
TCP server accepting connection on port: 51828
HAP Server is listening
[Domoticz] Initializing device with name 5 Sec...
[Domoticz] Loaded services for 5 Sec
Cannot find secret key, creating One...
TCP server accepting connection on port: 51832
HAP Server is listening
[Domoticz] Initializing device with name A1...
[Domoticz] Loaded services for A1
Cannot find secret key, creating One...
TCP server accepting connection on port: 51838
HAP Server is listening
[Domoticz] Initializing device with name A2...
[Domoticz] Loaded services for A2
Cannot find secret key, creating One...
TCP server accepting connection on port: 51846
HAP Server is listening
[Domoticz] Initializing device with name A3...
[Domoticz] Loaded services for A3
Cannot find secret key, creating One...
TCP server accepting connection on port: 51856
HAP Server is listening
[Domoticz] Initializing device with name A4...
[Domoticz] Loaded services for A4
Cannot find secret key, creating One...
TCP server accepting connection on port: 51868
HAP Server is listening
[Domoticz] Initializing device with name AV Amp QS2...
[Domoticz] Loaded services for AV Amp QS2
Cannot find secret key, creating One...
TCP server accepting connection on port: 51882
HAP Server is listening
[Domoticz] Initializing device with name AV Receiver...
[Domoticz] Loaded services for AV Receiver
Cannot find secret key, creating One...
TCP server accepting connection on port: 51898
HAP Server is listening
[Domoticz] Initializing device with name All Lights Off...
[Domoticz] Loaded services for All Lights Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 51916
HAP Server is listening
[Domoticz] Initializing device with name All On/Off...
[Domoticz] Loaded services for All On/Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 51936
HAP Server is listening
[Domoticz] Initializing device with name B1...
[Domoticz] Loaded services for B1
Cannot find secret key, creating One...
TCP server accepting connection on port: 51958
HAP Server is listening
[Domoticz] Initializing device with name B2...
[Domoticz] Loaded services for B2
Cannot find secret key, creating One...
TCP server accepting connection on port: 51982
HAP Server is listening
[Domoticz] Initializing device with name B3...
[Domoticz] Loaded services for B3
Cannot find secret key, creating One...
TCP server accepting connection on port: 52008
HAP Server is listening
[Domoticz] Initializing device with name B4...
[Domoticz] Loaded services for B4
Cannot find secret key, creating One...
TCP server accepting connection on port: 52036
HAP Server is listening
[Domoticz] Initializing device with name Bedroom...
[Domoticz] Loaded services for Bedroom
Cannot find secret key, creating One...
TCP server accepting connection on port: 52066
HAP Server is listening
[Domoticz] Initializing device with name Bedroom - TV...
[Domoticz] Loaded services for Bedroom - TV
Cannot find secret key, creating One...
TCP server accepting connection on port: 52098
HAP Server is listening
[Domoticz] Initializing device with name Bedroom Duo...
[Domoticz] Loaded services for Bedroom Duo
Cannot find secret key, creating One...
TCP server accepting connection on port: 52132
HAP Server is listening
[Domoticz] Initializing device with name Bedroom Film...
[Domoticz] Loaded services for Bedroom Film
Cannot find secret key, creating One...
TCP server accepting connection on port: 52168
HAP Server is listening
[Domoticz] Initializing device with name Bedroom Mode...
[Domoticz] Loaded services for Bedroom Mode
Cannot find secret key, creating One...
TCP server accepting connection on port: 52206
HAP Server is listening
[Domoticz] Initializing device with name Bedroom Sky...
[Domoticz] Loaded services for Bedroom Sky
Cannot find secret key, creating One...
TCP server accepting connection on port: 52246
HAP Server is listening
[Domoticz] Initializing device with name Bedroom Xbox...
[Domoticz] Loaded services for Bedroom Xbox
Cannot find secret key, creating One...
TCP server accepting connection on port: 52288
HAP Server is listening
[Domoticz] Initializing device with name Curtain Power...
[Domoticz] Loaded services for Curtain Power
Cannot find secret key, creating One...
TCP server accepting connection on port: 52332
HAP Server is listening
[Domoticz] Initializing device with name Curtain Power 2...
[Domoticz] Loaded services for Curtain Power 2
Cannot find secret key, creating One...
TCP server accepting connection on port: 52378
HAP Server is listening
[Domoticz] Initializing device with name Curtains...
[Domoticz] Loaded services for Curtains
Cannot find secret key, creating One...
TCP server accepting connection on port: 52426
HAP Server is listening
[Domoticz] Initializing device with name Dining Room - Celing Lights...
[Domoticz] Loaded services for Dining Room - Celing Lights
Cannot find secret key, creating One...
TCP server accepting connection on port: 52476
HAP Server is listening
[Domoticz] Initializing device with name Dining Room - TV...
[Domoticz] Loaded services for Dining Room - TV
Cannot find secret key, creating One...
TCP server accepting connection on port: 52528
HAP Server is listening
[Domoticz] Initializing device with name Dining Room - Tree Lights...
[Domoticz] Loaded services for Dining Room - Tree Lights
Cannot find secret key, creating One...
TCP server accepting connection on port: 52582
HAP Server is listening
[Domoticz] Initializing device with name Dining Room Lights Off Delay...
[Domoticz] Loaded services for Dining Room Lights Off Delay
Cannot find secret key, creating One...
TCP server accepting connection on port: 52638
HAP Server is listening
[Domoticz] Initializing device with name Dinner Time...
[Domoticz] Loaded services for Dinner Time
Cannot find secret key, creating One...
TCP server accepting connection on port: 52696
HAP Server is listening
[Domoticz] Initializing device with name Dinner Time Switch...
[Domoticz] Loaded services for Dinner Time Switch
Cannot find secret key, creating One...
TCP server accepting connection on port: 52756
HAP Server is listening
[Domoticz] Initializing device with name Dishwasher...
[Domoticz] Loaded services for Dishwasher
Cannot find secret key, creating One...
TCP server accepting connection on port: 52818
HAP Server is listening
[Domoticz] Initializing device with name Duo...
[Domoticz] Loaded services for Duo
Cannot find secret key, creating One...
TCP server accepting connection on port: 52882
HAP Server is listening
[Domoticz] Initializing device with name Duo Box...
[Domoticz] Loaded services for Duo Box
Cannot find secret key, creating One...
TCP server accepting connection on port: 52948
HAP Server is listening
[Domoticz] Initializing device with name Duo2...
[Domoticz] Loaded services for Duo2
Cannot find secret key, creating One...
TCP server accepting connection on port: 53016
HAP Server is listening
[Domoticz] Initializing device with name FON Wi Fi...
[Domoticz] Loaded services for FON Wi Fi
Cannot find secret key, creating One...
TCP server accepting connection on port: 53086
HAP Server is listening
[Domoticz] Initializing device with name Film...
[Domoticz] Loaded services for Film
Cannot find secret key, creating One...
TCP server accepting connection on port: 53158
HAP Server is listening
[Domoticz] Initializing device with name Finished Dinner Time...
[Domoticz] Loaded services for Finished Dinner Time
Cannot find secret key, creating One...
TCP server accepting connection on port: 53232
HAP Server is listening
[Domoticz] Initializing device with name Garden Receiver...
[Domoticz] Loaded services for Garden Receiver
Cannot find secret key, creating One...
TCP server accepting connection on port: 53308
HAP Server is listening
[Domoticz] Initializing device with name HDMI Matix Reset...
[Domoticz] Loaded services for HDMI Matix Reset
Cannot find secret key, creating One...
TCP server accepting connection on port: 53386
HAP Server is listening
[Domoticz] Initializing device with name HDMI Matrix 5.1 ...
[Domoticz] Loaded services for HDMI Matrix 5.1
Cannot find secret key, creating One...
TCP server accepting connection on port: 53466
HAP Server is listening
[Domoticz] Initializing device with name HDMI Transmitter...
[Domoticz] Loaded services for HDMI Transmitter
Cannot find secret key, creating One...
TCP server accepting connection on port: 53548
HAP Server is listening
[Domoticz] Initializing device with name HDMI Transmitter Dummy...
[Domoticz] Loaded services for HDMI Transmitter Dummy
Cannot find secret key, creating One...
TCP server accepting connection on port: 53632
HAP Server is listening
[Domoticz] Initializing device with name HTPC...
[Domoticz] Loaded services for HTPC
Cannot find secret key, creating One...
TCP server accepting connection on port: 53718
HAP Server is listening
[Domoticz] Initializing device with name HTPC Off...
[Domoticz] Loaded services for HTPC Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 53806
HAP Server is listening
[Domoticz] Initializing device with name Hall - Celing Lights...
[Domoticz] Loaded services for Hall - Celing Lights
Cannot find secret key, creating One...
TCP server accepting connection on port: 53896
HAP Server is listening
[Domoticz] Initializing device with name Home...
[Domoticz] Loaded services for Home
Cannot find secret key, creating One...
TCP server accepting connection on port: 53988
HAP Server is listening
[Domoticz] Initializing device with name Internet...
[Domoticz] Loaded services for Internet
Cannot find secret key, creating One...
TCP server accepting connection on port: 54082
HAP Server is listening
[Domoticz] Initializing device with name Internet Override...
[Domoticz] Loaded services for Internet Override
Cannot find secret key, creating One...
TCP server accepting connection on port: 54178
HAP Server is listening
[Domoticz] Initializing device with name Jack Transmitter...
[Domoticz] Loaded services for Jack Transmitter
Cannot find secret key, creating One...
TCP server accepting connection on port: 54276
HAP Server is listening
[Domoticz] Initializing device with name Jacks TV...
[Domoticz] Loaded services for Jacks TV
Cannot find secret key, creating One...
TCP server accepting connection on port: 54376
HAP Server is listening
[Domoticz] Initializing device with name Kitchen - TV...
[Domoticz] Loaded services for Kitchen - TV
Cannot find secret key, creating One...
TCP server accepting connection on port: 54478
HAP Server is listening
[Domoticz] Initializing device with name Landing - Celing Lights...
[Domoticz] Loaded services for Landing - Celing Lights
Cannot find secret key, creating One...
TCP server accepting connection on port: 54582
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Blue Lava Lamp...
[Domoticz] Loaded services for Living Room - Blue Lava Lamp
Cannot find secret key, creating One...
TCP server accepting connection on port: 54688
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Celing Lights...
[Domoticz] Loaded services for Living Room - Celing Lights
Cannot find secret key, creating One...
TCP server accepting connection on port: 54796
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Fire Place Lights...
[Domoticz] Loaded services for Living Room - Fire Place Lights
Cannot find secret key, creating One...
TCP server accepting connection on port: 54906
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Fish Tank Light...
[Domoticz] Loaded services for Living Room - Fish Tank Light
Cannot find secret key, creating One...
TCP server accepting connection on port: 55018
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Floor Standing Lamp...
[Domoticz] Loaded services for Living Room - Floor Standing Lamp
Cannot find secret key, creating One...
TCP server accepting connection on port: 55132
HAP Server is listening
[Domoticz] Initializing device with name Living Room - HDMI Matrix...
[Domoticz] Loaded services for Living Room - HDMI Matrix
Cannot find secret key, creating One...
TCP server accepting connection on port: 55248
HAP Server is listening
[Domoticz] Initializing device with name Living Room - HDMI Splitter...
[Domoticz] Loaded services for Living Room - HDMI Splitter
Cannot find secret key, creating One...
TCP server accepting connection on port: 55366
HAP Server is listening
[Domoticz] Initializing device with name Living Room - HTPC...
[Domoticz] Loaded services for Living Room - HTPC
Cannot find secret key, creating One...
TCP server accepting connection on port: 55486
HAP Server is listening
[Domoticz] Initializing device with name Living Room - LED TV Backlight...
[Domoticz] Loaded services for Living Room - LED TV Backlight
Cannot find secret key, creating One...
TCP server accepting connection on port: 55608
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Lights Mood 1...
[Domoticz] Loaded services for Living Room - Lights Mood 1
Cannot find secret key, creating One...
TCP server accepting connection on port: 55732
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Purple Lava Lamp...
[Domoticz] Loaded services for Living Room - Purple Lava Lamp
Cannot find secret key, creating One...
TCP server accepting connection on port: 55858
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Spare Socket 3...
[Domoticz] Loaded services for Living Room - Spare Socket 3
Cannot find secret key, creating One...
TCP server accepting connection on port: 55986
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Spare Socket 4...
[Domoticz] Loaded services for Living Room - Spare Socket 4
Cannot find secret key, creating One...
TCP server accepting connection on port: 56116
HAP Server is listening
[Domoticz] Initializing device with name Living Room - TV...
[Domoticz] Loaded services for Living Room - TV
Cannot find secret key, creating One...
TCP server accepting connection on port: 56248
HAP Server is listening
[Domoticz] Initializing device with name Living Room - Wall Lights...
[Domoticz] Loaded services for Living Room - Wall Lights
Cannot find secret key, creating One...
TCP server accepting connection on port: 56382
HAP Server is listening
[Domoticz] Initializing device with name Main Power...
[Domoticz] Loaded services for Main Power
Cannot find secret key, creating One...
TCP server accepting connection on port: 56518
HAP Server is listening
[Domoticz] Initializing device with name Night...
[Domoticz] Loaded services for Night
Cannot find secret key, creating One...
TCP server accepting connection on port: 56656
HAP Server is listening
[Domoticz] Initializing device with name Outside - Front Door Light...
[Domoticz] Loaded services for Outside - Front Door Light
Cannot find secret key, creating One...
TCP server accepting connection on port: 56796
HAP Server is listening
[Domoticz] Initializing device with name Outside - Main Lights...
[Domoticz] Loaded services for Outside - Main Lights
Cannot find secret key, creating One...
TCP server accepting connection on port: 56938
HAP Server is listening
[Domoticz] Initializing device with name Outside - Xmas Lights...
[Domoticz] Loaded services for Outside - Xmas Lights
Cannot find secret key, creating One...
TCP server accepting connection on port: 57082
HAP Server is listening
[Domoticz] Initializing device with name PC...
[Domoticz] Loaded services for PC
Cannot find secret key, creating One...
TCP server accepting connection on port: 57228
HAP Server is listening
[Domoticz] Initializing device with name PC Off...
[Domoticz] Loaded services for PC Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 57376
HAP Server is listening
[Domoticz] Initializing device with name Patio Curtains...
[Domoticz] Loaded services for Patio Curtains
Cannot find secret key, creating One...
TCP server accepting connection on port: 57526
HAP Server is listening
[Domoticz] Initializing device with name Play Xbox...
[Domoticz] Loaded services for Play Xbox
Cannot find secret key, creating One...
TCP server accepting connection on port: 57678
HAP Server is listening
[Domoticz] Initializing device with name Play Xbox on PJ...
[Domoticz] Loaded services for Play Xbox on PJ
Cannot find secret key, creating One...
TCP server accepting connection on port: 57832
HAP Server is listening
[Domoticz] Initializing device with name Projector...
[Domoticz] Loaded services for Projector
Cannot find secret key, creating One...
TCP server accepting connection on port: 57988
HAP Server is listening
[Domoticz] Initializing device with name Projector Off...
[Domoticz] Loaded services for Projector Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 58146
HAP Server is listening
[Domoticz] Initializing device with name Record Duo...
[Domoticz] Loaded services for Record Duo
Cannot find secret key, creating One...
TCP server accepting connection on port: 58306
HAP Server is listening
[Domoticz] Initializing device with name SQBlaster...
[Domoticz] Loaded services for SQBlaster
Cannot find secret key, creating One...
TCP server accepting connection on port: 58468
HAP Server is listening
[Domoticz] Initializing device with name SQBlasterDelay...
[Domoticz] Loaded services for SQBlasterDelay
Cannot find secret key, creating One...
TCP server accepting connection on port: 58632
HAP Server is listening
[Domoticz] Initializing device with name Server...
[Domoticz] Loaded services for Server
Cannot find secret key, creating One...
TCP server accepting connection on port: 58798
HAP Server is listening
[Domoticz] Initializing device with name Server Off...
[Domoticz] Loaded services for Server Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 58966
HAP Server is listening
[Domoticz] Initializing device with name Shellys iPhone 5S...
[Domoticz] Loaded services for Shellys iPhone 5S
Cannot find secret key, creating One...
TCP server accepting connection on port: 59136
HAP Server is listening
[Domoticz] Initializing device with name Shellys iPhone 5S Switch...
[Domoticz] Loaded services for Shellys iPhone 5S Switch
Cannot find secret key, creating One...
TCP server accepting connection on port: 59308
HAP Server is listening
[Domoticz] Initializing device with name Shellys iPhone 5S Switch Off...
[Domoticz] Loaded services for Shellys iPhone 5S Switch Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 59482
HAP Server is listening
[Domoticz] Initializing device with name Simons iPhone 6...
[Domoticz] Loaded services for Simons iPhone 6
Cannot find secret key, creating One...
TCP server accepting connection on port: 59658
HAP Server is listening
[Domoticz] Initializing device with name Simons iPhone 6 Switch...
[Domoticz] Loaded services for Simons iPhone 6 Switch
Cannot find secret key, creating One...
TCP server accepting connection on port: 59836
HAP Server is listening
[Domoticz] Initializing device with name Simons iPhone 6 Switch Off...
[Domoticz] Loaded services for Simons iPhone 6 Switch Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 60016
HAP Server is listening
[Domoticz] Initializing device with name Sky...
[Domoticz] Loaded services for Sky
Cannot find secret key, creating One...
TCP server accepting connection on port: 60198
HAP Server is listening
[Domoticz] Initializing device with name Sky Activity Dummy...
[Domoticz] Loaded services for Sky Activity Dummy
Cannot find secret key, creating One...
TCP server accepting connection on port: 60382
HAP Server is listening
[Domoticz] Initializing device with name Sky HDMI Out...
[Domoticz] Loaded services for Sky HDMI Out
Cannot find secret key, creating One...
TCP server accepting connection on port: 60568
HAP Server is listening
[Domoticz] Initializing device with name Sky Pause/Resume...
[Domoticz] Loaded services for Sky Pause/Resume
Cannot find secret key, creating One...
TCP server accepting connection on port: 60756
HAP Server is listening
[Domoticz] Initializing device with name Skybox F5S...
[Domoticz] Loaded services for Skybox F5S
Cannot find secret key, creating One...
TCP server accepting connection on port: 60946
HAP Server is listening
[Domoticz] Initializing device with name Squeeze Touch...
[Domoticz] Loaded services for Squeeze Touch
Cannot find secret key, creating One...
TCP server accepting connection on port: 61138
HAP Server is listening
[Domoticz] Initializing device with name Squeezebox Bedroom...
[Domoticz] Loaded services for Squeezebox Bedroom
Cannot find secret key, creating One...
TCP server accepting connection on port: 61332
HAP Server is listening
[Domoticz] Initializing device with name Squeezebox Kitchen...
[Domoticz] Loaded services for Squeezebox Kitchen
Cannot find secret key, creating One...
TCP server accepting connection on port: 61528
HAP Server is listening
[Domoticz] Initializing device with name Squeezebox Lounge...
[Domoticz] Loaded services for Squeezebox Lounge
Cannot find secret key, creating One...
TCP server accepting connection on port: 61726
HAP Server is listening
[Domoticz] Initializing device with name Squeezeboxes...
[Domoticz] Loaded services for Squeezeboxes
Cannot find secret key, creating One...
TCP server accepting connection on port: 61926
HAP Server is listening
[Domoticz] Initializing device with name Squeezes Off...
[Domoticz] Loaded services for Squeezes Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 62128
HAP Server is listening
[Domoticz] Initializing device with name Squeezy Touch QS...
[Domoticz] Loaded services for Squeezy Touch QS
Cannot find secret key, creating One...
TCP server accepting connection on port: 62332
HAP Server is listening
[Domoticz] Initializing device with name Sunset...
[Domoticz] Loaded services for Sunset
Cannot find secret key, creating One...
TCP server accepting connection on port: 62538
HAP Server is listening
[Domoticz] Initializing device with name Transfer To Projector...
[Domoticz] Loaded services for Transfer To Projector
Cannot find secret key, creating One...
TCP server accepting connection on port: 62746
HAP Server is listening
[Domoticz] Initializing device with name Transfer To TV...
[Domoticz] Loaded services for Transfer To TV
Cannot find secret key, creating One...
TCP server accepting connection on port: 62956
HAP Server is listening
[Domoticz] Initializing device with name Virgin Pure...
[Domoticz] Loaded services for Virgin Pure
Cannot find secret key, creating One...
TCP server accepting connection on port: 63168
HAP Server is listening
[Domoticz] Initializing device with name Wake...
[Domoticz] Loaded services for Wake
Cannot find secret key, creating One...
TCP server accepting connection on port: 63382
HAP Server is listening
[Domoticz] Initializing device with name Wake HTPC...
[Domoticz] Loaded services for Wake HTPC
Cannot find secret key, creating One...
TCP server accepting connection on port: 63598
HAP Server is listening
[Domoticz] Initializing device with name Wake Server...
[Domoticz] Loaded services for Wake Server
Cannot find secret key, creating One...
TCP server accepting connection on port: 63816
HAP Server is listening
[Domoticz] Initializing device with name Watch Duo...
[Domoticz] Loaded services for Watch Duo
Cannot find secret key, creating One...
TCP server accepting connection on port: 64036
HAP Server is listening
[Domoticz] Initializing device with name Watch Film...
[Domoticz] Loaded services for Watch Film
Cannot find secret key, creating One...
TCP server accepting connection on port: 64258
HAP Server is listening
[Domoticz] Initializing device with name Watch Film on TV...
[Domoticz] Loaded services for Watch Film on TV
Cannot find secret key, creating One...
TCP server accepting connection on port: 64482
HAP Server is listening
[Domoticz] Initializing device with name Watch Sky...
[Domoticz] Loaded services for Watch Sky
Cannot find secret key, creating One...
TCP server accepting connection on port: 64708
HAP Server is listening
[Domoticz] Initializing device with name Watch Sky Off...
[Domoticz] Loaded services for Watch Sky Off
Cannot find secret key, creating One...
TCP server accepting connection on port: 64936
HAP Server is listening
[Domoticz] Initializing device with name XBMC Pause...
[Domoticz] Loaded services for XBMC Pause
Cannot find secret key, creating One...
TCP server accepting connection on port: 65166
HAP Server is listening
[Domoticz] Initializing device with name XBMC Play...
[Domoticz] Loaded services for XBMC Play
Cannot find secret key, creating One...
TCP server accepting connection on port: 65398
HAP Server is listening
[Domoticz] Initializing device with name XBMC Resume...
[Domoticz] Loaded services for XBMC Resume
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: argument 8: port number is out of bounds.
    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:62:5)
    at Request.self.callback (/home/pi/homebridge/node_modules/request/request.js:373:22)
    at Request.emit (events.js:110:17)

npm ERR! Linux 3.18.11+
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
pi@raspberrypi ~/homebridge $

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 2:18
by simon_rb
simonrg, I changed the port like you said and I now have this at the end so I think its working.. Will test and let you know!!!

HAP Server is listening
[Domoticz] Initializing device with name Xbox Remote...
[Domoticz] Loaded services for Xbox Remote
Cannot find secret key, creating One...
TCP server accepting connection on port: 49382
HAP Server is listening

Update:-
Unfortunately it isn't working. When I pair a device and use the default code it disconnects the server. Maybe this is port related, like simonrg said - changing the port may have broken it. Using the default port crashes the server so I'm a bit stuck. Gizmocuz, how many devices do you have in your setup? I feel I am soooo close...
below is a snipit of the console:-

Code: Select all

New Session 61759
New Session 61755
New Session 61758
Server Connection Established 52394
Server Connection Established 52395
Server Connection Established 52396
Server Connection Established 52397
Server Connection Established 60526
Server Connection Established 60527
Start Verify M1
Verify M1 Finished
Start Verify M1
Verify M1 Finished
Start Verify M1
Verify M1 Finished
Start Verify M1
Verify M1 Finished
Start Verify M1
Verify M1 Finished
Start Verify M1
Verify M1 Finished
Client Disconnected
Client Disconnected
Client Disconnected
Client Disconnected
Client Disconnected
An Error Occured on client side connection, { [Error: This socket has been ended by the other party] code: 'EPIPE' }
An Error Occured on client side connection, { [Error: This socket has been ended by the other party] code: 'EPIPE' }
An Error Occured on client side connection, { [Error: This socket has been ended by the other party] code: 'EPIPE' }
An Error Occured on client side connection, { [Error: This socket has been ended by the other party] code: 'EPIPE' }
An Error Occured on client side connection, { [Error: This socket has been ended by the other party] code: 'EPIPE' }
Server Disconnected
Server Disconnected
Server Disconnected
Server Disconnected
Server Disconnected
Start Verify M3
M3: Verify Success
Client Disconnected
Server Disconnected

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 3:21
by simon_rb
Sorry for all the posts guys. I have it running with very mixed results. Is there a file somewhere that stores all the discovered switches and scenes from domoticz so I can remove a lot of them.. Maybe it will work better then? If not maybe an update to domoticz to deselect switches you don't want shown up as discoverable. Or maybe a way of adding each switch I'd like to use manually - time consuming but same end result. I have a lot of dummy switches that don't need to be in the HomeKit database...

Cheers guys and girls!

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 13:05
by simon_rb
Doing a bit of research it turns out that I think each bridge can only have 100 devices, I have about 160. I think the only way I can get it to work correctly is to add devices manually using the config.json. Does anyone know how to do this rather than making every device viable using the setup in the wiki?

Cheers

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 13:23
by simonrg
simon_rb wrote:Doing a bit of research it turns out that I think each bridge can only have 100 devices, I have about 160. I think the only way I can get it to work correctly is to add devices manually using the config.json. Does anyone know how to do this rather than making every device viable using the setup in the wiki?

Cheers
Interesting, only 100.

Two thoughts, one simple, one not so.

From memory you can hide devices in Domoticz by placing a $ at the start of the device name - you could try this and see if it stops devices being picked up by homebridge, it will depend on whether the json call still displays them or not. Such devices will no longer show up as switches on the switch page, but the logs will be available on the devices page. Certainly this would be no problem for devices such as my PIRs and would unclutter the devices page as well.

It would be fairly easy to modify platforms/Domoticz.js to filter the devices which it pass to homebridge, either based on a pre-set list or just a regular expression. I am not a Javascript native, but I suspect a combination of Google for similar code filtering a text list and playing should work.

Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 13:41
by simon_rb
The second sounds more complicated but better in the long run. Are all the devices found stored in Domoticz.js? I think you can have as many bridges as you wish, just each bridge can only have 100 devices assigned to it. Will try the dollar sign option however I'd need to do that to a lot of devices lol!

Re: Siri / HomeKit support for Domoticz

Posted: Sunday 14 June 2015 13:59
by gizmocuz
maybe we can add an optional parameter (room plan).
this way we can create a room, just for siri/homebridge, and put all devices in there that you want to control ?
it is an extra json query parameter to request devices from a room, so this should not be to hard to implement