Webhook final fixes
This commit is contained in:
parent
f6717560c0
commit
10dafd2bdb
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$hawebhook = "http://homeassistant:8123/api/webhook/plweb"; // Webhook-URL von Home Assistant
|
$hawebhook = "http://homie:8123/api/webhook/plweb"; // Webhook-URL von Home Assistant
|
||||||
$dbconnstring = "host=localhost dbname=plweb user=plweb password=plweb";
|
$dbconnstring = "host=localhost dbname=plweb user=plweb password=plweb";
|
||||||
$test_url = "https://example.com/plweb/test.php?";
|
$test_url = "https://sinclair.narnia.lan/plweb/test.php?id=";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -70,7 +70,7 @@ function test_finished() {
|
|||||||
if ($rc) {
|
if ($rc) {
|
||||||
$id = pg_fetch_result($rc, 0, 0);
|
$id = pg_fetch_result($rc, 0, 0);
|
||||||
echo return_success();
|
echo return_success();
|
||||||
send_notification("Test fertig. ID: " . $id, $test_url + $id);
|
send_notification("Test fertig. Ergebnis: " . $data['test']['result']['detectionResult'], $test_url . $id);
|
||||||
} else {
|
} else {
|
||||||
echo return_error(500, 'insert Datenbankfehler: ' . pg_last_error());
|
echo return_error(500, 'insert Datenbankfehler: ' . pg_last_error());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user