Jump to content

Webhook Events


franciscojcrespo

Recommended Posts

franciscojcrespo

Please, create separate events for "Playback Events". I need an event to turn off the lights when I play/resume a movie/show and another to set a scene when I pause/stop a movie/show. Right now, I can only have a webhook to turn on/off the lights when there is a change in a "Playback Event". This may cause the opposite effect if I play a movie and the light was already turned off and viceversa.

Please!!!

Francisco

  • Like 1
Link to comment
Share on other sites

hstamas
10 minutes ago, franciscojcrespo said:

Please, create separate events for "Playback Events". I need an event to turn off the lights when I play/resume a movie/show and another to set a scene when I pause/stop a movie/show. Right now, I can only have a webhook to turn on/off the lights when there is a change in a "Playback Event". This may cause the opposite effect if I play a movie and the light was already turned off and viceversa.

Please!!!

Francisco

You probably already know this but if your using Smartthings or Hue there are now excellent plugin's for these 2 platforms that do exactly what you need.

Link to comment
Share on other sites

franciscojcrespo

Hi Hstamas. Here's what  I am doing. I am using IFTTT to create an Applet that connects to Hue to turn off lights and another one to set a scene. Then I use the IFTTT webhook URL and adding it to the Emby webhook. But since in Emby has only one event for playback events, it doesn't work the way it should.

I also tried the same approach, but using only one Applet to turn on/off the lights, but this can cause the opposite of the desired result.

Am I doing something wrong? Is there another approach?

Thanks!

Edited by franciscojcrespo
Link to comment
Share on other sites

hstamas
17 hours ago, franciscojcrespo said:

Hi Hstamas. Here's what  I am doing. I am using IFTTT to create an Applet that connects to Hue to turn off lights and another one to set a scene. Then I use the IFTTT webhook URL and adding it to the Emby webhook. But since in Emby has only one event for playback events, it doesn't work the way it should.

I also tried the same approach, but using only one Applet to turn on/off the lights, but this can cause the opposite of the desired result.

Am I doing something wrong? Is there another approach?

Thanks!

The Hue plugin for Emby should make things a lot easier for you. Create a native Hue scene, associate it with a playback event (play-pause-stop). Done.

 

 

Edited by hstamas
  • Like 1
Link to comment
Share on other sites

franciscojcrespo

I am so sorry. I am new to this. How do I install this plugin? Did I mention my Emby Server is running on s Synology NAS?

Link to comment
Share on other sites

  • 2 months later...
Rom1toul1

Hello,

I have the same problem, and the plugin is not my solution because I want to turning on (and off) a light wich are not a Smartthings or Hue one. 

I can only have a webhook to turn on/off the lights when there is a change in a "Playback Event". This may cause the opposite effect if I play a movie and the light was already turned off and viceversa.

How can I do?

 

Thanks you.

  • Like 1
Link to comment
Share on other sites

On 4/7/2021 at 3:53 PM, Rom1toul1 said:

Hello,

I have the same problem, and the plugin is not my solution because I want to turning on (and off) a light wich are not a Smartthings or Hue one. 

I can only have a webhook to turn on/off the lights when there is a change in a "Playback Event". This may cause the opposite effect if I play a movie and the light was already turned off and viceversa.

How can I do?

 

Thanks you.

Hi @Rom1toul1, what event do you need?

Link to comment
Share on other sites

  • 5 weeks later...
JabbarJadooa

Hello, 

I was wondering if there was a solution to this issue. I want to perform the same function, with the below logic. 

If I start or unpause a movie (not a TV show) from a certain device (my android TV) then send an event to turn off the lights (I'm using smart life for lights and IFTTT for automation) 

Applying the same logic I want to send another event to turn on the light if I stop or pause the movie. 

Is this possible with the current plug in? 

Thank you 

Link to comment
Share on other sites

  • 2 weeks later...
On 5/12/2021 at 2:48 AM, JabbarJadooa said:

Hello, 

I was wondering if there was a solution to this issue. I want to perform the same function, with the below logic. 

If I start or unpause a movie (not a TV show) from a certain device (my android TV) then send an event to turn off the lights (I'm using smart life for lights and IFTTT for automation) 

Applying the same logic I want to send another event to turn on the light if I stop or pause the movie. 

Is this possible with the current plug in? 

Thank you 

Hi, yes you can receive these events by hooking up Emby webhooks to IFTTT. 

You will have to write code in IFTTT to process the data and check if it's the device you want to listen for and then act accordingly. Please let us know if this helps. Thanks.

Link to comment
Share on other sites

jjadooa

Hi @Luke,

Thanks for the reply but I abandoned IFTTT and used sequematic.com. It's much easier and gave more control. 

I will give a quick guide on how to set it up, just incase someone wants to do the same. 

Instructions:

1. First set up an account on sequematic.com 

2. I have smart life which can be connected to sequematic.com directly. Go to linked services and connect using your credentials. If you're using a service that's not available in sequematic.com then you can call IFTTT web services instead. 

3. Create the required variables (Action, device and content/type). I have included type since I wanted to control the lights only once a movie is played. You can add your own her based on the logic you want to implement. Refer to the screen shot to see the variables. 

4. Create a sequence and give it a name 

5. Click on add a step and choose custom webhook

6. Select schema 3 for json payload 

7. Add 3 more steps "change a variable" to set the variables from the payload. Set Action to {Event}, set device to {Session-DeviceId} and set content to {Item-Type}. Make sure you include the { when you are referring to the values from the json payload. You can add more variables if you want to perform certain actions. 

8. Now you can add your conditions as you want. I have set up two scenes on my smart life app, one to turn off the light and one to turn them on. I call the first scene based on condition the event is equal to playback.start or playback.unpause, and I call the second scene in the condition event is equal to playback.stop and playback.pause. Refer to the screen shot. I also have two more conditions that the content should equal to Movie and the device should equal my TV ID. You can find out the device ID by firing the service and checking the logs. 

9. Now copy the trigger URL for the sequence. Go to emby webhooks plugin, add webhook, select playback event and past the url. 

I hope this helps, since it took me a while to figure it out 😁😅

Regards, 

Jassim 

Screenshot_20210529-181423.png

Screenshot_20210529-183106.png

Link to comment
Share on other sites

Very cool, thanks for the info ! I hadn't heard of sequematic before.

Link to comment
Share on other sites

Cheesegeezer

Webhooks is great if you understand it, still need another piece of software(generally not free).

personally I’m not a fan, but for the geeks it’s great, I’ve programmed home automation software for my whole house and that was easier than webhooks.

Demopad setup

My Demopad interface

 

Edited by Cheesegeezer
Added links
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
JustEric78
On 6/4/2021 at 3:51 PM, Cheesegeezer said:

Webhooks is great if you understand it, still need another piece of software(generally not free).

personally I’m not a fan, but for the geeks it’s great, I’ve programmed home automation software for my whole house and that was easier than webhooks.

Demopad setup

My Demopad interface

 

You should look at Home Assistant, it has now taken the place of IFTTT and other solutions to bring it all in house except for one that I still use sequematic for. HA takes a lot of learning, but there is a huge community of people and information to reference. 

Link to comment
Share on other sites

Cheesegeezer
6 hours ago, JustEric78 said:

You should look at Home Assistant, it has now taken the place of IFTTT and other solutions to bring it all in house except for one that I still use sequematic for. HA takes a lot of learning, but there is a huge community of people and information to reference. 

Why... do i need to learn how to wipe my own ass with yet another piece of software that does everything all the others did differently and you get the privilege of paying more money for. Developers should remove the headache rather than giving a platform for interaction in a closed project.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
JustEric78
On 6/14/2021 at 8:40 PM, Cheesegeezer said:

Why... do i need to learn how to wipe my own ass with yet another piece of software that does everything all the others did differently and you get the privilege of paying more money for. Developers should remove the headache rather than giving a platform for interaction in a closed project.

I thought you were saying you need another piece of software, I was offering up an option that does not cost anything. 

Link to comment
Share on other sites

  • 5 months later...

@LukeI wonder if you can help me with something. I'm trying to send the webhook request from emby to IFTTT, but the json payload comes out empty. I contacted IFTTT support and they asked me to provide the request, do you know how I can extract it? 

Link to comment
Share on other sites

21 minutes ago, jjadooa said:

@LukeI wonder if you can help me with something. I'm trying to send the webhook request from emby to IFTTT, but the json payload comes out empty. I contacted IFTTT support and they asked me to provide the request, do you know how I can extract it? 

Hi, the server doesn't write it to the log so you might have to use some kind of network monitor such as wireshark. Or setup some other kind of local server to receive it and test that out.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...