Page 1 of 2

Cannot update device state

PostPosted: Wed Nov 15, 2017 6:04 pm
by wormhole
I am now constantly getting this error when the Plex plugin in enabled. I have connected both via HTTP and HTTPS in the server setup

Error cannot update device state for key clientConnectionStatus to value buffering (invalid enumeration value)

Re: Cannot update device state

PostPosted: Thu Nov 16, 2017 12:43 am
by RogueProeliator
Error cannot update device state for key clientConnectionStatus to value buffering (invalid enumeration value)

Sounds like you have an unexpected return (maybe a new media type or something) being returned. Can you turn on debug, let it update once (and fail), and post the log results from that?

Thanks!
Adam

Re: Cannot update device state

PostPosted: Thu Nov 16, 2017 6:50 am
by wormhole
i think last night’s server update broke the plugin version 1.9.7.4460. now reloading plugin. now all devices show disconnected.


Debug Found 1 clients
Plex Media Server Manager Debug Found client with Machine Id: 73d75b2654562c76-com-plexapp-android
NEST Home Error versionCheck: There was an error parsing the server's version file.
Plex Media Server Manager Debug Executing full status update request...
Plex Media Server Manager Debug Processing GET operation: http|*|/|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaConta

fuller debug log here
Nov 16, 2017, 7:42:07 AM
Reloading plugin "Plex Media Server Manager 2.0.4"
Stopping plugin "Plex Media Server Manager 2.0.4" (pid 19145)
Stopped plugin "Plex Media Server Manager 2.0.4"
Starting plugin "Plex Media Server Manager 2.0.4" (pid 19290)
Started plugin "Plex Media Server Manager 2.0.4"
Plex Media Server Manager Checking for updates...
Plex Media Server Manager No updates are available

Nov 16, 2017, 7:43:17 AM
Plex Media Server Manager Debug enabled (on Low) by user
Plex Media Server Manager Debug Executing full status update request...
Plex Media Server Manager Debug Processing GET operation: http|*|/|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {'myPlexSubscription': '1', 'eventStream': '1', 'allowChannelAccess': '1', 'countryCode': 'usa', 'photoAutoTag': '1', 'transcoderLyrics': '1', 'hubSearch': '1', 'sync': '1', 'multiuser': '1', 'allowMediaDeletion': '1', 'transcoderVideo': '1', 'updatedAt': '1510834503', 'transcoderVideoBitrates': '64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000', 'streamingBrainVersion': '2', 'size': '25', 'certificate': '1', 'backgroundProcessing': '1', 'platform': 'MacOSX', 'version': '1.9.7.4460-a39b25852', 'myPlexSigninState': 'ok', 'friendlyName': 'Friedflix', 'allowSync': '1', 'readOnlyLibraries': '0', 'transcoderVideoQualities': '0,1,2,3,4,5,6,7,8,9,10,11,12', 'transcoderVideoResolutions': '128,128,160,240,320,480,768,720,720,1080,1080,1080,1080', 'myPlex': '1', 'transcoderPhoto': '1', 'myPlexMappingState': 'mapped', 'transcoderActiveVideoSessions': '0', 'companionProxy': '1', 'pluginHost': '1', 'platformVersion': '10.12.6', 'allowSharing': '1', 'voiceSearch': '1', 'itemClusters': '1', 'streamingBrainABRVersion': '3', 'requestParametersInCookie': '1', 'transcoderAudio': '1', 'livetv': '4', 'transcoderSubtitles': '1', 'ownerFeatures': 'Android - PiP,adaptive_bitrate,camera_upload,cloudsync,content_filter,download_certificates,dvr,federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,livetv,lyrics,music_videos,news,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,session_bandwidth_restrictions,session_kick,sync,trailers,webhooks', 'diagnostics': 'logs,databases,streaminglogs', 'updater': '1', 'mediaProviders': '1', 'machineIdentifier': 'ad91c761b622e721b7bf0dc1ce6a7f8e96d5e8bd', 'allowCameraUpload': '1', 'myPlexUsername': 'cfriedberg@yahoo.com'}
Plex Media Server Manager Debug Processing GET operation: http|*|/status/sessions|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {'size': '0'}
Plex Media Server Manager Debug Found 0 active media sessions
Plex Media Server Manager Debug Updating current client list to: []
Plex Media Server Manager Debug Processing GET operation: http|*|/clients|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {'size': '1'}
Plex Media Server Manager Debug Found 1 clients
Plex Media Server Manager Debug Found client with Machine Id: 73d75b2654562c76-com-plexapp-android
Plex Media Server Manager Debug Executing full status update request...
Plex Media Server Manager Debug Processing GET operation: http|*|/|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {'myPlexSubscription': '1', 'eventStream': '1', 'allowChannelAccess': '1', 'countryCode': 'usa', 'photoAutoTag': '1', 'transcoderLyrics': '1', 'hubSearch': '1', 'sync': '1', 'multiuser': '1', 'allowMediaDeletion': '1', 'transcoderVideo': '1', 'updatedAt': '1510834503', 'transcoderVideoBitrates': '64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000', 'streamingBrainVersion': '2', 'size': '25', 'certificate': '1', 'backgroundProcessing': '1', 'platform': 'MacOSX', 'version': '1.9.7.4460-a39b25852', 'myPlexSigninState': 'ok', 'friendlyName': 'Friedflix', 'allowSync': '1', 'readOnlyLibraries': '0', 'transcoderVideoQualities': '0,1,2,3,4,5,6,7,8,9,10,11,12', 'transcoderVideoResolutions': '128,128,160,240,320,480,768,720,720,1080,1080,1080,1080', 'myPlex': '1', 'transcoderPhoto': '1', 'myPlexMappingState': 'mapped', 'transcoderActiveVideoSessions': '0', 'companionProxy': '1', 'pluginHost': '1', 'platformVersion': '10.12.6', 'allowSharing': '1', 'voiceSearch': '1', 'itemClusters': '1', 'streamingBrainABRVersion': '3', 'requestParametersInCookie': '1', 'transcoderAudio': '1', 'livetv': '4', 'transcoderSubtitles': '1', 'ownerFeatures': 'Android - PiP,adaptive_bitrate,camera_upload,cloudsync,content_filter,download_certificates,dvr,federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,livetv,lyrics,music_videos,news,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,session_bandwidth_restrictions,session_kick,sync,trailers,webhooks', 'diagnostics': 'logs,databases,streaminglogs', 'updater': '1', 'mediaProviders': '1', 'machineIdentifier': 'ad91c761b622e721b7bf0dc1ce6a7f8e96d5e8bd', 'allowCameraUpload': '1', 'myPlexUsername': 'cfriedberg@yahoo.com'}
Plex Media Server Manager Debug Processing GET operation: http|*|/status/sessions|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {'size': '0'}
Plex Media Server Manager Debug Found 0 active media sessions
Plex Media Server Manager Debug Updating current client list to: []
Plex Media Server Manager Debug Processing GET operation: http|*|/clients|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {'size': '1'}
Plex Media Server Manager Debug Found 1 clients
Plex Media Server Manager Debug Found client with Machine Id: 73d75b2654562c76-com-plexapp-android
Plex Media Server Manager Debug Executing full status update request...
Plex Media Server Manager Debug Processing GET operation: http|*|/|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {'myPlexSubscription': '1', 'eventStream': '1', 'allowChannelAccess': '1', 'countryCode': 'usa', 'photoAutoTag': '1', 'transcoderLyrics': '1', 'hubSearch': '1', 'sync': '1', 'multiuser': '1', 'allowMediaDeletion': '1', 'transcoderVideo': '1', 'updatedAt': '1510834503', 'transcoderVideoBitrates': '64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000', 'streamingBrainVersion': '2', 'size': '25', 'certificate': '1', 'backgroundProcessing': '1', 'platform': 'MacOSX', 'version': '1.9.7.4460-a39b25852', 'myPlexSigninState': 'ok', 'friendlyName': 'Friedflix', 'allowSync': '1', 'readOnlyLibraries': '0', 'transcoderVideoQualities': '0,1,2,3,4,5,6,7,8,9,10,11,12', 'transcoderVideoResolutions': '128,128,160,240,320,480,768,720,720,1080,1080,1080,1080', 'myPlex': '1', 'transcoderPhoto': '1', 'myPlexMappingState': 'mapped', 'transcoderActiveVideoSessions': '0', 'companionProxy': '1', 'pluginHost': '1', 'platformVersion': '10.12.6', 'allowSharing': '1', 'voiceSearch': '1', 'itemClusters': '1', 'streamingBrainABRVersion': '3', 'requestParametersInCookie': '1', 'transcoderAudio': '1', 'livetv': '4', 'transcoderSubtitles': '1', 'ownerFeatures': 'Android - PiP,adaptive_bitrate,camera_upload,cloudsync,content_filter,download_certificates,dvr,federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,livetv,lyrics,music_videos,news,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,session_bandwidth_restrictions,session_kick,sync,trailers,webhooks', 'diagnostics': 'logs,databases,streaminglogs', 'updater': '1', 'mediaProviders': '1', 'machineIdentifier': 'ad91c761b622e721b7bf0dc1ce6a7f8e96d5e8bd', 'allowCameraUpload': '1', 'myPlexUsername': 'cfriedberg@yahoo.com'}
Plex Media Server Manager Debug Processing GET operation: http|*|/status/sessions|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {'size': '0'}
Plex Media Server Manager Debug Found 0 active media sessions
Plex Media Server Manager Debug Updating current client list to: []
Plex Media Server Manager Debug Processing GET operation: http|*|/clients|*|basic|*|friedflix|*|S@ffron11
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {'size': '1'}
Plex Media Server Manager Debug Found 1 clients
Plex Media Server Manager Debug Found client with Machine Id: 73d75b265

Re: Cannot update device state

PostPosted: Thu Nov 16, 2017 5:12 pm
by wormhole
also getting this error

Plex Media Server Manager Error An error occurred executing the GET/PUT request (Device: 1423477522): HTTPConnectionPool(host='10.0.1.193', port=32400): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x113086f50>: Failed to establish a new connection: [Errno 60] Operation timed out',))

Re: Cannot update device state

PostPosted: Thu Nov 16, 2017 11:59 pm
by RogueProeliator
In the Device Properties for the Plex Media Server, what login credentials did you enter -- your Plex website username/password (i.e. that you would login to their website and which is registered on the local server installation) or a local server username/password? They have been more and more finicky about that... Be sure that you use the same one in Indigo that you use for Plex installation (found under Server in the Settings on the Plex server).

IF those already match we will move on from there (just want to check as that the last error you posted could be this issue).

Re: Cannot update device state

PostPosted: Fri Nov 17, 2017 5:32 am
by wormhole
same id and password as logged in under PMS server settings


seeing this error frequently as well
Plex Media Server Manager Error An error occurred executing the GET/PUT request (Device: 1423477522): ('Connection aborted.', error(60, 'Operation timed out'))

Re: Cannot update device state

PostPosted: Sat Sep 29, 2018 5:26 am
by wormhole
May I ask if this plug in is still being maintained? Still having the same issues with this plugin. Thanks in advance

Re: Cannot update device state

PostPosted: Mon Oct 01, 2018 1:08 pm
by RogueProeliator
May I ask if this plug in is still being maintained? Still having the same issues with this plugin. Thanks in advance

It is... A connection timing out is going to be just that - something on either your network or the Plex Authentication servers didn't respond (though it shouldn't need to reach out to the Plex servers very often, just to obtain the auth token at startup and maybe if it expires, which I am not sure if it does..)

Can you look in your logs directory and look for the file named something along the lines of com.duncanware.plexMediaManager? Sorry, not at my Indigo computer at the moment, but I think you can find that, will be in the Indigo folder tree somewhere with the rest of the logs. Need to examine any lines around one of the failures -- just be careful when posting because your uersname and password may be exposed in there, so * those out or something.

Adam

Re: Cannot update device state

PostPosted: Sat Oct 06, 2018 8:29 am
by wormhole
which log file? This has been a constant problem since last time i reported it. It never went away. I've deleted and re-added the plex server too...now using PMS Version 1.13.8.5395.

I am also seeing the 'Now Playing' on the PMS not properly updating stopped players and streams. Seems to not 'refresh'. now that is a new bug, the plex issue has been around for sometime.

Re: Cannot update device state

PostPosted: Sat Oct 06, 2018 8:37 am
by wormhole
tried deleting everything again and readding plex PMS...when i added the first slot, this appeared in the logs

Oct 6, 2018 at 10:36:16 AM
Plex Media Server Manager Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/plugin_base.py", line 1176, in deviceUpdated
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Plex Media Server Manager.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkPlugin.py", line 536, in deviceStopComm
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Plex Media Server Manager.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkDevice.py", line 248, in removeChildDevice
KeyError: (u'Slot 1',)

Re: Cannot update device state

PostPosted: Sun Oct 07, 2018 5:22 am
by wormhole
I believe the issue may be related to when a client stops. There is no longer a 'stop' device state in the plugin. I noticed this when I stopped a client

Error cannot update device state for key clientConnectionStatus to value stopped (invalid enumeration value)


I also noticed that when setting up a trigger, there is no longer a device stated changed to stopped....

Re: Cannot update device state

PostPosted: Sun Oct 07, 2018 9:35 pm
by RogueProeliator
I believe the issue may be related to when a client stops. There is no longer a 'stop' device state in the plugin. I noticed this when I stopped a client

Good sleuthing on determining that it is a connection state mismatch; however, there has never been a "stopped" state in the plugin -- when I wrote this that was actually a common complaint from people using the API -- that a player would be paused or playing but if they media was actually stopped there was no "stopped" state. It came down to the server not reporting the "browsing" client IIRC. At any rate, I can update the plugin to include that state ASAP. Thanks for the debugging!

Adam

Re: Cannot update device state

PostPosted: Mon Oct 08, 2018 8:00 am
by wormhole
Awesome thanks! Just stumbled on it...hopefully that's the fix :)

Re: Cannot update device state

PostPosted: Mon Oct 08, 2018 8:19 am
by RogueProeliator
Awesome thanks! Just stumbled on it...hopefully that's the fix :)

This brought up an idea... I think I'll go ahead and add an "unknown" status and log in the event log when the status coming back is not listed in the Indigo list. That is defined as a list with finite options to aid in creation of triggers and displays and such, but obviously fails when Plex updates. SO, will still need to update whenever Plex changes, but perhaps will stop things from breaking immediately on people hitting the un-accounted-for status.

Hope to have some time tonight or tomorrow night to get you an update.

Adam

Re: Cannot update device state

PostPosted: Mon Oct 08, 2018 6:05 pm
by matt (support)
That sounds like a great idea Adam. Thanks.