I have some mySensors nodes that Im trying to get into Openhab 3. Currently in the process of migrating from mySensors-binding to generic MQTT.
I have a channel reporting a cumulative counter value. Problem is the value-payload cannot be parsed correctly for values < 10 due to a proceeding “space”-sign. So I would need some cast string->uint. Preferably I would like to solve this directly in the “thing”-definition, although a solution should be to define thing as string and make cast in the item.
Tried transformationPattern, but couldnt work out a working solution. Any help appreciated. Thanks!
Per
log:
2022-05-22 12:42:07.641 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Incoming payload ' 1' not supported by type 'NumberValue'
thing:
Type number : cnt_flush "Cnt flush activations" [
stateTopic="mys_gw_1_out/2/4/1/0/24"
]
item:
Number cnt_flush_krypgrund "Counter flush kondens krypgrund [%d]" (gMySensors) {channel="mqtt:topic:ms_rfm_node_2:cnt_flush"}