Closed foxriver76 closed 4 years ago
generateclientkey
has been around for a long time now, as it is connected with the entertainment API.
I have used and tested this multiple times under v3.
Can you provide any details on the versions of the configuration of the bridge that this is failing on? The configuration endpoint can be called with authentication, it will just return less information.
Ah, just re-read the initial details. So this is a really ancient hardware device that was never upgraded, right?
I will need the data from the the http://[bridge-ipaddress]/api/config
to be able to implement a work around on this as that will contain some version numbers I can use to remove the generateclientkey
parameter when encountered, as this is needed to support the newer bridges.
I will try to get the information asap.
I have released 3.4.2
to npm registry to provide a short term work around until we can get the information needed to gate the generateclientkey
parameter safely.
The v3.users.createUser()
function now supports a noClientKey
third parameter to suppress the request for the clientkey
when creating a new user.
So the call to the bridge via the library would now be:
hueClient.users.createUser('appName', 'deviceName', true);
It has to be true
so that it has zero impact on existing code bases using this function until I can gate it properly based on bridge api version numbers.
Thank you {"name":"Philips hue","datastoreversion":"59","swversion":"01041302","apiversion":"1.16.0","mac":"00:12:88:15:fb:93","bridgeid":"001788FFFE14FB93","factorynew":false,"replacesbridgeid":null,"modelid":"BSB001"}
Version 3.4.3
is in the npm registry with the long term fix applied.
It now looks at the modelid
reported from the bridge to decide if it should set the generateclientkey
in the parameters.
Confirmed -- works! Thank you very much for the quick fix. I really appreciate this. :+1:
It seems like that user creation is not possible via
createUser
Of node-hue-api v3 on the v1 bridge. Resulting in{"_hueError":{"payload":{"message":"parameter, generateclientkey, not available","type":6,"address":"/generateclientkey","description":"parameter, generateclientkey, not available"}}}
With v2 it worked. Do you have any idea?