Comments (11)
Same issue here with the Danalock. I can lock/unlock it with Siri just
fine, but using a HomeKit app I have to toggle the target state a few times
before it actually does anything.
Edvard;
On Sat, Jul 30, 2016 at 5:36 AM, moosebert [email protected] wrote:
Have a couple Kiwkset locks successfully linked-up with Z-Way, but when
presented to Homebridge as accessories they’re constantly showing
“unlocking” (in iOS 10’s new Home app), and in a “Lock Mechanism Target
State” of “Unsecured” constantly (despite being locked).I’m able to lock/unlock them (with a valid state update) via Z-Way without
issue. It’s only via Homebridge that this funky “always unlocking” state
appears.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#44, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWZB2ShMQM9xxUredH8HqrPSywFWzdWks5qasa-gaJpZM4JYtxX
.
from homebridge-zway.
Think I'm onto something here.
So on line 1142 of index.js val
is declared with a default value of "0". If vdev.metrics.level
returns "open", it should be set to "0" and conversely if "closed" is returned set to "1". Did a little debugging, and at least with Z-Way 2.2.3 (only version I've ever used) if a lock is secured (e.g. "closed") vdev.metrics.level
actually returns "close", ergo no match so val is never changed from "0".
Changed the code around simply like this and things are working as expected now:
if(cx instanceof Characteristic.LockTargetState){
cx.zway_getValueFromVDev = function(vdev){
var val = Characteristic.LockTargetState.UNSECURED;
if(vdev.metrics.level === "open"){
val = Characteristic.LockTargetState.UNSECURED;
} else if(vdev.metrics.level === "closed") {
val = Characteristic.LockTargetState.SECURED;
} else if(vdev.metrics.level === "close") {
val = Characteristic.LockTargetState.SECURED;
}
debug("Returning LockTargetState of \"" + val + "\" because vdev.metrics.level returned \"" + vdev.metrics.level + "\"");
return val;
};
Will submit a commit eventually on the above once I've researched more and validated it's the right approach.
Last issue is the status never changes within homekit after a successful lock/unlock (with the above issue resolved). Not sure if homebridge-zway should be kicking Z-Way server to update, or if Z-Way server should be querying the device for the update on its own, but started a thread over on Z-Way forum https://forum.z-wave.me/viewtopic.php?f=3419&t=23601.
from homebridge-zway.
Resolved the "last issue" which has nothing to do with homebridge-zway. Details at https://forum.z-wave.me/viewtopic.php?f=3419&t=23601 (use https://github.com/jensmoes/Niffler app).
With submitted commit this should be resolved.
@ZYG0TE take a look at the aforementioned commit, and app. Combo of these should solve your issues too I hope!
from homebridge-zway.
@moosebert Thanks for looking into this. I have no experience with npm packages. How can I try out your commit exactly?
from homebridge-zway.
@archpoint you can simply alter /usr/lib/node_modules/homebridge-zway/index.js
on your box as described in this thread. Alternatively, replace aforementioned file with https://github.com/moosebert/homebridge-zway/blob/master/index.js.
from homebridge-zway.
@moosebert Gave it a go now. Works perfectly. Thank you.
from homebridge-zway.
@moosebert , Great! Thanks... I got my DanaLock but haven't installed it yet so couldn't test (finally ordered the right cylinder so it's on its way now). Can you submit this as a pull request?
from homebridge-zway.
@SphtKr my pleasure dude, thanks for all the hard work. Aforementioned "fix" can be found in pull req. #45
from homebridge-zway.
Have these changes been rolled into the latest v0.5 alpha (3)? From a cursory glance it seems to be but the code is not exactly the same as what's described above. I've also setup Niffler in my ZWay server but I'm not sure it's updating status correctly for my Danalock v2 BTZE. Home app on my iPhone always shows "Unlocking..." except for a few seconds after I try to lock the door, then it switches back. How can I verify that the ZWay + Niffler combination is working before I start debugging homebridge-zway?
from homebridge-zway.
No, these changes were added after 0.5.0-alpha3. Try updating to the latest (0.5.0-alpha4).
from homebridge-zway.
That did the trick (upgrading to 0.5.0-alpha4)! The status of my Danalock is now correctly updated in HomeKit.
from homebridge-zway.
Related Issues (20)
- Danalock v3? HOT 4
- Homebridge hangs when initializing Zway Server accessory. HOT 1
- Z-way Dummy Device to Homebridge Accessory??
- Unit tests run is failed on master
- HTTP Service toggleButton not showing up in Home app
- Remotec ZXT-120 thermostat HOT 2
- GE/Jasco In-Wall Smart Motion Switch ZW4006 doesnt complete interview
- Aeotec Garage Door Opener G5 HOT 1
- LightScenes not shown in HomeKit
- Tags do have no effect HOT 8
- Fibaro CO Sensor support
- Thermostat-issues ios > 13 HOT 1
- Is this project dead? HOT 5
- Z-Way Plugin doesn't work
- Devices 'Not Supported' HOT 6
- SphKr -- Have you abandoned this project? HOT 1
- Memory leak HOT 2
- Server is not running HOT 1
- Problem with Philio Double Relay Insert (Switch)
- Is it homebridge 1.3 ready??? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-zway.