i wrote a meross-bridge for my garage door. From openHAB it works perfect, but in Apple Home App I get a message : “Garage Blocked”; “Garage opening” but the garage never switch to open.
I think i need to change the state value from OFF to CLOSED and the ON to OPEN but i have no idea how i can do that. May be i need a second channel for the State and a switch for OPEN and CLOSE?
I tried a lot but i do not have a solution… sorry for pasting the file into the topic but it was not allowed to add attachments.
i configured it using text files but it should work in the same way via UI.
basically you need at least 1 additional item, which can be virtual, i.e. without a link to a channel/things.
something like this.
String garageCurrentState "Garage Current State [%s]" (gGarage) {homekit="CurrentDoorState"}
and the use rules to update you real item, something like this
rule "garage door state update"
when
Item garage_opener_device_openState received update
then
if (garage_opener_device_openState.state == "OPEN" ) {
garageCurrentState.sendCommand("OPEN")
} else {
garageCurrentState.sendCommand("CLOSED")
}
end
in my case i had to make 3 virtual items, for currentState, targetState and obstruction. the last one has no mapping and no rules
you can have more than one tag assign but both characteristics should expect the same values. in case of garage door: currentState support values “OPEN, OPENING, CLOSED, CLOSING, STOPPED”, targetState only " ON/“OPEN” = open door, OFF/“CLOSED” = closed door".
you can find more information on the add on documentation page HomeKit Add-on - System Integrations | openHAB
but for sure, it can be improved, e.g. garage door examples is missing there
thanks… now I got it. Now I understand what is meant with Example Block.
I solved my issue without a rule. I extend my MQTT python garageDoor program (based on meross-bridge from Daniel Morlock) to provide following MQTT topics: current_door_state: messages [OPEN, OPENING, CLOSED, CLOSING] target_door_state: messages [OPEN, CLOSED]
That is the thing in $OPENHAB_CONF/things/garageOpener.things :
Bridge mqtt:broker:broker "MQTT Broker" [ host="localhost", port=1883, secure=false, clientID="meross-bridge-client" ] {
Thing topic garage_opener_device_garage_am_haus "Meross Garage Opener: Garage am Haus" {
Channels:
Type string : name "name" [stateTopic="meross/1911087511756090804648e1e91117ac/name"]
Type string : currentDoorState "currentDoorState" [stateTopic="meross/1911087511756090804648e1e91117ac/current_door_state"]
Type switch : targetDoorState "targetDoorState" [stateTopic="meross/1911087511756090804648e1e91117ac/target_door_state", on="OPEN", off="CLOSED", commandTopic="meross/1911087511756090804648e1e91117ac/set/target_door_state"]
}
}
That are the items in $OPENHAB_CONF/items/garageOpener.items :
Group garage_opener_device_garage_am_haus "Garage am Haus" <garagedoor> {homekit="GarageDoorOpener"}
String garage_opener_device_garage_am_haus_name "Garage am Haus:Name" <none> (garage_opener_device_garage_am_haus) {homekit="Name", channel="mqtt:topic:broker:garage_opener_device_garage_am_haus:name"}
String garage_opener_device_garage_am_haus_currentDoorState "Garage am Haus:CurrentDoorState" <none> (garage_opener_device_garage_am_haus) {homekit="CurrentDoorState", channel="mqtt:topic:broker:garage_opener_device_garage_am_haus:currentDoorState"}
Switch garage_opener_device_garage_am_haus_targetDoorState "Garage am Haus:TargetDoorState" <none> (garage_opener_device_garage_am_haus) {homekit="TargetDoorState", channel="mqtt:topic:broker:garage_opener_device_garage_am_haus:targetDoorState"}
Switch garage_opener_device_garage_am_haus_obstruction "Garage am Haus:ObstructionState" <none> (garage_opener_device_garage_am_haus) {homekit="ObstructionStatus"}
Thank you for the posts that lead me to the solution!!!
Hi Florian,
I am trying to integrate my Meross Garage Opener in the same way you did.
But I am still struggling with the Python script to get the right MQTT topics to see the current status of the garage door.
You can share your python script?