Set Tuya blinds to percent position

Hi

Can someone help me to set up my tuya blinds to a exact percent position in mainUI

I’m running openhab 3,2.
I’m using tuya-mqtt with mosquitto
I can open and close my tuya blinds from 0 to 100%

In Generic MQTT Thing
(rollershutter)

MQTT topic
State
tuya/blinds/state
Command
tuya/blinds/dps/102/command
Up Value
FZ
Down value
ZZ
Stop Value
STOP

This set up works to open and close the blinds from 0 to 100%

From MQTT Explorer I get following info:

dps 101
state = 0 (or 100 depends if the blinds are up/down)

dps 102
state = STOP (or FZ/ZZ if the blinds are moving up/down)
command = FZ

dps 103
state = true

In /etc/openhab/scripts/tuya-mqtt/device.conf
{
name: ‘blinds’,
id: ‘xxxxxxxxxxxxxx’,
key: ‘xxxxxxxxxx’,
version: ‘3.3’,
ip: ‘xx.xx.xx.xx’
}

I can’t figure out how to set up my Generic MQTT Thing and semantic model, create point from thing, to get my blinds to stop on 50% open.

Thank you!

Add a dimmer channel to the same topic.

Thank you for your replay.

I have tried that as well, with a number of options but I can’t find the correct setup.

I have tried with both topic DPS 101 and DPS 102

I have tried add channel from Generic MQTT Thing with channel type rollershutter, percentage value, number value

I have tried to add point from semantic model (with above different channel types) and tried to change type to, dimmer, rollershutter etc.

MQTT Explorer
When I add the setup as dimmer, the command in DPS 102 change to the right number, but the blinds will not start. Some setups, the blinds will start but they will go to its end, not stop and the command number.

In smartlife app/tuya app, I had to create a scene to get the blinds to stop in a exact place. When I use that scene

MQTT Explorer change DPS 102 to FZ/ZZ (up/down) and DPS 101 = 0.
When the blinds are in the middle
DPS 102
State = STOP
DPS 101
State= 50

I have tried to use the STOP button in rollershutter, when the blinds are moving, but the blinds will not stop.
MQTT Explorer
DPS 102
state = FZ
command = STOP
The state will turn to STOP for a 1/2 of a second, then turn back to FZ and the blinds are still moving.

I got a solution that works for me.

I add channel with value number
tuya/blinds/state
tuya/blinds/dps/101/command
(which show the state where the blinds are)

create thing with type number (not dimmer)

add a dummy switch

made a rule when dummy switch turn on, send command 70 to my item (tuya/blinds/dps/101/command) and the blind stops at 70.

I saw in MQTT explorer that when I used dimmer function, the command = 0.70 and not natural number 70. I could not figure it out how to get from 0.xxx to natural number with dimmer function.