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:

Re: Siri / HomeKit support for Domoticz

Post by simon_rb »

gizmocuz wrote: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
That would be fantastic!
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 »

I have it up and running and it is working very well. But i notice that when i add a device and on the same time the connection with the homebridge is lost you also lose your device. is there a way to get the device back?
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 »

SwordFish wrote:I have it up and running and it is working very well. But i notice that when i add a device and on the same time the connection with the homebridge is lost you also lose your device. is there a way to get the device back?
I have had the same behaviour. Only way I found of getting the device back was to reset HomeKit settings and start again.
User avatar
gizmocuz
Posts: 2537
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:
gizmocuz wrote: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
That would be fantastic!
If you place the attached file in the homebridge/platforms folder, and then you can specify a roomplan in the config.json file

config.json example:

// "platforms": [
// {
// "platform": "Domoticz",
// "name": "Domoticz",
// "server": "127.0.0.1",
// "port": "8080",
// "roomid": 123 (0=no roomplan)
// }
// ],
Attachments
Domoticz.zip
(2.5 KiB) Downloaded 223 times
Quality outlives Quantity!
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 »

I know, but is there no other option
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 »

SwordFish wrote:I know, but is there no other option
Not that I've found. Going to try what Gizmocuz has said above and only try a couple of devices and see if it's more reliable and post my findings..
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:
simon_rb wrote:
gizmocuz wrote: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
That would be fantastic!
If you place the attached file in the homebridge/platforms folder, and then you can specify a roomplan in the config.json file

config.json example:

// "platforms": [
// {
// "platform": "Domoticz",
// "name": "Domoticz",
// "server": "127.0.0.1",
// "port": "8080",
// "roomid": 123 (0=no roomplan)
// }
// ],
Thanks mate, will try this later.. Fast working there!! Cheers.
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 »

Nice work!
HomeKit integration was running here for several months based on HAP-NodeJS (viewtopic.php?f=38&t=6170&p=40433), but i needed to manually add every switch to my HomeKit configuration so this rocks!

2 additions:

1) NodeJS Repository
You can install NodeJS 0.12 by adding the NodeJS repository to your apt sources.

Code: Select all

curl -sL https://deb.nodesource.com/setup_dev | sudo bash -
and use

Code: Select all

apt-get install nodejs 
or

Code: Select all

apt-get upgrade nodejs
2) Use PM2 so start on system boot
I use PM2 https://github.com/Unitech/pm2 to manage my NodeJS apps like HomeKit and NodeJS.

Code: Select all

pm2 start /opt/homekit/app.js  --name HomeKit --node-args="--max-old-space-size=64" -- -v
pm2 startup
pm2 save
Will add HomeKit to PM2 and will start on system boot.

Code: Select all

pm2 logs HomeKit
will show the HomeKit logs ... etc
User avatar
gizmocuz
Posts: 2537
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 »

is 'forever' not a better way to auto start nodejs applications?
(almost done with a new stable release, and installed forever on the sdcard image)
(homebridge is installed, but not active when you burn the sdcard image)

npm install forever
cd homebridge
forever start app.js
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:
simon_rb wrote:
gizmocuz wrote: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
That would be fantastic!
If you place the attached file in the homebridge/platforms folder, and then you can specify a roomplan in the config.json file

config.json example:

// "platforms": [
// {
// "platform": "Domoticz",
// "name": "Domoticz",
// "server": "127.0.0.1",
// "port": "8080",
// "roomid": 123 (0=no roomplan)
// }
// ],
Sorry for being daft. I can't get this to work. When I add "roomid": to it I get syntaxerror unexpected string..
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 »

gizmocuz wrote:is 'forever' not a better way to auto start nodejs applications?
Forever will also work.
User avatar
gizmocuz
Posts: 2537
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: Sorry for being daft. I can't get this to work. When I add "roomid": to it I get syntaxerror unexpected string..
double check if you got a 'comma' after the port
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 »

simon_rb wrote:Sorry for being daft. I can't get this to work. When I add "roomid": to it I get syntaxerror unexpected string..
Have you replaced ~/homebridge/platforms/Domoticz.js with the version in the zip file which gizmocuz supplied in his post?
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
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 »

gizmocuz wrote:
Joep wrote:I don't get you? To my howto?
That is possible, but it is system specific, so I have to figure all system start-up parameters out first.
Thats true ;) Maybe you could add a how-to to the domoticz wiki ?

i created a pull request:

https://github.com/nfarina/homebridge/pull/25

Implemented:
- Added support for RGB lights
- Added support for Scenes
- Sorting device names
What is the dutch command to start a scene?
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 »

gizmocuz wrote:double check if you got a 'comma' after the port
This is what I have tried. Also tried "123", also..
"platforms": [
{
"name": "Domoticz",
"server": "127.0.0.1",
"port": "8080",
"roomid": 123
}
],
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:Sorry for being daft. I can't get this to work. When I add "roomid": to it I get syntaxerror unexpected string..
Have you replaced ~/homebridge/platforms/Domoticz.js with the version in the zip file which gizmocuz supplied in his post?
I have done
User avatar
gizmocuz
Posts: 2537
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 »

could you try

"roomid": "123"

and please post the output when running homebridge
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 »

I had a comma after "123"

Thank you for your help. It still loaded my scenes but that's ok. Although my living room wall lights are not showing up.. I tried to set that device up last night and it disappeared. Is there a file that stores all the sync info so I can delete it all and start again? Cheers

Update:- just turned on my first scene, I like the eve app as it allows you to pick a Siri name for each device. (Didn't see that on the insteon app).

Still have some devices missing - would love to start fresh with all the syncing.

Update:- Found the persist folder, deleted the contents and that seems to have done the trick to start fresh however still no switches, only scenes are showing up.
Last edited by simon_rb on Sunday 14 June 2015 19:31, edited 1 time in total.
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 »

For some reason it is only importing my scenes and none off the switches from the room. I called the room 123 just like in the code above. I have since removed the " from the 123 and that hasn't made any difference. Am I right in thinking its the room name and not some other ID like the IDX for the switches. Sorry I've taken some much of every bodies time up on here. I do sincerely appreciate 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:For some reason it is only importing my scenes and none off the switches from the room. I called the room 123 just like in the code above. I have since removed the " from the 123 and that hasn't made any difference. Am I right in thinking its the room name and not some other ID like the IDX for the switches. Sorry I've taken some much of every bodies time up on here. I do sincerely appreciate it.
I think you have to use the room idx...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest