Page 3 of 27
Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 11:05
by simon_rb
SwordFish wrote:this works great.
But when i close the putty sessie after run npm run start its stop working?
Is there a way to keep it running? Or do i mis something.
Have you tried the forever command? It's about 8 comments up I think.. I've not set this ups yet but intend to today so can't really help.. Sorry.
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 12:24
by SwordFish
Yes i tried, but i get this warning.
Code: Select all
root@domoticzpi:~# forever start /root/homebridge/app.js
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: /root/homebridge/app.js
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 13:52
by G3rard
I am using Eve and it's working great
Thanks for sharing this!!!
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 13:53
by G3rard
SwordFish wrote:Yes i tried, but i get this warning.
Code: Select all
root@domoticzpi:~# forever start /root/homebridge/app.js
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: /root/homebridge/app.js
I get those warnings to when running forever, but apparently this doesn't matter because homebridge is working.
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 13:55
by emke
That's not a critica's warming. After that it should run.
I also got a couple of switches that disconnected and can't find anymore. Restarting homebridge doesn't have any effect. Someone found a solution?
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 14:00
by simon_rb
Your a lot closer than I am. I followed the wiki to the letter and I get this error when trying to run npm run start

Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 14:05
by gizmocuz
simon_rb wrote:Your a lot closer than I am. I followed the wiki to the letter and I get this error when trying to run npm run start
i think you should use the program "putty", and i think there is a lot more debug log above
i remember i had an error with "mdns" not sure how i solved it, but for sure you have to add the required packages first (with apt-get) before installing this.
if you did not do the apt-get , i suggest to remove the solver, do this, and start again
something like
Code: Select all
sudo apt-get update
sudo apt-get install libnss-mdns libavahi-compat-libdnssd-dev
Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 14:07
by simon_rb
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 14:09
by gizmocuz
simon_rb wrote:Start from the beginning you mean? I did use apt-get. I don't know how to remove it though. I'm not too good with the command line side of raspberry pi. Thank you for the reply

you should have a homebridge folder in your home folder
cd ~
sudo rm -Rf homebridge
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 14:20
by simonrg
gizmocuz wrote:simon_rb wrote:Start from the beginning you mean? I did use apt-get. I don't know how to remove it though. I'm not too good with the command line side of raspberry pi. Thank you for the reply

you should have a homebridge folder in your home folder
cd ~
sudo rm -Rf homebridge
It looks like simon_rb might have the same problem as I do, as gizmocuz says the errors above are more informative - it seems to try to use a port out of bounds - which is in a dns routine, gizmocuz what did you do with mdns to sort this out?:
Code: Select all
/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)
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 14:22
by gizmocuz
good question, not sure anymore
#1 use the above apt-get command
#2 install the mdns packet
npm install mdns
#3 remove the homebridge folder
#4 start the homebridge tutorial again
something like this, and google helped me too
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 15:18
by simon_rb
gizmocuz wrote:good question, not sure anymore
#1 use the above apt-get command
#2 install the mdns packet
npm install mdns
#3 remove the homebridge folder
#4 start the homebridge tutorial again
something like this, and google helped me too
Done above and I have the same errors. It does find all my devices but can control them as it doesn't stay running. I am running default ports on Domoticz.. I'm completely at a loss. No idea what to google to try and get it working.
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 16:11
by v40jlt4
Tried npm install --verbose and get:
............................
npm verb request uri
https://registry.npmjs.org/ip
npm verb request no auth needed
npm info attempt registry request try #1 at 15:50:40
npm verb etag "2CPEK6B74CEVLLFG2E792DIY5"
npm http request GET
https://registry.npmjs.org/ip
npm verb gentlyRm vacuuming /home/pi/homebridge/node_modules/wemo/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream
npm http 200
https://registry.npmjs.org/bunyan-prettystream
npm verb get saving bunyan-prettystream to /home/pi/.npm/registry.npmjs.org/bunyan-prettystream/.cache.json
npm http 200
https://registry.npmjs.org/bunyan
npm verb get saving bunyan to /home/pi/.npm/registry.npmjs.org/bunyan/.cache.json
npm verb tar unpack /home/pi/.npm/delayed-stream/1.0.0/package.tgz
npm verb tar unpacking to /home/pi/homebridge/node_modules/wemo/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream
npm verb gentlyRm vacuuming /home/pi/homebridge/node_modules/wemo/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream
npm verb afterAdd /home/pi/.npm/lodash/2.4.2/package/package.json written
Then it hangs.
Any ideas??
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 17:09
by pvm
Simon_rb, it does not stay running after Restart of your machine?
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 17:25
by simon_rb
Pvm, it doesn't run at all. It crashes before it runs. It finds all of my devices but then crashes. My devices show up within the insteon app on my iPhone but can't do anything with them as they do not respond...
Very puzzling.
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 18:01
by spudgunman
I added a little to the wiki and cleaned up some syntax for ease of use.
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 18:41
by simon_rb
I ran NPM Test and got the same error

Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 19:04
by simonrg
simon_rb wrote:I ran NPM Test and got the same error
What happens if you run npm test in the Hombridge directory?
I don't think homebridge provides a test package - see npm help:
Code: Select all
pi@raspberrypi ~ $ npm help test
NAME
npm-test - Test a package
SYNOPSIS
npm test [-- <args>]
npm tst [-- <args>]
DESCRIPTION
This runs a package's "test" script, if one was provided.
To run tests as a condition of installation, set the npat config to true.
So running in homebridge directory should give:
Code: Select all
pi@raspberrypi ~/homebridge $ npm test
> [email protected] test /home/pi/homebridge
> echo "Error: no test specified"
Error: no test specified
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 19:24
by simon_rb
simonrg wrote:simon_rb wrote:I ran NPM Test and got the same error
What happens if you run npm test in the Hombridge directory?
I don't think homebridge provides a test package - see npm help:
Code: Select all
pi@raspberrypi ~ $ npm help test
NAME
npm-test - Test a package
SYNOPSIS
npm test [-- <args>]
npm tst [-- <args>]
DESCRIPTION
This runs a package's "test" script, if one was provided.
To run tests as a condition of installation, set the npat config to true.
So running in homebridge directory should give:
Code: Select all
pi@raspberrypi ~/homebridge $ npm test
> [email protected] test /home/pi/homebridge
> echo "Error: no test specified"
Error: no test specified
That's correct. That's the error I got.
I don't know what to try now!

Re: Siri / HomeKit support for Domoticz
Posted: Saturday 13 June 2015 22:30
by simon_rb
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