ich habe schon Google bemüht aber werde nicht wirklich fündig.
Ich habe in meinen Rules eine ganze Menge
Code: Alles auswählen
sendBroadcastNotification("Aktion")
Ist das möglich?
beste Grüße
Bernhard
Code: Alles auswählen
sendBroadcastNotification("Aktion")
Code: Alles auswählen
String M_Persist_Notify
Code: Alles auswählen
...
sendBroadcastNotification("Erinnerung - Kinderzimmerfenster seit 15 Minuten offen")
M_Persist_Notify.postUpdate("Erinnerung - Kinderzimmerfenster seit 15 Minuten offen")
...
Code: Alles auswählen
M_Persist_Notify : strategy = everyUpdate
Code: Alles auswählen
sqltype.STRING = VARCHAR(4096)
Code: Alles auswählen
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=”Content-type” CONTENT=”text/html; charset=utf-8″>
</head>
<body>
<iframe src="http://192.168.2.5/notify.php" width="100%"></iframe>
</body>
Code: Alles auswählen
<?php
$servername = "localhost";
$username = "openhab";
$password = "xxx!";
$dbname = "OpenHAB";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM Item15";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo "Time: " . $row["Time"]. " - Message: " . $row["Value"];
}
} else {
echo "0 results";
}
$conn->close();
?>
Code: Alles auswählen
Webview url="/static/notify.html" height=50 icon=none