Siri / HomeKit support for Domoticz

Moderator: leecollings

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

I didn't have to install node-persist. I just followed the wiki.. Strange.

Did you install node.js correctly?

Try node -v see what version you have..
thebeetleuk
Posts: 115
Joined: Saturday 21 December 2013 23:50
Target OS: Linux
Domoticz version:
Location: Scotland
Contact:

Re: Siri / HomeKit support for Domoticz

Post by thebeetleuk »

pi@domoticzpi ~/homebridge $ node -v
v0.12.1
Not sure what version I should have.
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
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 »

That's the correct version.. Is it still not working?
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 »

Eduard wrote:As an addition to the roomid-config, i made a new domoticz.js with a parameter to disable the scenes...

Code: Select all

{
    "description": "Configuration file for Domoticz platform.",
    "platforms": [
        {
            "platform": "Domoticz",
            "name": "Domoticz",
            "server": "127.0.0.1",
            "port": "8080",
            "roomid": 123 (0=no roomplan),
            "usescenes": 0 (0=off, 1=on)
        }
    ],
    "accessories": [
    ]
}

Also made HomeBridge start at reboot with a startup-script:

Code: Select all

#!/bin/sh
#/etc/init.d/homebridge.sh

export PATH=$PATH:/usr/local/bin
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules

case "$1" in
  start)
    exec forever start /home/pi/homebridge/app.js -p /home/pi/.forever
    ;;
  stop)
    exec forever stop /home/pi/homebridge/app.js
    ;;
  *)
    echo "Usage: homebridge.sh {start|stop}"
    exit 1
    ;;
esac

exit 0

Code: Select all

sudo chmod 755 /etc/init.d/homebridge.sh

update-rc.d homebridge.sh defaults
To remove from startup at reboot:

Code: Select all

update-rc.d -f homebridge.sh remove
Tried this and mine still imported all the scenes..
thebeetleuk
Posts: 115
Joined: Saturday 21 December 2013 23:50
Target OS: Linux
Domoticz version:
Location: Scotland
Contact:

Re: Siri / HomeKit support for Domoticz

Post by thebeetleuk »

simon_rb wrote:That's the correct version.. Is it still not working?
nope still not working. this is the error I get....
pi@domoticzpi ~/homebridge $ node -v
v0.12.1
pi@domoticzpi ~/homebridge $ npm run start

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

module.js:338
throw err;
^
Error: Cannot find module 'node-persist'
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/app.js:3:15)
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 Function.Module.runMain (module.js:501:10)

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
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
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 »

Have you tried sudo npm run start?
I had a similar error except it couldn't find mdns module.
thebeetleuk
Posts: 115
Joined: Saturday 21 December 2013 23:50
Target OS: Linux
Domoticz version:
Location: Scotland
Contact:

Re: Siri / HomeKit support for Domoticz

Post by thebeetleuk »

Yeah tried that but the error is just the same
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post by pepijn »

Did you run npm install?
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 »

Install the node.js part of the wiki using sudo.. It maybe a permissions thing..
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 »

pepijn wrote:Did you run npm install?
Or that! Lol
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'm having an issue where no matter how I ask Siri to turn on a single light or device in a room it seems to turn everything on or off in the room. Dunno what I'm doing wrong.
thebeetleuk
Posts: 115
Joined: Saturday 21 December 2013 23:50
Target OS: Linux
Domoticz version:
Location: Scotland
Contact:

Re: Siri / HomeKit support for Domoticz

Post by thebeetleuk »

simon_rb wrote:Install the node.js part of the wiki using sudo.. It maybe a permissions thing..
ok so tried all that part again using sudo and no luck. just the same error :(
might need to give up :(
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
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 »

Did you run npm install twice?
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 »

Is anybody having success with this? As in able to add all their devices and reliably control them individually using Siri. I have spent 3 days on this now and I'm no closer to understanding what it is I'm doing wrong?!? Or is it just buggy as hell and nothing I can do to correct it?
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Siri / HomeKit support for Domoticz

Post by Eduard »

simon_rb wrote:Tried this and mine still imported all the scenes..
Did you overwrite the Domoticz.js file in folder Platforms with the attachted file?
thebeetleuk
Posts: 115
Joined: Saturday 21 December 2013 23:50
Target OS: Linux
Domoticz version:
Location: Scotland
Contact:

Re: Siri / HomeKit support for Domoticz

Post by thebeetleuk »

simon_rb wrote:Did you run npm install twice?
I tried to run again to see if it missed anything. Is that wrong? would I need to uninstall first? If so, how would I do that?
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
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 »

Eduard wrote:
simon_rb wrote:Tried this and mine still imported all the scenes..
Did you overwrite the Domoticz.js file in folder Platforms with the attachted file?
I did.
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 »

thebeetleuk wrote:
simon_rb wrote:Did you run npm install twice?
I tried to run again to see if it missed anything. Is that wrong? would I need to uninstall first? If so, how would I do that?
It has to be run inside the lib-node folder..
thebeetleuk
Posts: 115
Joined: Saturday 21 December 2013 23:50
Target OS: Linux
Domoticz version:
Location: Scotland
Contact:

Re: Siri / HomeKit support for Domoticz

Post by thebeetleuk »

simon_rb wrote:
thebeetleuk wrote:
simon_rb wrote:Did you run npm install twice?
I tried to run again to see if it missed anything. Is that wrong? would I need to uninstall first? If so, how would I do that?
It has to be run inside the lib-node folder..
Is that this directory?

Code: Select all

/usr/local/lib/node_modules/
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
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 »

Today I experience new issues with Eve/Siri so I resetted Homekit configuration on my IOS device. After that I opened Eve but it couldnt find my devices anymore.
Trying to run 'npm run start' gives the following message:

Code: Select all

[Domoticz] Loaded services for Zonnescherm
Cannot create another accessory with the same name 'Zonnescherm'. The 'name' property must be unique for each accessory.
[Domoticz] Initializing device with name Alle Lampen AAN...
Last edited by Heisenberg on Tuesday 16 June 2015 20:24, edited 1 time in total.
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest