I’m seeing the same, I think its a problem with plex and have logged it here.
I’ve wondered about the length of data, or whether its how busy the PMS is. I’ve found if you stop playback and start again on the same title it sometimes works. Also, there seems to be a better chance of it working if you move through the menus/selections and pause for 5 secs or so, before you start it playing.
My PMS is relatively low powered running on a Netgear NAS, I’ll get round to trying ,y backup server running on windows.
FYI, I fixed the issue. I installed Tautulli instead of the script. Using the same webhook settings in webcore (minus the media.play requirement) it now gets everything. Tautulli has the ability to only send the webhook only when it starts.
Now, I can’t get the same level of detail i.e my smart speaker no longer tells me who and what is playing, but I at least get a notification every time.
I have tried your updated script (with extra modules) and seems to work far better!! even though Putty’s text output seems to go crazy on the media.play trigger.
I’ll keep testing…
I think the console.log commands are async, so can get out of sequence with whats actually happening, particularly with large volumes of data. It may be worth commenting out unless debugging etc
I also have a suspicion that the adhoc processing of the media.play command may be improved by a periodic restart of the app. (when this is not being notified, plex reports that the pi closed the connection) I’m also wondering whether a more powerful linux server may help, my Pi is quite slow, think its a 2nd gen model b
Thanks for the heads up!
fyi, I’m using a new Pi 4 with 4GB ram (stolen from my son, L0L) and very occasionally seeing miss calls on media.play, pause and stop commands at the moment are spot on. The Pi is doing over things but nothing to stressful (Pi-hole mainly and some speaker controls.)
My Plex server is running on a Fedora Linux pc, Intel corei5 cpu.
It maybe worth trying the node.js on your linux PC?
I’d had the script running for a few days, and found all media.play requests were not being handled. Having restarted the app, the same requests worked again. I’ll continue investigating.
I did wonder about adding node to my Plex server but because the server is working perfectly well, I’m a little worried changing things and breaking something
I do make system backups so may give it a go. Also the server isn’t a always on server, so not sure whether it’ll be a fair test for the js script. guess it would work perfectly every time though!