Rollertshutter item to Tuya Binding

Hi all, I’ve added the org.smarthomej.binding.tuya in order to connect to a tuya blind motor. This is working fantastically (thank you @J-N-K). My only problem is I can’t bind a rollershutter item to the channels exposed by the thing. This is because the tuya item has separate text and numeric command channels. In addition the text channel expects open and close, but the openhab rollershutter item sends up and down.

I can get around this using rules but would prefer to have it as a single item. The reason I want to still use a rollershutter item is for exposing to google assistant via OH. I’ve read a bunch of posts about possibly using transformations etc. but can’t figure out any solutions. Any ideas would be greatly appreciated.

You understand you can create a ‘virtual’ RollerShutter Item, one that is not linked to any real world device.
This ‘standard’ Item can be used with Google assistant, or in your user-facing GUI
Rules may then process commands arriving at that Item into a command for one of two different Items linked to a real device.
Rules may process status changes of those ‘real’ Items into updates for the virtual Item.
These Items may remain behind the scenes, not exposed to ordinary users.

Hi rossko57, sorry should have been clearer. A proxy RollerShutter item is exactly what I’m using now with rules to command the actual items linked to the blind. This works great, but if I decide to buy more of these I’d prefer not to copy and paste the rules for every single blind motor I buy. It’s not that painful, just a bit ugly. Also asking the question because I have other instances of proxy items where I’d like to achieve the same thing. On first glance, transformations feels like the right place but I don’t see anywhere to transform outgoing commands on the fly.

There are ways to use rules to act on members of Groups i.e. one rule to handle every rollerblind.

That’s right.
It would be of little use anyway here, where you need to steer commands to channel X or channel Y - transformations and profiles are simple in-out pipes…
Rules are purpose designed for decision making and still free to use.

Thanks again. I have set up rules against a group so I could issue one command and close/open all blinds. This is great for sunrise, sunset events etc. Unfortunately that would still require individual rules if I want to raise/lower individual blinds which will definitely come up. Appreciate your input :slight_smile:

You can use triggeringItemName to identify the proxy item that triggered the rule, then pass that to a string and use it to determine which of your actual rollershutter items receives the command.

If you use a naming convention for your items, you could append to the string and then use that as the item name for the subsequent command.

  • Proxy item: rollershutter_NAME
  • String item: rollershutter_NAME_string
  • Number item: rollershutter_NAME_number

I haven’t done this myself, but I recall seeing similar examples in the community.