FlyingDiver / Indigo-miniUniFi

Minimalistic UniFi plugin for Indigo
MIT License
0 stars 0 forks source link

Deleting device error #5

Closed jstewart99 closed 3 years ago

jstewart99 commented 3 years ago

Had created a couple of new devices that I didn't rename. Deleted them and this started appearing in the log:

miniUniFi new device 1: Stopping Device miniUniFi Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last): File "plugin.py", line 89, in runConcurrentThread KeyError: 'key id 600256091 not found in database'

miniUniFi Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

FlyingDiver commented 3 years ago

I've made some changes to the device definitions between test versions. Delete all the client devices (the controller is OK), recreate them, and see if it all works as expected.

jstewart99 commented 3 years ago

Restarting the plug-in seems to have fixed the issue as the errors stopped (I didn't delete and recreated the clients as suggested, just restarted the plugin). As a test I did then create a new device, didn't rename it (not sure if that makes a difference), then deleted that "new device", and those log entries start up again (different "key ID" but same error otherwise). So there does seem to be an issue with creating and then deleting a device.

FlyingDiver commented 3 years ago

Cannot reproduce with the current code. Please upgrade to 0.0.3: https://github.com/FlyingDiver/Indigo-miniUniFi/releases/tag/0.0.3

This version also implements the default values for controller and site.