tf4all Posted June 12, 2015 at 07:02 PM Share Posted June 12, 2015 at 07:02 PM Ich möchte das Solid State Relais in OpenHAB schalten. Kann mir jemand sagen, wie der jeweilige sendCommand-Befehl lauten muss, um den Status abzufragen und das Relais zu schalten ? Danke für Eure Hilfe ! Quote Link to comment Share on other sites More sharing options...
theo Posted June 13, 2015 at 08:56 PM Share Posted June 13, 2015 at 08:56 PM Hi tf4all, hier findest du eine Beispielkonfiguration: https://github.com/theoweiss/openhab-tinkerforge-configuration-examples/tree/master/solidstaterelay Die offizielle Doku wird bald kommen - leider bin ich derzeit etwas im Zeitmangel. Gruß, Theo Quote Link to comment Share on other sites More sharing options...
tf4all Posted June 14, 2015 at 05:54 AM Author Share Posted June 14, 2015 at 05:54 AM Hallo, Danke für den Link. Diese Seite hatte ich auch schon gefunden. Der Quellcode in tf.rules ist aber nicht vollständig oder ich sehe ihn einfach nicht. Ich vermisse die Abfrage nach dem Relais-Status und die Reaktion darauf mit einem sendCommand-Befehl. Die Lösung ist wahrscheinlich simpel. Aber mit einem einfachen ON oder OFF im Befehl komme ich nicht weiter. Gruss, Frank Quote Link to comment Share on other sites More sharing options...
theo Posted June 14, 2015 at 07:46 PM Share Posted June 14, 2015 at 07:46 PM Hi Frank, ich hab es noch mal getestet und eine Beispielregel erstellt, die das Relay sekündlich schaltet. Das funktioniert bei mir soweit. https://github.com/theoweiss/openhab-tinkerforge-configuration-examples/blob/master/solidstaterelay/rules/tf.rules Wichtig ist, dass du mindestens das relay-Item und die Rule anlegst. Gruß, Theo Quote Link to comment Share on other sites More sharing options...
theo Posted June 14, 2015 at 08:15 PM Share Posted June 14, 2015 at 08:15 PM Ich habe das Beispiel um eine Trigger Regel erweitert. Diese setzt den Status eines Contact Items analog zum Status des Solid State Relays (siehe rules, items und sitemap). Quote Link to comment Share on other sites More sharing options...
tf4all Posted June 14, 2015 at 08:53 PM Author Share Posted June 14, 2015 at 08:53 PM Hi, danke für die Unterstützung. Ich habe die Programmzeilen bei mir so eingebaut. Der Status wechselt nun alle paar Sekunden. Dies wird auch durch die Icons entsprechend angezeigt. Nur eines geht nicht. Das Bricklet schaltet nicht. Meine Glühlampe will nicht angehen. Nur am Rande: Wenn ich im Brick Viewer auf ON klicke, dann leuchtet sie in voller Bracht. Die uid habe ich im Programm auch angepasst. Das ist es auch nicht. Gruss, Frank Quote Link to comment Share on other sites More sharing options...
tf4all Posted June 14, 2015 at 09:06 PM Author Share Posted June 14, 2015 at 09:06 PM Nachtrag: im openhab.log steht 2015-06-14 23:03:30.010 [ERROR] [.t.internal.TinkerforgeBinding] - COMMAND no tinkerforge device found for command for item uid: ovx subId: null Quote Link to comment Share on other sites More sharing options...
theo Posted June 14, 2015 at 09:23 PM Share Posted June 14, 2015 at 09:23 PM Sieht so aus als ob dein Stack nicht erkannt wird. Solltest du die openhab.cfg aus dem Github Beispiel eins zu eins kopiert haben, ist es vermutlich eine falsche Authentisierung am brickd. Siehe aktuelle openhab.cfg im Beispiel: https://github.com/theoweiss/openhab-tinkerforge-configuration-examples/blob/master/solidstaterelay/openhab.cfg Quote Link to comment Share on other sites More sharing options...
tf4all Posted June 14, 2015 at 09:50 PM Author Share Posted June 14, 2015 at 09:50 PM Habe ich geprüft. Keine Änderung. Die falsche Authentisierung würde dann aber auch alle Bricklets am RedBrick betreffen. Oder ? Denn andere Bricklets (Temp, Baro) werden erkannt und die Werte in OpenHAB dargestellt. Quote Link to comment Share on other sites More sharing options...
theo Posted June 14, 2015 at 10:08 PM Share Posted June 14, 2015 at 10:08 PM Habe ich geprüft. Keine Änderung. Die falsche Authentisierung würde dann aber auch alle Bricklets am RedBrick betreffen. Oder ? Denn andere Bricklets (Temp, Baro) werden erkannt und die Werte in OpenHAB dargestellt. Ja. Hmm. Welche openHAB Version verwendest du? Quote Link to comment Share on other sites More sharing options...
tf4all Posted June 15, 2015 at 09:56 AM Author Share Posted June 15, 2015 at 09:56 AM Das muss ich später nochmal genauer prüfen. Zumindest kann ich sagen, dass der RedBrick die Image-Version 1.6 (full) verwendet. Quote Link to comment Share on other sites More sharing options...
tf4all Posted June 15, 2015 at 03:12 PM Author Share Posted June 15, 2015 at 03:12 PM Sehe ich im Brick Viewer die OpenHAB-Version die der RedBrick verwendet? Habs nicht gefunden. Quote Link to comment Share on other sites More sharing options...
tf4all Posted June 15, 2015 at 03:27 PM Author Share Posted June 15, 2015 at 03:27 PM Gefunden: openHAB runtime has been started (v1.6.2) Quote Link to comment Share on other sites More sharing options...
theo Posted June 15, 2015 at 03:32 PM Share Posted June 15, 2015 at 03:32 PM Auf dem Image ist ein openHAB 1.6.2, das Solid State Relay ist erst mit 1.7.0 unterstützt. Du musst also die openHAB Version auf dem RED-Brick aktualisieren. Dazu musst du dich auf dem RED einloggen: 1. die apt-sources list anpassen, da wir auf ein anderes Repo-Format und Bintray als Dienstleister umgestiegen sind. Der sources-List-Eintrag sieht jetzt so aus: deb http://dl.bintray.com/openhab/apt-repo stable main 2. Danach apt-get update 3. Normalerweise macht man dann ein apt-get upgrade aber da ich nicht sicher bin, ob das mit dem TF-Image eine gute Idee ist, versuche es besser mit apt-get install openhab-runtime openhab-addon-binding-tinkerforge Quote Link to comment Share on other sites More sharing options...
theo Posted June 15, 2015 at 04:36 PM Share Posted June 15, 2015 at 04:36 PM Du kannst apt-get upgrade machen, siehe hier: http://www.tinkerunity.org/forum/index.php/topic,3174.0.html Quote Link to comment Share on other sites More sharing options...
tf4all Posted June 15, 2015 at 05:24 PM Author Share Posted June 15, 2015 at 05:24 PM :D :D Ich habe es schon mit dem zweiten Befehl gemacht. Den anderen führe ich dann später noch aus. Noch nie habe ich mich so über eine im 5-Sekundentakt blickende Glühlampe gefreut !!! Noch ein Nachtrag: Nach dem Update auf 1.7 hat OpenHAB zunächst nicht mehr funktioniert. Neustart des RedBrick brachte nichts. Ich hatte dann des OpenHAB Service beendet und neu gestartet. Keine Ahnung, ob das generell erforderlich ist. Bei mit hat es geholfen. OpenHAB rennt wieder und die Glühlampe blickt. Besten Dank für Deine Hilfe !!!!!!! Quote Link to comment Share on other sites More sharing options...
theo Posted June 15, 2015 at 05:34 PM Share Posted June 15, 2015 at 05:34 PM Glückwunsch! Ich werde den Upgrade die Tage mal ausprobieren. Gruß, Theo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.