Page 1 of 1

Problem with changing state from z-wave device via HomeKit

Posted: 31 Dec 2014 17:00
by vga
Hey!

like the topic says, i want to update a z-wave device by HomeKit iOS App.

Environment looks like this:

z-Wave Environment:
Controller HW: RPi with Razberry
Controller SW: z-way server (v2.0.1-rc7-7-gff06bfa)
included z-wave device: Fibaro Wall-Plug
(all works fine within this z-wave environment!)

HomeKit Environment:
iPhone6 with iOS8
used App: https://github.com/KhaosT/HomeKit-Demo.git
(successfully paired the HomeKit with RaZberry Controller as a bridge and see the Fibaro Wall-Plug as accessory!)

The Situation:
Using web-GUI "Z-Way Home Automation UI" -> "Widgets" I see the Wall-Plug Switch and when i turn on/off in UI, the HW Wall-Plug will turn on/off correctly.
Using web-GUI "Expert UI" "Control->Switch" I see the Wall-Plug Switch and when i turn on/off in UI, the HW Wall-Plug will turn on/off correctly.
Looking at the iOS "HomeKit-Demo" App on iPhone, while switching on/off (does´t matter which web-GUI is used for switching) i can see, that the accessory characteristic from Wall-Plug is changing (0/1) correctly.

Now, when i switch state of Wall-Plug by HomeKit-Demo-App, the HW-Wall-Plug didn´t turn on/off!
i found, switching the state of "Wall-Plug" in "HomeKit-Demo" App, indeed changes the state of "Wall-Plug" in web-GUI "Z-Way Home Automation UI" too, but NOT in web-GUI "Expert UI"! AND, when i click "update" for "Wall-Plug" switch in "Expert UI" it forces the state from the original unchanged switch state in "Expert UI" back to "Z-Way Home Automation UI" AND "HomeKit-Demo" App.

So, however, it seems that commands from HomeKit will reach the z-way-HA-GUI, but at least not the actual switch-command for device HW in z-way server.

Is this a known issue in z-way, or a problem with the device, or do i need a special module in "Z-Way Home Automation UI" except HomeKitGate for that?
I hope this description is detailed enough for help troubleshooting.

Re: Problem with changing state from z-wave device via HomeK

Posted: 07 Jan 2015 13:11
by vga
...sorry for re-post, but is there no idea for that?
Looks like the state change request from HomeKit-App is reaching the z-way server (as I can see in Z-way Home Automation UI), but doesn´t call the trigger-command for the device itself, however.

Don´t know how to deal with that. Possibly the state-change through z-way Home Automation UI is called by js with "onclick" and this trigger-command isn´t configured within the HomeKitGate?

This is just a guess, and I´m happy for all help/information, what I can do or what the real problem is.

Re: Problem with changing state from z-wave device via HomeK

Posted: 08 Jan 2015 01:31
by PoltoS
Indeed, there is a bug. We will fix it in next RC8. Please stay tunned - it's a matter of few days.

Re: Problem with changing state from z-wave device via HomeK

Posted: 08 Jan 2015 01:40
by vga
Thank you for notification, i will. :)

Re: Problem with changing state from z-wave device via HomeK

Posted: 09 Jan 2015 07:45
by PoltoS
If you don't want to wait, change this:
https://github.com/Z-Wave-Me/home-autom ... b146c4e82b

Re: Problem with changing state from z-wave device via HomeK

Posted: 10 Jan 2015 01:31
by vga
Thank you for this commit.
I took the changed file and replaced it in folder:
/opt/z-way-server/automation/modules/HomeKitGate/index.js

Then, after reboot the RPi, the z-way-server-log output is like that:

Code: Select all

[2015-01-09 23:36:45.239] [I] [core] Notification: error (core): Can not instantiate module HomeKitGate: TypeError: undefined is not a function
[2015-01-09 23:36:45.265] [I] [core] TypeError: undefined is not a function
    at AutomationController.instantiateModule (automation/classes/AutomationController.js:235:24)
    at AutomationController.reconfigureInstance (automation/classes/AutomationController.js:444:22)
    at ZAutomationAPIWebRequest.<anonymous> (automation/webserver.js:605:44)
    at ZAutomationAPIWebRequest.ZAutomationWebRequest.handleRequest (automation/request.js:254:30)
    at automation/request.js:43:35
    at WebServerRequestHandler (automation/main.js:85:10)
Did I make a mistake, or do you find another bug to fix, for RC8? ;)

Re: Problem with changing state from z-wave device via HomeK

Posted: 10 Jan 2015 02:14
by PoltoS
Excuse, I've made a typo. Updated it:
https://github.com/Z-Wave-Me/home-autom ... e/index.js

Re: Problem with changing state from z-wave device via HomeK

Posted: 10 Jan 2015 20:54
by vga
Top! ...you got it, now it works! ;)