Webhooks and IFTTT

Once I saw the announcement that plex has webhhooks I knew I needed to connect it to IFTTT.

I modified elan’s home automation example to send the various events to IFTTT.

Here is the file and a link to the IFTTT recipe is in the readme as well.

github.com/problemss/webhooks-home-automation

I just wanted an easy way to log every item that is played on my plex box so I can monitor who in my family is watching what. When I get IFTTT connected lights I could dim the appropriate rooms lights, etc…

Figured I would share.

1 Like

@Problemss said:

I just wanted an easy way to log every item that is played on my plex box so I can monitor who in my family is watching what. When I get IFTTT connected lights I could dim the appropriate rooms lights, etc…

Figured I would share.

Do you not use PlexPy? this provides detailed tracking and analysis for all users?

I had no idea this existed. I will have to try it out. Looks awesome. Thank you!

@Problemss said:
Once I saw the announcement that plex has webhhooks I knew I needed to connect it to IFTTT.

I modified elan’s home automation example to send the various events to IFTTT.

Here is the file and a link to the IFTTT recipe is in the readme as well.

github.com/problemss/webhooks-home-automation

I just wanted an easy way to log every item that is played on my plex box so I can monitor who in my family is watching what. When I get IFTTT connected lights I could dim the appropriate rooms lights, etc…

Figured I would share.

Thanks @Problemss for your work! I want to ask help to lock the trigger to only one device: TV UE40ES7000

I’ve understand that i need to work on this line:

//If you want to control lights in particular ‘Plex Rooms’ you can look into payload.Player.title to send a customer event based on the player (ensure you have a unique name for each player configured in Plex).
switch (payload.event) {
case ‘media.play’:
// Trigger IFTTT_Plex.Play
//console.log(‘IFTTT_Plex.Play’);
options.url = ‘Webhooks Integrations - Connect Your Apps with IFTTT’ + key;
//options.body = { value1: payload.Account.title, value2: payload.Metadata.title, value3: payload.Player.title };
//request(options);
break;

I don’t understand where i put my player title in variable.
Thanks!

I just wanted an easy way to log every item that is played on my plex box so I can monitor who in my family is watching what. When I get IFTTT connected lights I could dim the appropriate rooms lights, etc…

I would highly recommend PlexPlus if you have a SmartThings hub, works great… Plex controls your lights for you:

@pepicora - did you work it out? I had the same issue… my lights were going on and off in my house in Australia when my sister was playing & pausing in the UK (from my server).