One of my users got a Smart Lock 3.0 Pro, which returns deviceType 4 in the /list endpoint, but 0 in the scanResults of the /info endpoint. I also found that the /lock, /unlock, /lockState, and /lockAction endpoints require 4 as deviceType URL parameter, or else return HTTP 404.
deviceType 4 is undocumented. Could you please update the API documentation for the 3.0 Pro?
Note that it might occure that on connection the /info endpoint shows the default 0 till the first data sync. We are looking into that, but latest after the next lockAction the deviceType should be correctly shown.
No, as a Smart Lock 3.0 Pro connected to a Bridge (as it has no internal Bridge API!) is the same to the Bridge as a Smart Lock 3.0 (the deviceType separation to SL 1.0/2.0 is also only needed for unique ID reasons on the Bridge).
Also small correctio to above:
To get the deviceTypes best use /list (as this is taking the data from the devices itself and not from cache as /info, but note that this drains battery so should only be just to retrieve data initially if not updated in /info yet).
No, as a Smart Lock 3.0 Pro connected to a Bridge (as it has no internal Bridge API!) is the same to the Bridge as a Smart Lock 3.0
Makes sense, thanks.
the deviceType separation to SL 1.0/2.0 is also only needed for unique ID reasons on the Bridge
Not sure I understand this correctly. Are you implying that a SmartLock 3.0 or 3.0 Pro might have the same nukiId as a SmartLock 1.0 or 2.0? Or does the bridge guarantee a unique nukiId, using the deviceType to generate this?
To get the deviceTypes best use /list (as this is taking the data from the devices itself and not from cache as /info, but note that this drains battery so should only be just to retrieve data initially if not updated in /info yet.
Huh? I thought /list returns the cached state from the bridge. I my experience it returns immediately, and wouldn’t even have the time to query the devices over BLE. I thought only /lockState forces querying the device, but that needs the deviceType as parameter, so using that to find out the deviceType would result in a catch-22 scenario.
There should never be the same id for 2 devices, but we introduced the deviceType option with the Opener to make sure that not the Bridge has to check which deviceType a called ID has but that it’s in the call (while at the same time have a good fallback for =0 for prior devices, i.e. Smart Lock 1.0/2.0).
So this is mainly done to be safe in the future whatever new devices and changes to ID handling might come.
My bad again! - Sorry seems I should not quickly answer things today
You are correct about caching.
In testing at my setup I just saw that it seems to be mor reliable to get the correct deviceType in /list than /info
What does “Enhanced the HTTP API to get rid of the device type, which streamlines the handling of Smart Locks” mean? Can I leave out the deviceType parameter to /list or /lockAction endpoints? The HTTP API documentation doesn’t seem to be updated to reflect this?
Yes, in fact you can just leave it out. Only for the rare case that you really should have to devices with same IDs and different deviceTypes (which should nearly impossible)
Just added the release notes and am currently updating the documentation (which will be live later today - at least the HTML version for now).
Is the new firmware version indeed 2.12.0 or is that a typo? My bridge reports 2.11.0, which is missing from the release notes, and it won’t update to/doesn’t find 2.12.0.