You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems as though in the API calls made via wink-js, it is not getting the "desired_state" node in the JSON response, see this example from the debug logs:
When I hit the API directly (outside of Wink-JS, eg using Postman), even using the same authentication token, URL, endpoint, etc, (eg https://winkapi.quirky.com/users/me/wink_devices), I get the expected desired_state.
The consequence of this missing node is that it triggers confusion in apps downstream that might expect this node present (eg homebridge-wink), based on a query to the wink API. I'm not sure if it's something Wink changed, or in how exactly wink-js is querying the API, but it is strange. The only difference I can see between hitting the API directly and wink-js is the model, but all it does is inflate the response and isn't touching this node...
Having said all that, according to the Wink documentation, we should expect that the desired state is only set during a request and otherwise cleared: http://docs.winkapiv2.apiary.io/#reference/device/desired-state-and-last-reading/retrieve-all-devices-of-user, "When the device acknowledges that the state has been applied, the server will clear the field from desired_state."; In which case the anomaly is the direct to API queries. Any thoughts?
The text was updated successfully, but these errors were encountered:
It seems as though in the API calls made via wink-js, it is not getting the "desired_state" node in the JSON response, see this example from the debug logs:
{"object_type":"light_bulb","object_id":"133xxxx","uuid":"cdb488fc-7d56-4c61-b7fe-xxx","icon_id":"71","icon_code":"light_bulb-light_bulb",
"desired_state":{},"last_reading":{"connection":true,
.
.
When I hit the API directly (outside of Wink-JS, eg using Postman), even using the same authentication token, URL, endpoint, etc, (eg https://winkapi.quirky.com/users/me/wink_devices), I get the expected desired_state.
The consequence of this missing node is that it triggers confusion in apps downstream that might expect this node present (eg homebridge-wink), based on a query to the wink API. I'm not sure if it's something Wink changed, or in how exactly wink-js is querying the API, but it is strange. The only difference I can see between hitting the API directly and wink-js is the model, but all it does is inflate the response and isn't touching this node...
Having said all that, according to the Wink documentation, we should expect that the desired state is only set during a request and otherwise cleared: http://docs.winkapiv2.apiary.io/#reference/device/desired-state-and-last-reading/retrieve-all-devices-of-user, "When the device acknowledges that the state has been applied, the server will clear the field from desired_state."; In which case the anomaly is the direct to API queries. Any thoughts?
The text was updated successfully, but these errors were encountered: