Possible bug: rules fire more then once

Hey did you find the solution? I’m in the same situation.

Astro binding events have changed a lot in two years. You’d best identify what version you are using, and be more specific about what problems you are having.

My rule seem to work but the infos are logged twice (and maybe so the rule)

2019-02-24 21:37:05.848 [INFO ] [g.eclipse.smarthome.model.script.SDB] - Aucun timer en cours, définition d’un timer
2019-02-24 21:37:05.852 [INFO ] [g.eclipse.smarthome.model.script.SDB] - Aucun timer en cours, définition d’un timer
2019-02-24 21:54:07.851 [INFO ] [g.eclipse.smarthome.model.script.SDB] - Fin du timer, Extinction de la ventilation
2019-02-24 21:54:07.855 [INFO ] [g.eclipse.smarthome.model.script.SDB] - Fin du timer, Extinction de la ventilation

my rule

var Timer SDBTimer = null

rule "Ventil OFF Timer"
when
    Item DomintellBIR2320_Output2 received update OFF
then
    if(SDBTimer === null) {
        logInfo("SDB", "Aucun timer en cours, définition d'un timer")
        SDBTimer = createTimer(now.plusMinutes(17), [|
            logInfo("SDB", "Fin du timer, Extinction de la ventilation")
            sendCommand(Ventilation_Switch, OFF)
            SDBTimer = null
        ])
    } else {
        logInfo("SDB", "timer en cours, reprogrammation du timer")
        SDBTimer.reschedule(now.plusMinutes(17))
    }
end

Ah, nothing to do with Astro then.

I would suspect multiple updates to your Item. There is nothing to stop other rules or any bindings updating an Item as often as they want, and to the same state if they like.

Maybe a rule trigger of changed to off would be more appropriate for you.

Good idea, will try :slight_smile:

edit : no double rules now :slight_smile: thank you!

My experience showed me that the problem points mostly to ghost rules. That can be fixed with restarting oh, maybe with cleaning the cache.

Another cause is the one from pastroboy. Several log statements, because the log was triggered several times. :slight_smile: