Jump to content

Find non supported remote control devices


bakes82

Recommended Posts

bakes82

Can you provide the details on how I can find devices that dont support remote controlling so I can block users from using them?
Looking at the devices api there is no way to find what they are unless you can give me the "AppNames", preferred, as I can then just use a scheduled job instead of option 2.
Otherwise, it looks like I need to loop sessions or hook into the playback start/progress to get the session info and look at the "SupportsRemoteControl" flag which ideally should be known at the device level, also confused why from the device I can't get the supported commands.

On the session service there is a "Logout", but it takes in an authToken, how can I get the authtoken from the session that I already have, in the rest API i see /auth/keys but its not in the sdk sessionManager?  I also assume a logout of a session wont stop the stream on Rokus, whats the command actually doing then?

To kill clients that don't support remote control I assume the flow is, get device id, update the user access policy to remove deviceId from allowed list, restart server?

Link to comment
Share on other sites

OK so that value gets updated regularly based on whether there is an open communication channel available so that the server can send commands to the app. This usually means web socket although for some devices it's a combination of web socket and push notifications.

There could be any number of reasons why the web socket might disconnect, including that sometimes devices will kill it in order to conserve resources when they are needed. So this value could initially be true and change later, or vice versa.

For this reason I would not suggest blocking the device, but if you must, then I would probably do it based on App name.

Link to comment
Share on other sites

bakes82

Is there an Enum for "AppNames", and how do I know if they support remote control, IE we know roku does not support remote control.

Link to comment
Share on other sites

4 hours ago, bakes82 said:

Is there an Enum for "AppNames", and how do I know if they support remote control, IE we know roku does not support remote control.

There's no enum. If you do what I'm suggesting, then you wouldn't make your decisions on whether remote control is supported. You'd make your decisions based on checking off a list of apps to block by the server admin who installs your plugin.

The reason I'm suggesting this is because the SupportsRemoteControl value can change based on the conditions I mentioned above. You could have a situation of a one-off where remote control is not available but I'm not sure you'd want to permanently block based on that alone.

Link to comment
Share on other sites

bakes82

I want to block known devices that dont support remote control IE roku, so again, how do we tell what devices support remote control?  Clearly you know rokus dont, so how do we tell, whats the device name for roku, I dont have one.  Now if the streams were killable like plex this wouldnt be an issue, plex can kill streams to a roku just fine since its the server is the one controlling the stream, so in order to circumvent the issues with emby the next logical choice is to run a scheduled job look at device names and uncheck them from the allowed listed of users since clearly we cant "stop" it like we can with other devices.

Link to comment
Share on other sites

OK then I would just go back to your original usage and check SupportsRemoteControl. You'll need to use the /Sessions api.

Link to comment
Share on other sites

The Roku may report it supports remote control even though it will not work over remote sessions. It is meant to report support interally on the LAN. So if you are trying to kill streams remotely it doesn't work on Roku point blank, whether transcoding or direct playing or anything in between. The Roku has clamped down on their ECP port to stop people taking over their devices and creating a botnet streaming farm to rake in streaming monies. Roku also forces developers to adhere to their policy which doesn't allow us to use another method. They do not want users outside the network having any control over the device.

Edited by speechles
Link to comment
Share on other sites

bakes82
24 minutes ago, speechles said:

The Roku may report it supports remote control even though it will not work over remote sessions. It is meant to report support interally on the LAN. So if you are trying to kill streams remotely it doesn't work on Roku point blank, whether transcoding or direct playing or anything in between. The Roku has clamped down on their ECP port to stop people taking over their devices and creating a botnet streaming farm to rake in streaming monies. Roku also forces developers to adhere to their policy which doesn't allow us to use another method. They do not want users outside the network having any control over the device.

Whats the roku device AppName then, can I just do a .tolower().contains("roku") and that would hit them all TV/Stick/Boxes?  I can just target that and not allow it as a usable device via a schedule job and remove it from users allowed devices.

Im not going to debate you on why the server cant kill the stream itself instead of using the client to "stop" it, thats just a poor design choice for a server/client application, where the only fix is to reboot the server which now impacts all clients.

{
      "Name": "Bakes82 Apple TV",
      "Id": "12",
      "ReportedDeviceId": "A1",
      "LastUserName": "bakes82",
      "AppName": "Emby for Apple TV",
      "AppVersion": "1.8.3 (1)",
      "LastUserId": "a40710f8e8a04f5e88728993e2a32022",
      "DateLastActivity": "2024-03-03T20:17:54.0000000Z",
      "IconUrl": "https://github.com/MediaBrowser/Emby.Resources/raw/master/images/devices/appletv.png",
      "IpAddress": "1.2.3.4"
    }

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...