Note: Some functionality described in this article is only available ist you are using the develop branch of SmartHomeNG. It will be generally available with the release v1.6.

 

The UZSU plugin is useful to set specific values for your items at specific times. Due to the possibility to also include sunrise and sunset calculations you can for example create a quite simple control of your blinds.

The plugin configuration is very straight forward as there are no specific parameters to set. Nevertheless you have to create an item where your automatic schedule will be saved in the cache. The easiest way to do this is to create a child object with relative item referencing like seen below. That you can easily copy that item to all your items that should use the UZSU. This item also has to have an uzsu_item attribute that defines which item should be changed.


# items/my.yaml
someroom:

    blind1:
        type: int

        uzsu:
            type: dict
            uzsu_item: .. # This only works >= 1.5.1develop. Use the full item path otherwise
            cache: 'True'

You can the set your times and values using a logic (see official README) but it is much more convenient to use the UZSU widget in smartVISU2.9.

Just add an icon to your Visu. By clicking the icon a popup will be opened that lets you configure your universal time scheduling.


{{ device.uzsuicon('uzsu_example', 'someroom.blind1.uzsu', 'Markise', '', '', 'num') }}

 

uszu_blinds

Example VISU screenshot to set automatic blind scheduling

Lets‘ have a look at what happens with the (slightly photoshopped) configuration popup above:

During the week:

  • Blinds will open (value 0) 30 minutes after sunrise  but never before 7.00 am and never later than 8.00am.
  • Blinds will close (value 100) at sunset, but never before 8.00pm and later than 10.00pm.

Weekends:

  • Blinds will open (value 0) at 8.00am in the morning.
  • Blinds might get almost closed (value 80) at 9pm as soon as the „Akt“ (active) button next to the row is enabled.
  • Blinds will close (value 100) at 11pm in the evening.

One caveat of the UZSU, especially compared to the autoblind plugin is a value might not be set if smarthomeNG is down in that time frame. If for example you are rebooting on a weekend at 7.59am the blinds stay down as the UZSU entry for 8.00am most likely doesn’t get triggered. That’s where the „Back in time“ kicks in (only available in plugin version 1.5.1 and higher). Here you can define a time frame in minutes the plugin should go back in time at initialisation to find a trigger. In the given example a value of 10 minutes would be enough to find the trigger „0“ that would have been set at 8am. For such a simple setup you could increase the „back in time“ to several hours (e.g. 240 minutes) but beware that in a more complex situation with evals, triggers, etc. the feature might result in weird situations.

If you want to go further and include suntracking, weather information, etc., it is recommended to use the autoblind/stateengine plugin. But you can still combine both plugins.

One example is to set your light during the day by a given lightcurve (see interpolation feature in a separate blog entry coming soon) but change the light to a constant low value during the night as soon as everyone is in bed.

Another example would be to exchange the min_time and max_time from the autoblind plugin state with a boolean item (e.g. called activate_state_x) and use the UZSU to set that item active or not. This is just a more convenient and visual way of setting minimum and maximum time for your states.

Stay tuned for a much more elaborated example to automate your lighting with the UZSU.


2 Kommentare

onkelandy · 19. September 2018 um 18:47

Das „back in time“ Feature, das versäumte Schaltungen beim Start nachholt und die relative Item-Angabe im yaml File. Alles andere geht auch mit der alten Version.

sisamiwe · 19. September 2018 um 16:39

Hallo,
welche Funktionen, die du hier nutzt, sind in develop bzw. 1.6. verfügbar?
Ich frage deshalb, weil ich meine Rolladen bereits seit längerem so steuere.
Michael

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.