Hallo!
Ich habe das Unifi Binding entdeckt, welches anhand des Unifi Controller WiFi Geräte im WLAN entdeckt. Anhand des Beispiels (unten) kann ich schon prima auf der Basic UI sagen, ob das Gerät da ist, oder nicht. Klappt also alles.
Jetzt würde ich das Ganze gern als Anwesenheitskontrolle an unseren externen Server versenden. Das würde ich am liebsten mit HTTP-Bindings machen.
Also wenn Matthew's iPhone = online, rufe http://meinserver.de/pfad/datei.php?param=parameter auf.
Das Beispiel:
hatte ich bereits ohne Erfolg zweckentfremdet:
Hier habe ich 2 Probleme: "Contact" will an dieser Stelle "OPEN/CLOSED"
und/oder das HTTP-Binding will mit "Contact" generell nichts anfangen:
Dem wollte ich dann mit einer Rule entgegen wirken. Dann läuft zwar alles weiter, aber die URL wird nicht aufgerufen.
Habe ich da irgend einen Denkfehler drin, oder geht es generell nicht?
Ich habe das Unifi Binding entdeckt, welches anhand des Unifi Controller WiFi Geräte im WLAN entdeckt. Anhand des Beispiels (unten) kann ich schon prima auf der Basic UI sagen, ob das Gerät da ist, oder nicht. Klappt also alles.
Jetzt würde ich das Ganze gern als Anwesenheitskontrolle an unseren externen Server versenden. Das würde ich am liebsten mit HTTP-Bindings machen.
Also wenn Matthew's iPhone = online, rufe http://meinserver.de/pfad/datei.php?param=parameter auf.
Das Beispiel:
Code:
Contact MatthewsPhone "Matthew's iPhone [MAP(unifi.map):%s]" { channel="unifi:client:home:matthewsPhone:online" }
Code:
Contact MatthewsPhone "Matthew's iPhone [MAP(unifi.map):%s]" { channel="unifi:client:home:matthewsPhone:online", http=">[ON:POST:http://meinserver.de/pfad/datei.php?param=open] >[OFF:POST:http://meinserver.de/pfad/datei.php?param=closed]" }
Binding configuration of type 'http' of item 'MatthewsPhone' could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigPars eException: couldn't create Command from 'OPEN'
org.eclipse.smarthome.model.item.BindingConfigPars eException: couldn't create Command from 'OPEN'
Binding configuration of type 'http' of item 'MatthewsPhone' could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigPars eException: couldn't create Command from 'ON'
org.eclipse.smarthome.model.item.BindingConfigPars eException: couldn't create Command from 'ON'
Dem wollte ich dann mit einer Rule entgegen wirken. Dann läuft zwar alles weiter, aber die URL wird nicht aufgerufen.
Code:
rule "MatthewsPhonehttp" when Item MatthewsPhone received command then sendHttpGetRequest("http://meinserver.de/pfad/datei.php?param=" + receivedCommand.toString) end
Kommentar