# Webhooks and IFTTT

**URL:** https://forums.plex.tv/t/webhooks-and-ifttt/179504
**Category:** Dev/API Corner
**Tags:** other-dev
**Created:** [February 10, 2017, 10:45pm UTC](https://forums.plex.tv/t/webhooks-and-ifttt/179504 "2017-02-10T22:45:21Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Problemss](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/problemss/32/3752_2.png) [@Problemss](https://forums.plex.tv/u/Problemss)
#### Post date: [February 10, 2017, 10:45pm UTC](https://forums.plex.tv/t/webhooks-and-ifttt/179504/1 "2017-02-10T22:45:21Z")

</div>

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](https://github.com/problemss/webhooks-home-automation "https://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.

---

<div class="post-metadata">

### Author: ![tylordurton](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tylordurton/32/82214_2.png) [@tylordurton](https://forums.plex.tv/u/tylordurton)
#### Post date: [February 12, 2017, 8:38pm UTC](https://forums.plex.tv/t/webhooks-and-ifttt/179504/2 "2017-02-12T20:38:30Z")

</div>

> @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?

---

<div class="post-metadata">

### Author: ![Problemss](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/problemss/32/3752_2.png) [@Problemss](https://forums.plex.tv/u/Problemss)
#### Post date: [February 17, 2017, 3:52am UTC](https://forums.plex.tv/t/webhooks-and-ifttt/179504/3 "2017-02-17T03:52:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pepicora](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@pepicora](https://forums.plex.tv/u/pepicora)
#### Post date: [February 25, 2017, 5:47pm UTC](https://forums.plex.tv/t/webhooks-and-ifttt/179504/4 "2017-02-25T17:47:46Z")

</div>

> @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](https://github.com/problemss/webhooks-home-automation "https://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](https://console.log)(‘IFTTT\_Plex.Play’);  
options.url = ‘[Webhooks Integrations - Connect Your Apps with IFTTT](https://maker.ifttt.com/trigger/Plex.Play/with/key/)’ + key;  
[//options.body](https://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!

---

<div class="post-metadata">

### Author: ![JEscHT](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jescht/32/82458_2.png) [@JEscHT](https://forums.plex.tv/u/JEscHT)
#### Post date: [February 26, 2017, 4:22pm UTC](https://forums.plex.tv/t/webhooks-and-ifttt/179504/5 "2017-02-26T16:22:16Z")

</div>

> 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:

> **[\[OBSOLETE\] PlexPlus - Control Lighting with Plex Play Status](https://community.smartthings.com/t/obsolete-plexplus-control-lighting-with-plex-play-status/38321)**
>
> PlexPlus (with Plex2SmartThings) \*NO LONGER MAINTAINED - New revision in comments as " Plex Communicator" Using either a Windows EXE, direct from Plex webhooks (Plex Pass only) or a Plex custom device type to translate status changes in Plex...

---

<div class="post-metadata">

### Author: ![James\_Lesley](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/james_lesley/32/11663_2.png) [@James\_Lesley](https://forums.plex.tv/u/James_Lesley)
#### Post date: [May 28, 2017, 7:25am UTC](https://forums.plex.tv/t/webhooks-and-ifttt/179504/6 "2017-05-28T07:25:55Z")

</div>

@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).

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [January 8, 2020, 8:02pm UTC](https://forums.plex.tv/t/webhooks-and-ifttt/179504/7 "2020-01-08T20:02:21Z")

</div>


