Jump to content

Webhook


Recommended Posts

muppet4k
Posted

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

muppet4k
Posted
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 ?

MarkusMail
Posted (edited)

(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
muppet4k
Posted
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 ?

muppet4k
Posted

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…

 

MarkusMail
Posted (edited)


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
MarkusMail
Posted

Oder du verwendest das Emby Scripter-X Plugin
damit bin ich aber nicht so ganz zufrieden gewesen !

muppet4k
Posted (edited)


@MarkusMail

Das guck ich mir mal an 

bzw beide 

 

wie meinst du dass die synology nicht schlafen geht ?

Edited by muppet4k
MarkusMail
Posted (edited)


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
muppet4k
Posted
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 ?

muppet4k
Posted

Achso meinst du 🙂

 

naja meine ist irgendwie eh nie wirklich ruhig 😕

  • 10 months later...
Posted

Und wie bekomme ich da einen payload zb ?

dass Aufnahme xxx gestartet ist zb ?

  • 3 weeks later...
muppet4k
Posted
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 ?

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