Siri / HomeKit support for Domoticz

Moderator: leecollings

User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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.
Not using Domoticz anymore
Immo
Posts: 19
Joined: Wednesday 11 February 2015 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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 :)
djoeney
Posts: 15
Joined: Sunday 17 May 2015 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: NL
Contact:

Re: Siri / HomeKit support for Domoticz

Post by djoeney »

Does someone is using homebrige is over a VPN? I would like to use siri from a non local network.
Compute RPi 2 : Domoticz latest beta, Synology : Domoticz tested beta on failover system.
Peripherals RFXCOM - RFXtrx433, Z-Wave.Me ZME_UZB1 USB Stick,P1 cable on smartmeter, Logitech Harmony Hub, 3 IP camera's
NewFolk
Posts: 39
Joined: Wednesday 02 September 2015 11:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by NewFolk »

It works out of home, if you have aTV 3+
User avatar
Thyraz
Posts: 7
Joined: Friday 28 August 2015 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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.
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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:

Code: Select all

pi@RPIDomo2 ~/homebridge $ npm install
npm WARN engine [email protected]: wanted: {"node":"~0.10.0"} (current: {"node":"4.0.0","npm":"2.14.2"})
npm WARN optional dep failed, continuing [email protected]
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...
User avatar
Thyraz
Posts: 7
Joined: Friday 28 August 2015 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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. :)
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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?
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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.
NewFolk
Posts: 39
Joined: Wednesday 02 September 2015 11:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
NewFolk
Posts: 39
Joined: Wednesday 02 September 2015 11:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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 │
└────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────────────┴──────────┘
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
NewFolk
Posts: 39
Joined: Wednesday 02 September 2015 11:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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.
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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?
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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?
maq1017
Posts: 4
Joined: Saturday 28 September 2013 18:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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!
User avatar
Thyraz
Posts: 7
Joined: Friday 28 August 2015 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Siri / HomeKit support for Domoticz

Post 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
temp.png (75.36 KiB) Viewed 3104 times
And after looking at the FHEM shim of Homebridge I think they already support more than switches...
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: Siri / HomeKit support for Domoticz

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

Who is online

Users browsing this forum: No registered users and 1 guest