Dear OH-community, i’m going to be crazy! couple of days on this problem:
I succeeded in integrating my Zemismart vertical shutter motor in openhab thanks to the AgentK binding, -I found my secret key etc …,
-I have configured my broker correctly,-configured my MQTT thing like this:
,with a rollershutter ID channel type
- created my articles like this:
Dimmer Direction "Store sam" {channel="mqtt:topic:0f66ae51:direction"}
-and create a basic rule like this:
`rule “rule name”
when
Item Direction received command OFF
then
Direction.sendCommand(0)
end
rule “rule name”
when
Item Direction received command ON
then
Direction.sendCommand(100)
end`
-I noticed while running MQTT fix that the topics of my device were tuya / “name” / dps / 2 / state, this one returns a number value.
My problem is the following, when I activate my roller shutter via the tuya application, I see the change of values of my MQTT fix topic, on my sitemap I also see that the switch opens and closes, however I can’t send a shutter command from openhab to my roller shutter, what am I doing wrong with my rule?
i also tried this one reading the binding documentation
MQTT binding doc
`rule “Toggle Tuya light/switch on/off via MQTT”
when
Item Direction received command
then
val mqttActions = getActions(“mqtt”,“mqtt:systemBroker:embedded-mqtt-broker”)
switch(receivedCommand) {
case ON : mqttActions.publishMQTT("tuya/store_de_la_salle_a_manger/dps/2/state/","40",true)
case OFF : mqttActions.publishMQTT("tuya/store_de_la_salle_a_manger/dps/2/state/","100",true)
}
end`
Sorry for the layout firefox doesn’t help me