[mqtt] Added rollershutter formatBeforePublish will be ignored #20288
As already posted at the old issue:
https://github.com/openhab/openhab-addons/issues/20288
The old one was closed by @markus7017 by fault and i am not able to reopen
we are not talking about the Shelly Binding, There is a Shely Binding but Shelly also supports MQTT and @markus7017 wasn't aware of
Mqtt itself is working but the added "Format Befone Publish" does not effect the message.
New created MQTT Thing to control my Rollershutter (Shelly). Status Informations are fine but commands needs to be modified using "formatBeforePublish"
Openhab 5.03 and also updated to 5.1.3 -> same issue
<!-- Provide a general summary of the issue in the *Title* above -->
<!-- If the issue is related to a binding, please include its short name in -->
<!-- square brackets in the title - Example: "[astro] My issue..." -->
<!-- Important: Please contact the openHAB community forum for questions or -->
<!-- for configuration and usage guidance: https://community.openhab.org -->
<!-- Feel free to delete any comment lines in the template (starting with "<!--") -->
## Expected Behavior
Using the Up and Down Button of the Items should send Numbers from 0-100 (%)
Shelly needs to recieve the additional Info "pos," for position-value.
Controlling the rollershutter the message should be:
commandTopic: Shelly/kueche/rollo/command/cover:0 pos,90
Channel:
commandTopic: Shelly/kueche/rollo/command/cover:0
Message: (90% Rollershutter)
pos,90
By sending the MQTT Message using an external Tool this works fine. So the MQTT Broker and the Shelly Item itself is fine.
External Tool:
Image
Correct Message:
Image
## Current Behavior
Openhab ignores the formatBeforePublsh for the rollershutter.
The Message sent to the MQTT Broker shows the % Value only.
By using the up/down button of the item it sends 0 or 100 only. (pos, missing)
Image
When searching forums, there are others who have the same problem and have found that this sometimes works and sometimes does not with different channel types. Looks linke Rollershutter is one of the non working types.
## Possible Solution
I think there is a bug which causes this but i dont know if there is an filter or other setting which blocks formatbeforepublish for rollershutter.
## Steps to Reproduce (for Bugs)
Thing:
version: 1 things: mqtt:topic:MQTTBroker:Kueche_Rollo1: bridge: mqtt:broker:MQTTBroker label: Kueche_Rollo_1 channels: Rollo_Kueche: type: rollershutter label: Rollo_Kueche config: stateTopic: Shelly/kueche/rollo/status/cover:0 commandTopic: Shelly/kueche/rollo/command/cover:0 transformationPattern: - JSONPATH:$.current_pos formatBeforePublish: "pos,%s" postCommand: true stop: Stop transformExtentsToString: true
Item:
version: 1
items:
Kueche_Rollo_1_Rollo_Kueche:
type: Rollershutter
label: Kueche_Rollo_1 Rollo_Kueche
tags:
- Control
- OpenLevel
## Context
As a work around i am starting to switch to the Shelly Addon which works fine. But i prefer MQTT because most of my smarthome devices using MQTT.
## Your Environment
Openhab V 5.1.3 (Rasperberry PI 4) using Openhabian-Image (Updated via Openhab console)
MQTT Broker Mosquitto (Openhab->Optional Components)
New Hardware Item Shelly 2PM
2 条评论