nahovevyse 1 Posted March 11, 2019 Share Posted March 11, 2019 (edited) I've been trying to restrict the user's to particular or few devices (TV and tab) only via EMBY API or any custom API (if there's an option to create one). I want everyone to watch videos only in the hall where I have the TV and tabs for kids. I tried looking into EMBY docs, EMBY API's, searched forums, Google Emby Community answers but unable to find something that gives me IP address or device information from where the user is trying to log in. I thought maybe I can listen to webhooks and grab the IP. So, tried looking for webhooks in emby core files /usr/lib/emby/ , /var/lib/emby/ and /opt/emby-server/ I'm creating user's via EMBY API. Trying to get control through the code. Any idea how it can be done?Consider me a newbie with emby backend configuration. I know few things but not too much. Edited March 12, 2019 by nahovevyse Link to comment Share on other sites More sharing options...
mastrmind11 717 Posted March 11, 2019 Share Posted March 11, 2019 your server log. Link to comment Share on other sites More sharing options...
ebr 14982 Posted March 11, 2019 Share Posted March 11, 2019 Hi. Why don't you just use the Device Access feature of our user configuration...? Link to comment Share on other sites More sharing options...
nahovevyse 1 Posted March 12, 2019 Author Share Posted March 12, 2019 your server log. I did checked the server logs, it gives from where the request is coming. How will I know which user is related to which log statement. Link to comment Share on other sites More sharing options...
nahovevyse 1 Posted March 12, 2019 Author Share Posted March 12, 2019 Hi. Why don't you just use the Device Access feature of our user configuration...? Can you please guide me through this. I didn't find in my local EMBY server Link to comment Share on other sites More sharing options...
ebr 14982 Posted March 12, 2019 Share Posted March 12, 2019 Can you please guide me through this. I didn't find in my local EMBY server Open a User in the server dashboard. Click the "Access" tab. Scroll to the bottom where it says "Device Access". Un-check "Allow all devices". Then check the ones you want. Link to comment Share on other sites More sharing options...
Luke 37361 Posted March 12, 2019 Share Posted March 12, 2019 To learn more, please check out our wiki article for this: https://github.com/MediaBrowser/Wiki/wiki/Device-Access @@cayars, screens need updating. Thanks. Link to comment Share on other sites More sharing options...
nahovevyse 1 Posted March 13, 2019 Author Share Posted March 13, 2019 (edited) To learn more, please check out our wiki article for this: https://github.com/MediaBrowser/Wiki/wiki/Device-Access @@cayars, screens need updating. Thanks. I want to experiment with EMBY API's to have a feature restricting user's, one user can log in to max 2 devices something like ... let's say Netflix don't know how will this kind of access be controlled via the API or something else (but not manual) Even with manual, it's not working. I first logged in with 4 devices, They appeared in devices section then I have unchecked all of them, still, the user is able to log in via the same blocked browser. I didn't get it. Is this a feature or a bug or it's just not working. Then I saw this text in 'Device Access' area what does this actually mean This only applies to devices that can be uniquely identified and will not prevent browser access. Filtering user device access will prevent them from using new devices until they've been approved here. This kind of restriction should be possible, I'm just not thking right I guess Edited March 13, 2019 by nahovevyse Link to comment Share on other sites More sharing options...
ebr 14982 Posted March 13, 2019 Share Posted March 13, 2019 still, the user is able to log in via the same blocked browser. ... This only applies to devices that can be uniquely identified and will not prevent browser access. Filtering user device access will prevent them from using new devices until they've been approved here. Browsers cannot be uniquely identified, therefore there is no way to block them. Does that make sense? Link to comment Share on other sites More sharing options...
nahovevyse 1 Posted March 14, 2019 Author Share Posted March 14, 2019 Browsers cannot be uniquely identified, therefore there is no way to block them. Does that make sense? okay I wonder how Netflix does this. Can we associate a user with some IP address to achieve the desired result? detecting from where a user is logged in. Is it possible to do so? There must be something where I can place a hook to get the desired result. Maybe when user log in or when user start playing the video. Any idea? Link to comment Share on other sites More sharing options...
Luke 37361 Posted March 14, 2019 Share Posted March 14, 2019 Because you have to sign into Netflix, and once you sign in, the session can be identified based on the sign in. Emby can do this as well. The issue is that prior to signing in, there's no way to differentiate browsers and this makes it impossible to identify one browser on one device vs another browser on another device. Link to comment Share on other sites More sharing options...
nahovevyse 1 Posted March 15, 2019 Author Share Posted March 15, 2019 (edited) yes, I discovered it yesterday. I tried it. User's let's say log in via an Android app or to Android TV or ios app (but not via browser), I see on the user's 'Access' tab EMBY is identifying them uniquely. But I'm still stuck at how do I control the feature via code. When the user log in how would I know the user has already registered 2 devices and when they try to connect the third they won't be able to log in.I think devices can't be controlled until they're registered. But can we control the login?Should be possible with your websocket APIIDK how to use it tho, I need help if that's possible. I'm using python, should be possible listening to the EMBY websocket API and get notifications. If that's possible we would like to see what data that API sends to the listener. Edited March 15, 2019 by nahovevyse Link to comment Share on other sites More sharing options...
Luke 37361 Posted October 22, 2019 Share Posted October 22, 2019 There will be a new webhooks plugin with the upcoming Emby Server 4.3: https://emby.media/community/index.php?/topic/77969-new-webhooks-plugin/ 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