Control of roller shutters

This topic follows the GitHub issue:

@AlexTrovato we can discuss this here in French because I feel like we’re not understanding each other in English over there :smiley:

Actually, the problem is storing information about the roller shutter’s capabilities.

Let’s imagine three hypothetical shutter brands:

  • The first is controlled by a remote with 3 buttons: open the shutters to 100%, open to 50%, and open to 0% (closed position)

  • The second is controlled by a remote with an up button and a down button.

  • The third is controlled by a remote with 5 buttons: 0%, 25%, 50%, 75%, 100%

Question:

How to model this in Gladys?

When I say « this, Â» it’s not the final result, yes the final result could be an integer from 0 to 100 that corresponds to the shutter’s opening percentage, I’m talking about the information that will say « this roller shutter has this functionality Â»

Because in the UI, each shutter will have a different type of button, but there must be somewhere in the DB this information

One possibility I see is to handle it case by case, we create category/type pairs for each type of shutter. I think this is the solution closest to the philosophy of Gladys 4 :slight_smile:

But there may be other ways to do it, and especially to see how this question could apply to other issues.

I hope you see what I mean :grin: Good idea anyway to look at how others do it!

Ok, I understand better.
At first glance, I would say to have a device category for « shutter system Â». But that might be a bit heavy.
Thinking carefully that this will concern several types of devices.
Otherwise, a « param / options Â» system on the device feature.

But it’s better to think it through well.

So, would a roller shutter have a single device_feature? And this device_feature would have the category + type corresponding to its use, and we would store in the state an integer from 0 to 100 corresponding to the shutter level? That could work.

It’s true that it might be a bit heavy, but I prefer this initial approach as long as we don’t have too much experience with roller shutters, rather than starting with the ultra-modular approach without understanding and making a mess :slight_smile:

I prefer to go from ultra-specific to general rather than the opposite.

A question that comes to my mind is how to explain in the UI in the MQTT service what each feature corresponds to? Since we only display the name, the name must be explicit enough to explain « so this feature corresponds to the shutter at 0, 50, 100% Â» ^^ any ideas?

UI UI


a part, add an explanatory box (feature description) when selecting (or hovering) in the dropdown
 I don’t really see it.

If I may interject, there are even remote controls with 3 functions:

  • Up
  • Down
  • Stop to halt the current blind’s ascent or descent (so we don’t know the blind’s opening percentage)

This might complicate your thinking a bit more :slight_smile:

Hello,
Indeed, it’s often like this, with a learning phase.
The problem with this principle is that the ascent/descent times are not necessarily the same.
The descent is faster than the ascent because the mass of the VR pulls it down.
However, it’s a matter of very little.
In Domoticz, there is a Motor Operation Time parameter.

This is what I have at home and it is the most common from a manual switch point of view (switch models).

Moreover, there are models of connected switches (4th gen+) that manage the percentage of opening from a timer.
The idea is to provide the ascent/descent times and then, depending on these times and the direction of the command, partially open/close the shutter.

In the application, there are 2 types of commands (up/stop/down and slider):

Hi,

I developed a small ESP8266 assembly to manage shutters with a 3-position inter or via Gladys. Initially, I initialize the up and down times. I send the position in % with each change in the shutter state. (on my assembly it’s inverted 100% is closed - 0% open)
I think it’s not Gladys’s job to calculate the position of the shutter but the inter to return the position.

Example:
I request via Gladys to open the shutter to 25% but I decide, given the sunshine, to stop it at 50% using the wall inter.
I press the stop button.
By the time Gladys receives the stop information, Gladys’s calculation will be wrong.
There will be a discrepancy between the actual position and the position estimated by Gladys.

For 9 months the subject has not moved, are you still looking for a solution?

At jeedom it’s simple Up/Stop/Down, the percentage does not work well so not integrated by default! indeed the percentage is calculated based on the time the shutter will take to travel from one point to another 
 except that all shutters are different even if used with the same engine.

I may not have understood what this function is stuck on?

Just a matter of time, I think. On my side, over the past 9 months, I have focused on the most requested features (multi-users, multi-dashboard, scenes, zones, presence, Google Home integration, well, all the devs of this year 2021, you know :D). Since this feature only had 2 votes, it was necessarily less of a priority :slight_smile:

After that, I’m always open to discussion if someone wants to take over a reflection/development.

I voted accordingly because I don’t see how to manage my shutters in Node-RED in Gladys.

Shutters there are several types:

  • those with status feedback and therefore percentage control
  • those without feedback so 0 - 100%

I made a mockup with both, knowing that the percentage would only be used for those that support it:

In my opinion, it looks great! Great mockup by the way :slight_smile: The full square « stop Â» button could perhaps be improved a bit?

@syper Would you have the skills to do the development?

Yes, see if square outline 

Is there a guideline for the icons? See a library?

For the skills, I have web development but no React and very little JS.

In short, I am a front-end developer with HTML/CSS/PHP. I saw that it looks a lot like Bootstrap for the front end, but I don’t know if I have the time for it.

I assume there is a back end? I didn’t see where everything is located for Gladys. (It’s a shame we don’t have a doc with the file structure)

Yes, we use feathericon!

I recommend several videos I made on this topic:

The technical presentation of Gladys 4:

A live coding session last week:

This can give you an idea of the project :slight_smile:

After that, the best thing is to launch an instance locally, you have all the front end in the « front Â» folder, and all the back end in the « server Â» folder (It’s Node.js)

Nothing too complicated, and I’m always here to lend a hand if you have trouble!


With the right icons :smiley:

I’ll try as soon as I have some time :wink:

For those without feedback, it would be necessary to configure in Gladys:

  • a maximum time for full descent
  • a maximum time for partial descent (when you see the dashes)
  • a maximum time for full ascent
  • a time at 50% of partial ascent
  • a maximum time for partial ascent (when you see the dashes)
  • a time at 50% of partial descent

In terms of algorithm, this would result in:
Open to 100% = max full ascent time + 2s (to be adjusted) then reset position to 100%
Close to 100% = max full descent time + 2s (to be adjusted) then reset position to 0%
Starting from a full opening or closing, we always have an exact reset position
After that, if you want to open to X%, it’s the time at 50% plus or minus (time at 50% / 50) * the position to reach in % we get an approximate position that should be quite reliable, right?

Hello here,
is there any progress on the subject? Is it being processed by someone?
I see with the z2m service that the demand is increasing, with models with OPEN/STOP/CLOSE (3 actions).

@AlexTrovato As far as I know, no one is working on this topic.

In my opinion, there’s nothing to lose by starting development for just one type of roller shutter (Open/Stop/Close for example, yes), no need to try to do everything, it’s already great to have one type.

I’m upvoting here because I have 3 roller shutters with their Zigbee switches (well recognized under z2m) that are just waiting to land in Gladys!! :slight_smile: