Closed Zefau closed 3 years ago
Hi Zefau!
It appears that the parameter is optional, as the specs says here: https://developer.nuki.io/page/nuki-bridge-http-api-190/4
If we implement that, we should do it the right way and getting the deviceType from the list-endpoint, and send that with the the next requests. Is there a reason against that?
Specs are unfortunately wrong, see https://developer.nuki.io/t/nuki-opener-api-error/2576/2?u=zefau.
I agree with your approach. Thanks in advanced.
Oh I see, very unclear in the docs yes.
Maybe we can implement something like I wrote in #12 in the Nuki._request
function to check if the Nuki deviceType is set, and set it if not already, and then do the request with the correct params.
I started implementing this and I was wondering about the third parameter of new Nuki()
, which apparently only offers two parameters (I think the third one was meant for new Bridge()
)?
and https://github.com/Mik13/nuki-bridge-api/blob/master/lib/bridge.js#L104 https://github.com/Mik13/nuki-bridge-api/blob/master/lib/bridge.js#L122
but
I simply removed it now, see https://github.com/Mik13/nuki-bridge-api/pull/16.
I think we can close this issue.
Hi there, it's me again. :-)
In the course of the implementation of the support for the Nuki Opener I was wondering if you could apply some changes to your library?
Specifically, it is (for now) only necessary to add the parameter
deviceType
(0
for the Nuki Smartlock,2
for the Nuki Opener) to the bothlockState
andlockAction
.See also https://github.com/Zefau/ioBroker.nuki2/issues/18#issuecomment-529941543.
Thanks in advanced and Cheers, Zefau