matryer / xbar-plugins

Plugin repository for xbar (the BitBar reboot)
https://xbarapp.com
2.44k stars 1.04k forks source link

HomeBridge Plugin Issues #2048

Closed C4Wiz closed 3 weeks ago

C4Wiz commented 3 weeks ago

i am getting these errors all of a sudden:

Traceback (most recent call last):
  File "/Application Support/xbar/plugins/homebridge.py", line 243, in <module>
    doStuff(token, url, icon, command, unit)
  File "/Application Support/xbar/plugins/homebridge.py", line 61, in doStuff
    link = "https://github.com/" + plugin['author'] + '/' + plugin['name'] + '/releases/latest'
                                   ~~~~~~^^^^^^^^^^
KeyError: 'author'
sprak3000 commented 3 weeks ago

Based on the code, it looks like it reaches out to get all the plugins installed in the HomeBridge. It gets back a successful reply but the shape of the response does not match the expectation. I don't own a HomeBridge, so I can't do any further debugging. Best guess is a firmware update changed the API, and the plugin would need updating.

@C4Wiz If you are familiar with Python, you could output the JSON from the /api/plugins call and see what it looks like. Post it here, and I can maybe get a patch going.

C4Wiz commented 3 weeks ago

Based on the code, it looks like it reaches out to get all the plugins installed in the HomeBridge. It gets back a successful reply but the shape of the response does not match the expectation. I don't own a HomeBridge, so I can't do any further debugging. Best guess is a firmware update changed the API, and the plugin would need updating.

@C4Wiz If you are familiar with Python, you could output the JSON from the /api/plugins call and see what it looks like. Post it here, and I can maybe get a patch going.

Oddly enough, i updated homebridge and the plugin started working again. not clue what the deal was.... but thank you for offering to help

sprak3000 commented 3 weeks ago

Great to hear! Maybe they had a bug and rolled out a fix. Going to close this out.