This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
[PUBLISHED] Plex Notify
Hi Guys,
I've submitted my Plex notify app for approval.
NOTE: The app only supports PMS version 1.3.0 and above (due to JSON changes made by the Plex team).
This app allows you to trigger flows based on Plex player status - play, pause, stop.
It works for all Plex players as the flow card uses tokens.
Available tokens are - player, title, username.
Once it's approved I'll let you all know.
P.S. I'm a new coder so please work with me if you find issues
I've submitted my Plex notify app for approval.
NOTE: The app only supports PMS version 1.3.0 and above (due to JSON changes made by the Plex team).
This app allows you to trigger flows based on Plex player status - play, pause, stop.
It works for all Plex players as the flow card uses tokens.
Available tokens are - player, title, username.
Once it's approved I'll let you all know.
P.S. I'm a new coder so please work with me if you find issues
![:smile: :smile:](https://forum.athom.com/resources/emoji/smile.png)
Comments
[WEBSOCKET] Detected state: paused
[LISTENER] Homey session listener detected event
[DATA] Sessions Data: { MediaContainer: { size: 1, Video: [ [Object] ] } }
It does sense that I am watching and when I pause, but it doesn't seem to work if I try to make a trigger with it...
It seems to stop at:
var session = result.MediaContainer.Metadata.filter(item => item.sessionKey === event.key)
Because it doesn't show this for me:
console.log('[INFO] Detected session:')
@phil_s It's a simple app to use Plex player states as triggers, you add your Plex (owner) credentials, and the use the tags to setup flows, i.e. on play, dim lights.
Can you check the version on my github? It seems Plex changed things again.
I'm running the latest PMS on a windows unit. I do see your app in my PMS devices list:
so the credentials are fine. Does this also means it found the server on my network or how could I check this? I'm pretty sure I entered the right IP and port.
Can you run the github version from CLI and let me know the debug? Also confirm your PMS version...
I'll see if I can do it remotely from work today, but I'm new to the CLI thing so bare with me
I did get this error: api.js:1 POST http://192.168.178.13/api/app/com.plex.notify/restart/?_=1481535572620 net::ERR_EMPTY_RESPONSE
when stopping a movie.
And a warning that the dutch locale was missing but that one makes sense
Nice work! I like that the tokens in the flows very much.
Maybe you can also make a plex.tv pin procedure for linking the app with plex like MikeOne did.
Great work in each case!
I'll certainly look at implementing the PIN auth, but I'm still new to coding
Maybe you could implement a AND flow card for selecting Plex players. The reason is that I don't want every plex player to trigger my living room lighting.
It might be a bit hard since you're not allowed to make a flow card with multiple checkboxes to select for which players it should be true. But maybe a dropdown with the registered players?
Seems like some solid coding you did anyway!
But it needs some extra work because you need to find out all the player names you use. It's also a bit more tricky if I i.e. have 3 players that should trigger the flow and 2 that shouldn't. Since OR is not available in a flow you're bound to inverting some cards to exclude the players you don't want to trigger.
Don't really need it right now but it just came to mind as some cool extra functionality.
Now just have to append the flows to make sure only my main TV will control the lights, then this is another simple-but-awesome set of flows. Thanks a lot!
I saw you updated to 1.0.3. Any interesting changes? For me to let the app work I have to go to the settings screen before I watch a movie and press the save button again to trigger the connection to plex . Any idea what could cause this?