elcaron 1 Posted January 19, 2021 Share Posted January 19, 2021 Hallo, I want to connect Emby to my Home Assistant server to auto dim some lights base on play status. I have generated an API key in the admin controls (Advanced -> API Keys) and this works in principle. Unfortunately, home assistant now gets the activity of my admin user, which is not particularly helpful. In the interface of my normal user, I cannot find a setting to generate an API key. What am I missing? Link to comment Share on other sites More sharing options...
ebr 14935 Posted January 19, 2021 Share Posted January 19, 2021 Hi. The API key is for authentication. On the specific query you are calling, if you want that scoped to a particular user, then you would provide that user ID as a part of the parameters or URL. Link to comment Share on other sites More sharing options...
elcaron 1 Posted January 19, 2021 Author Share Posted January 19, 2021 Okay, where can I find the URL documentation? Also, I find this implementation a little weird. Why would "Integrate this user's account into home assistant" be an admin task, that requires giving the Homeassistant admin an Emby admin API key? I think there should be a possibility for users to generate API keys for their accounts. 1 Link to comment Share on other sites More sharing options...
ebr 14935 Posted January 19, 2021 Share Posted January 19, 2021 2 hours ago, elcaron said: where can I find the URL documentation? Click the "api" link at the bottom of your dashboard. https://github.com/MediaBrowser/Emby/wiki Link to comment Share on other sites More sharing options...
elcaron 1 Posted January 19, 2021 Author Share Posted January 19, 2021 Hm, I don't really see an obvious way how to do that. Might have to raise the question with the homeassistant crowd. Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted January 19, 2021 Share Posted January 19, 2021 @elcaron you need to use the AuthenticatebyName endpoint and the returned data includes an api_key specific to the user (called an access token) Link to comment Share on other sites More sharing options...
elcaron 1 Posted January 20, 2021 Author Share Posted January 20, 2021 Sure, but the controls for HA are host string (Optional, default: localhost)The host name or IP address of the device that is running Emby api_key string Required The API key to use to authenticate. ssl boolean (Optional, default: false) Connect with HTTPS/WSS. Your SSL certificate must be valid. port integer (Optional) The port number of the device that is running Emby. So if the user selection cannot be done in the host field, I don't see how it would be possible given these methods of interaction. As I sayid, I think there SHOULD be API keys for users from the emby side, but the current state seems to require improvements on the HA plugin. Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted January 20, 2021 Share Posted January 20, 2021 the HA plugin needs updating/modifying not emby as you can get the api key for the user with a simple script and probably then call HA from the script for it to connect to emby or run the script in HA - i assume thats possible as not using HA currently although intend to in the near ish future Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now