Rule for Shutter automatic und manually

Hello,
I’m looking for a way to detect whether a shutter has been manually pressed or if the position was approached manually. Unfortunately, this informaiton does not provide the actuator.
Does somebody has any idea?
I had already set myself variable to recognize whether I am driven automatically. Unfortunately, I’m not there any further.

The Rule does not work:

rule "Rolladen"
when Rollo_EG_WZ_EuI received update
then
if (Rolladen_EuI_Auto_gefahren.state==ON) {
sendCommand(Rolladen_EuI_Auto_gefahren, OFF)
logInfo(“Rolladen EuI”, “Auto beleibt aktiv”)
}
else
{
sendCommand(Rolladen_EuI_Auto, OFF)
logInfo(“Rolladen EuI”, “Auto wird deaktiviert”)
}
end

Openhab.log:

Cannot retrieve item ‘Rolladen_EuI_Auto’ for widget org.eclipse.smarthome.model.sitemap.Switch

default.items:

Rollershutter Rollo_EG_WZ_EuI “Rollade_EuI [%d %%]” (gShutter,gEG_WZ_Shutter,gSued_Shutter) {homematic=“address=xxxxx, channel=1, parameter=LEVEL”}
Rollo_EG_WZ_EuI

is there such an item defined in your OH2?

there is my mistake. i sort the items file and wrote a wrong name.
thanks for open my eys…
:slight_smile:

1 Like

Hello,
sorry, but the Rule does not work:

rule "Rolladen EuI Automikmodus pruefen"
when Rollo_EG_WZ_EuI changed
then
if (Rolladen_EuI_Auto_gefahren.state==ON) {
sendCommand(Rolladen_EuI_Auto_gefahren, OFF)
logInfo(“Rolladen EuI”, “Auto beleibt aktiv”)
}
else
{
sendCommand(Rolladen_EuI_Auto, OFF)
logInfo(“Rolladen EuI”, “Auto wird deaktiviert”)
}
end

i test changed or received update but i became the following error notifiction in the log:

2017-08-22 22:50:46.685 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘test.rules’ is either empty or cannot be parsed correctly!
2017-08-22 22:50:46.993 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘test.rules’ has errors, therefore ignoring it: [275,7]: no viable alternative at input ‘Rollo_EG_WZ_EuI’

where is the mistake? Thanks for your help!
ThomyTP

when
	Item Rollo_EG_WZ_EuI changed

http://docs.openhab.org/configuration/rules-dsl.html#event-based-triggers