heggink / domoticz-nuki

python plugin for the nuki locks
MIT License
9 stars 5 forks source link

Update Unlatch IDs and name, add Sensor support #8

Closed StephaneM60 closed 3 years ago

StephaneM60 commented 3 years ago

Hi,

I added support for the sensor on locks. It works well with my locks, whenever you open / close the door, status is pushed to domoticz.

I also updated the way IDs are genrated for Unlatch devices. As I have three devices (two locks and one opener) the way you were doing it resulted in conflicting IDs and as such one unlatch device was not created.

As I doubt no one will a more than 100 nuki devices, I opted for 100 as a seed for Unlatch devices IDs and 200 for Sensor devices IDs.

I also added a space for the Unlatch devices name (but you can revert to the old naming if you want)

Best Regards, Stéphane.

heggink commented 3 years ago

Hey Stephane, Many thanks for the new features. As mentioned on the domoticz forum, I have no way to test these as I don't have that type of lock myself. Assuming you have tested this yourself, I can either just merge straight or maybe run with a separate feature update branch for a while. If you feel this is properly tested then I am happy to just push this to master. Again, many thanks! Herman

rgroothuis commented 3 years ago

If you tell me how I can install the merged/updated script I can do a test run.

Will there be an extra switch/device in Domoticz that is updated automatically depended on the status of the Door?

Rene

On 25 Sep 2020, at 19:30, heggink notifications@github.com wrote:

 Hey Stephane, Many thanks for the new features. As mentioned on the domoticz forum, I have no way to test these as I don't have that type of lock myself. Assuming you have tested this yourself, I can either just merge straight or maybe run with a separate feature update branch for a while. If you feel this is properly tested then I am happy to just push this to master. Again, many thanks! Herman

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

StephaneM60 commented 3 years ago

Hi,

It would be better to proceed with a feature update, as it may have issues for locks without sensors.

-- Stéphane MENGUY

De : hegginkmailto:notifications@github.com Envoyé le :vendredi 25 septembre 2020 19:30 À : heggink/domoticz-nukimailto:domoticz-nuki@noreply.github.com Cc : StephaneM60mailto:steph.web@live.fr; Authormailto:author@noreply.github.com Objet :Re: [heggink/domoticz-nuki] Update Unlatch IDs and name, add Sensor support (#8)

Hey Stephane, Many thanks for the new features. As mentioned on the domoticz forum, I have no way to test these as I don't have that type of lock myself. Assuming you have tested this yourself, I can either just merge straight or maybe run with a separate feature update branch for a while. If you feel this is properly tested then I am happy to just push this to master. Again, many thanks! Herman

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/heggink/domoticz-nuki/pull/8#issuecomment-699056554, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5IGU7IPACPILFYJ2KAT3SHTHSNANCNFSM4RZWTPPQ.

StephaneM60 commented 3 years ago

Hi,

You can simply update (replace) the plugin.py file on your domoticz server (in the nuki plugin folder). Once updated either restart domoticz or disable the plugin and enable it.

Currently the way it is : It will create one additionnal device (door contact) in domoticz and these devices are updated each time the door is opened or closed.

Also you will have duplicate Unlatch devices as I changed the Ids and name, you can then remove the old unlatch devices.

The name of the device will be « Nuki – Xxxxxxxxx Sensor » where Xxxxxxxx is your lock name in the nuki app.

Best regards.

-- Stéphane MENGUY

De : rgroothuismailto:notifications@github.com Envoyé le :vendredi 25 septembre 2020 23:02 À : heggink/domoticz-nukimailto:domoticz-nuki@noreply.github.com Cc : StephaneM60mailto:steph.web@live.fr; Authormailto:author@noreply.github.com Objet :Re: [heggink/domoticz-nuki] Update Unlatch IDs and name, add Sensor support (#8)

If you tell me how I can install the merged/updated script I can do a test run.

Will there be an extra switch/device in Domoticz that is updated automatically depended on the status of the Door?

Rene

On 25 Sep 2020, at 19:30, heggink notifications@github.com wrote:

 Hey Stephane, Many thanks for the new features. As mentioned on the domoticz forum, I have no way to test these as I don't have that type of lock myself. Assuming you have tested this yourself, I can either just merge straight or maybe run with a separate feature update branch for a while. If you feel this is properly tested then I am happy to just push this to master. Again, many thanks! Herman

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/heggink/domoticz-nuki/pull/8#issuecomment-699153531, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5IGQTP3C6QSDR3O5T7PTSHUAOFANCNFSM4RZWTPPQ.

rgroothuis commented 3 years ago

Excellent, works perfectly for me! See screenshots. Well done. Thanks for the support.

On 25 Sep 2020, at 23:29, StephaneM60 notifications@github.com wrote:

Hi,

You can simply update (replace) the plugin.py file on your domoticz server (in the nuki plugin folder). Once updated either restart domoticz or disable the plugin and enable it.

Currently the way it is : It will create one additionnal device (door contact) in domoticz and these devices are updated each time the door is opened or closed.

Also you will have duplicate Unlatch devices as I changed the Ids and name, you can then remove the old unlatch devices.

The name of the device will be « Nuki – Xxxxxxxxx Sensor » where Xxxxxxxx is your lock name in the nuki app.

Best regards.

-- Stéphane MENGUY

De : rgroothuismailto:notifications@github.com Envoyé le :vendredi 25 septembre 2020 23:02 À : heggink/domoticz-nukimailto:domoticz-nuki@noreply.github.com Cc : StephaneM60mailto:steph.web@live.fr; Authormailto:author@noreply.github.com Objet :Re: [heggink/domoticz-nuki] Update Unlatch IDs and name, add Sensor support (#8)

If you tell me how I can install the merged/updated script I can do a test run.

Will there be an extra switch/device in Domoticz that is updated automatically depended on the status of the Door?

Rene

On 25 Sep 2020, at 19:30, heggink notifications@github.com wrote:

 Hey Stephane, Many thanks for the new features. As mentioned on the domoticz forum, I have no way to test these as I don't have that type of lock myself. Assuming you have tested this yourself, I can either just merge straight or maybe run with a separate feature update branch for a while. If you feel this is properly tested then I am happy to just push this to master. Again, many thanks! Herman

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/heggink/domoticz-nuki/pull/8#issuecomment-699153531, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5IGQTP3C6QSDR3O5T7PTSHUAOFANCNFSM4RZWTPPQ.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/heggink/domoticz-nuki/pull/8#issuecomment-699164189, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMBKNFQBCUVVGNHH46BDCLSHUDR3ANCNFSM4RZWTPPQ.