No, the homebridge/lib/HAP-NodeJS folderthebeetleuk wrote:Code: Select all
/usr/local/lib/node_modules/
Siri / HomeKit support for Domoticz
Moderator: leecollings
-
- 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
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Re: Siri / HomeKit support for Domoticz
Still no luckpepijn wrote:No, the homebridge/lib/HAP-NodeJS folderthebeetleuk wrote:Code: Select all
/usr/local/lib/node_modules/
Code: Select all
pi@domoticzpi ~/homebridge/lib/HAP-NodeJS $ sudo npm run start
> [email protected] start /home/pi/homebridge/lib/HAP-NodeJS
> node BridgedCore.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/lib/HAP-NodeJS/BridgedCore.js:1:77)
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 BridgedCore.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node BridgedCore.js'.
npm ERR! This is most likely a problem with the HAP-NodeJS package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node BridgedCore.js
npm ERR! You can get their info via:
npm ERR! npm owner ls HAP-NodeJS
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/lib/HAP-NodeJS/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.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Siri / HomeKit support for Domoticz
Did you sudo npm run start that folder? You need to do sudo npm install in that folderthebeetleuk wrote:Still no luckpepijn wrote:No, the homebridge/lib/HAP-NodeJS folderthebeetleuk wrote:Code: Select all
/usr/local/lib/node_modules/
Code: Select all
pi@domoticzpi ~/homebridge/lib/HAP-NodeJS $ sudo npm run start > [email protected] start /home/pi/homebridge/lib/HAP-NodeJS > node BridgedCore.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/lib/HAP-NodeJS/BridgedCore.js:1:77) 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 BridgedCore.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script 'node BridgedCore.js'. npm ERR! This is most likely a problem with the HAP-NodeJS package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node BridgedCore.js npm ERR! You can get their info via: npm ERR! npm owner ls HAP-NodeJS 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/lib/HAP-NodeJS/npm-debug.log
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Re: Siri / HomeKit support for Domoticz
OK so I guess I must have skipped the multiple install on the Wikisimon_rb wrote:Did you sudo npm run start that folder? You need to do sudo npm install in that folder
Note that this took a long time to execute (10 min+ and counting!!)
potential wiki edit?
I'll let you know how it goes when finished.git clone https://github.com/nfarina/homebridge.git
cd homebridge
git submodule init
git submodule update
npm install (Should this be sudo nmp install?)
cd lib/HAP-NodeJS <- MISSED THIS
npm install<- MISSED THIS (Should this be sudo nmp install?)
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Siri / HomeKit support for Domoticz
Fingers crossed it'll work. Let us all know how you get on once it's running.. I've given up on it as on my system is too unreliable.. Both for executing commands and adding devices.
-
- Posts: 8
- Joined: Wednesday 15 October 2014 18:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Siri / HomeKit support for Domoticz
First of all: thanks for this great work!
I had an older version of Domoticz running on my RPi-B (v1, with 256 MB Ram).
First the manual install failed: npm install seemed to last forever.
So, I backupped the database and grabbed a copy of the SD image with everything included.
I also used 'forever' to start the server automatically. It all works perfectly.
However , I do have two little bugs:
-I have made a room called 'Woonkamer' in Eve. I can ask Siri 'zet alles uit (of aan) in de woonkamer' and that works. However, when I ask Siri 'zet alle lampen (of verlichting) aan in de woonkamer', Siri replies there are no lights (lampen) in de Woonkamer. When I ask 'wat is er in de woonkamer?' Siri replies 'Er zijn geen apparaten in de woonkamer'.
- I too have the problem of the disappearing devices. I can add devices just fine in Eve, but sometimes when adding a device, before I would normally select the room it's in, Eve returns to the 'find a device screen'. The device I was trying to add is gone then and cannot be re-added.
I tried deleting the device ID-files in the 'persistent' folder (I know he the device ID, since those files were created when the 'add device'-action went wrong), but that doesn't help. So, for some reason the Pi thinks it is paired and doesn't show the device to Eve again? Or does Eve think it is paired and not show it?
-Running app.js with forever doesn't last after a reboot, I suppose I need to use cron to execute the forever command again after reboot. It does allow me to exit the SSH-session obviously which is nice enough for now.
Edit: found the startup-script. After copying it into /etc/init.d I ran the command to include it and got an error:
Edit2: It would seem the auto-start script is working after all. But because of the problem described in my post below (the 'unreachable' devices), it seemed like the script/server wasn't running after a reboot. That wasn't the case and not the cause of the unreachable devices. The cause is described below.
Thanks again and I hope the 'missing devices' can be sorted out soon.
If you need any help / testing, just let me know!
I had an older version of Domoticz running on my RPi-B (v1, with 256 MB Ram).
First the manual install failed: npm install seemed to last forever.
So, I backupped the database and grabbed a copy of the SD image with everything included.
I also used 'forever' to start the server automatically. It all works perfectly.
However , I do have two little bugs:
-I have made a room called 'Woonkamer' in Eve. I can ask Siri 'zet alles uit (of aan) in de woonkamer' and that works. However, when I ask Siri 'zet alle lampen (of verlichting) aan in de woonkamer', Siri replies there are no lights (lampen) in de Woonkamer. When I ask 'wat is er in de woonkamer?' Siri replies 'Er zijn geen apparaten in de woonkamer'.
- I too have the problem of the disappearing devices. I can add devices just fine in Eve, but sometimes when adding a device, before I would normally select the room it's in, Eve returns to the 'find a device screen'. The device I was trying to add is gone then and cannot be re-added.
I tried deleting the device ID-files in the 'persistent' folder (I know he the device ID, since those files were created when the 'add device'-action went wrong), but that doesn't help. So, for some reason the Pi thinks it is paired and doesn't show the device to Eve again? Or does Eve think it is paired and not show it?
-Running app.js with forever doesn't last after a reboot, I suppose I need to use cron to execute the forever command again after reboot. It does allow me to exit the SSH-session obviously which is nice enough for now.
Edit: found the startup-script. After copying it into /etc/init.d I ran the command to include it and got an error:
Code: Select all
pi@raspberrypi /etc/init.d $ sudo update-rc.d homebridge.sh defaults
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'homebridge.sh' missing LSB tags and overrides
Thanks again and I hope the 'missing devices' can be sorted out soon.
If you need any help / testing, just let me know!
Last edited by RvD on Wednesday 17 June 2015 7:41, edited 1 time in total.
-
- Posts: 8
- Joined: Wednesday 15 October 2014 18:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Siri / HomeKit support for Domoticz
... after some more testing and a reboot, most devices turned 'unreachable' in Eve.
I can still add new devices I haven't added before and they work, but the existing devices are all 'unreachable'.
I get these messages:
I really hope you can get these two error (disappearing devices and unreachable/unusable devices) fixed soon, it's really such a great script you've created!
Do you already have a Paypal Donate-button somewhere?
Edit: I can also get you SSH, web,... access to my Pi (through OpenVPN) if you want to take a look at the problem and cannot reproduce it on your own Pi.
I can still add new devices I haven't added before and they work, but the existing devices are all 'unreachable'.
I get these messages:
Code: Select all
[Domoticz] Initializing device with name Staande lamp...
[Domoticz] Loaded services for Staande lamp
Cannot create another accessory with the same name 'Staande lamp'. The 'name' property must be unique for each accessory.
I really hope you can get these two error (disappearing devices and unreachable/unusable devices) fixed soon, it's really such a great script you've created!
Do you already have a Paypal Donate-button somewhere?
Edit: I can also get you SSH, web,... access to my Pi (through OpenVPN) if you want to take a look at the problem and cannot reproduce it on your own Pi.
Last edited by RvD on Wednesday 17 June 2015 7:42, edited 1 time in total.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Siri / HomeKit support for Domoticz
I have the same message about the name needing to be unique. I hope there is a way to fix this.. Like you said it's a great script.
Just iron out the kinks.
Just iron out the kinks.
-
- Posts: 8
- Joined: Wednesday 15 October 2014 18:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Siri / HomeKit support for Domoticz
I can also get you (the developer that is) SSH, web,... access to my Pi (through OpenVPN) if you want to take a look at the problem and cannot reproduce it on your own Pi.
-
- Posts: 8
- Joined: Wednesday 15 October 2014 18:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Siri / HomeKit support for Domoticz
Have you been able to figure out in which config file these settings are actually stored?simon_rb wrote:I have the same message about the name needing to be unique. I hope there is a way to fix this.. Like you said it's a great script.
Just iron out the kinks.
The message about the duplicate ID could be fixed (for a limited time of course, since the bug present will recreate the error eventually) by removing those devices from Homebridge itself. Then, when Domoticz.js tries to re-add them, it would be fine.
The same goes for the devices it thinks are already added. Those settings aren't really saved in the 'persistent'-directory, there must be some other location with a settings file that is used for this, but I haven't found it yet.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Siri / HomeKit support for Domoticz
I found they are stored within HomeKit, if you reset this then the devices come back. I have also deleted the persistent folder every time I have reset HomeKit.
-
- Posts: 138
- Joined: Thursday 01 May 2014 9:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands - Sittard
- Contact:
Re: Siri / HomeKit support for Domoticz
Hi Simon,
I also reset the homekit config on my iPhone, but the devices that I once added do not come back. I even deleted Eve from the phone, reset the HK config, then rebooted, but the devices do not come back.
Then, I tried reinstalling homebridge on the Pi, also to no avail. I even did this part again (first deleted the whole homekit folder):
git clone https://github.com/nfarina/homebridge.git
cd homebridge
git submodule init
git submodule update
npm install
cd lib/HAP-NodeJS
npm install
Could you tell me what the persistent folder is so that I can try to delete them from there? For the rest, the Siri integration works beautiful!
EDIT: Is it this folder: /homebridge/lib/HAP-NodeJS/node_modules/node-persist? If so, do you just delete the whole contents of that folder?
I also reset the homekit config on my iPhone, but the devices that I once added do not come back. I even deleted Eve from the phone, reset the HK config, then rebooted, but the devices do not come back.
Then, I tried reinstalling homebridge on the Pi, also to no avail. I even did this part again (first deleted the whole homekit folder):
git clone https://github.com/nfarina/homebridge.git
cd homebridge
git submodule init
git submodule update
npm install
cd lib/HAP-NodeJS
npm install
Could you tell me what the persistent folder is so that I can try to delete them from there? For the rest, the Siri integration works beautiful!
EDIT: Is it this folder: /homebridge/lib/HAP-NodeJS/node_modules/node-persist? If so, do you just delete the whole contents of that folder?
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Siri / HomeKit support for Domoticz
No it's under homebridge/persist I think.. I'm not at home to check.. It's full of what looks like MAC address.. Delete that and it should all come back.D'rMorris wrote:Hi Simon,
I also reset the homekit config on my iPhone, but the devices that I once added do not come back. I even deleted Eve from the phone, reset the HK config, then rebooted, but the devices do not come back.
Then, I tried reinstalling homebridge on the Pi, also to no avail. I even did this part again (first deleted the whole homekit folder):
git clone https://github.com/nfarina/homebridge.git
cd homebridge
git submodule init
git submodule update
npm install
cd lib/HAP-NodeJS
npm install
Could you tell me what the persistent folder is so that I can try to delete them from there? For the rest, the Siri integration works beautiful!
EDIT: Is it this folder: /homebridge/lib/HAP-NodeJS/node_modules/node-persist? If so, do you just delete the whole contents of that folder?
-
- Posts: 138
- Joined: Thursday 01 May 2014 9:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands - Sittard
- Contact:
Re: Siri / HomeKit support for Domoticz
Ah found it! It's not in the homebridge folder, but in root. I deleted the files in there, hope that it works when I get home.
Too bad homebridge / homekit does not work across IP ranges. I've set my VPN so that clients get different adresses than my local devices. Maybe I have to give them the same range, but then addresses outside of the normal DHCP range at home. That way, I can create a VPN connection and tell my oven to start heating .
Too bad homebridge / homekit does not work across IP ranges. I've set my VPN so that clients get different adresses than my local devices. Maybe I have to give them the same range, but then addresses outside of the normal DHCP range at home. That way, I can create a VPN connection and tell my oven to start heating .
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Siri / HomeKit support for Domoticz
Once iOS 9 launches in September then you should be able too..D'rMorris wrote:Ah found it! It's not in the homebridge folder, but in root. I deleted the files in there, hope that it works when I get home.
Too bad homebridge / homekit does not work across IP ranges. I've set my VPN so that clients get different adresses than my local devices. Maybe I have to give them the same range, but then addresses outside of the normal DHCP range at home. That way, I can create a VPN connection and tell my oven to start heating .
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Re: Siri / HomeKit support for Domoticz
looks like I have it working. well I'm past that error now so looking good to progress.simon_rb wrote:Fingers crossed it'll work. Let us all know how you get on once it's running.. I've given up on it as on my system is too unreliable.. Both for executing commands and adding devices.
I clearly missed something during the install process. Deleted the homebridge directory and installed from the start
thanks for everyone's help so far. I'm sure I'll be back with more questions
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Siri / HomeKit support for Domoticz
Excellent. Good luck!thebeetleuk wrote:looks like I have it working. well I'm past that error now so looking good to progress.simon_rb wrote:Fingers crossed it'll work. Let us all know how you get on once it's running.. I've given up on it as on my system is too unreliable.. Both for executing commands and adding devices.
I clearly missed something during the install process. Deleted the homebridge directory and installed from the start
thanks for everyone's help so far. I'm sure I'll be back with more questions
-
- Posts: 8
- Joined: Wednesday 15 October 2014 18:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Siri / HomeKit support for Domoticz
I have some more insights into the 'device already exists in HomeBridge / Unreachable from Eve'.D'rMorris wrote:Ah found it! It's not in the homebridge folder, but in root. I deleted the files in there, hope that it works when I get home.
Too bad homebridge / homekit does not work across IP ranges. I've set my VPN so that clients get different adresses than my local devices. Maybe I have to give them the same range, but then addresses outside of the normal DHCP range at home. That way, I can create a VPN connection and tell my oven to start heating .
There are in fact two folders that are called 'persists', one in the root (/) and one in ~/homebridge (/home/pi/homebridge).
It would appear that sometimes, HomeKit creates files in the /persists folder.
However, most of the times files are created in ~/homebridge/persists.
Now, it would seem, that domoticz.js somehow checks the folder ~/homebridge/persists to see if a device has already been created.
There, it doesn't find the find and wants to create a new device.
However, the HomeKit-framework checks the /persists-folder as well and therefore the error is thrown.
I can't really replicate this issue, but it seems to be something like this. I might be a little off on the details, but is seems the problem has to do with two folders with the same name/purpose in different locations and sometimes the one and sometimes the other being used.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Siri / HomeKit support for Domoticz
Good find, wonder if the developer watches this thread. If that's causing the error I don't think it would be too hard to fix.. Fingers crossed.RvD wrote:I have some more insights into the 'device already exists in HomeBridge / Unreachable from Eve'.D'rMorris wrote:Ah found it! It's not in the homebridge folder, but in root. I deleted the files in there, hope that it works when I get home.
Too bad homebridge / homekit does not work across IP ranges. I've set my VPN so that clients get different adresses than my local devices. Maybe I have to give them the same range, but then addresses outside of the normal DHCP range at home. That way, I can create a VPN connection and tell my oven to start heating .
There are in fact two folders that are called 'persists', one in the root (/) and one in ~/homebridge (/home/pi/homebridge).
It would appear that sometimes, HomeKit creates files in the /persists folder.
However, most of the times files are created in ~/homebridge/persists.
Now, it would seem, that domoticz.js somehow checks the folder ~/homebridge/persists to see if a device has already been created.
There, it doesn't find the find and wants to create a new device.
However, the HomeKit-framework checks the /persists-folder as well and therefore the error is thrown.
I can't really replicate this issue, but it seems to be something like this. I might be a little off on the details, but is seems the problem has to do with two folders with the same name/purpose in different locations and sometimes the one and sometimes the other being used.
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Re: Siri / HomeKit support for Domoticz
Right I now have this working using the following app on my iphone:
https://itunes.apple.com/US/app/id919270334
I did notice however when I ran "npm run start" it looks like its found all my devices. I'm assuming you want to create a room plan to limit the ones on the list?
Also, what app do I need to use to get siri working with this?
https://itunes.apple.com/US/app/id919270334
I did notice however when I ran "npm run start" it looks like its found all my devices. I'm assuming you want to create a room plan to limit the ones on the list?
Also, what app do I need to use to get siri working with this?
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
Who is online
Users browsing this forum: No registered users and 1 guest