Jump to content

EventGhost & Emby Server + (IFTTT) Plug-in?


julianb

Recommended Posts

If you are using HA, find the REST API http command line to trigger a light to turn on.

Then copy it into the text box in the plugin config.

Click save and the emby event will trigger the HA event.

Yeah, I know I can use http://servername:8800/devices/{id}/turnon to control for instance lights. I guess that should work just fine, although I have never used such functionality before.
Link to comment
Share on other sites

Unfortunately I still have not managed to get it to work. Could you maybe share what you actually put in the command line setup?

 

Thanks!

You installed from the link above and restarted the server?

Link to comment
Share on other sites

I realize that everyone from this thread are busy people. But perhaps if the commander plugin generally works. I would submit it to Luke to put into the catalog.

 

I will add process command options in as well as device choosing.

 

That way your htpc will dim lights in a particular room, or run an eventghost command specific to the htpc.

 

 

Sorry chef, I feel that I seem very ungrateful. That is not the case, on the contrary, I am very grateful for this. 

I will probably not be able to test this right now, but I will for sure do that very soon!

Link to comment
Share on other sites

You installed from the link above and restarted the server?

 

Many thanks for working on this - much apprechiated!

 

Sorry I've just realized what I wrote didn't really mean anything :) I have the latest beta server running, downloaded the latest plugin from your link, copied it in the plugins folder and restarted the server. I can see the plugin and I have put the same URLs in the respective fields which I already use to trigger the same action via Tasker.

 

Playback Started Commandline
 
Playback Stopped Commandline
 
I am running the Emby server on Win 10 - not sure if that makes a difference. Does this mean I have to put a full Curl command in the configuration? Also I get a message box popping up with the command when the trigger fires so that part definately works.
 
Thanks,
Manuel
Edited by Manuel
Link to comment
Share on other sites

julianb

I realize that everyone from this thread are busy people. But perhaps if the commander plugin generally works. I would submit it to Luke to put into the catalog.

 

I will add process command options in as well as device choosing.

 

That way your htpc will dim lights in a particular room, or run an eventghost command specific to the htpc.

 

 

I really appriciate your work man! :D
 
Just installed the beta on a test server and installed the plugin, but I can't get it to work with some basic test commands.
 
I have made a simple html page with eventghost "webserver" plugin. The page contains four buttons: Play, Stop, Pause, Unpaused.
 
When I click these buttons on the webpage it works fine and eventghost registrer the commands. When I assign these commands to your plugin like: http://localhost:2016/index.html?Start
 
Nothing happens? Shouldn't the plugin just push a request on that address like when I physically push the button on the webpage? 
 
 
If you want to test it in eventghost, this is how the file look like: index.html
 <head>
   <title>EventGhost Webserver Controller</title>
 </head>
 <body>
   <a href="index.html?Start">Start</a>
   <a href="index.html?Stop">Stop</a>
   <a href="index.html?Pause">Pause</a>
   <a href="index.html?Unpaused">Unpaused</a>
 </body>

Webserver plugin in eventghost:

GycYb8k.png

 

The webpage with 4 buttons:

 

99ebAM0.png

Could be me doing something wrong here, but shouldn't this work?

 

Using Version 3.1.225.0 beta

Link to comment
Share on other sites

Many thanks for working on this - much apprechiated!

 

Sorry I've just realized what I wrote didn't really mean anything :) I have the latest beta server running, downloaded the latest plugin from your link, copied it in the plugins folder and restarted the server. I can see the plugin and I have put the same URLs in the respective fields which I already use to trigger the same action via Tasker.

Playback Started Commandline

http://192.168.0.33:...el&level=40

Playback Stopped Commandline

http://192.168.0.33:...l&level=100

I am running the Emby server on Win 10 - not sure if that makes a difference. Does this mean I have to put a full Curl command in the configuration? Also I get a message box popping up with the command when the trigger fires so that part definately works.

Thanks,

Manuel

Is the message box empty or does it contain the URL string?

Edited by chef
Link to comment
Share on other sites

this version removes a resource pool i had set for the http request.

 

copy the plugin dll and restart the server:

 

https://dl.dropboxusercontent.com/u/46151346/Commander/Commander/bin/Debug/Commander1.zip

 

Just done that - I do not get a message when I start a movie but when I pause I get the follwing error:

 

582f023eafa64_Image3.jpg

 

This is what I have maintained in the plugin settings:

582f032f418c7_Image4.jpg

Edited by Manuel
Link to comment
Share on other sites

Thanks @@Manuel

I will fix the pause events.

 

Have the playback started commands triggered the commandline for you?

 

I'm gonna get this fixed :)

Link to comment
Share on other sites

Thanks @@Manuel

I will fix the pause events.

 

Have the playback started commands triggered the commandline for you?

 

I'm gonna get this fixed :)

 

Thanks for looking into this. No the playback started has not triggered the command and I do not get a message popping up.

Link to comment
Share on other sites

julianb

I could not get this to work, as described in my previous post, but will you make it available with the next stable server build? @@chef

Link to comment
Share on other sites

Sorry I got side tracked this week.

 

I figured out the problem with the commandline.

 

The content type has to be "application/json".

 

This plugin will work with the next stable release, I'm pretty sure :)

Edited by chef
Link to comment
Share on other sites

julianb
Sweet, no worries! 
 
Will it be possible to send HTTP commands like:
http://localhost:2016/index.html?Stop
http://localhost:2016/index.html?Start

when you release the plugin?

Link to comment
Share on other sites

Sweet, no worries!

 

Will it be possible to send HTTP commands like:

http://localhost:2016/index.html?Stop
http://localhost:2016/index.html?Start 
when you release the plugin?
@@julianb

 

 

If they are for an Http API for another program, then yes, those types of commandlines will work :)

Edited by chef
Link to comment
Share on other sites

Thanks @@Manuel

I will fix the pause events.

 

Have the playback started commands triggered the commandline for you?

 

I'm gonna get this fixed :)

 

Hi,

 

just an update - the triggers do actually work - I made a mistake in my command line.

 

However I still get the pause event issue where the message box comes up plenty of times which actually eventually brings my emby server down.

I think once this is fixed it's good to be released :)

 

Thanks, 

Manuel

Link to comment
Share on other sites

julianb

@@julianb

 

 

If they are for an Http API for another program, then yes, those types of commandlines will work :)

They are "remote" controls for EventGhost using the web server plugin. See my previous post :)
 
Can't wait to get this working!
Link to comment
Share on other sites

 

They are "remote" controls for EventGhost using the web server plugin. See my previous post :)
 
Can't wait to get this working!

 

 

I've been following this thread - I do not think he is making a plugin for Eventghost julianb. 

 

Eventghost plugins do not use the format .dll

Link to comment
Share on other sites

Is it possible to make Eventghost log an event for Emby? Like "Movie is playing on (HTPC)" or "User" is active?

 

I know some 3rd party plugins use emby API keys to watch for playback events. How can i make EventGhost log these? 

 

(server address,serverport, devicetowatch, apikey)

 

This would make it possible to make commands like: 

 

- When "Started playback on (HTPC)" is triggered, set volume, dim lights etc

 

Yes - this is fairly easy to make, plugins for eventghost are written in python 2.6 I believe. If you head over to the forum and ask there you might be luckier, a lot of stuff is going on there now.

 

I could look into it, but I do not have the skills yet to get something like this working. 

Link to comment
Share on other sites

I've been following this thread - I do not think he is making a plugin for Eventghost julianb.

 

Eventghost plugins do not use the format .dll

I think the discussion have been about an Emby plugin all along.

In some extent to catch some events in eventghost, yes.

Edited by Exile82
Link to comment
Share on other sites

julianb

I've been following this thread - I do not think he is making a plugin for Eventghost julianb. 

 

Eventghost plugins do not use the format .dll

 

That's true, but he could make it work with simple http commands to eventghost? I started this thread about an Eventghost plugin so I really hope what's coming from this thread is eventghost related, but who knows :)

 

Yes - this is fairly easy to make, plugins for eventghost are written in python 2.6 I believe. If you head over to the forum and ask there you might be luckier, a lot of stuff is going on there now.

 

I could look into it, but I do not have the skills yet to get something like this working. 

 
That would be great, I don't know what @@chef is aiming for with his plugin, but I really hope it will communicate with EventGhost. Right now I can't get it to work with EventGhost, but it could just be me not understanding how the plugin work or because it not finished yet.

 

I think the discussion have been about an Emby plugin all along.

In some extent to catch some events in eventghost, yes.

 

Yes, I really hope it has the ability to communicate with EventGhost. We just have to wait for the plugin to be released and see what it can do.

Link to comment
Share on other sites

I'm sorry if I might be confused here - but I'll try to write it down for you julianb.

You can reach emby from eventghost with a python script doing API calls (This can for example let you play a file or get information about a file) 

If you want emby to trigger events in eventghost you need to make a plugin for eventghost or a plugin for emby that triggers events in EG when something happens.

So if you want to have an event like this. for example:
 

emby.onplay

or:

emby.starting.episode(blablabla)

This would require an plugin.

------------------------------------------------------------------------------------------------------------------------------------------------

Now if you want to do this:

 

http://localhost:2016/index.html?Stop
http://localhost:2016/index.html?Start 

to trigger play or stop in emby is fairly easy. You would do this with a python script in eventghost like so (THIS IS JUST AN EXAMPLE - I use KODI as frontend and use this to play a set file from my webserver)

 

payload = eg.event.payload
eg.plugins.XBMC2.JSONRPC(u'Player.Open', u'{"item":{"movieid":' + payload + '}}', False, True)

I take no credit for making this - it should be fairly easy to recreate it so it triggers emby instead, but then you need to use the API for emby.

 

But as I said, you should head over and ask on the eventghost forum.

 

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