Page 20 of 27
Re: Siri / HomeKit support for Domoticz
Posted: Wednesday 28 October 2015 21:23
by Bikey
deejc wrote:Bikey wrote:
Not all devices have two way communication, e.g. LightwaveRF devices. Its not possible for HomeKit (or indeed Domoticz) to keep its status in sync.
i understand the concept,i have z-wave devices and rfxcom devices, Domoticz knows about the state of certain devices when i use the web gui but firing Eve up it does not reflect the state of these devices.
That was not my quote, but lukeredpath's... I totaly agree that it must be possible for HomeKit to reflect the status of the devices as they are presented in Siri. For this, however it should poll Domoticz at a regular basis to request the device list with the statuses.
I see that e.g. non Siri Apps like Imperihome have implemented this in the App.
I have to remark that I also use the bridge to directly control Hue lights, and also the status of those lamps is not propagated to Eve if switched via another remote. So the polling is not implemented as a general function in the bridge.
Re: Siri / HomeKit support for Domoticz
Posted: Wednesday 28 October 2015 21:34
by Bikey
lukeredpath wrote:
Ok I'm with you now, so the problem is not setting the level but that the level is not being reported correctly in the other direction? It's possible there's a similar bug, I will take a look.
I still think it's a bug on the Domoticz side that it accepts levels between 1-16 if it's max dim level is 15 though.
Yes, that's is correct. As a result of the level not reported correctly to Siri, it only will send limited levels back as a command.
You are right that 1-16 as command values for a MaxdimLevel of 15 is questionable, although this is as described I the
WiKi
Re: Siri / HomeKit support for Domoticz
Posted: Friday 30 October 2015 6:58
by deejc
Bikey wrote:
That was not my quote, but lukeredpath's...
sorry i edited the post.. still its frustrating!
Re: Siri / HomeKit support for Domoticz
Posted: Friday 30 October 2015 17:34
by woods
Hi guys,
I'm testing Domoticz on Windows. Is it possible to activate HomeBridge on this platform?
Trying to follow the guide on Wiki, but it's for the r-pie.
Code: Select all
Create config.json file in the HomeBridge directory:
cd ~/homebridge/
nano config.json
If possible; coulde someone point me where I should start? Thanks!
Re: Siri / HomeKit support for Domoticz
Posted: Wednesday 04 November 2015 12:07
by Bikey
Bikey wrote:lukeredpath wrote:
Ok I'm with you now, so the problem is not setting the level but that the level is not being reported correctly in the other direction? It's possible there's a similar bug, I will take a look.
I still think it's a bug on the Domoticz side that it accepts levels between 1-16 if it's max dim level is 15 though.
Yes, that's is correct. As a result of the level not reported correctly to Siri, it only will send limited levels back as a command.
You are right that 1-16 as command values for a MaxdimLevel of 15 is questionable, although this is as described I the
WiKi
Ok, I just tested things by changing Domoticz.js in the platforms directory.
I have changed line 329:
designedMaxValue: this.MaxDimLevel
to:
designedMaxValue: 100
Now Siri sees a maximum level of 100%. If I ask Siri to dim back to 50% it sends a level 8 to Domoticz (50% * 15 rounded upwards to 8. 49% results in level 7). That now works perfect!
Now there is only still one bug: Domoticz reports back a MaxDimLevel of 15 but needs values between 1 - 16. Also if you send e.g. 8 as a command in JSON you get back a level 7!
Re: Siri / HomeKit support for Domoticz
Posted: Wednesday 11 November 2015 11:59
by alexsh1
mschut wrote:Hmm, I did a first install according to
the wiki. I started at the configuration part, because I have a recent SD card image for the Pi. However, I didn't got it working.
So, today I started all over again, performing all actions in the wiki. However, now I am stuck way sooner: At the part "Install dependencies", the command "node -v" results in:
Code: Select all
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node)
node: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.16' not found (required by node)
Any idea/help appreciated...
Did you get it sorted? Wiki is outdated - you have to follow the Github instructions. They have a manual for RPi users.
Stick to node 0.12.6 otherwise you need to upgrade to Jessie. The above error tells me that you have upgraded your node (v4***) and not upgraded your system.
Downgrade it to v.0.12.6
Re: Siri / HomeKit support for Domoticz
Posted: Wednesday 11 November 2015 12:17
by alexsh1
This was a very useful guide to install homebridge on the RPi2
https://github.com/cflurin/homebridge-s ... spberry-Pi
and the following pm2 works fine on RPi2
pm2 start "/usr/local/bin/npm" --name "myAPP" -- start
Siri / HomeKit support for Domoticz
Posted: Thursday 12 November 2015 1:34
by simon_rb
Forgive me for being stupid however I am looking to get this installed tomorrow on my Pi, I tried before and was unsuccessful. The above link says its for an old homebridge. The GitHub instructions say that it needs to be updated as it installs Nodes 4.x.x which doesn't work with wheezy.
What guide should I follow to install homebridge on wheezy?
Thank you
Re: Siri / HomeKit support for Domoticz
Posted: Thursday 12 November 2015 12:07
by alexsh1
simon_rb wrote:Forgive me for being stupid however I am looking to get this installed tomorrow on my Pi, I tried before and was unsuccessful. The above link says its for an old homebridge. The GitHub instructions say that it needs to be updated as it installs Nodes 4.x.x which doesn't work with wheezy.
What guide should I follow to install homebridge on wheezy?
Thank you
Every guide is getting outdated. The only question is when.
If you are on wheezy, please stick to node 0.12.6 - I can confirm it works with homebridge.
You have to install the following
1) all dependencies
2) homebridge (please check your package.json file and search any info on
https://github.com/nfarina/homebridge)
3) homebridge-legacy-plugins and any extra plugins via npm
4) configure your config.json file (you may need to add 127.0.0.1 to the trusted sites in your Domoticz settings if you have a username/password login)
5) npm start run to run homebridge
I must state that the installation process is very tedious after the recently introduced changes.
Re: Siri / HomeKit support for Domoticz
Posted: Thursday 12 November 2015 12:15
by simon_rb
alexsh1 wrote:simon_rb wrote:Forgive me for being stupid however I am looking to get this installed tomorrow on my Pi, I tried before and was unsuccessful. The above link says its for an old homebridge. The GitHub instructions say that it needs to be updated as it installs Nodes 4.x.x which doesn't work with wheezy.
What guide should I follow to install homebridge on wheezy?
Thank you
Every guide is getting outdated. The only question is when.
If you are on wheezy, please stick to node 0.12.6 - I can confirm it works with homebridge.
You have to install the following
1) all dependencies
2) homebridge (please check your package.json file and search any info on
https://github.com/nfarina/homebridge)
3) homebridge-legacy-plugins and any extra plugins via npm
4) configure your config.json file (you may need to add 127.0.0.1 to the trusted sites in your Domoticz settings if you have a username/password login)
5) npm start run to run homebridge
I must state that the installation process is very tedious after the recently introduced changes.
Thanks for that. I'll see how I get on. Is it working more reliably now with all switches from domoticz staying there. They kept disappearing when I had this working a few months back. That was with iOS 8, I'm guessing now iOS 9 is out its a bit better.
Cheers
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 14 November 2015 14:35
by Bikey
Bikey wrote:Bikey wrote:lukeredpath wrote:
Ok I'm with you now, so the problem is not setting the level but that the level is not being reported correctly in the other direction? It's possible there's a similar bug, I will take a look.
Ok, I just tested things by changing Domoticz.js in the platforms directory.
I have changed line 329:
designedMaxValue: this.MaxDimLevel
to:
designedMaxValue: 100
Now Siri sees a maximum level of 100%. If I ask Siri to dim back to 50% it sends a level 8 to Domoticz (50% * 15 rounded upwards to 8. 49% results in level 7). That now works perfect!
Will this bug fix (designedMaxValue:100) be included in the code?
Re: Siri / HomeKit support for Domoticz
Posted: Monday 16 November 2015 11:36
by SuppleX
Hi,
Quick question here. Just tried to follow the guide on
https://www.domoticz.com/wiki/Homekit_Siri.
All prereqs install correctly but the moment i enter "npm run start" i get the following error.
/usr/local/lib/node_modules/homebridge/lib/server.js:124
throw err;
^
SyntaxError: Unexpected token “
at Object.parse (native)
at Server._loadConfig (/usr/local/lib/node_modules/homebridge/lib/server.js:118:19)
at new Server (/usr/local/lib/node_modules/homebridge/lib/server.js:25:23)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:23:3)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
This is based on a config for philips hue. The moment i configure domoticz it will complain about:
Error: The requested platform 'Domoticz' was not registered by any plugin.
at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:88:13)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.
Any idea what i am missing?
Re: Siri / HomeKit support for Domoticz
Posted: Monday 16 November 2015 15:45
by alexsh1
SuppleX wrote:
This is based on a config for philips hue. The moment i configure domoticz it will complain about:
Error: The requested platform 'Domoticz' was not registered by any plugin.
at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:88:13)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.
Any idea what i am missing?
The wiki link is outdated. Please check out the link I posted above or alternatively try the following:
https://github.com/nfarina/homebridge/w ... spberry-Pi
You need to install homebridge-legacy-plugins
IMPORTANT
Homebridge has recently spun off its included accessories into a new module homebridge-legacy-plugins which contains our previous integrations for popular devices like Nest, WeMo, Sonos, Hue, and many more.
Re: Siri / HomeKit support for Domoticz
Posted: Tuesday 17 November 2015 10:17
by SuppleX
Thanks, problem solved!
Re: Siri / HomeKit support for Domoticz
Posted: Friday 20 November 2015 17:30
by Bikey
Ok, I have also solved the other issue being that Domticz expects for RFXCOM-based (KaKu) dimmers values between 1-16, even if it reports MaxDimLevel 15 in the API.
I have changed the following in the Domoticz.js file in the platforms subdirectory:
In this function:
dimmerLevelForValue: function(value) {
if (this.MaxDimLevel == 100) {
return value;}
return Math.round(((value / 100.0) * this.MaxDimLevel)+1) }
I have changed:
return Math.round((value / 100.0) * this.MaxDimLevel)
to:
return Math.round(((value / 100.0) * this.MaxDimLevel)+1)
Now finally I can get my dimmers back to 100%! And the other values % SIRI reports now more closely match the values as being reported in the GUI of Domoticz.
I'm not sure if this also is needed for other non-RFXCOM/KaKu dimmer-devices that work with values instead of % in the API. Are there others that work this way?
Perhaps others can check if that works for your configuration as well?
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 22 November 2015 2:18
by simon_rb
Does anyone have the command to install nodes 0.12 for wheezy? All guides are for version 4.0.
Cheers
Siri / HomeKit support for Domoticz
Posted: Sunday 22 November 2015 15:03
by simon_rb
I have been on this for 8 hours and cannot get it working. Does anyone have it running on wheezy and nodes 0.12? If they have could you quickly write how you got this to work. Seems there is a lot of conflicting guides out there. Some say homebridge isn't compatible with nodes 4 yet the guide still uses it. I have 0.12 installed but still no luck.
Cheers
pi@raspberrypi ~/homebridge $ npm run start
npm ERR! Linux 4.1.6+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! missing script: start
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <
https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/homebridge/npm-debug.log
pi@raspberrypi ~/homebridge $
Re: Siri / HomeKit support for Domoticz
Posted: Monday 23 November 2015 9:48
by deennoo
Got the same issue as you, and
When installing legacy plug-ins :
Code: Select all
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.2"
Ho to solve this ?
Have to admit the one who is provid on Domoticz Sd card run well, but i made some test, and try make it run on i386 device running wheezy.
if some one can give some help, it will be very appriciated
Re: Siri / HomeKit support for Domoticz
Posted: Monday 23 November 2015 10:40
by alexsh1
deennoo wrote:Got the same issue as you, and
When installing legacy plug-ins :
Code: Select all
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.2"
Ho to solve this ?
You do not need to do anything - this is just a warning.
I believe the image on the SD card is for ARM (Raspberry Pi) - you would need to find a binary or compile Domoticz for i386
Re: Siri / HomeKit support for Domoticz
Posted: Monday 23 November 2015 14:17
by deejc
is the shim being moved to the new plugin system ?
also, will this at any point be able to reflect the current state of the devices as show in Domoticz or will it never be able to gain that level of feedback ?