Page 18 of 27
Re: Siri / HomeKit support for Domoticz
Posted: Wednesday 07 October 2015 0:05
by G3rard
mschut wrote:When I logout for the iCloud sync, the iPhone says it will delete all information of the iphone (I dont have the exact words, I use it in dutch). I am not suren which information it will delete, I dont want to remove all information.
I have checked this and you have to disable the iCloud Keychain (Sleutelhanger) and afterwards enable it again. So not the iCloud sync.
If the Keychange is being used then I think that information will be gone after disabling. I am not sure as I am not using the Keychain other than for Eve.
Re: Siri / HomeKit support for Domoticz
Posted: Thursday 08 October 2015 7:23
by Immo
Hi
So I got this running after some issues with installing npm.
I added some devices and scenes, they are see and I can control them.
Added a new scene which was became available in Eve as I had to restart npm.
I added a pnother scene, but it doesn't show up in Eve now.
Should I restart homebridge or should it become available by itself?
Looking great for the rest, now if only speech recognition would be a bit better in Siri
Re: Siri / HomeKit support for Domoticz
Posted: Thursday 08 October 2015 22:57
by djoeney
Does someone is using homebrige is over a VPN? I would like to use siri from a non local network.
Re: Siri / HomeKit support for Domoticz
Posted: Friday 09 October 2015 20:37
by NewFolk
It works out of home, if you have aTV 3+
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 10 October 2015 12:24
by Thyraz
Do other stuff than simple switches work for you?
Or is this a restriction of the HomeBridge Domoticz shim so far?
For example I can't see temperature or motion sensors.
They also don't appear in the log of homebridge when I start it in the terminal.
Switching Lights and power plugs works without a problem.
Here's my config:
Code: Select all
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},
"platforms": [
{
"platform": "Domoticz",
"name": "Domoticz",
"server": "192.168.2.108",
"port": "8080",
"roomid": "2",
"loadscenes": 1
}
],
"accessories": [
]
}
Room ID 2 is a room called "HomeKit" where I added some switches and sensors for testing.
But HomeBridge will only recognize the switches on startup.
I removed anything beside a switch and a temperature sensor for this log for you:
Code: Select all
> [email protected] start /home/pi/homebridge-new/homebridge
> DEBUG=* node app.js || true
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
Starting HomeBridge server...
_____________________________________________________________________
IMPORTANT: Homebridge is in the middle of some big changes.
Read more about it here:
https://github.com/nfarina/homebridge/wiki/Migration-Guide
_____________________________________________________________________
Loading 1 platforms...
[Domoticz] Initializing Domoticz platform...
[Domoticz] Fetching Domoticz lights and switches...
Loading 0 accessories...
[Domoticz] Initializing platform accessory 'Bürolampe'...
[Domoticz] Loaded services for Bürolampe
Scan this code with your HomeKit App on your iOS device:
┌────────────┐
│ 031-45-154 │
└────────────┘
EventedHTTPServer Server listening on port 51826 +0ms
EventedHTTPServer [192.168.2.109] New connection from client +1s
EventedHTTPServer [192.168.2.109] HTTP server listening on port 54826 +6ms
EventedHTTPServer [192.168.2.109] HTTP request: /pair-verify +31ms
HAPServer [CC:22:3D:E3:CE:30] HAP Request: POST /pair-verify +1ms
HAPServer [CC:22:3D:E3:CE:30] Pair verify step 1/2 +13ms
EventedHTTPServer [192.168.2.109] HTTP Repsonse is finished +87ms
EventedHTTPServer [192.168.2.109] HTTP request: /pair-verify +33ms
HAPServer [CC:22:3D:E3:CE:30] HAP Request: POST /pair-verify +2ms
HAPServer [CC:22:3D:E3:CE:30] Pair verify step 2/2 +5ms
HAPServer [CC:22:3D:E3:CE:30] Client 6B82179C-BBB0-4B84-A90C-C0A822398E4C verification complete +22ms
EventedHTTPServer [192.168.2.109] HTTP Repsonse is finished +11ms
EventedHTTPServer [192.168.2.109] HTTP request: /accessories +167ms
HAPServer [CC:22:3D:E3:CE:30] HAP Request: GET /accessories +4ms
EventedHTTPServer [192.168.2.109] HTTP Repsonse is finished +23ms
EventedHTTPServer [192.168.2.109] HTTP request: /characteristics +109ms
HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /characteristics +1ms
Accessory [Homebridge] Processing characteristic set: {"characteristics":[{"aid":4,"iid":9,"ev":true}]} +5ms
Accessory [Homebridge] Registering Characteristic "Change the power state" for events +4ms
EventedHTTPServer [192.168.2.109] HTTP Repsonse is finished +2ms
EventedHTTPServer [192.168.2.106] New connection from client +3m
EventedHTTPServer [192.168.2.106] HTTP server listening on port 54827 +3ms
EventedHTTPServer [192.168.2.106] HTTP request: /pair-verify +16ms
HAPServer [CC:22:3D:E3:CE:30] HAP Request: POST /pair-verify +1ms
HAPServer [CC:22:3D:E3:CE:30] Pair verify step 1/2 +2ms
EventedHTTPServer [192.168.2.106] HTTP Repsonse is finished +40ms
EventedHTTPServer [192.168.2.106] HTTP request: /pair-verify +19ms
HAPServer [CC:22:3D:E3:CE:30] HAP Request: POST /pair-verify +0ms
HAPServer [CC:22:3D:E3:CE:30] Pair verify step 2/2 +2ms
HAPServer [CC:22:3D:E3:CE:30] Client 5485AAC1-0538-4BF6-BCC4-638DC591A9C5 verification complete +7ms
EventedHTTPServer [192.168.2.106] HTTP Repsonse is finished +5ms
EventedHTTPServer [192.168.2.106] HTTP request: /accessories +8ms
HAPServer [CC:22:3D:E3:CE:30] HAP Request: GET /accessories +1ms
EventedHTTPServer [192.168.2.106] HTTP Repsonse is finished +7ms
Is there anything that can be configured to support more accessories?
My Setup is an Raspberry Pi with Z-Wave Module (Razpberry).
The OfficeLight is a Fibaro PowerPlug with a light bulb attached.
The temperature sensor is a Fibaro multi sensor, which works fine in Domoticz, but not in Homebridge.
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 10 October 2015 12:41
by Bikey
Hi guys,
I'm now using a freshly installed Jessie image with a manual install of Domoticz, which runs fine, however when I follow the wiki the step "npm install" gives the following errors:
This is possibly related with the fact that sudo dpkg -i node_latest_armhf.deb installed node 4.0.
After this warning, the process continues until it really hits errors:
Code: Select all
make: Entering directory '/home/pi/homebridge/node_modules/teslams/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build'
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
In file included from ../lib/kerberos.cc:1:0:
../lib/kerberos.h:5:27: fatal error: gssapi/gssapi.h: No such file or directory
#include <gssapi/gssapi.h>
^
compilation terminated.
kerberos.target.mk:92: recipe for target 'Release/obj.target/kerberos/lib/kerberos.o' failed
make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1
make: Leaving directory '/home/pi/homebridge/node_modules/teslams/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.8-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/homebridge/node_modules/teslams/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok
After this lots more errors.
Can anybody give me some pointers how to resolve this?
* EDIT * Did some Googling and found this solution to remove the second warning and the errors: sudo apt-get install libkrb5-dev
Hope it now goes well...
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 10 October 2015 13:04
by Thyraz
Ok, to my earlier question: The Domoticzs platform shim only supports switches so far, no sensors.
Let's see if we get this hacked into the domoticz.js.
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 10 October 2015 16:05
by Bikey
Ok, I've got the basics running. Only start-up at boot is not working.
First I tried forever as instructed on the WiKi but that didn't seem to do anything. So I uninstalled Forever, and tried pm2.
Looks like everything works fine if I test it interactively and check with "pm2 list", however at boot nothing happens.
This is what syslog looks like:
Code: Select all
Oct 10 15:53:22 RPIDomo2 pm2-init.sh[435]: [PM2] PM2 Successfully daemonized
Oct 10 15:53:22 RPIDomo2 pm2-init.sh[435]: [PM2] Resurrecting
Oct 10 15:53:22 RPIDomo2 pm2-init.sh[435]: ┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐
Oct 10 15:53:22 RPIDomo2 pm2-init.sh[435]: │ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
Oct 10 15:53:22 RPIDomo2 pm2-init.sh[435]: └──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘
Oct 10 15:53:22 RPIDomo2 pm2-init.sh[435]: Use `pm2 show <id|name>` to get more details about an app
Oct 10 15:53:22 RPIDomo2 systemd[1]: Started LSB: PM2 init script.
So Homebridge is not started. I did do "pm2 save" and also checked etc/init.d/pm2-init.sh
Any other logs I can check to find clues?
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 11 October 2015 14:30
by Bikey
Another thing, Homebridge is always loading all my scenes, while in de config file I specified no scenes.
This is my son-config.js
Code: Select all
{
"description": "Configuration file for Domoticz platform.",
"platforms": [
{
"platform": "Domoticz",
"name": "RPIDomo",
"server": "127.0.0.1",
"port": "8080",
"roomid": 2,
"usescenes": 0
}
],
"accessories": []
}
It makes no difference if I use quotes, like: "usescenes": "0"
Without quotes is like it is done in the example config-file.
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 11 October 2015 14:51
by NewFolk
Thyraz wrote:Ok, to my earlier question: The Domoticzs platform shim only supports switches so far, no sensors.
Let's see if we get this hacked into the domoticz.js.
Siri does not support sensors.
https://support.apple.com/en-us/HT204893
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 11 October 2015 15:04
by NewFolk
Bikey wrote: [PM2]
So Homebridge is not started. I did do "pm2 save" and also checked etc/init.d/pm2-init.sh
Any other logs I can check to find clues?
Ater no successful boot try.
pm2 list
pm2 resurrect
pm2 list
If output will be the same, then the problem is in PM2 start. Another way you have not correct do "pm2 save"
Code: Select all
root@Kitchen:~# pm2 list
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
root@Kitchen:~# pm2 resurrect
[PM2] Resurrecting
Process /home/pi/homebridge/app.js launched
┌────────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├────────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────────────┼──────────┤
│ HomeBridge │ 0 │ fork │ 10673 │ online │ 0 │ 2s │ 10.895 MB │ disabled │
└────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
root@Kitchen:~# pm2 list
┌────────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├────────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────────────┼──────────┤
│ HomeBridge │ 0 │ fork │ 10673 │ online │ 0 │ 25s │ 31.930 MB │ disabled │
└────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────────────┴──────────┘
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 11 October 2015 17:53
by Bikey
Thanks for your reply. I have tested it, and this are the results:
Code: Select all
pi@RPIDomo2 ~ $ pm2 list
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
pi@RPIDomo2 ~ $ pm2 resurrect
[PM2] Resurrecting
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
pi@RPIDomo2 ~ $ pm2 list
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
So it it is not resurrected. But if I start the process with the following action manually, it looks like it is running, but it does not work; the app can not connect:
Code: Select all
pi@RPIDomo2 ~ $ pm2 start /home/pi/homebridge/app.js --name Siri
[PM2] Starting /home/pi/homebridge/app.js in fork_mode (1 instance)
[PM2] Done.
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬─────────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├──────────┼────┼──────┼─────┼────────┼─────────┼────────┼─────────────┼──────────┤
│ Siri │ 0 │ fork │ 887 │ online │ 0 │ 0s │ 11.703 MB │ disabled │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴─────────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
Strange thing is, that when looking which process are running I get this result:
Code: Select all
pi@RPIDomo2 ~ $ ps -aux | grep app.js
pi 887 6.0 3.8 134036 38376 ? Ssl 17:46 0:05 node /home/pi/homebridge/app.js
pi 950 0.0 0.1 4264 1804 pts/0 S+ 17:48 0:00 grep --color=auto app.js
If I stop the process from PM2 with "PM2 stop all" and then start the Homebridge with "npm start app.js" it all works fine, but there are 2 process running:
Code: Select all
pi@RPIDomo2 ~/homebridge $ ps -aux | grep app.js
pi 1079 0.0 0.0 1900 424 pts/1 S+ 17:50 0:00 sh -c DEBUG=* node app.js || true "app.js"
pi 1080 36.3 3.7 134236 37524 pts/1 Sl+ 17:50 0:04 node app.js
pi 1107 0.0 0.2 4264 2004 pts/0 S+ 17:50 0:00 grep --color=auto app.js
Summary:
- "pm2 start /home/pi/homebridge/app.js --name Siri" is not working when it is started manually. The App can't connect.
- This is not persistent after a reboot, even if I do "pm2 save"
- "npm start app.js" is working fine, so configuration is Ok
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 11 October 2015 18:38
by NewFolk
Try
pm list
1-2 minutes after
pm2 start /home/pi/homebridge/app.js --name Siri
It`s look strange to me to see "uptime 0s"
I alway see 1-2s
- Spoiler: show
Code: Select all
root@Kitchen:~# pm2 list
┌────────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├────────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────────────┼──────────┤
│ HomeBridge │ 0 │ fork │ 10673 │ online │ 0 │ 3h │ 42.566 MB │ disabled │
└────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
root@Kitchen:~# pm2 stop HomeBridge
[PM2] Stopping HomeBridge
[PM2] stopProcessId process id 0
┌────────────┬────┬──────┬─────┬─────────┬─────────┬────────┬────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├────────────┼────┼──────┼─────┼─────────┼─────────┼────────┼────────┼──────────┤
│ HomeBridge │ 0 │ fork │ 0 │ stopped │ 0 │ 0 │ 0 B │ disabled │
└────────────┴────┴──────┴─────┴─────────┴─────────┴────────┴────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
root@Kitchen:~# ps -aux | grep app.js
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
root 20320 0.0 0.4 3548 1796 pts/0 S+ 19:34 0:00 grep app.js
root@Kitchen:~# pm2 start HomeBridge
[PM2] restartProcessId process id 0
[PM2] Process successfully started
┌────────────┬────┬──────┬───────┬────────┬─────────┬────────┬────────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├────────────┼────┼──────┼───────┼────────┼─────────┼────────┼────────────┼──────────┤
│ HomeBridge │ 0 │ fork │ 20359 │ online │ 0 │ 1s │ 9.695 MB │ disabled │
└────────────┴────┴──────┴───────┴────────┴─────────┴────────┴────────────┴──────────┘
BTW you have PM2 log in home folder /home/pi/.pm2/logs
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 11 October 2015 21:28
by Bikey
Hi,
If I try pm2 list after a short while it show an uptime > 0 seconds.
See how it looks like just after a reboot:
Code: Select all
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Oct 11 20:50:55 2015 from 192.168.0.165
pi@RPIDomo2 ~ $ pm2 list
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
pi@RPIDomo2 ~ $ pm2 start /home/pi/homebridge/app.js --name Siri
[PM2] Starting /home/pi/homebridge/app.js in fork_mode (1 instance)
[PM2] Done.
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬─────────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├──────────┼────┼──────┼─────┼────────┼─────────┼────────┼─────────────┼──────────┤
│ Siri │ 0 │ fork │ 878 │ online │ 0 │ 0s │ 12.176 MB │ disabled │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴─────────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
pi@RPIDomo2 ~ $ pm2 list
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬─────────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├──────────┼────┼──────┼─────┼────────┼─────────┼────────┼─────────────┼──────────┤
│ Siri │ 0 │ fork │ 878 │ online │ 0 │ 27s │ 37.145 MB │ disabled │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴─────────────┴──────────┘
pi@RPIDomo2 ~ $ ps -aux | grep app.js
pi 878 6.1 3.8 134036 38424 ? Ssl 21:02 0:05 node /home/pi/homebridge/app.js
pi 972 0.0 0.2 4264 2000 pts/0 R+ 21:03 0:00 grep --color=auto app.js
I font's see any errors in de log, just the regular warnings:
- Spoiler: show
- *** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdn ... ceRegister>
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdn ... ceRegister>
Only strange thing is, that if I look at the output log in /home/pi/.pm2/logs everything looks normal, but the last lines are:
Code: Select all
Scan this code with your HomeKit App on your iOS device:
┌────────────┐
│ undefined │
└────────────┘
However if I start the home bridge interactively with: npm start app.js the last lines, are (unit the iOS app connects and more http traffic is logged):
Code: Select all
Scan this code with your HomeKit App on your iOS device:
┌────────────┐
│ undefined │
└────────────┘
EventedHTTPServer Server listening on port 51826 +0ms
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 11 October 2015 21:31
by Bikey
By the way, I solved the issue why the scenes where always loaded!
In the configuration file you should not use "usescenes": 0 as indicated in this forum, but it should be "loadscenes": 0
I have updated the Wiki with this info.
Re: Siri / HomeKit support for Domoticz
Posted: Friday 16 October 2015 12:32
by Bikey
I have now added some RFX-com enabled lights to the Room that Homebridge/Siri is controlling, that works except I can only set a maximum of 15% for all dimmable lamps.
Why is that? I did not configure anything for these lamps in Homebridge. Does anybody knows how to change that?
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 17 October 2015 17:11
by Bikey
I control my Hue Lamps, via a direct connection between homebridge and the hue bridge. Dimming and color-setting for these lamps works perfect.
Only lamps that I control via the Domoticz-Homebridge connection can only be dimmed to a maximum of 15%. So it looks like there is a bug in the Domoticz-platform shim. Or in the Domoticz API?
Does anybody experience the same?
Re: Siri / HomeKit support for Domoticz
Posted: Saturday 17 October 2015 21:55
by maq1017
Yep, I've got the same issue with LWRF dimmers, it only dims up to 32%.
I think there is a bug with the MadDimLevel variables in domoticz.js, I've overwritten it to 100% and it works fine for me, but I'm not a javascript guy so I've not worked out the implications.
There's also something weird in that Siri doesn't recognise any dimmer commands, but they work from within the app. Strange!
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 18 October 2015 11:10
by Thyraz
NewFolk wrote:Thyraz wrote:Ok, to my earlier question: The Domoticzs platform shim only supports switches so far, no sensors.
Let's see if we get this hacked into the domoticz.js.
Siri does not support sensors.
https://support.apple.com/en-us/HT204893
That's not true.
Here's a screenshot using Elgato Eve Room and Siri on the Apple Watch:
- temp.png (75.36 KiB) Viewed 3111 times
And after looking at the FHEM shim of Homebridge I think they already support more than switches...
Re: Siri / HomeKit support for Domoticz
Posted: Sunday 18 October 2015 22:56
by Bikey
maq1017 wrote:Yep, I've got the same issue with LWRF dimmers, it only dims up to 32%.
I think there is a bug with the MadDimLevel variables in domoticz.js, I've overwritten it to 100% and it works fine for me, but I'm not a javascript guy so I've not worked out the implications.
I did some research: if I use the JSON command (as is used by Homebridge platformshim) to retrieve all devices from Domoticz with:
http://ip-address-of-domoticz:8080/json ... order=Name
This is the output for one of the lamps:
Code: Select all
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Set Level: 93 %, Level: 93 %",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 2,
"HardwareName" : "RFXCOM",
"HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
"HardwareTypeVal" : 1,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "0907196",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2015-10-18 22:26:29",
"Level" : 93,
"LevelInt" : 14,
"MaxDimLevel" : 15,
"Name" : "DimmableLamp",
"Notifications" : "false",
"PlanID" : "2",
"PlanIDs" : [ 2, 16 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 7,
"Status" : "Set Level: 93 %",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "AC",
"SwitchType" : "Dimmer",
"SwitchTypeVal" : 7,
"Timers" : "false",
"Type" : "Lighting 2",
"TypeImg" : "dimmer",
"Unit" : 4,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "66",
"YOffset" : "54",
"idx" : "25"
},
As you can see it has a "MaxDimLevel" : 15, so that explains perhaps why in Homebridge/Siri this translates (at least to the Eve App) as a maximum of 15%.
However this MaxDimLevel should have been calculated to 100%.
Also you can see that this lamp currently has a "Level" : 93 which corresponds to the actual setting of 93% which scales to the indicated "LevelInt" : 14 (on the scale of 0-15).
This is what should be done in the Domoticz.js code as well. I can see some code doing this, but I'm not a programmer so I can't figure out where the bug is. I hope someone else can?
maq1017 wrote:There's also something weird in that Siri doesn't recognise any dimmer commands, but they work from within the app. Strange!
Mmm, for me it does recognize dimmer commands; eg. I can say "set the diner table lamp at 20%" With my Philps Hue lights that works perfectly.