nils12 0 Posted February 4, 2019 Posted February 4, 2019 (edited) Hi, is there a way to execute API based on Emby events ? lets say a new user register his device in emby. Can we make emby execute an API url of my choice ? this api will register on my system that the following user has registered with XX devices ? if by default not possible. can this be created using a plugin, or the limitation does not allow such plugins ? or is there another better way to keep control of my users ? I just want a email notification or something that can trigger when a new device is registered. Edited February 4, 2019 by nils12
Luke 40135 Posted February 4, 2019 Posted February 4, 2019 You could use the api to listen to events using the web socket. You could also do this with A plugin.
nahovevyse 1 Posted March 16, 2019 Posted March 16, 2019 (edited) You could use the api to listen to events using the web socket. You could also do this with A plugin. I tried it, connected to the websocket but when the user log in nothing got triggered. Tho EMBY admin dashboard is showing the user's. Here's what I tried with python. It's connected but no message afterwards. Where am I wrong. I want the device ID when user's log in. websocket.enableTrace(True) host = "xxx.xx.xx.xx" port = 8096 api_key = "bd404819afb6474e8820b351b8de89b3" ws = websocket.WebSocketApp("ws://{}:{}/embywebsocket?api_key={}".format(host, port, api_key), on_message = on_message, on_error = on_error, on_close = on_close) Also tried using ws://{}:{}/embywebsocket?api_key={}&deviceId={}".format(host, port, api_key, device_id) no success Do I have to send some json first before start receiving the response? Edited March 16, 2019 by nahovevyse
Luke 40135 Posted March 16, 2019 Posted March 16, 2019 I tried it, connected to the websocket but when the user log in nothing got triggered. Tho EMBY admin dashboard is showing the user's. Here's what I tried with python. It's connected but no message afterwards. Where am I wrong. I want the device ID when user's log in. websocket.enableTrace(True) host = "xxx.xx.xx.xx" port = 8096 api_key = "bd404819afb6474e8820b351b8de89b3" ws = websocket.WebSocketApp("ws://{}:{}/embywebsocket?api_key={}".format(host, port, api_key), on_message = on_message, on_error = on_error, on_close = on_close) Also tried using ws://{}:{}/embywebsocket?api_key={}&deviceId={}".format(host, port, api_key, device_id) no success Do I have to send some json first before start receiving the response? https://emby.media/community/index.php?/topic/71425-getting-user-login-and-device-in-use-via-websocket-api/
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