Closed LETRA closed 3 years ago
I've just encountered this myself in the past week.
@benknight Any ideas where I could begin to look to help debug?
@brichards can you open Alfred Preferences, go to Workflows, select Philips Hue Controller, select the little debug icon in the top right, then trigger the workflow by typing "hue" in Alfred, and copy and paste whatever output occurs in the debug log?
Well isn't that slick. I remember seeing the bug icon when first knocking around Alfred years ago, then promptly forgot about it, it would seem.
In my case, the error is triggered when load_full_state()
attempts to pull back all the data from the bridge. And this was a problem, I've realized, because my bridge IP changed a week or so back when my entire router cabinet was powered down.
The workflow settings still held the original IP address, which is now a different device, and that device returns a 404 response instead of the JSON object expected by the call to data.json()
.
Manually altering the IP stored in my hue-alfred-workflow/settings.json
file resolved the problem for me. And now I'll know to test this again should the problem resurface.
Perhaps an additional exception check is needed here for these rare occasions when the bridge IP changes? I'm not a python guy, so I'm afraid I can't help with a patch for this one.
@brichards excellent, I agree with your assessment of the issue :D Feel free to submit a pull request, or I can look at this issue some time in the future.
If future readers come across this issue and it's still not resolved, uninstalling and reinstalling the workflow should work in the case that the bridge's IP address changed.
In the meantime, the it's easier to delete (or rename) ~/Library/Application Support/Alfred 3/Workflow Data/hue-alfred-workflow/settings.json
than it is to replace the IP address stored. So the brainless approach is:
settings.json
,hue-alfred-workflow
by Alfreding hue +
the only option.
Hi. I have a problem for a few days. I thought an update would fix it, but I see that I am the only one who has reported this problem.
When I start Hue Controller I get the message "no json object could be decoded". I hope you can help out.
Thank you.