Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: "ViewCategories" on setup #13

Open
hanerd opened this issue Aug 28, 2020 · 5 comments
Open

KeyError: "ViewCategories" on setup #13

hanerd opened this issue Aug 28, 2020 · 5 comments

Comments

@hanerd
Copy link

hanerd commented Aug 28, 2020

I can't get the sensor to actually install on HA .114 and Emby 4.4.3. It fails setup with the following error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 184, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/emby_upcoming_media/sensor.py", line 85, in setup_platform
    categories = client.get_view_categories()
  File "/config/custom_components/emby_upcoming_media/client.py", line 41, in get_view_categories
    return self.data["ViewCategories"]
KeyError: 'ViewCategories'```
@mhertel
Copy link

mhertel commented Dec 1, 2020

I am having the same issue..

@boardwarp
Copy link

Same issue here. I previously had this working fine, then moved house and changed a bunch of network settings. Aside from updating the Emby configuration to the new IP, no Emby-specific settings have changed. My logs are identical to @hanerd's aside from the line numbers, but happy to help with other logs/troubleshooting.

@Squale76
Copy link

Squale76 commented Jan 3, 2021

Same problem here. I am under Emby 4.5.4.0 via a Docker image hosted on a NAS (IP: 192.168.0.240) and HA 2020.12.2 supervisor hosted via a Docker image on an RPi (IP 192.168.0.252).
Did you find a solution or a workaround?

@Squale76
Copy link

Squale76 commented Jan 3, 2021

To work around the problem, you must connect to Emby via the account used by HA.
Then go to Profile, get the URL that points to this page.
It will be in this form:
http://<emby_host_ip>: 8096/web/index.html #!/settings/profile.html?userId=<user_id>&serverId=<server_id>
Retrieve the user_id that you put in the parameters in the HA configuration file configuraiton.yaml with this code :

sensor:
- platform: emby_upcoming_media
  api_key: YOUR_EMBY_API_KEY
  user_id: <user_id>
  host: <ip address of emby host>

@boardwarp
Copy link

To work around the problem, you must connect to Emby via the account used by HA...

This worked perfectly for me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants