Closed WolfspiritM closed 3 years ago
Sorry for the late answer. I understood. That's normal, that the adapter throws a 401 error, because the adapter uses the current set authorization token which is not valid anymore because you've reset the device. To obtain a new token set the device into paring mode and then delete the current authorization token in the adapter. Once this field is emptied in the adapter settings you can click on the button again to get a new token. That's the trick.
Sorry. I just tested and got now the real problem. The adapter stops after receiving the 401 error and then you cannot optain a new token (even if you empty the field) because adapter is stopped. And you cannot empty the token field and click save, because save is only possible when a token was entered. That's a bad bahaviour. I'll change this with a new version (thank you for reporting this issue).
As a workaround you can delete the token manually via object explorer. Go to the object explorer and enable system view and go to system -> adapter -> nanoleaf-lightpanels -> your instance and click the edit button. In the "native" area you will find the settings. Remove the authToken (set to "") and save. Then restart your nanoleaf adapter again and you will get the error, that the authtoken is missing. Go to the adapter settings and then you can obtain a new one.
I just released version 1.2.1. Please try again. Should be fixed now.
Hi,
I've reset my Lightpanels and had troubles getting the API Token.
The reason is that if the IP and Port are correct, then the Adapter won't start and just shut down cause of a 401 error. I don't even have a chance to click the Button to get the API token.
As a workaround I had to change the IP to an IP that is not valid, restart the adapter, change the IP back and then click on the API token button.