Closed pklaus closed 3 years ago
Hi, thank you for the kind words and the bug report!
I have run into this myself. Thanks for the comprehensive report, it will be helpful in creating a proper bugfix.
In the meantime, the easiest workaround (which probably you have figured out already) is simply to delete the discovered.json
file and run the discovery procedure again. I leave my light plugged in continuously, so this problem occurred for me only after a power outage at my home.
If you need to regularly disconnect your light from power or from your network, I can see how this workaround would quickly become tedious. I will work on a fix for this.
@pklaus, could you check out / try #16 and see if it solves your problem?
I installed the version from that branch using pip install git+https://github.com/waxlamp/elgato.git@fix-discovery#egg=PyElgato
. Works perfectly now. Thank you for the fix.
You're welcome. Thanks again for the bug report. And just FYI, version 1.1.0 of the package is now published to PyPI.
A very nice CLI for leglight, thanks!
Encountered Issue: When a previously discovered key light is switched off (and therefore not available on the WiFi/network), the tool fails with ~70 lines of traceback. This applies to calls for
elgato
,elgato lights
orelgato lights --discover
.Expected behaviour: Tool exits without errors (return value 0), but lists all lights that are currently not available separately. In the case of the
elgato lights --discovery
I would expect that any lights, which are not available would be removed from~/.config/elgato/discovered.json
.Traceback when calling
elgato
:content of
~/.config/elgato/discovered.json
: