Jump to content

Webhook


muppet4k

Recommended Posts

muppet4k

Hi, 

I tried to create a web hook with the following url:

 

http://XXXXXX:8089/set/0_userdata.0.EMBY.Playback_start?value=true

to my iobroker server, which can receive true/false.

 

But emby says the URL is wrong when I try to send a test web hook to this address.

 

what can be the Problem? or how must look the URL?

 

Thank you

Link to comment
Share on other sites

muppet4k
1 hour ago, MarkusMail said:

Maybe this helps!

Webhook in PHP

Webhook in Python

 

http://<IP>/web/xxxxxx/emby.php?value=Emby.Play     -->  this

@MarkusMail

 

hi Markus,

 

so ganz versteh ich es nicht … und wie ich sehe steuerst du auch einen DP in IO an oder ?

ksnn ich also nicht direkt die url Eingeben sondern muss mir erst php Script bauen und dass irgendwo am emby Server ablegen ?

Link to comment
Share on other sites

MarkusMail

(Unfortunately I only speak German!)

Yes!
1 Install apache2 and PHP
2 Install in IOBroker "simple-api"
3 Create the PHP script! "emby.php"
That was it!

 

<?php
// Empfangene Daten aus der Anfrage extrahieren
$value = $_GET['value'];

// Daten an eine andere Adresse weiterleiten
// < Your link to IOBroker simple-api with port > 
$url = fopen("http://192.168.178.57:8087/set/0_userdata.0.emby.Benachrichtigungen?value=".urlencode($value), "r");

// HTTP-Statuscode 200 (OK) zurückgeben, um zu bestätigen, dass der Webhook erfolgreich empfangen wurde
http_response_code(200);
?>

 

Emby webhook address!

http://< Your link to the PHP page >/emby.php?value=Emby.Play

http://< Your link to the PHP page >/emby.php?value=Emby.Stopp

http://< Your link to the PHP page >/emby.php?value=Emby.User.Tom

and so forth !

Edited by MarkusMail
  • Thanks 1
Link to comment
Share on other sites

muppet4k
3 hours ago, MarkusMail said:

Maybe this helps!

Webhook in PHP

Webhook in Python

 

http://<IP>/web/xxxxxx/emby.php?value=Emby.Play     -->  this

@MarkusMail

 

hi Markus,

 

so ganz versteh ich es nicht … und wie ich sehe steuerst du auch einen DP in IO an oder ?

ksnn ich also nicht direkt die url Eingeben sondern muss mir erst php Script bauen und dass irgendwo am emby Server ablegen ?

Link to comment
Share on other sites

muppet4k

Japp hatte in Deutsch auch geantwortet…

 

Puhh Apache und php installieren nur wegen webhook da such ihr mir noch anderen weg 

Kenne nur den klassischen webhook mit url 

 

verstehe nicht warum emby dass so umständlich macht…

 

Link to comment
Share on other sites

MarkusMail


Wer weis das schon? 🤪


Und warum ioBroker nicht direkt unterstützt wird , verstehe ich auch nicht !

Moment ! Es gibt ein ioBroker Adapter für emby!

Das wollte ich aber nicht verwenden!

Da die Synology bei zu vielen Aktionen nicht schlafen geht!

 

PS. Ich habe einen Raspberry PI für die Homepage und PHP-Skripte verwendet.

Emby läuft auf der Synology.

Zitat:
Japp hatte in Deutsch auch geantwortet…
Zitat Ende:
😳 🤣

Edited by MarkusMail
Link to comment
Share on other sites

MarkusMail


Ich denke, das der ioBroker Adapter für emby ständig anfragen an die  Synology (Emby) stellt.
Um die Werte oder was auch immer abzurufen!
Das könnte dazu führen, das die Synology nicht in den Ruhemodus wechselt!

Während  ein webhook  Aufruf nur ausgeführt wird, wenn Emby  arbeitet!

 

Eventuell könnte man den IO Adapter zu festen Zeiten automatisch deaktivieren!
Das müsste auch funktionieren!
Aber ich bleibe lieber bei dem PHP skript! Funktioniert 1A!

Edited by MarkusMail
Link to comment
Share on other sites

muppet4k
On 4/10/2023 at 3:58 PM, MarkusMail said:

Maybe this helps!

Webhook in PHP

Webhook in Python

 

http://<IP>/web/xxxxxx/emby.php?value=Emby.Play     -->  this

@MarkusMail

 

hi Markus,

 

so ganz versteh ich es nicht … und wie ich sehe steuerst du auch einen DP in IO an oder ?

ksnn ich also nicht direkt die url Eingeben sondern muss mir erst php Script bauen und dass irgendwo am emby Server ablegen ?

Link to comment
Share on other sites

  • 10 months later...
muppet4k

Und wie bekomme ich da einen payload zb ?

dass Aufnahme xxx gestartet ist zb ?

Link to comment
Share on other sites

  • 3 weeks later...
muppet4k
On 4/10/2023 at 6:13 PM, MarkusMail said:

(Unfortunately I only speak German!)

Yes!
1 Install apache2 and PHP
2 Install in IOBroker "simple-api"
3 Create the PHP script! "emby.php"
That was it!

 

<?php
// Empfangene Daten aus der Anfrage extrahieren
$value = $_GET['value'];

// Daten an eine andere Adresse weiterleiten
// < Your link to IOBroker simple-api with port > 
$url = fopen("http://192.168.178.57:8087/set/0_userdata.0.emby.Benachrichtigungen?value=".urlencode($value), "r");

// HTTP-Statuscode 200 (OK) zurückgeben, um zu bestätigen, dass der Webhook erfolgreich empfangen wurde
http_response_code(200);
?>

 

Emby webhook address!

http://< Your link to the PHP page >/emby.php?value=Emby.Play

http://< Your link to the PHP page >/emby.php?value=Emby.Stopp

http://< Your link to the PHP page >/emby.php?value=Emby.User.Tom

and so forth !

@MarkusMail

gibt’s da auch ne möglich wenn eine Aufnahme gestartet wird dass er anzeigt was grad aufgenommen wird ?

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