- Platform information:
- Hardware: _ Raspberry Pi 3 B+, 4x 1,4 GHz, 1 GB RAM_
- openHAB version: 3.1
Hello all,
I am still at the very beginning regarding my programming as well as Openhab knowledge. I have searched the whole forum. However, I have not found a solution that I can get to work
Here is what I have in mind:
My goal is that I can control my blinds with a slider. That is, if the slider is on 50%, the blinds also drive in real on 50%. (later I would like to control the blinds via Apple HomeKit and the Openhab App).
Also, the value should be stored where the blinds currently stand. This is important if the blinds are at 50% and then, for example, should be driven to 70%. That is, it should be stored that the blinds are already X sec down / up.
I have a relay module which is controlled via MQTT (the relays themselves via CAN bus). I would like to control the blinds with this relay module. (The relays are interlocked and therefore electrically safe).
My module has no timer etc. the module understands only relay on/off.
The roller blinds need 25 sec (travel) to be completely closed.
Currently I can only control the relays. but must deactivate them Manuel via Stop commandâŚ
I hope it is understandable described and one can understand my goal.
Is such a thing in principle possible to illustrate? If so, I would be very happy about your help
Many thanks in advance.
Kind regards
Marvin
Item
Rollershutter Rollo_Kueche "Rollo KĂźche" ["Rollershutter"]
Switch Rollo_Kueche_auf "Rollo 1 auf" {channel="mqtt:topic:mqtt:E6V_41:Ausgang2"}
Switch Rollo_Kueche_zu "Rollo 1 zu" {channel="mqtt:topic:mqtt:E6V_41:Ausgang1"}
Thing
Bridge mqtt:broker:mqtt
{
Thing topic E6V_41 "E6V ID41" {
Channels:
Type dimmer : Ausgang1 [stateTopic="Relais/41/state/201", commandTopic="Relais/41/command/201", min=0, max=65535, step=1, on="65535", off="0"]
Type dimmer : Ausgang2 [stateTopic="Relais/41/state/202", commandTopic="Relais/41/command/202", min=0, max=65535, step=1, on="65535", off="0"]
}
Rule
var Timer timer = null
rule "Rollo KĂźche Steuerung"
when
Item Rollo_Kueche received command
then
if (receivedCommand == UP){
sendCommand(Rollo_Kueche_zu, OFF)
sendCommand(Rollo_Kueche_auf, ON)
}
else if (receivedCommand == DOWN){
sendCommand(Rollo_Kueche_auf, OFF)
sendCommand(Rollo_Kueche_zu, ON)
}
else if (receivedCommand == STOP){
sendCommand(Rollo_Kueche_auf, OFF)
sendCommand(Rollo_Kueche_zu, OFF)
}
end