(kurze Vorstellung)
mein Name ist Christian, bin Software-Entwickler und hab vor kurzem begonnen, mich mit openhab2 auseinanderzusetzen.
Aktuell ist mein Setup recht klein:
Ich betreibe via Homematic zwei Rolladenaktoren, gesteuert über einen RaspberryPi mit homegear/openhab2. Aktuell ist es sehr trivial, dass "statisch" zu entsprechenden Zeiten die Rolladen hoch-, bzw. runtergefahren werden. Da ich sehr viel mit Prozessautomatisierung betreibe und dazu BPMN einsetze (ja, Openhab2 hat eine Rules Engine, aber ich möchte hier eine Alternative), erstelle ich mir aktuell ein WildFly Swarm Projekt, welches mittels Mqtt sich mit Openhab2 austauschen soll.
(zu meinem Problem)
Ich hab mir über PaperUI das Mqtt-Binding installiert und dann die Config laut Anleitung vorgenommen:
Code: Alles auswählen
#
# Define your MQTT broker connections here for use in the MQTT Binding or MQTT
# Persistence bundles. Replace <broker> with an ID you choose.
#
# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
mosquitto.url=tcp://localhost:1883
# Optional. Client id (max 23 chars) to use when connecting to the broker.
# If not provided a default one is generated.
mosquitto.clientId=openhab2pihab
# Optional. User id to authenticate with the broker.
#mosquitto.user=<user>
# Optional. Password to authenticate with the broker.
#mosquitto.pwd=<password>
# Optional. Set the quality of service level for sending messages to this broker.
# Possible values are 0 (Deliver at most once),1 (Deliver at least once) or 2
# (Deliver exactly once). Defaults to 0.
#mosquitto.qos=<qos>
# Optional. True or false. Defines if the broker should retain the messages sent to
# it. Defaults to false.
#mosquitto.retain=true
# Optional. True or false. Defines if messages are published asynchronously or
# synchronously. Defaults to true.
#mosquitto.async=<async>
# Optional. Defines the last will and testament that is sent when this client goes offline
# Format: topic:message:qos:retained <br/>
#mosquitto.lwt=<last will definition>
## My item configuration
Rollershutter Rollladen_UG_links {mqtt=">[mosquitto:rolladen/links:command:*:default]"}
Leider tut sich da gar nichts.
Ich kann zumindest laut log sagen, dass das Mqtt binding sich mit meinem Broker (mosquitto localhost) verbunden hat.
Aktuell fehlen mir die Ideen, was das Problem sein könnte. Vielleicht hat jemand das in Verwendung und kann mir sagen, wie ich Openhab-Mqtt beibringen kann, Änderungen (z.B. des LEVEL Wertes) an ein Topic zu publishen, bzw. von Außen das Kommando mit LEVEL Angabe konsumiert, um entsprechend den Rolladen zu steuern.
Ich hoffe, es kann mir jemand weiterhelfen. Danke schon einmal im Voraus!
Viele Grüße
Christian