kw123 / Hue-Lights-Indigo-plugin

Philips Hue control from Indigo
MIT License
7 stars 11 forks source link

Config bug in 1.10.21 #11

Open indigo-jay opened 2 years ago

indigo-jay commented 2 years ago

Not sure what happened in the config dialog, but something broke such that I can't get it back. I see this repeating in the event log:

   Hue Lights Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   Hue Lights Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 458, in runConcurrentThread
  File "plugin.py", line 5639, in updateTheTypeList
KeyError: 'sensors'

Note: this will be addressed in 2022.0.0.

kw123 commented 2 years ago

Jay,

that is a bug but only happens if something else is broken, ie connection to the hue hub is broken.

will fix

Karl

On May 13, 2022, at 01:28, Jay Martin @.***> wrote:

Not sure what happened in the config dialog, but something broke such that I can't get it back. I see this repeating in the event log:

Hue Lights Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds) Hue Lights Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last): File "plugin.py", line 458, in runConcurrentThread File "plugin.py", line 5639, in updateTheTypeList KeyError: 'sensors'

— Reply to this email directly, view it on GitHub https://github.com/IndigoDomotics/Hue-Lights-Indigo-plugin/issues/11, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEH2SNEY7M6LAZCNPW6SYM3VJWH3XANCNFSM5VZYB7SQ. You are receiving this because you are subscribed to this thread.

indigo-jay commented 2 years ago

I think the bug is a little more subtle than that because it was still working despite getting that message repeatedly. In any event, it needs fixing and I'll address it in the Python 3 upgrade and the changes/enhancements I'm making to the plugin.

kw123 commented 2 years ago

...changes/enhancements I'm making to the plugin. ..

You will own the plugin from now on?

it should work fine under py3. I have it running under py2 and py3

Karl

On May 13, 2022, at 01:28, Jay Martin @.***> wrote:

5639

indigo-jay commented 2 years ago

This plugin is somewhat special in that a lot of users use it and rely on releases being stable/solid, so we want to put it through the slightly more rigorous process of fork/PR/code review/merge (I'll write up the process and post it somewhere) - that will help ensure quality by requiring changes to be reviewed by someone else before it's released it in the repo and into the store. This is the standard open source process and we think that it's a great way to get the community involved and yet maintain high quality releases.

I've got some things I want to add and change - for instance I think the plugin config dialog is overly complex and fragile (see this error as one example of how you can somehow get in trouble), and adding devices one at a time doesn't seem to work (though creating all of them at once using the menu item does).

Thanks for all the work getting it ready for python 3 - that should make it easier to get the next release done.

indigo-jay commented 2 years ago

Change of mind: the plugin has been transferred to Karl and he'll be taking care of it from now on.

I never got to the bottom of why this error was happening, but it really should be taken care of.

kw123 commented 1 year ago

Jay,

Here are my plans for the plugin:

  1. start converting to new Hue API v 2 - that is not a small change
  2. make the connections persistent, currently the session connect and disconnect each time they get data (every 3 secs). That creates significant load on the hue hub. fixing: about 4 days of work
  3. create devices on hue hub ie to eg duplicate dimmer. I have several dimmers theta do the same thing and required many manual steps to set them up on the iPhone app. about 4 days of work

just to share my thoughts.

Karl

On May 13, 2022, at 18:59, Jay Martin @.***> wrote:

I think the bug is a little more subtle than that because it was still working despite getting that message repeatedly. In any event, it needs fixing and I'll address it in the Python 3 upgrade and the changes/enhancements I'm making to the plugin.

— Reply to this email directly, view it on GitHub https://github.com/IndigoDomotics/Hue-Lights-Indigo-plugin/issues/11#issuecomment-1126260951, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEH2SNAGNPEH3EANGPTKZPDVJ2C67ANCNFSM5VZYB7SQ. You are receiving this because you commented.

kw123 commented 1 year ago

Jay

re the one bug:

around line 5639 this :

        if hubNumber not in self.hueConfigDict[hubNumber][theType]:
            self.hueConfigDict[hubNumber][theType] = {}

should be replace with this:

        if hubNumber not in self.hueConfigDict:
            self.hueConfigDict[hubNumber] = {theType:{}}

how would you like to handle this?

It should be made available to existing users on older indigo versions

So I would leave the api version at 2. Hence one more update before requiring py3.

Karl

indigo-jay commented 1 year ago

I'm making no changes.