jant90 15 Posted January 29, 2016 Share Posted January 29, 2016 (edited) EDIT As the wonderful people of this forum pointed out this is useless. Edited January 29, 2016 by jant90 Link to comment Share on other sites More sharing options...
xnappo 1593 Posted January 29, 2016 Share Posted January 29, 2016 (edited) Err - I don't understand - how is this different/better than the addon? Sounds like the alpha version of the db based addon - what am I missing here? Edited January 29, 2016 by xnappo Link to comment Share on other sites More sharing options...
jant90 15 Posted January 29, 2016 Author Share Posted January 29, 2016 (edited) Should the beta addon sync the library on a timer then? Because mine doesn't. I had to manually force a sync or reboot Kodi to get Emby to sync the library or newly added content on the server simply wouldn't show up in my Kodi library. If that's the case then sorry, I should have made a bug report but I couldn't find anything about it so I just assumed that it would only update at startup. Edited January 29, 2016 by jant90 Link to comment Share on other sites More sharing options...
xnappo 1593 Posted January 29, 2016 Share Posted January 29, 2016 (edited) Yeah, absolutely it should. It doesn't run on a timer anymore - it is much more sophisticated using messages from the server when updates occur. We can definitely debug your problem - install the addon (probably recommend the beta) then turn on the log as instructed in the 'how to report a problem' thread, add something to Emby and post the log if the item doesn't automatically show up. xnappo Edited January 29, 2016 by xnappo 1 Link to comment Share on other sites More sharing options...
jant90 15 Posted January 29, 2016 Author Share Posted January 29, 2016 Great, thanks. Way better practice than running updates on a timer indeed. Anyways, I noticed a lot of missing items after a day or so that started showing up as soon as I ran a manual sync. Maybe the connection to the server is lost after a while of idling? In the server management tab I've occasionally seen no active devices despite my Kodi being on 24/7 and I've also seen "X has disconnected from X" in the recent activity list. Also a lot of problems occurred because Emby for Kodi fails to generate a machine_guid file on all my, and my friends, installations (such as resume points/watched status syncing between users). This caused the Emby server to think several people were connected to the Emby server from the same device (because no "deviceId" was present at all) while in reality those were all different devices. Anyways, I generated a machine_guid manually about 2 days ago and so far the problems I experienced before are gone (but I will keep monitoring for the upcoming week). So perhaps that is also the reason why I missed library updates in the first place. Either way I wanted to solve the incomplete library problem for myself, so I adapted the addon for my own use and figured I could post it here as well not knowing it was pointless haha. Anyways it was a fun first look into Kodi addons and I guess no harm done, right? Thanks everybody, support here has been great and Emby in combination with Kodi is truly an awesome combination, loving it more and more every day. Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted January 30, 2016 Share Posted January 30, 2016 I keep my Kodi device on 24/7 and don't see the connection run out at any time and all my new content syncs. However, I imagine missing the deviceId can create weird behaviors server side, especially for the websocket. The best way to find out is to test the next beta version and seeing if the issue goes away. There will be an announcement. Link to comment Share on other sites More sharing options...
jant90 15 Posted January 30, 2016 Author Share Posted January 30, 2016 It happened again tonight "jant90 has disconnected from Livingroom", and the device was not listed in the "active devices" list (but I'm not sure if it's supposed to remain listed there). The most recent episode that was added to the server didn't show up before I forced a manual sync. Tonight the Emby plugin restarted for the auto update to v1.1.81 at 8:30h (looked at the Kodi log), exactly 3 hours later at 11:30h I got the "jant90 has disconnected from Livingroom" message in the recent activity on the server. Content that was added after 11:30h did not show up in Kodi. Also the Kodi log shows no activity at all around 11:30h, only 2 hours later (when I manually forced a sync) there are entries in the Kodi log again. So for now I'll just force the manual sync once every hour when Kodi is idle only. That way it should restore any lost connections and always have my library up-to-date without any interference to the user experience anyway so it's no biggie. Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted January 30, 2016 Share Posted January 30, 2016 (edited) Is your kodi device going to sleep mode or something? Edit: Yes it's supposed to remain listed. It shouldn't be logging you out because the connection is keep alive. The only thing I can think of, is the internet connection was lost at that time. Maybe due to sleep mode? Do you have Kodi set to go to sleep? If so then that will give me a better idea of where to look.Sent from my iPhone using Tapatalk Edited January 31, 2016 by Angelblue05 Link to comment Share on other sites More sharing options...
Dvinge 6 Posted January 31, 2016 Share Posted January 31, 2016 Same problem as jant90. I have been trying to solve this for som time. It happens with all my devices, 1 nuc 4 pi 1 shield. I have tried 3 different networks. Logs on clients are embty. I could try to post a server log if it helps? Its exactly the same problem clients disconnects from emby and new content are not being added. Server is located outside my home network could this be the problem ? Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted January 31, 2016 Share Posted January 31, 2016 A server log might help if you know at what time the device disconnected. The device should stay connected for as long as the Kodi profile is running. Can you confirm the device didn't go to sleep during that time? Let me know. Link to comment Share on other sites More sharing options...
Dvinge 6 Posted January 31, 2016 Share Posted January 31, 2016 I will try to grap a server log in a few hours with a disconnect. The raspberry pi's cant go to sleep. I have also tried my desktop where i was just sitting and waiting for it to disconnect. So im pretty sure that aint the problem. The server is a Windows server with dedicated IP on a gigabit line, no problem starting a movie the clients just connects again and disconnects 1-2 hours after the movie is done 1 Link to comment Share on other sites More sharing options...
Dvinge 6 Posted January 31, 2016 Share Posted January 31, 2016 (edited) Null_pointer that sounds fantastic, if you need further testing i would be happy to help out Edited January 31, 2016 by Dvinge Link to comment Share on other sites More sharing options...
rhodges 37 Posted February 1, 2016 Share Posted February 1, 2016 I installed beta 2.0.0 and then later, while kodi was connected to emby, updated emby. Now, I keep seeing blips of Kodi connecting and disconnecting. Now, I see these lines, over and over in the log: 2016-01-31 22:17:09.9589 Info HttpServer: HTTP Response 200 to 192.168.1.193. Time: 0ms. http://192.168.1.5:8096/emby/Sessions?DeviceId=40C3319C54DF4D9B89B2DFEAF20FE8A6&format=json 2016-01-31 22:17:09.9901 Error HttpServer: Error in SharpWebSocket: An exception has occurred while receiving a message.. Exception.Message: The header part of a frame cannot be read from the data source. If I restart Kodi, I stop getting the error and it shows up in "Active devices" just fine. Link to comment Share on other sites More sharing options...
Dvinge 6 Posted February 1, 2016 Share Posted February 1, 2016 installed the update on 2 devices. so far so good, they have been online 1 hour and are showing all changes to the libary. 1 Link to comment Share on other sites More sharing options...
jant90 15 Posted February 1, 2016 Author Share Posted February 1, 2016 I don't think there is a sleep mode on my Android TV box either (like there is on smartphones). But maybe Android kills the internet connection after a while of idling? I have my TV box hooked up with a wired ethernet connection so Wi-Fi can't be an issue either and I'm sure that my internet has been up & running (router shows a WAN uptime of several weeks). Anyways, most of us have updated to Emby for Kodi 2.0.0 automatically and currently the devices remain listed under active devices, I've not seen this before yet so I assume the ping works as expected. The recent activity shows no disconnects either (unless Kodi was closed). I will keep an eye out for the next couple of days to see if I ever notice any disconnects. Again, many thanks for the efforts, it seems that Emby for Kodi is a little closer to being perfect again . 2 Link to comment Share on other sites More sharing options...
puithove 208 Posted February 1, 2016 Share Posted February 1, 2016 I installed beta 2.0.0 and then later, while kodi was connected to emby, updated emby. Now, I keep seeing blips of Kodi connecting and disconnecting. Now, I see these lines, over and over in the log: 2016-01-31 22:17:09.9589 Info HttpServer: HTTP Response 200 to 192.168.1.193. Time: 0ms. http://192.168.1.5:8096/emby/Sessions?DeviceId=40C3319C54DF4D9B89B2DFEAF20FE8A6&format=json 2016-01-31 22:17:09.9901 Error HttpServer: Error in SharpWebSocket: An exception has occurred while receiving a message.. Exception.Message: The header part of a frame cannot be read from the data source. If I restart Kodi, I stop getting the error and it shows up in "Active devices" just fine. I've got the 2.0.0 version running on one client. It was fine at first - restart Kodi and it'l reconnect to Emby server just fine and sit there like normal. However, restart Emby server while the client is connected, and it goes into this state where the server shows the client constantly disconnecting and reconnecting. I see the same message in the log. 2 Link to comment Share on other sites More sharing options...
Dvinge 6 Posted February 1, 2016 Share Posted February 1, 2016 Still working after 12 hours. Looks like a simple ping to the server Solved my issue. Thanks alot null_pointer Link to comment Share on other sites More sharing options...
jant90 15 Posted February 1, 2016 Author Share Posted February 1, 2016 I've got the 2.0.0 version running on one client. It was fine at first - restart Kodi and it'l reconnect to Emby server just fine and sit there like normal. However, restart Emby server while the client is connected, and it goes into this state where the server shows the client constantly disconnecting and reconnecting. I see the same message in the log. Unfortunately I experience the same. I am looking into the server restart issue now. I hope it's an easy fix for you . In the meantime, is there anything I can do to solve it manually server-sided for now? Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted February 2, 2016 Share Posted February 2, 2016 (edited) @ can you use the server restart/shutdown socket message to make the websocket behave correctly? Force it to disconnect and reconnect? Sent from my iPhone using Tapatalk Edited February 2, 2016 by Angelblue05 Link to comment Share on other sites More sharing options...
puithove 208 Posted February 2, 2016 Share Posted February 2, 2016 Looks good. Left the one client at 2.0.0 as a control. Updated another client to 2.0.1. Both connections were stable. Restarted the server. 1.8.0 & 2.0.1 clients reconnected and were stable. 2.0.0 client continually disconnecting/reconnecting. 4 Link to comment Share on other sites More sharing options...
xnappo 1593 Posted February 2, 2016 Share Posted February 2, 2016 Looks good. Left the one client at 2.0.0 as a control. Updated another client to 2.0.1. Both connections were stable. Restarted the server. 1.8.0 & 2.0.1 clients reconnected and were stable. 2.0.0 client continually disconnecting/reconnecting. Excellent - appreciate the scientific testing!! Link to comment Share on other sites More sharing options...
Dvinge 6 Posted February 2, 2016 Share Posted February 2, 2016 Still going strong with 2.0.1, it's been working all day, looking forward to see if it's still connected tomorrow. 1 Link to comment Share on other sites More sharing options...
Dvinge 6 Posted February 3, 2016 Share Posted February 3, 2016 Still working here. All my clients on stable are disconnected with one on 2.0.1 still connected, and reflecting all changes. 2 Link to comment Share on other sites More sharing options...
Recommended Posts