This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[New app] Yale Real Living pushbutton smart lock with Z-Wave

TimTim Member
edited January 2017 in Apps
I wrote a basic app to get my Yale smart lock working with Homey. At the moment it supports remote lock and unlock, notification of who has entered or left (via keypad user ID), notification of a manual lock or unlock event, and tamper alarms. Certain lock settings can be updated via the Devices page in Homey; currently the audio mode (whether the lock beeps or not), the maximum number of tries before a user is locked out, the lockout time, and the operating mode (whether privacy mode is enabled).

I only own the pushbutton non-Bluetooth device so that is all I've been able to test with. If anybody has any of the other Yale variants I'd be happy to work with them to add support for those devices.

YMMV, I'm not a developer so this was all though trial and error. Don't come after me if the lock catches fire and burns down your house :smile: But it's been working pretty well for me for a couple of weeks now.
«1

Comments

  • I tried using your codes and update the productypeid and productid to work with YRD220. The pairing process will report vdevice.drivers.zwavebasic.pair.invalid_capability. So I slowly removed all the capabilities until I keep only the capability that maps to 'COMMAND_CLASS_DOOR_LOCK.  From there I can lock and unlock the door but I couldn't get the status updates by thumbturn. But whenever I see that if I manually lock/unlock the door, I see the lock reporting to Homey:

    Decapsulated frame from COMMAND_CLASS_SECURITY to COMMAND_CLASS_ALARM, data 0x051502

    I know it uses the COMMAND_CLASS_ALARM to report status but whenever I have a capability with the COMMAND_CLASS_ALARM, the same error will occur.

    Interestingly, on https://products.z-wavealliance.org/, both 110 and 220 has exactly the same command classes. Really puzzling. It is my first customised Z-Wave app, so appreciate if you can shed some light.
  • CC ALARM has been renamed to NOTIFICATION from version 3 and on, that is probably why :smile:
  • I've added support for a few more models of Yale locks. May I request for a pull?
  • TimTim Member
    edited October 2017
    limkopi78 said:
    I've added support for a few more models of Yale locks. May I request for a pull?
    Sure! Unfortunately I can't guarantee to get to it straight away as I have a lot going on IRL right now, but send it and if I can integrate it with no hassles I'll do it. I know the API also needs to be updated to v2, and frankly getting this working was complete trial and error for me (not a dev), so I'm nervous :smile:
  • limkopi78 said:
    I've added support for a few more models of Yale locks. May I request for a pull?
    I wanted to do the same but I cannot find the correct product ID. When I include the Yale lock as a generic z-wave device I get Product ID = 0000, which looks strange to me. Can somebody point me in the right direction to get this lock working?

  • Yannick said:
    limkopi78 said:
    I've added support for a few more models of Yale locks. May I request for a pull?
    I wanted to do the same but I cannot find the correct product ID. When I include the Yale lock as a generic z-wave device I get Product ID = 0000, which looks strange to me. Can somebody point me in the right direction to get this lock working?

    Apperantly it isn't. On the Z-wave certification site, the same productID is noted:
    https://products.z-wavealliance.org/products/1399

    Does it work when defining the productID as "0"?
  • YannickYannick Member
    edited November 2017
    I"m not at home currently so can't sideload an app. But do you guys think this will work in app.json:
    "manufacturerId": 297, 
    "productTypeId": [4,6], 
    "productId": [2048, 0],

  • YannickYannick Member
    edited November 2017
    @limkopi78 could you upload your pull request?
  • Yannick said:
    I"m not at home currently so can't sideload an app. But do you guys think this will work in app.json:
    "manufacturerId": 297, 
    "productTypeId": [4,6], 
    "productId": [2048, 0],

    Should work.
    But I'm also interrested why the productID is listed as "0000" instead of the decimal value "0"...
    It could be that the productID is not parsed right, but there is only one way to find out...
  • casedacaseda Member
    edited November 2017
    I guess that is indeed a parser thing, as 0 can be seen as null (no value) or false (0 = false, 1 = true), and thus not be parsed (IE: `if(value) { parse() }` will not parse when not specifically assigned as number).
    You could add both, so 0 and 0000, shouldn't break anything, and if it ever gets fixed, it will keep working.
  • not sure if productTypeId can be an array too but will try tonight.
  • All 3 id's can be an array, even the manufacturer (for some reason)
    That was changed not too long ago
  • Yannick said:
    not sure if productTypeId can be an array too but will try tonight.
    All ID's can be arrays, see below example out of one of my apps:
    "manufacturerId": [351],
    "productTypeId": [12546, 12561, 16642, 16657, 16658, 20753],
    "productId": [513, 4866, 4098, 4101, 5121, 5122, 5126, 5128],
    I would try both (0 and 0000), but first 0 and if it does not work try 0000
  • is there a way to add different assets (for App Store) to the productid's or do you need to duplicate/separate the products in app.json for that?
  • Yannick said:
    is there a way to add different assets (for App Store) to the productid's or do you need to duplicate/separate the products in app.json for that?
    Basic rule of thumb: if the device has different capabilities or different settings, a unique driver should be made and the corresponding product ID's should be linked to it.

    In SDK2, it is possible to extend driver1 towards driver2 in case driver 2 has an additional capability on top of the capability of driver1.
  • is it difficult to port an app to sdk2?
  • that depends on the code used in apps/drivers, some are harder to create (fibaro rgbw) then others, where only 10 lines of driver.js/device.js code is enough thanks to the new and improved z-wave library doing all the repetitive work.
  • got the lock to pair with above change + removing the COMMAND_CLASS_ALARM capabilities. Now have to figure out how to fix those to the new COMMAND_CLASS_NOTIFICATION specs.
  • Tim said:
    limkopi78 said:
    I've added support for a few more models of Yale locks. May I request for a pull?
    Sure! Unfortunately I can't guarantee to get to it straight away as I have a lot going on IRL right now, but send it and if I can integrate it with no hassles I'll do it. I know the API also needs to be updated to v2, and frankly getting this working was complete trial and error for me (not a dev), so I'm nervous :smile:
    I actually forked to support Samsung locks as well and tried to publish it to realise that we can only publish the v2.

    So if you don't mind, I'll try to do up a V2 for this and add your original model into the list. Currently, I have YRD220, YDD424, YDM4109, YFM40 in a fork of your V1 app.
  • Yannick said:
    got the lock to pair with above change + removing the COMMAND_CLASS_ALARM capabilities. Now have to figure out how to fix those to the new COMMAND_CLASS_NOTIFICATION specs.
    What is your Yale Lock model?
  • You can see the product numbers in the fork that I made. Did you get the notification class to work already? Oh and PIN management in Admin would be high on my wish list.
  • Didn't have to use COMMAND_CLASS_NOTIFICATION for the models i tried. 
  • Would anyone be willing to make an app that would work with the Yale Conexis L1 via Bluetooth 

    Just what it would save me purchasing a zwave module would make this worthwhile, happy to provide some drinks to whoever can help? 
  • Yannick said:
    got the lock to pair with above change + removing the COMMAND_CLASS_ALARM capabilities. Now have to figure out how to fix those to the new COMMAND_CLASS_NOTIFICATION specs.
    Hi I have the Yale YKFCON -https://products.z-wavealliance.org/products/2743
    looks like it should work...just cant figure it out...any advice or assitance would be great :)

  • I've published an SDK2 app on various models of Yale locks.

    https://apps.athom.com/app/com.yale.lock
  • Nice work @limkopi78 !
  • Cool @limkopi78 !
    I see you added YFM40 which strangely has the same producttypeid (6) and product id (0) as my YD-01-CON which looks totally different. Is Yale messing up?
  • TimTim Member
    Nice work @limkopi78! If you agree I'd like to deprecate my app in favour of yours... with a new baby I don't really have time to give it the attention it deserves. What do you guys think is the safest/most polite way to do this?
  • Yannick said:
    Cool @limkopi78 !
    I see you added YFM40 which strangely has the same producttypeid (6) and product id (0) as my YD-01-CON which looks totally different. Is Yale messing up?
    I suspect the z-wave module is probably the same? I'm not very sure.
Sign In or Register to comment.