screenBloom
screenBloom copied to clipboard
Error on startup
The problem seems to be related to the IP of the Bridge changing. It would be good to catch the error and force a reconfiguration, something like: Cannot contact the bridge, register your bridge again (or maybe perform a new search and reuse the token?)
I could try to create a PR if you agree and if you tell me where I should look.
Hey there, thanks for bringing this up.
The catch will probably have to go somewhere in here. I'm compiling a list of fixes/small things to add with some free time in the next few weeks, will definitely be investigating this one.
I was thinking of something like
try:
presets.update_presets_if_necessary()
except ConnectionError:
# There was an error connecting to the hue lights
# let's pretend it is a new user
self._set_startup_for_new_user()
return
with
def _set_startup_for_new_user(self):
self.url = self.base_url + 'new-user'
self.new_user = True
So I don't repeat that code. Did you have something like that in mind?