Jump to content

Search the Community

Showing results for tags 'websocket'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements
    • Emby Premiere Purchase/Subscription Support
    • Feature Requests
    • Tutorials and Guides
  • Emby Server
    • General/Windows
    • Android Server
    • Asustor
    • FreeBSD
    • Linux
    • NetGear ReadyNAS
    • MacOS
    • QNAP
    • Synology
    • TerraMaster NAS
    • Thecus
    • Western Digital
    • DLNA
    • Live TV
  • Emby Apps
    • Amazon Alexa
    • Android Mobile
    • Android TV / Fire TV
    • Emby Theater
    • iOS
    • Apple TV
    • Kodi
    • Raspberry Pi
    • Roku
    • Samsung Smart TV
    • Sony PlayStation
    • LG Smart TV
    • Web App
    • Windows Media Center
    • Plugins
  • Language-specific support
    • Arabic
    • Dutch
    • French
    • German
    • Italian
    • Portuguese
    • Russian
    • Spanish
    • Swedish
  • Community Contributions
    • Ember for Emby
    • Fan Art & Videos
    • Tools and Utilities
    • Web App CSS
  • Other
    • Non-Emby General Discussion
    • Developer API
    • Hardware
    • Media Clubs
    • Legacy Support


  • Emby Blog

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 8 results

  1. Hey guys, first of all: Emby for Kodi is the reason why i came to emby. Great app, much appreciated. @@Angelblue05 @@sualfred I'm still testing a lot of stuff but i found some errors in my kodi.log. Every five seconds it gives me a never ending loop of these: NOTICE: EMBY.entrypoint.service -> [ onNotification/plugin.video.emby/WebSocketRestarting ] NOTICE: Emby.emby.core.ws_client -> ERROR:: Handshake Status 503 Debug logging within emby for kodi will add these two lines: NOTICE: EMBY.helper.utils -> DEBUG:: ---[ event: plugin.video.emby/WebSocketRestarting ] "[{}]" NOTICE: EMBY.entrypoint.service -> DEBUG:: [ plugin.video.emby: WebSocketRestarting ] {} The http error code 503 comes from my haproxy, which does SNI and SSL-offloading (e.g. by emby.domain.com) on port 443 and will return a 503, if you use none or a non existent hostname in your request. Making emby server and emby.domain.com my the default (fallback), the websocket will work with haproxy. For obvious reasons i don't want to use my emby server as 'default backend' on any request on port 443. Haproxy logs show, that the request is: "GET /embywebsocket?api_key=<removed>&device_id=<removed> HTTP/1.1" (See update at the end) Unfortunately i could not figure a way to make haproxy or emby for kodi show me the whole request with the hostname, so one can only guess, that is might not be the hostname but maybe only the ip address? While searching about this, i only found this locked topic, from which i didn't get any helping hints. I understand there was a fix in the websockets request in 2017 which added a slash before the 'embywebsocket': https://emby.media/community/index.php?/topic/50062-web-sockets-and-reverse-proxy/ Since i can see the get request with the leading slash, i figure this can't be the reason for the 503. Of cause i'd like to rule out a configuration error on the haproxy side. Since streaming and database updates seem to work as long with the workaround using emby server as default backend for SNI, in my opinion this has to be a websocket request specific problem. So my first question would be: Does anybody have this working with reverse proxy and SNI (without emby as default backend)? On the other hand i'm not sure what the websocket is used for. I figured it might be the 'send message' feature from server to client or the 'inform about new content' over 'server is restarting' and so on. Which features depend on a websocket to the emby server? Is it 'required'? I'd also like to look further into this, but i can't seem to find the full websocket request in any log. Is there a way to see the whole request somewhere in emby for kodi? I'm running: - emby for kodi 4.1.19 - Libreelec 9.2.2 with Kodi 18.6 - Emby server Thanks for your help or hints in advance. Steve UPDATE: I figured how to make haproxy capture the sent host headers from the http request and log them. The problems seems to be that an additonal colon from the appending port remains inside the host header (e.g. emby.domain.com: ). This seems to be the reason why haproxy can't find the hostname. Is this a bug inside Kodi for Emby? I use 'manual server' with 'https://emby.domain.com:443'.This still only happens with the websockets request. Can someone tell, how this request does handle the host header differently from the other requests? SOLUTION: Emby for Kodi does SNI correctly. It turned out i had my haproxy configuration wrong. It was redirecting to emby server based on the host header within the http request, but it should have redirected by the SNI within the tcp request. I set it to sni and now it works perfect. Thanks for pointing me back to the haproxy logs and sorry for wasting your time @@Luke.
  2. TLDR How does the server tell a client to re-render library content? A few example use-cases are: client searches for library media, server dynamically adds media to library, client never receives library updates until they type the next word client views a library item, server dynamically downloads subtitles for library item, client never receives subtitle updates until they press back and view the library item again Things I've tried: POST /Library/Media/Updated only downloads metadata for parameters in the request body POST /Sessions/{Id}/Message/LibraryChanged command but the clients never receive a websocket message, the only time I've witnesses the client receive a LibraryChanged message is a full minute after a library scan is completed, would be nice to manually send this command immediately after the library scan Issues I've come across: Roku clients never receive updates of any kind from the server, most likely related to using roku's native remote control api which is restricted to same subnet ip addresses
  3. I remember some time ago when I was able to send remote control commands to the Roku app from a server outside the network via websockets. From what I understand is, currently it's not possible to do this anymore since the new Roku remote control API implementation. I'm aware of the port forwarding solution, but that's an impossible feat to teach Mom; she won't even attempt it. lol I was wondering if there's any other way to get this to work again. Maybe revert the websocket removal in the next release or a plugin of some sort? Any advise to point me in the right direction would be groovy smoothie. Thank you!
  4. Checked the WebSocket wiki page. It shows to connect to a WebSocket you will require an API key and device ID I'm trying to get the device ID as soon as any user logs in to the server. Till now I got no response after WebSocket connection. here's my python code websocket.enableTrace(True) host = "xxx.xx.xx.xx" port = 8096 api_key = "xxxxxx" device_id = "xxxx" ws = websocket.create_connection("ws://{}:{}/embywebsocket?api_key={}&deviceId={}".format(host, port, api_key, device_id)) result = ws.recv() print('Result: {}'.format(result)) result = ws.recv() print('Result: {}'.format(result)) # Trying something from community... ws.send(json.dumps([json.dumps({'msg': 'connect', 'version': '1', 'support': ['1', 'pre2', 'pre1']})])) result = ws.recv() print('Result: {}'.format(result)) Result: --- request header --- GET /embywebsocket?api_key=xxxxxxxx&deviceId=a7650139abe6b220 HTTP/1.1 Upgrade: websocket Connection: Upgrade Host: xxx.xx.xx.xx:8096 Origin: http://xxx.xx.xx.xx:8096 Sec-WebSocket-Key: mHuOCG3yyL41uB7gk7fK8g== Sec-WebSocket-Version: 13 ----------------------- --- response header --- HTTP/1.1 101 Switching Protocols Connection: Upgrade Upgrade: websocket Sec-WebSocket-Accept: Ta03Qfon0bEHLCQKG+0BtGNZXjQ= ----------------------- send: b'\x8a\x80\x93\tf\xe1' send: b'\x8a\x80\x13\xf8qB' send: b'\x8a\x80\xa3\xf3\xa1b' send: b'\x8a\x80\xa9\x87\xad\x9e' send: b'\x8a\x80@\x19\xa7\xa7' These send messages came after some time of no response. These are not proper Hex codes. IDK what they are. Requesting EMBY gurus to help me on this. I think I don't even know much about WebSockets
  5. bluesaxman

    Question about browser decoders

    Hello, I didn't see a post about this, so I thought I would ask. I'm pretty sure this has something to do with fedora, because the webplayer works fine at home on chrome/firefix/qutebrowser on arch (client side), however I'm currently on a fresh install of fedora (client side) and when I try to play a move in chrome or firefox, it hangs and in the js console I get a message about websocket problems. I added a few things to my apache config to try and fix this, but I went from a 404, to a 500 and then to a "Invalid Socket response" message. I'm wondering if I just forgot to install some library on the client side that is causing the browsers not to run the web player correctly. I checked the emby server logs and everything on the server end seems to be in order, emby even thinks the transaction was successful and shows the movie currently being played even though the web player stalled out in the browser. Nothing is showing up in the apache logs ether, so the proxypass I have set up is working fine. So my question is, could I be missing some libraries that chrome/firefox needs in order to properly talk over a webshell? I will be happy to provide the logs I mentions if you would like, but I don't know that it will be necessary as both (emby server and apache error logs) are clean.
  6. mezz64

    Websocket usage workflow

    I'm working on expanding an existing python library that uses the HTTP api to interact with emby to use websockets where possible to allow for faster updates with less polling. Looking through the websockets documentation and in doing some testing I can't seem to find a way to initiate a single websocket connection that would give me events for all devices currently active in emby. Am I missing something or this the intended usage? Thus far the best workflow I can come up with is query the api for currently active device and then open a websocket connection for each active device. Any insight is appreciated. Thanks.
  7. jeffshead

    Collections not updating

    I found a few locked threads from people who have encountered the same issue that I have. Collections/movie sets are not updating with Kodi when they are added, edited or deleted in Emby. According to those posts, this is a known issue that happens with some servers not sending the websocket messages. Has the cause been identified and is there a fix coming for this? Is there any way other than the manual DB reset from the Kodi-Emby Add-on? That takes 45 minutes.
  8. Hi there, I'm running latest emby on my linux server, everything (more or less) seems to work fine, but my logs show some erros, see below and attachment, what can I do, what is going wrong? thx emby1.log
  • Create New...