taburineagle / NeewerLite-Python

NeewerLite-Python is an un-official cross-platform Neewer LED light control app - written in Python, originally based off of the NeewerLite macOS Swift project by @keefo (Xu Lian)
MIT License
60 stars 11 forks source link

Enhancement request: Stay open after failure to connect #19

Closed fribse closed 2 years ago

fribse commented 2 years ago

Currently if a light fails to connect, the application exits, I would like it to stay open :-)

taburineagle commented 2 years ago

Ha, that shouldn't be happening, it should re-attempt to link to the light for as many times specified in maxNumOfAttempts, which is also settable in the global preferences tab. When you say "exits", do you mean it just closes, or does it error out?

taburineagle commented 2 years ago

Or is this with CLI mode? Because it does quit out on issues in CLI mode. Ha, I need a little more info for this one 😊

fribse commented 2 years ago

I'm currently running the GUI only. Not even with the webserver, haven't had the time to put it in the streamdeck even :-) If it fails to connect, then it retries 6 times, and then exits. I think it should just continue with the next light. Then one could try and fix the connection problem and try reconnecting later?

I just see this in the debug:

[08:05:21] - A custom preferences file was found for C0:50:A7:8C:95:BA!
[08:05:22] - Attempting to link to light 1 [NEEWER-SNL660] MAC Address: CE:D9:49:A3:1F:F7 (Attempt 1 of 6)
[08:05:25] - Successfully linked to light 1 [NEEWER-SNL660] MAC Address: CE:D9:49:A3:1F:F7
[08:05:26] - Attempting to link to light 2 [NEEWER-SNL660] MAC Address: DF:88:56:D0:72:A8 (Attempt 1 of 6)
[08:05:28] - Successfully linked to light 2 [NEEWER-SNL660] MAC Address: DF:88:56:D0:72:A8
[08:05:29] - Attempting to link to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA (Attempt 1 of 6)
[08:05:33] - Error linking to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA
[08:05:33] - Attempting to link to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA (Attempt 2 of 6)
[08:05:43] - Error linking to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA
[08:05:43] - Attempting to link to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA (Attempt 3 of 6)
[08:05:53] - Error linking to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA
[08:05:53] - Attempting to link to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA (Attempt 4 of 6)
[08:06:03] - Error linking to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA
[08:06:03] - Attempting to link to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA (Attempt 5 of 6)
[08:06:13] - Error linking to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA
[08:06:13] - Attempting to link to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA (Attempt 6 of 6)
[08:06:23] - Error linking to light 3 [NEEWER-RGB176] MAC Address: C0:50:A7:8C:95:BA

There are no loglines after that, no disconnect or anything, just exit...

taburineagle commented 2 years ago

I saw a later posting that this issue went away for you - the program shouldn't be quitting out after erroring out, it should just say "The light failed to link" or something along those lines, and then you'd just need to hit "Connect" again to try a 2nd time - this might have been because the NeewerLite-Python.py file and ui_NeewerLightUI.py files aren't from the same version.

taburineagle commented 2 years ago

I'm not sure what was causing this one... I think it might have been due to a NeewerLite-Python.py file and ui_NeewerLightUI.py mismatch, but I'm not 100% sure on that... but I'm going to close this for now. If you continue having issues with the program quitting out like this after connection failures, feel free to re-open it!