DIM Start and Stop with SWITCH_MULTILEVEL

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
GregN
Posts: 28
Joined: 20 Aug 2015 01:47

DIM Start and Stop with SWITCH_MULTILEVEL

Post by GregN »

Hi,

I have successfully used ZUNO with a remote control to open and close my curtains using the ZUNO_SWITCH_MULTILEVEL channel, but there seems no way to 'dim' the curtains. The setter() function only has 1 parameter which is a level - there seems no way to actually get anything other than a level. Indeed, setter() never gets called when a DIMSTART or DIMSTOP is sent from the remote control.

Is there currently any way the receive these (or other) commands?

On the assumption that it is not currently possible could/will this get added? An easy way I can see to do this (although not perhaps the nicest) is to present special values for level, much as 255 is used for ON to current level.

In general though, it would seem as though the setter() function (and probably getter() too) needs to have more information presented to it or, for compatibility, a third function added for other messages.

Kind regards,

Greg.
User avatar
PoltoS
Posts: 7562
Joined: 26 Jan 2011 19:36

Re: DIM Start and Stop with SWITCH_MULTILEVEL

Post by PoltoS »

Z-Uno should handle itself Dim and run periodically your setter with incremeted values.
GregN
Posts: 28
Joined: 20 Aug 2015 01:47

Re: DIM Start and Stop with SWITCH_MULTILEVEL

Post by GregN »

Hi PoltoS,

Hmm, I have a trace print in my setter and DIM never gets translated into a call to setter. Do I need to set it up somehow?

Besides, how would Z-Uno know how quickly my curtains close? I don't want to press DIM until the curtains are in the correct place only to find that Z-Uno has decided that they should be dimmed somewhere else.

Greg.
User avatar
PoltoS
Posts: 7562
Joined: 26 Jan 2011 19:36

Re: DIM Start and Stop with SWITCH_MULTILEVEL

Post by PoltoS »

We will check that dimming works.

You need to send STOP to stop dimming.
GregN
Posts: 28
Joined: 20 Aug 2015 01:47

Re: DIM Start and Stop with SWITCH_MULTILEVEL

Post by GregN »

Hi PoltoS,

Thanks.

Yes, but I would only see STOP as having been sent by the absence of any further setter calls.

Also, as I ask above, how does Z-Uno know the speed at which my curtains close? In the following scenario (time increasing to the right):

Code: Select all

Me:       press dim                                    release dim
remote:      dimstart                                     dimstop
Z-Uno:          setter(80)  setter(60)  setter(40)  setter(20)
Curtains:          100%    90%    80%    70%    60%    50%    40%    30%    20%
I start to 'dim' the curtains and when they are 50% closed I decide to stop them. But Z-Uno has already sent a value of 20 to setter so the curtains will continue to close to 20%. The precise values or timings obviously don't matter, the point being that Z-Uno's periodical call of setter with incremented values cannot track what is actually happening (and I can't track the precise position of the curtains either). You need some way to know that a DIM START has happened (as against a normal set level) and then that a DIM STOP happened and to stop there and then as against using the Z-Uno generated level value.

Kind regards,

Greg
User avatar
PoltoS
Posts: 7562
Joined: 26 Jan 2011 19:36

Re: DIM Start and Stop with SWITCH_MULTILEVEL

Post by PoltoS »

I don't really get you. Are curtains connected to Z-Uno or this is another device that receives same dimming commands like Z-Uno do (means they are both in the same association group)?

If the former: Z-Uno setter value should be used for curtains. Z-Uno will care itself about changing the value and calling setter periodically (need to check, but as I remember it is every second - may be we need to allow configure it)

BIf the latter: just think of two curtains at 80% and 100%. When you start closing them they will go with same speed but from different levels - here you can do nothing but sync their levels explicitelly.
GregN
Posts: 28
Joined: 20 Aug 2015 01:47

Re: DIM Start and Stop with SWITCH_MULTILEVEL

Post by GregN »

Hi PoltoS,

I'm really sorry about this long post, but I thought that it was best to get the full details in one post rather than going backwards and forwards in multiple posts.

The cutains are controlled via the RS-232 using commands OPEN, CLOSE and STOP (the curtains also automatically stop when they have either fully opened or fully closed). There is no explicit way to know how open or closed that they are, so setting to an explicit 'dim' (i.e. how open or closed they are) has to be done approximately using timing and knowledge of how long they take to open/close.

Without knowing exactly what Z-Uno does with DIM commands it is difficult to comment fully, but the 2 problems that I see are knowing that you are dimming (as against setting a specific dim level) and time granularity. Just for arguments sake, let's assume that, as you say above, new levels are sent every second and that the curtains take 5 seconds to fully open or close.

Knowing that we are dimming: I press the dim button and Z-Uno sends me a level of some value, presumably such that the curtains know which way to move. So, if it is a small incremental value then they will reach that level of 'dim' within the second before the next level comes and so I will stop them. The next incremental level arrives and I will quickly reach that and stop again. Therefore the curtains judder across very slowly, stopping and starting the whole way until I release the dim button. If, on the other hand, it is a large incremental value then it won't stop but we will 'run out' of potential increments before the curtains have fully opened/closed. So I have to know that this is a dim sequence and in that case not to move to the absolute indicated dim value. The only way I can know that this is a dim sequence is by waiting for just over 1 second and seeing if another incremental level command comes in, so I cannot start to move for at least 1 second (although I could make levels of 0 and 99 special cases, so at least it would only be an actual dim or parital open that would have to be delayed). There is also a particular problem of if something takes londer than 99 seconds to 'dim'.

Granularity: lets say that we now know that we are dimming. The only way that we know that we have stopped dimming is when another incremental level doesn't arrive within the next 1 second. In that time my curtains will continue to open or close. If an incremental dim has just been sent when I release the dim button then they will travel an extra 20% until I see that we are no longer dimming and I can stop them.

The granularity issue could obviously be solved by sending the incremental levels more often and this would also help the delay in starting a dim, but you will run out of incremental levels quicker.

With the current setter only interface, solutions for these issues that I can see are:
  1. Your suggestion of having the incremental delay configurable - as long as it has a sufficiently fine granularity and large enough range. It does have the advantage of removing the need for the sketch to keep track of the approximate 'dim' level if the delay can be made sufficiently accurate. It can still run out of incremental levels though if the dim is open ended in terms of time.
  2. Introducing special values such as 252, 253 and 254 for start dim up, start dim down and stop dim. I would think that this is the easiest and most straight forward option.
  3. Send 2 (or more) level commands in a special sequence in very quick succession for start and stop dim (and this would mean that you didn't have to send incremental levels in between so you wouldn't 'run out' of incremental levels after 99 seconds/increment intervals). A suitable start sequence could be current level/current level+1 for dim start up and current level/current level for dim start down, with current level as dim stop.
These would have minimal impact on a sketch that didn't know anything about dim (although presumably they wouldn't be using SWITCH_MULTILEVEL or trying to dim anyway in that case).

All of this is meant to be constructive - I think that the Z-Uno is a great little device and I'm just trying to help to make it even better!

Greg
schmidmi
Posts: 55
Joined: 01 Dec 2016 16:45
Location: Germany (Karlsruhe)

Re: DIM Start and Stop with SWITCH_MULTILEVEL

Post by schmidmi »

This discussion seems to be a little bit confusing...
I think dimming a device is not to be controlled by a z-wave controller outside, but by the Z-UNO only.
The dimming level (0 - 99) is to be handled as an setpoint. From this point of view it is needed only once.
The Z_UNO has to deal with the actual position of the curtains and the requested one.
If there is no physical feedback from the curtains, we have to make a calculation based on time and the required direction (open ( Close).
That should be all. I can not see how the z-wave should be involved anywhere.
I you want to show the actual position to an controller, you can use the 'SendReport' functionality.
GregN
Posts: 28
Joined: 20 Aug 2015 01:47

Re: DIM Start and Stop with SWITCH_MULTILEVEL

Post by GregN »

schmidmi,

Z-Wave defines DIM START UP, DIM START DOWN and DIM STOP commands for multi-level switches which don't have levels associated with them. At issue is how (and, at the moment, if) these are presented to the sketch by Z-Uno.

Greg
User avatar
PoltoS
Posts: 7562
Joined: 26 Jan 2011 19:36

Re: DIM Start and Stop with SWITCH_MULTILEVEL

Post by PoltoS »

Greg, I would agree that the current implementation being simple for a light/LED is not good for shades.

Our idea was to hide those Start/Stop, because for light you don't need it. We forgot about shades.

I see two solutions:
1) use 252-254 levels (will confuse users) and add per-channel configuration for dimming speed
2) add a special channel type (that will also change the Device Class to shades) that will handle Set/Start/Stop as expected and will allow speed setting

We will think of it
Post Reply