cyrilcc / org.openhab.binding.rflink

RFLink binding for OpenHAB 2.0
23 stars 35 forks source link

RTS Shutter position tracking #48

Open cartemere opened 5 years ago

cartemere commented 5 years ago

This is some BIG feature : being able to have a status on the RTS Shutter objects. This means :

These features are pretty difficult to develop as the physical RTS Shutter is passive : it does NOT send any message, it only listen to messages (from physical remotes as well as from a virtual remote in the RfLink EPROM) and react to these messages. So we must "guess" the shutter position by replicating precisely the way the shutter works.

cartemere commented 5 years ago

Well, 1st step is pushed on my fork. The RfLinkRTS device is now able to track the shutter position from the internal RfLink RTS remote (external physical remotes are not supported for now... it will come later on).

HOW DOES IT WORK There is a new input in the RTS remote configuration :

Capture d’écran 2019-03-10 à 22 46 20

in the config file, this is the following parameter : shutterDuration

You MUST set the shutter timing to enable the tracking. By "timing", I mean the time (in seconds) required by the roller shutter to go from one bound to the other (full CLOSED to full OPEN). By doing so, the RfLink plugin is able to "count" the time between the events, and deduce the position.

UNITS AND CONVENTION The Shutter duration is an Integer expressed in seconds The Position is expressed in percent of Opening :

HOW TO USE IT Once setup, you can interact with the Shutter channel on the RTS remote (the Swith widget is limited for these complex instructions)

Capture d’écran 2019-03-10 à 22 47 11

So, two ways to input an order. First using the UP/DOWN/STOP commands :

Capture d’écran 2019-03-10 à 22 47 11 copie

The Roller Shutter starts to move UP. Meanwhile, the position on the widget is updated (almost) in real time. In fact : the position is updated 1x/second on UP/DOWN moves, until you give another order, or the shutter is full open at 100%

Capture d’écran 2019-03-10 à 22 47 29

On the STOP action, the RollerShutter will trop moving, and the position is updated a last time to reflect the actual position.

Capture d’écran 2019-03-10 à 22 47 43

Second using the Percent input on the widget By clicking on the Position, you can enter a target position.

Capture d’écran 2019-03-10 à 22 48 03

On target position validation, the store will move in the right direction and stop on the target position. You can order a STOP / UP / DOWN or even another target position whenever you want : the plugin will automatically update its position and process the new order.

NEXT STEPS

Do not hesitate to give me a feedback 👍

cartemere commented 5 years ago

Hello !

PREVIOUS LIMITATIONS Here comes the second step of the "RTS tracking" solution. In the 1st implementation (posted on march 10th), the RfLink plugin is now able to "guess" the shutter position from the explicit commands sent from the RfLink Bridge (using the built in RfLink RTS system). But it does NOT work if you also gives order to your shutter using a physical remote controller.

NEW BEHAVIOR We can now track orders from other remotes (physical) and sync them on the position tracking system : a rollershutter can be managed from multiple input sources

HOW IT WORKS I have added the concept of "echo". This means : when an message is listened through the bridge on a specific Thing, we can apply transformations on the message to generate a new one and simulate it has been received. This allows a kind of "link" between things :

PLUGIN VERSION REQUIRED I still have some rework to do, but I will push the developments by the end of the weekend on my fork. The RfLink plugin will be automatically generated.

CONFIGURATION As before, everything can be configured from the PaperUI interface. You don't need to edit any configuration file "By Hand".

Here is a view of my setup within the PaperUI "Thing" configuration panel :

Capture d’écran 2019-07-05 à 19 00 19

I have 3 Things :

The RTS virtual remote configuration does not change :

The Somfy physical remote configuration is specific

And we are done with the configuration 👍

USAGE By pressing one of the physical remote Key, the remote will emit an order. this order is grabbed by the rollershutter, and moves in the expected direction. ... but the same order is now also grabbed by the RfLink Bridge, and delegate the handling to the related Thing (physical remote). This Thing processes the echo pattern and generate a new "echo" order The RfLink Bridge delegates the handling of this new echo message to the related thing (virtual RTS remote with RTS position tracking support) The Thing process the events and simulate the rollershutter movement on the tracking system.

TIPS A> Physical Things channels are useless You can disable all channels on the physical Thing, as they are useless :

B> You can mix orders from physical & RfLink RTS remotes : it works seamlessly

C> You can have multiple physical remotes for a RTS position tracker : in case you have a remote attached to your wall and a hand remote, you can configure each of them as a Thing in OpenHab, then set the echoPattern so they generate a new echo message that matches the RTS position tracker signature.

Larsen-Locke commented 3 years ago

Great approach, but unfortunately last comment is long ago, so i guess this is not continued anymore? You're not moving this to the oh3 branch, do you?