Siri / HomeKit support for Domoticz

Moderator: leecollings

simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Siri / HomeKit support for Domoticz

Post 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.
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
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 am using Eve and it's working great :D
Thanks for sharing this!!!
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 »

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.
Not using Domoticz anymore
emke
Posts: 10
Joined: Tuesday 10 February 2015 14:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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?
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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 startImage
User avatar
gizmocuz
Posts: 2536
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
Quality outlives Quantity!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Siri / HomeKit support for Domoticz

Post by simon_rb »

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 Image

ImageImage
Last edited by simon_rb on Saturday 13 June 2015 14:17, edited 1 time in total.
User avatar
gizmocuz
Posts: 2536
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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 Image
you should have a homebridge folder in your home folder

cd ~
sudo rm -Rf homebridge
Quality outlives Quantity!
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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 Image
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)
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
User avatar
gizmocuz
Posts: 2536
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
Quality outlives Quantity!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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.
v40jlt4
Posts: 20
Joined: Saturday 24 January 2015 13:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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??
Last edited by v40jlt4 on Sunday 14 June 2015 10:52, edited 1 time in total.
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: Siri / HomeKit support for Domoticz

Post by pvm »

Simon_rb, it does not stay running after Restart of your machine?
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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.
spudgunman
Posts: 32
Joined: Tuesday 26 May 2015 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Seattle WA, USA
Contact:

Re: Siri / HomeKit support for Domoticz

Post by spudgunman »

I added a little to the wiki and cleaned up some syntax for ease of use.
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Siri / HomeKit support for Domoticz

Post by simon_rb »

I ran NPM Test and got the same error
Image
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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! Image
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest