Git Product home page Git Product logo

smarthome.plugin.autoblind's Introduction

#Finite state machine plugin for smarthomeNG#

##This project has been moved. It is now contained in the plugin repository of smarthomeNG. Further development will take place there.

The manual for this plugin is available in english at the Wiki on GitHub: https://github.com/i-am-offline/smarthome.plugin.autoblind/wiki/Home-English

##Dieses Projekt ist umgezogen. Es ist nun im Plugin Repository von smarthomeNG enthalten. Weitere Entwicklungen werden dort stattfinden

Das Handbuch für dieses Plugin steht auf Deutsch im GitHub Wiki zur Verfügung: https://github.com/i-am-offline/smarthome.plugin.autoblind/wiki

smarthome.plugin.autoblind's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

hhhc tco99

smarthome.plugin.autoblind's Issues

Falsche Suspendzeit!?

Das Problem hat sich erledigt. Das Item hatte unter rules kein suspend_duration definiert, weshalb die Dauer dort und das age_max nicht übereingestimmt hatten.

Enable ordering of actions

Actions are not necessarily executed in the order of their definition. It should be possible to define the order in which the actions should be executed. For this a new attribute as_order_<actionname> will be introduced which can be set to a numeric value. The value defines the order to execute the actions.

repeat_actions specific for single actions?

Is it possible to implement the repeat_actions not only for the whole rules section but for specific actions? I sometimes would like to force the retrigger of the state evaluation but not to re-trigger the actions in that specific state.

So something like a as_repeat_XYZ = true or false would be pretty awsome. So if set manually to true it ignores the global setting, whereas when set to false the action doesn't get evaluated when re-entering the state.

Zustandswechsel per (Auto-)Timer

Hallo,

ich habe folgendes Problem:

  • Es soll ein Zustandswechsel erfolgen, wenn eine gewisse Zeit verstrichen ist.
  • Die Zeit soll über ein Item änderbar sein
  • Die Zeit kann nur wenige Sekunden betragen.

Der Lösungsansatz die Cycle Time zu Reduzieren, erhöht die Last da jedes Mal die komplette Zustandsermittlung läuft.

Die Lösung einen zusätzliches autotimer-item per eval_trigger mit aufzunehmen und den timer beim Zustandswechsel zu aktivieren, reduziert aufgrund einer Ereignis basierenden Zustandsermittlung die Last, aber die Zeit ist nicht frei über ein Item einstellbar.

Ein Workaround wäre eine separate Logik - ist aber nicht gerade im Sinn einer durchgängigen und verständlichen Software.

Vielleicht ist es sinnvoll, einen einstellbaren, zeitgesteuerten Zustandswechsel in das autoblind Plugin mit aufzunehmen? Oder würde es mehr Sinn machen, sh.py bezüglich der autotimer = x = y Funktion zu flexibilisieren?

Problems with suspend timer

Ich hab jetzt noch 2 weitere Suspend Phänomene entdeckt:
Zum einen wird die "current suspend age" teils nicht korrekt berechnet. Auch wenn ich smarthome gerade neu gestartet habe und frisch in den Suspend Modus gewechselt habe, kann es passieren, dass die Suspend Age zB auf 120 Sekunden liegt.

Auch schräg: Schalte ich ein Item manuell aus, zeigt Autoblind die suspend End Time korrekt an. Schalte ich ein, wird die End Time auch korrigiert. Ab dem 3. Klick passiert allerdings nichts mehr. Konnte ich jetzt bei mehreren Items reproduzieren. Hier ein Auszug aus dem Log:

2016-11-29 14:16:40.181257 Staying at steckdosen.eg.terrasse.automatik.rules.suspend ('Ausgesetzt')
2016-11-29 14:16:40.181673       Executing method 'insert_suspend_time(..suspend, %X)'
2016-11-29 14:16:40.181948               Suspend time is 300
2016-11-29 14:16:40.182522               Suspend item is steckdosen.eg.terrasse.automatik.suspend
2016-11-29 14:16:40.183468               Current suspend age: 47.574803000000003
2016-11-29 14:16:40.184034               Remaining suspend time: 252.425197
2016-11-29 14:16:40.184935               Suspend finished at 2016-11-29 14:20:52.609606+01:00
2016-11-29 14:16:40.185700       Action 'suspend_end': Set 'steckdosen.eg.terrasse.automatik.autostate_suspend_end' to '02:20:52 PM'
2016-11-29 14:16:40.187758       Action 'suspend': Set 'steckdosen.eg.terrasse.automatik.suspend' to 'True'
2016-11-29 14:17:21.982087 Update state of item steckdosen.eg.terrasse.automatik.rules ====================
2016-11-29 14:17:21.982371 Update triggered by Eval (item=steckdosen.eg.terrasse.automatik.rules source=steckdosen.eg.terrasse.automatik.manuell dest=None)
2016-11-29 14:17:21.983117 Eval initially triggered by Visu (item=steckdosen.eg.terrasse.SA source=10.0.0.27:60221)
2016-11-29 14:17:21.983745 Executing method 'get_relative_itemvalue(..settings.suspendduration)'
2016-11-29 14:17:21.984372 Last state: steckdosen.eg.terrasse.automatik.rules.suspend ('Ausgesetzt')
2016-11-29 14:17:21.984661 Check if state 'steckdosen.eg.terrasse.automatik.rules.suspend' ('Ausgesetzt') can be left:
2016-11-29 14:17:21.984848       No condition sets defined -> matching
2016-11-29 14:17:21.985024 State can be left
...
2016-11-29 14:17:21.991237 State can be entered
2016-11-29 14:17:21.991437 Staying at steckdosen.eg.terrasse.automatik.rules.suspend ('Ausgesetzt')
2016-11-29 14:17:21.991787       Executing method 'insert_suspend_time(..suspend, %X)'
2016-11-29 14:17:21.991998               Suspend time is 300
2016-11-29 14:17:21.992595               Suspend item is steckdosen.eg.terrasse.automatik.suspend
2016-11-29 14:17:21.993268               Current suspend age: 89.384628000000006
2016-11-29 14:17:21.993556               Remaining suspend time: 210.61537199999998
2016-11-29 14:17:21.994183               Suspend finished at 2016-11-29 14:20:52.609113+01:00
2016-11-29 14:17:21.994660       Action 'suspend_end': Set 'steckdosen.eg.terrasse.automatik.autostate_suspend_end' to '02:20:52 PM'

So sieht das Item aus:

                [[[[['rules']]]]]
                    type = bool
                    as_plugin = active
                    as_laststate_item_id = ..autostate_id
                    as_laststate_item_name = ..autostate_name
                    as_item_suspend_end = ..autostate_suspend_end 
                    as_item_taster = ...SA.ausschalttimer

                    as_suspend_time = eval:autoblind_eval.get_relative_itemvalue('..settings.suspendduration') * 60
                    eval_trigger = steckdosen.autoblind.steckdosentrigger  | steckdosen.autoblind.settings.* | steckdosen.eg.terrasse.automatik.settings.* | steckdosen.automatik_lock | steckdosen.eg.terrasse.automatik.lock | steckdosen.eg.terrasse.automatik.suspend | steckdosen.eg.terrasse.automatik.manuell | steckdosen.eg.terrasse.SA.ausschalttimer | Bett.*
                    [[[[[['lock']]]]]]
                        type = foo
                        as_use = steckdosen.autoblind.default.lock                        
                    [[[[[['taster']]]]]]
                        type = foo
                        as_use = steckdosen.autoblind.default.taster
                    [[[[[['suspend']]]]]]
                        type = foo
                        as_use = steckdosen.autoblind.default.suspend

Und die default so:

        [[['default']]]
            type=foo
            # Items, die geprueft werden
            .....
            as_item_suspend_active = steckdosen.autoblind.settings.suspend.active

            # Items die geaendert werden
            as_item_schalten = ...SA

            # Suspend und Lock Items
            as_item_manuell = ..manuell
            as_item_lock = ..lock
            as_item_suspend = ..suspend

            [[[['suspend']]]]
                type = foo
                name = Ausgesetzt
                as_set_suspend = True
                as_set_suspend_end = eval:autoblind_eval.insert_suspend_time('..suspend', suspend_text='%X')
                [[[[['enter_manuell']]]]]
                    type = foo
                    as_value_trigger_source = eval:autoblind_eval.get_relative_itemid('..manuell')
                    as_value_suspend_active = True
                [[[[['enter_stay']]]]]
                    type = foo
                    as_value_laststate = var:current.state_id                            
                    as_agemax_manuell = var:item.suspend_time
                    as_value_suspend = True
                    as_value_suspend_active = True

Problem with get_random_int function

Problem evaluating 'autoblind_eval.get_random_int(min=0,max=255)': get_random_int() got an unexpected keyword argument 'min'.

Lässt man das min und max weg, also nur Zahlen, dann klappt es. In der Doku steht es aber anders drin ;)

Make plugin compatible with smarthomeNG 1.4

  • create plugin.yaml
  • use self.get_parameter_value to approve attributes
  • Fix CLI Commands problem: Plugin version 1.4 expects a "group" of cli commands. Right now I get the error: missing 1 required positional argument: 'usage'
  • add plugin to official plugin repo ;)

falscher Suspend-Status bei Init

Möchte man den Suspend-Modus bzw. das Manuell-Item von mehreren Items abhängig machen, in meinem Beispiel von licht.treppe.garderobe.SA | licht.treppe.garderobe.sperren,
dann startet das Item nach einem SmarthomeNG Restart immer im Suspend-Modus. Würde man ein exclude: Init:* hinzu fügen, gäbe es ja das Problem mit dem nicht einsetzenden Suspend beim Senden einer "0". Ist das nur mit mehreren manuell-Items lösbar oder hättest du ne andere Idee, @i-am-offline

2016-12-09 18:03:21.857049 manual_item_update_eval ========================================================
2016-12-09 18:03:21.857312 running for item 'licht.treppe.garderobe.automatik.manuell' source 'Init' caller 'None'
2016-12-09 18:03:21.860212 Current value of item licht.treppe.garderobe.automatik.manuell is False
2016-12-09 18:03:21.860398 get_original_caller: returning Init, None
2016-12-09 18:03:21.860575 original trigger by caller 'Init' source 'None'
2016-12-09 18:03:21.860769 checking exclude values: ['Database:*', 'DbLog:*', 'sqlite:*', 'KNX:1.1.31', 'KNX:1.1.1', 'KNX:1.1.28']
2016-12-09 18:03:21.860935       Database:*: not matching
2016-12-09 18:03:21.861092       DbLog:*: not matching
2016-12-09 18:03:21.861245       sqlite:*: not matching
2016-12-09 18:03:21.862094       KNX:1.1.31: not matching
2016-12-09 18:03:21.866575       KNX:1.1.1: not matching
2016-12-09 18:03:21.866868       KNX:1.1.28: not matching
2016-12-09 18:03:21.867044 No include limitation. Writing value True
2016-12-09 18:04:02.007273 manual_item_update_eval ========================================================
2016-12-09 18:04:02.007558 running for item 'licht.treppe.garderobe.automatik.manuell' source 'Eval' caller 'licht.treppe.garderobe.SA'
2016-12-09 18:04:02.007765 Current value of item licht.treppe.garderobe.automatik.manuell is True
2016-12-09 18:04:02.008183 get_original_caller(Eval, licht.treppe.garderobe.SA): changed by Init, None
2016-12-09 18:04:02.008427 get_original_caller: returning Init, None
2016-12-09 18:04:02.008604 original trigger by caller 'Init' source 'None'
2016-12-09 18:04:02.008795 checking exclude values: ['Database:*', 'DbLog:*', 'sqlite:*', 'KNX:1.1.31', 'KNX:1.1.1', 'KNX:1.1.28']
2016-12-09 18:04:02.008962       Database:*: not matching
2016-12-09 18:04:02.009993       DbLog:*: not matching
2016-12-09 18:04:02.010171       sqlite:*: not matching
2016-12-09 18:04:02.010326       KNX:1.1.31: not matching
2016-12-09 18:04:02.010479       KNX:1.1.1: not matching
2016-12-09 18:04:02.010646       KNX:1.1.28: not matching
2016-12-09 18:04:02.010811 No include limitation. Writing value False

Zeitsteuerung

Wie wird eine reine Zeitsteuerung realisiert?
funktioniert dies mit as_value_time = 20:00 ?

Define log level for items seperately

It would be awesome to define the log level on an item level, let's say below the as_plugin_active attribute with an as_loglevel entry. This would then overrule the general log level.

That would be very handy to debug just some specific items more in depth (when the general log level is set low) or to decrease the log level of items (when the general log level is set to debug).

Keep order of condition sets

I had a weird situation where during the evaluation of condition sets (1 second) some relevant values just changed and therefore lead to a wrong behaviour.

I'm pretty sure this wouldn't have happened if the order of the evaluation would have been the other way round. A simple self.__condition_sets = OrderedDict() might solve the problem but I'm not sure.

Here the relevant part of the log file:

2018-07-02 16:43:32.629903 Check if state 'jalousien.og.westen_essen.automatik.rules.suntrack' ('Sonnenstand') can be entered:
2018-07-02 16:43:32.635496	 Check condition set 'enter_delay_brightness':
2018-07-02 16:43:32.722964		 Condition 'brightness_west_leave_bool': value=True negate=False current=False
2018-07-02 16:43:32.738859			 not OK -> not matching
....
2018-07-02 16:43:33.431720	 Check condition set 'enter_hysterese_brightness':
2018-07-02 16:43:33.581975		 Condition 'brightness_west_leave_bool': value=False negate=False current=True
2018-07-02 16:43:33.590897			 not OK -> not matching
2018-07-02 16:43:33.602749 State can not be entered

Rename plugin

Meanwile the plugin can do far more than just automate blinds. Its basically a full finite state machine.
The plugin name should reflect this.

Multiple laststate items not working?

The following problem when using multiple laststate items. It's possible that this problem also exists with other attributes, didn't try it yet.
Item definition:

as_value_laststate: 
  - var:current.state_id
  - eval:autoblind_eval.get_relative_itemid('..rules.heimkino')

No matter whether the first entry is var: or eval: the item is always evaluated as a standard string and not variable or eval.

Log:

Condition 'laststate': value=['current.state_id', "eval:autoblind_eval.get_relative_itemid('..rules.standard')"] negate=True current=licht.og.terrasse.wand.automatik.rules.helligkeitsaus


Condition 'laststate': value=["autoblind_eval.get_relative_itemid('..rules.helligkeitsaus')", "eval:autoblind_eval.get_relative_itemid('..rules.standard')"] negate=True current=licht.og.terrasse.wand.automatik.rules.helligkeitsaus

Problems with multiple delayed actions

Hi!
I figured the following problem.. I have two delayed actions. Both trigger the same item, actually the action only gets triggered once:

2017-11-30 16:21:39.302952       Action 'sperren: Add 14 second timer 'licht.eg.bad.spots.sperren-AbItemDelayTimer' for delayed execution.  Repeat allowed by item configuration.
2017-11-30 16:21:39.321852       Action 'prio: Add 15 second timer 'licht.eg.bad.spots.zwangvalue-AbItemDelayTimer' for delayed execution.  Repeat allowed by item configuration.
2017-11-30 16:21:39.325130       Action 'prio_warm': No item defined. Ignoring.
2017-11-30 16:21:54.654808 Delay Timer 'licht.eg.bad.spots.zwangvalue-AbItemDelayTimer': Set 'licht.eg.bad.spots.zwangvalue' to '0'.

So far this seems fine, as the timer for 15 sec delay just overwrites the 14 sec timer for the same item. BUT: If both delayed actions have the same order and delay the delay timer doesn't get executed at all! The "Add 15 second timer .." is still in the logfile but the "Delay timer.. Set.." isn't.

Allow different actions for entering, staying at and leaving a state

It should be possible to have different actions for

  • entering a state
  • staying at a state
  • leaving a state
    These action groups will be represented by sub-items if the state item. A fourth group for "enter or stay" will be added for convenience.
    Actions contained directly in the state item will still be possible. They will be added to the "enter or stay" group.

Error when "set to" value of as_action can not be determined

Wird in einem Zustand ein Item gesetzt, das nicht existiert, wird dieser Aufruf normalerweise einfach ignoriert. Soll der zu setzende Wert aber aus einem anderen Item ausgelesen werden, das nicht existiert, wird der komplette Zustand ignoriert (determined item does not exist). Super wäre, wenn das Evaluieren des zu setzenden Wertes nur dann stattfindet oder "kontrolliert" wird, wenn das zu verändernde Item auch tatsächlich existiert.

Beispiel:
Gewisse Items sollen alle auf die gleichen default Zustände zurückgreifen. Bei manchen Items werden allerdings andere Dinge geschaltet, also zB dimmbare Leuchte vs normale Schalt-Leuchte. Der zu setzende Wert wird wiederum durch ein Item ermittelt - und hier beginnt das Problem:

                [<zustandsname>]
                    [[on_enter_or_stay]]
                    as_action_schalten = function: set | to: item:..settings.sollwert.<Zustandsname>
                    as_action_dimmen_warm = function: set | to: item:..settings.sollwert.<Zustandsname>
                    as_action_dimmen_kalt = function: set | to: item:..settings.sollwert.<Zustandsname>
```     

Wenn jetzt also Leuchte X alle oben angegebenen Settings-Items definiert hat, ist alles bestens. 
Wenn Leuchte Y aber kein dimmen-Item - und somit auch kein settings.sollwert hat, gibt es die Meldung:
Ignoring state.. determined item XYZ does not exist

Was natürlich auch stimmt. Wenn ich aber zB as_action_dimmen_kalt = function: set | to: 0 eingebe, wird diese Aktion einfach ignoriert, wenn das zu ändernde Item nicht existiert. So sollt es sein ;) Aktuell könnte es nur dadurch gelöst werden, dass alle Items die gleichen settings.XYZ bekommen, unabhängig davon, ob sie Sinn machen oder nicht. Das macht die Sache aber unnötig kompliziert und unübersichtlich finde ich.

No new logfile get written

AutoBlind only generates logfiles for each item once at startup instead of every day.

This is my plugin configuration:

autoblind:
    class_name: AutoBlind
    class_path: plugins.autoblind
    log_level: 1 
    log_maxage: 5

The only logging in regarding AutoBlind in the smarthome.log are the following two lines every day:

2018-02-24  00:30:00 INFO     plugins.autoblind.AutoBlind: Remove old logfiles Removing logfiles older than 5 days
2018-02-24  00:30:00 INFO     plugins.autoblind.AutoBlind: Remove old logfiles 0 files removed, 0 errors occured

Multiple suspend items?

What I want to achieve:

  • Put a shutter device to suspend mode for 240 minutes in general whenever it's value is changed by the Visu for example
  • Put the same shutter to suspend mode for only 3 minutes if a specific switch was triggered

I figured out that I can somehow implement two separate suspend states for one specific item in general. But what doesn't work is
a) setting the correct end time,
b) retrigger the rules evaluation after the "additionally set" suspend time.

Because var:item.suspend_remaining is only connected to the standard suspend item.

Any chance to change the way var:item.suspend_remaining works? Let's say instead of item someone could actually define the item name, i.e. var: as_suspend_remaining_additionalsuspend whereas as_item_additionalsuspend points to the additional suspend item.

The insert_suspend_time function also seems to be strictly connected to the standard suspend item.

2017-10-29 22:15:33.577968       Executing method 'insert_suspend_time(..suspend_taster, %X)'
2017-10-29 22:15:33.581515               Suspend time is 14400
2017-10-29 22:15:33.585726               Suspend item is screens.westen_s3.automatik.suspend_taster
2017-10-29 22:15:33.588794               Current suspend age: 118.691951
2017-10-29 22:15:33.596388               Remaining suspend time: 14281.308049
2017-10-29 22:15:33.598948               Suspend finished at 2017-10-30 02:13:34.906300+01:00

It would be awesome to set the suspend_time for a specific item like this:
eval:autoblind_eval.insert_suspend_time('..suspend_taster', suspend_text='%X')"
and the plugin knows that the correct time is read from the as_suspend_time_taster?

Wieder mal Probleme mit dem "manuell" Item :(

Hi!
Ich habe bei einem Item wieder das komische Phänomen, dass es in den suspend geht, obwohl es nicht sollte. Sonderbarerweise betrifft es wohl nur dieses eine Item, keine Ahnung warum. Hier der manuell-Part vom Item:

                manuell:
                    type: bool
                    name: manuelle bedienung
                    se_manual_logitem: jalousien.og.sueden_stiegenhaus.automatik.manuell
                    se_manual_invert: 'True'
                    se_manual_exclude:
                      - database:*
                      - KNX:1.1.4

Hier das Log für das Item:

2018-11-04 07:30:14.736703 Leaving jalousien.og.sueden_stiegenhaus.automatik.rules.morning ('morgen')
2018-11-04 07:30:14.773395 Entering jalousien.og.sueden_stiegenhaus.automatik.rules.day ('standard')
2018-11-04 07:30:14.791399	 Action 'height': Set 'jalousien.og.sueden_stiegenhaus.hoehe' to '0'.
2018-11-04 07:30:14.977678	 Action 'lamella': Set 'jalousien.og.sueden_stiegenhaus.lamellen' to '0'.
2018-11-04 07:30:15.230424 Update state of item jalousien.og.sueden_stiegenhaus.automatik.rules ===========
2018-11-04 07:30:15.560552 Update triggered by Eval (item=jalousien.og.sueden_stiegenhaus.automatik.rules source=jalousien.og.sueden_stiegenhaus.automatik.manuell dest=None)
2018-11-04 07:30:15.582659 Eval initially triggered by KNX (item=jalousien.og.sueden_stiegenhaus.hoehe source=1.1.4)
2018-11-04 07:30:15.603538 Last state: jalousien.og.sueden_stiegenhaus.automatik.rules.day ('standard')
2018-11-04 07:30:15.616678 Check if state 'jalousien.og.sueden_stiegenhaus.automatik.rules.wind' ('wind') can be entered:
2018-11-04 07:30:15.635206	 Check condition set 'enter':
2018-11-04 07:30:15.648395		 Executing method 'get_relative_itemid(..rules.lock)'
2018-11-04 07:30:15.665164		 Condition 'laststate': value=jalousien.og.sueden_stiegenhaus.automatik.rules.lock negate=True current=jalousien.og.sueden_stiegenhaus.automatik.rules.day
2018-11-04 07:30:15.674725			 not OK but negated -> matching
2018-11-04 07:30:15.679247		 Age of 'laststate': No limits given
2018-11-04 07:30:15.689051		 Condition 'windjalousien': value=True negate=False current=False
2018-11-04 07:30:15.697551			 not OK -> not matching
2018-11-04 07:30:15.706249 State can not be entered
2018-11-04 07:30:15.719652 Check if state 'jalousien.og.sueden_stiegenhaus.automatik.rules.wind_locked' ('wind') can be entered:
2018-11-04 07:30:15.731557	 Check condition set 'enter':
2018-11-04 07:30:15.750113		 Executing method 'get_relative_itemid(..rules.lock)'
2018-11-04 07:30:15.769900		 Condition 'laststate': value=jalousien.og.sueden_stiegenhaus.automatik.rules.lock negate=False current=jalousien.og.sueden_stiegenhaus.automatik.rules.day
2018-11-04 07:30:15.783403			 not OK -> not matching
2018-11-04 07:30:15.793776	 Check condition set 'enter_stay':
2018-11-04 07:30:15.800377		 Condition 'laststate': value=jalousien.og.sueden_stiegenhaus.automatik.rules.wind_locked negate=False current=jalousien.og.sueden_stiegenhaus.automatik.rules.day
2018-11-04 07:30:15.808266			 not OK -> not matching
2018-11-04 07:30:15.813414 State can not be entered
2018-11-04 07:30:15.817443 Check if state 'jalousien.og.sueden_stiegenhaus.automatik.rules.release' ('release') can be entered:
2018-11-04 07:30:15.822203	 Check condition set 'enter':
2018-11-04 07:30:15.826230		 Condition 'release': value=True negate=False current=False
2018-11-04 07:30:15.838478			 not OK -> not matching
2018-11-04 07:30:15.847796 State can not be entered
2018-11-04 07:30:15.859056 Check if state 'jalousien.og.sueden_stiegenhaus.automatik.rules.lock' ('gesperrt') can be entered:
2018-11-04 07:30:15.863997	 Check condition set 'enter':
2018-11-04 07:30:15.865300		 Condition 'lock': value=True negate=False current=False
2018-11-04 07:30:15.876854			 not OK -> not matching
2018-11-04 07:30:15.886626 State can not be entered
2018-11-04 07:30:15.891995 Check if state 'jalousien.og.sueden_stiegenhaus.automatik.rules.heimkino_start' ('kino') can be entered:
2018-11-04 07:30:15.899250	 Check condition set 'enter_beamer':
2018-11-04 07:30:15.905068		 Condition 'trigger_source': value=heimkino.beamer.power negate=False current=jalousien.og.sueden_stiegenhaus.automatik.manuell
2018-11-04 07:30:15.910720			 not OK -> not matching
2018-11-04 07:30:15.929135	 Check condition set 'enter_stay':
2018-11-04 07:30:15.934170		 Condition 'heimkino_active': value=True negate=False current=True
2018-11-04 07:30:15.938667			 OK -> matching
2018-11-04 07:30:15.940819		 Age of 'heimkino_active': No limits given
2018-11-04 07:30:15.944405		 Condition 'laststate': value=jalousien.og.sueden_stiegenhaus.automatik.rules.heimkino_start negate=False current=jalousien.og.sueden_stiegenhaus.automatik.rules.day
2018-11-04 07:30:15.945786			 not OK -> not matching
2018-11-04 07:30:15.948820 State can not be entered
2018-11-04 07:30:15.953021 Check if state 'jalousien.og.sueden_stiegenhaus.automatik.rules.suspend' ('ausgesetzt') can be entered:
2018-11-04 07:30:15.956359	 Check condition set 'enter_manuell':
2018-11-04 07:30:15.961199		 Executing method 'get_relative_itemid(..manuell)'
2018-11-04 07:30:15.971604		 Condition 'trigger_source': value=jalousien.og.sueden_stiegenhaus.automatik.manuell negate=False current=jalousien.og.sueden_stiegenhaus.automatik.manuell
2018-11-04 07:30:15.983347			 OK -> matching
2018-11-04 07:30:15.994434		 Age of 'trigger_source': No limits given
2018-11-04 07:30:16.001891		 Condition 'suspend_active': value=True negate=False current=True
2018-11-04 07:30:16.004513			 OK -> matching
2018-11-04 07:30:16.010141		 Age of 'suspend_active': No limits given
2018-11-04 07:30:16.014596 State can be entered
2018-11-04 07:30:16.016500 Leaving jalousien.og.sueden_stiegenhaus.automatik.rules.day ('standard')
2018-11-04 07:30:16.021545 Entering jalousien.og.sueden_stiegenhaus.automatik.rules.suspend ('ausgesetzt')
2018-11-04 07:30:16.027166	 Action 'suspend': Executing special action 'suspend' using value '[Item: jalousien.og.sueden_stiegenhaus.automatik.suspend, 'jalousien.og.sueden_stiegenhaus.automatik.manuell']'.
2018-11-04 07:30:16.031513		 Set 'jalousien.og.sueden_stiegenhaus.automatik.suspend' to 'True'.
2018-11-04 07:30:16.073956		 Updated variable 'item.suspend_remaining' to 10800
2018-11-04 07:30:16.078149	 Executing method 'insert_suspend_time(..suspend, %X)'
2018-11-04 07:30:16.083935		 Suspend time is 10800
2018-11-04 07:30:16.087508		 Suspend item is jalousien.og.sueden_stiegenhaus.automatik.suspend
2018-11-04 07:30:16.091806		 Current suspend age: 0.055107
2018-11-04 07:30:16.093478		 Remaining suspend time: 10799.944893
2018-11-04 07:30:16.097074		 Suspend finished at 2018-11-04 10:30:16.041410+01:00
2018-11-04 07:30:16.101535	 Action 'suspend_end': Set 'jalousien.og.sueden_stiegenhaus.automatik.stateengine_suspend_end' to '10:30:16'.
2018-11-04 07:30:19.128939	 Action 'retrigger: Add 10800 second timer 'jalousien.og.sueden_stiegenhaus.automatik.rules-SeItemDelayTimer' for delayed execution. 

Und hier das manuell-Log:

2018-11-04 07:30:03.233837 manual_item_update_eval ========================================================
2018-11-04 07:30:03.242081 running for item 'jalousien.og.sueden_stiegenhaus.automatik.manuell' source 'Eval' caller 'jalousien.og.sueden_stiegenhaus.hoehe'
2018-11-04 07:30:03.249784 Current value of item jalousien.og.sueden_stiegenhaus.automatik.manuell is True
2018-11-04 07:30:03.260632 get_original_caller(Eval, jalousien.og.sueden_stiegenhaus.hoehe): changed by StateEngine Plugin, None at 2018-11-04 07:30:03.126002+01:00
2018-11-04 07:30:03.262261 get_original_caller: returning StateEngine Plugin, None
2018-11-04 07:30:03.264663 original trigger by caller 'StateEngine Plugin' source 'None'
2018-11-04 07:30:03.267124 checking exclude values: ['database:*', 'KNX:1.1.4']
2018-11-04 07:30:03.270556	 database:*: not matching
2018-11-04 07:30:03.276939	 KNX:1.1.4: not matching
2018-11-04 07:30:03.280363 No include limitation. Writing value False
2018-11-04 07:30:03.292885 manual_item_update_eval ========================================================
2018-11-04 07:30:03.295708 running for item 'jalousien.og.sueden_stiegenhaus.automatik.manuell' source 'Eval' caller 'jalousien.og.sueden_stiegenhaus.lamellen'
2018-11-04 07:30:03.299251 Current value of item jalousien.og.sueden_stiegenhaus.automatik.manuell is False
2018-11-04 07:30:03.301950 get_original_caller(Eval, jalousien.og.sueden_stiegenhaus.lamellen): changed by StateEngine Plugin, None at 2018-11-04 07:30:03.240989+01:00
2018-11-04 07:30:03.304654 get_original_caller: returning StateEngine Plugin, None
2018-11-04 07:30:03.306079 original trigger by caller 'StateEngine Plugin' source 'None'
2018-11-04 07:30:03.309112 checking exclude values: ['database:*', 'KNX:1.1.4']
2018-11-04 07:30:03.311851	 database:*: not matching
2018-11-04 07:30:03.312778	 KNX:1.1.4: not matching
2018-11-04 07:30:03.313421 No include limitation. Writing value True
2018-11-04 07:30:14.990230 manual_item_update_eval ========================================================
2018-11-04 07:30:14.991674 running for item 'jalousien.og.sueden_stiegenhaus.automatik.manuell' source 'Eval' caller 'jalousien.og.sueden_stiegenhaus.hoehe'
2018-11-04 07:30:15.006016 Current value of item jalousien.og.sueden_stiegenhaus.automatik.manuell is True
2018-11-04 07:30:15.026486 get_original_caller(Eval, jalousien.og.sueden_stiegenhaus.hoehe): changed by StateEngine Plugin, None at 2018-11-04 07:30:14.809551+01:00
2018-11-04 07:30:15.052068 get_original_caller: returning StateEngine Plugin, None
2018-11-04 07:30:15.065519 original trigger by caller 'StateEngine Plugin' source 'None'
2018-11-04 07:30:15.078861 checking exclude values: ['database:*', 'KNX:1.1.4']
2018-11-04 07:30:15.092598	 database:*: not matching
2018-11-04 07:30:15.103931	 KNX:1.1.4: not matching
2018-11-04 07:30:15.107103 No include limitation. Writing value False
2018-11-04 07:30:15.227944 manual_item_update_eval ========================================================
2018-11-04 07:30:15.551850 running for item 'jalousien.og.sueden_stiegenhaus.automatik.manuell' source 'Eval' caller 'jalousien.og.sueden_stiegenhaus.lamellen'
2018-11-04 07:30:15.568159 Current value of item jalousien.og.sueden_stiegenhaus.automatik.manuell is False
2018-11-04 07:30:15.589977 get_original_caller(Eval, jalousien.og.sueden_stiegenhaus.lamellen): changed by StateEngine Plugin, None at 2018-11-04 07:30:14.994313+01:00
2018-11-04 07:30:15.636327 get_original_caller: returning StateEngine Plugin, None
2018-11-04 07:30:15.646860 original trigger by caller 'StateEngine Plugin' source 'None'
2018-11-04 07:30:15.675312 checking exclude values: ['database:*', 'KNX:1.1.4']
2018-11-04 07:30:15.686281	 database:*: not matching
2018-11-04 07:30:15.708975	 KNX:1.1.4: not matching
2018-11-04 07:30:15.723917 No include limitation. Writing value True
2018-11-04 07:30:15.754117 manual_item_update_eval ========================================================
2018-11-04 07:30:15.757858 running for item 'jalousien.og.sueden_stiegenhaus.automatik.manuell' source 'Eval' caller 'jalousien.og.sueden_stiegenhaus.hoehe'
2018-11-04 07:30:15.764744 Current value of item jalousien.og.sueden_stiegenhaus.automatik.manuell is True
2018-11-04 07:30:15.776443 get_original_caller(Eval, jalousien.og.sueden_stiegenhaus.hoehe): changed by KNX, 1.1.4 at 2018-11-04 07:30:15.347213+01:00
2018-11-04 07:30:15.784052 get_original_caller: returning KNX, 1.1.4
2018-11-04 07:30:15.807593 original trigger by caller 'KNX' source '1.1.4'
2018-11-04 07:30:15.813606 checking exclude values: ['database:*', 'KNX:1.1.4']
2018-11-04 07:30:15.820791	 database:*: not matching
2018-11-04 07:30:15.831952	 KNX:1.1.4: matching. Writing value True
2018-11-04 07:30:15.852219 manual_item_update_eval ========================================================
2018-11-04 07:30:15.858874 running for item 'jalousien.og.sueden_stiegenhaus.automatik.manuell' source 'Eval' caller 'jalousien.og.sueden_stiegenhaus.lamellen'
2018-11-04 07:30:15.868163 Current value of item jalousien.og.sueden_stiegenhaus.automatik.manuell is True
2018-11-04 07:30:15.876616 get_original_caller(Eval, jalousien.og.sueden_stiegenhaus.lamellen): changed by KNX, 1.1.4 at 2018-11-04 07:30:15.704503+01:00
2018-11-04 07:30:15.885451 get_original_caller: returning KNX, 1.1.4
2018-11-04 07:30:15.903935 original trigger by caller 'KNX' source '1.1.4'
2018-11-04 07:30:15.910200 checking exclude values: ['database:*', 'KNX:1.1.4']
2018-11-04 07:30:15.915148	 database:*: not matching
2018-11-04 07:30:15.926107	 KNX:1.1.4: matching. Writing value True
2018-11-04 07:31:34.149257 manual_item_update_eval ========================================================
2018-11-04 07:31:34.150263 running for item 'jalousien.og.sueden_stiegenhaus.automatik.manuell' source 'Eval' caller 'jalousien.og.sueden_stiegenhaus.hoehe'
2018-11-04 07:31:34.150838 Current value of item jalousien.og.sueden_stiegenhaus.automatik.manuell is True
2018-11-04 07:31:34.152521 get_original_caller(Eval, jalousien.og.sueden_stiegenhaus.hoehe): changed by KNX, 1.1.4 at 2018-11-04 07:31:34.132596+01:00
2018-11-04 07:31:34.153087 get_original_caller: returning KNX, 1.1.4
2018-11-04 07:31:34.153505 original trigger by caller 'KNX' source '1.1.4'
2018-11-04 07:31:34.153975 checking exclude values: ['database:*', 'KNX:1.1.4']
2018-11-04 07:31:34.154412	 database:*: not matching
2018-11-04 07:31:34.154832	 KNX:1.1.4: matching. Writing value True
2018-11-04 07:31:34.291897 manual_item_update_eval ========================================================
2018-11-04 07:31:34.293779 running for item 'jalousien.og.sueden_stiegenhaus.automatik.manuell' source 'Eval' caller 'jalousien.og.sueden_stiegenhaus.lamellen'
2018-11-04 07:31:34.294571 Current value of item jalousien.og.sueden_stiegenhaus.automatik.manuell is True
2018-11-04 07:31:34.296538 get_original_caller(Eval, jalousien.og.sueden_stiegenhaus.lamellen): changed by KNX, 1.1.4 at 2018-11-04 07:31:34.271110+01:00
2018-11-04 07:31:34.297357 get_original_caller: returning KNX, 1.1.4
2018-11-04 07:31:34.298020 original trigger by caller 'KNX' source '1.1.4'
2018-11-04 07:31:34.298508 checking exclude values: ['database:*', 'KNX:1.1.4']
2018-11-04 07:31:34.299275	 database:*: not matching
2018-11-04 07:31:34.300006	 KNX:1.1.4: matching. Writing value True

Interessant sind die ersten paar Einträge. Hier scheint das Manuell-Item getriggert zu werden, obwohl die Änderung vom SmartEngine Plugin kommt. Bei einem anderen Item heißt es korrekterweise:

2018-11-04 07:30:14.460354 Leaving jalousien.og.osten_stiegenhaus.automatik.rules.morning ('morgen')
2018-11-04 07:30:14.484163 Entering jalousien.og.osten_stiegenhaus.automatik.rules.day ('standard')
2018-11-04 07:30:14.490541	 Action 'height': Set 'jalousien.og.osten_stiegenhaus.hoehe' to '0'.
2018-11-04 07:30:14.688627	 Action 'lamella': Set 'jalousien.og.osten_stiegenhaus.lamellen' to '0'.
2018-11-04 07:30:15.035544 Update state of item jalousien.og.osten_stiegenhaus.automatik.rules ============
2018-11-04 07:30:15.045365 Update triggered by Eval (item=jalousien.og.osten_stiegenhaus.automatik.rules source=jalousien.og.osten_stiegenhaus.automatik.manuell dest=None)
2018-11-04 07:30:15.055824 Eval initially triggered by StateEngine Plugin (item=jalousien.og.osten_stiegenhaus.lamellen source=None)
2018-11-04 07:30:15.071661 Ignoring changes from StateEngine Plugin
2018-11-04 07:32:10.425621 Update state of item jalousien.og.osten_stiegenhaus.automatik.rules ============
2018-11-04 07:32:10.429314 Update triggered by Eval (item=jalousien.og.osten_stiegenhaus.automatik.rules source=jalousien.stateengine.jalousietrigger dest=None)
2018-11-04 07:32:10.432829 Eval initially triggered by Scheduler (item=jalousien.stateengine.jalousietrigger source=None)

Ich bin mir nicht sicher, ob das Problem erst mit 1.5 master aufgekommen ist. Offenbar hatte ich das Problem aber schon mal, sonst hätte ich das manuelle Log nicht aktiviert.

Mark certain functions as obsolete

Several functions are to be marked as "obsolete". These functions have been removed from the documentation since a long time. The functions can be replaced by implementing according states as described in the manual:

  • hardcoded static lock item --> use lock state instead
  • hardcoded static suspend item --> use suspend state instead
  • maybe some more functionality

Usage of this functions should produce error messages first. After a grace period of about 6 month the functions should be removed.

Rules not evaluating with new SmarthomeNG 1.5 master

Looks like the rules evaluation doesn't get triggered anymore by a sole "eval_trigger".
Adding a "eval: true" in the rules section fixes the problem, nevertheless an automatic retriggering without the eval attribute would be fine. Thanks!

Prepare Version 1.2.2

New branch for finalizing version 1.2.2 has been created.
Final tests in progress.

Update documentation

Documentation needs to be updated before releasing the next version.

Issues which require changes in documentation:

  • #5 Problems with suspend timer --> Explain new suspend mechanism
  • #6 repeat_actions specific for single actions? --> Explain new functionality
  • #10 Enable ordering of actions --> Explain new functionality (once realized)
  • #11 Allow different actions for entering, staying at and leaving a state --> Explain new functionality

Other changes

  • think about splitting documentation into several pages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.