Rule does not work after 1 year

Hello all,
im using an openhabian and have a rule to automatically open and close hatches due to temperature and/or Rain.
Theres also a setting to do this manually with a switch. Suddenly i cannot switch back to Auromtic mode and recive the following logentry:

2020-04-02 18:23:34.716 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Manuellaus’: The name ‘Temp3’ cannot be resolved to an item or type; line 168, column 7, length 5

2020-04-02 18:23:34.716 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Manuellaus’: The name ‘Temp3’ cannot be resolved to an item or type; line 201, column 7, length 5

The Rules is as follows below hopefully someone can tell me why this happens now.

var Number Tempa = 24 var Number Tempb = 26 var Number Tempc = 28 var Number Tempd = 30 var Number
Tempe = 23 var Number Tempf = 25 var Number Tempg = 27 var Number Temph = 29

rule Temperaturschalter1

when
        Item Regensensor changed from CLOSED to OPEN

then
        Tempa = 150
        Tempb = 150
        Tempc = 150
        Tempd = 150
        Tempe = -150
        Tempf = -150
        Tempg = -150
        Temph = -150
        Relais7.sendCommand(ON)
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(30000), [|
        Relais8.sendCommand(OFF)
        Relais7.sendCommand(OFF)
        ])

 end

 rule Temperaturschalter2

 when

    Item Regensensor changed from OPEN to CLOSED
 then

    if (Temp3.state > 30 ) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(20000), [|
        Relais8.sendCommand(OFF) ])
        Tempd = 150
        Temph = 29
    } else if(Temp3.state > 28) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(15000), [|
        Relais8.sendCommand(OFF) ])
        Tempc = 150
        Tempd = 30
        Tempg = 27
    } else if(Temp3.state > 26) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(10000), [|
        Relais8.sendCommand(OFF) ])
        Tempb = 150
        Tempc = 28
        Tempf = 25
    } else if(Temp3.state > 24) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(5000), [|
        Relais8.sendCommand(OFF) ])
        Tempa = 150
        Tempb = 26
        Tempe = 23
    }

 end
rule Temperaturschalter3

when
        Item Temp3 changed then if (Temp3.state > Tempa ) {
                Relais8.sendCommand(ON)
                createTimer(now.plusMillis(5000), [|
                Relais8.sendCommand(OFF)
                ])
                Tempa = 150
                Tempb = 26
                Tempe = 23
        }
if (Temp3.state > Tempb ) {
                Relais8.sendCommand(ON)
                createTimer(now.plusMillis(5000), [|
                Relais8.sendCommand(OFF)
                ])
                Tempb = 150
                Tempc = 28
                Tempf = 25
        createTimer(now.plusMillis(10000), [| ])
        }
if (Temp3.state > Tempc ) {
                Relais8.sendCommand(ON)
                createTimer(now.plusMillis(5000), [|
                Relais8.sendCommand(OFF)
                ])
                Tempc = 150
                Tempd = 30
                Tempg = 27
        createTimer(now.plusMillis(10000), [| ])
        }
if (Temp3.state > Tempd ) {
                Relais8.sendCommand(ON)
                createTimer(now.plusMillis(5000), [|
                Relais8.sendCommand(OFF)
                ])
                Tempd = 150
                Temph = 29
        createTimer(now.plusMillis(10000), [| ])
        }
if (Temp3.state < Tempe ) {
                Relais7.sendCommand(ON)
                Relais8.sendCommand(ON)
                createTimer(now.plusMillis(15000), [|
                Relais8.sendCommand(OFF)
                Relais7.sendCommand(OFF)
                ])
                Tempe = -150
                Tempa = 24
        createTimer(now.plusMillis(10000), [| ])
        }
if (Temp3.state < Tempf ) {
                Relais7.sendCommand(ON)
                Relais8.sendCommand(ON)
                createTimer(now.plusMillis(5000), [|
                Relais7.sendCommand(OFF)
                Relais8.sendCommand(OFF)
         ])
                Tempf = -150
                Tempb = 26
        createTimer(now.plusMillis(10000), [| ])
        }
if (Temp3.state < Tempg ) {
                Relais7.sendCommand(ON)
                Relais8.sendCommand(ON)
                createTimer(now.plusMillis(5000), [|
                Relais8.sendCommand(OFF)
                Relais7.sendCommand(OFF)
                ])
                Tempg = -150
                Tempc = 28
        createTimer(now.plusMillis(10000), [| ])
        }
if (Temp3.state < Temph ) {
                Relais7.sendCommand(ON)
                Relais8.sendCommand(ON)
                createTimer(now.plusMillis(5000), [|
                Relais8.sendCommand(OFF)
                Relais7.sendCommand(OFF)
                ])
                Temph = -150
                Tempd = 30
        }
end
rule Manuellan

when
        Item Manuell changed from CLOSED to OPEN then

        Relais7.sendCommand(ON)
        Tempa = 150
        Tempb = 150
        Tempc = 150
        Tempd = 150
        Tempe = -150
        Tempf = -150
        Tempg = -150
        Temph = -150 end rule Manuellaus when
        Item Manuell changed from OPEN to CLOSED then
        Relais7.sendCommand(OFF)
  if (Temp3.state > 30 ) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(20000), [|
        Relais8.sendCommand(OFF) ])
        Tempd = 150
        Temph = 29
    } else if(Temp3.state > 28) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(15000), [|
        Relais8.sendCommand(OFF) ])
        Tempc = 150
        Tempd = 30
        Tempg = 27
    } else if(Temp3.state > 26) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(10000), [|
        Relais8.sendCommand(OFF) ])
        Tempb = 150
        Tempc = 28
        Tempf = 25
    } else if(Temp3.state > 24) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(5000), [|
        Relais8.sendCommand(OFF) ])
        Tempa = 150
        Tempb = 26
        Tempe = 23
   }
 end

rule Manuellaus when
        Item Manuell changed from OPEN to CLOSED then
        Relais7.sendCommand(OFF)
  if (Temp3.state > 30 ) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(20000), [|
        Relais8.sendCommand(OFF) ])
        Tempd = 150
        Temph = 29
    } else if(Temp3.state > 28) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(15000), [|
        Relais8.sendCommand(OFF) ])
        Tempc = 150
        Tempd = 30
        Tempg = 27
    } else if(Temp3.state > 26) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(10000), [|
        Relais8.sendCommand(OFF) ])
        Tempb = 150
        Tempc = 28
        Tempf = 25
    } else if(Temp3.state > 24) {
        Relais8.sendCommand(ON)
        createTimer(now.plusMillis(5000), [|
        Relais8.sendCommand(OFF) ])
        Tempa = 150
        Tempb = 26
        Tempe = 23
    }
 end

Is there maybe a hardware defect? cause this happened suddenly and after 1 year of use or more.

It’s unlikely it just suddenly stopped out of the blue. What was going on immediately before it stopped working? Did you upgrade OH? Did you clear the cache? Did you restart OH or the machine? Did the machine lose power without being shut down?

Without a lot more information about the context it’s anyone’s guess what caused it. Beyond the questions asked above, the error says “Temp3 cannot be resolved.” Did you look at your Items to see if it’s still there? If it has truly just been sitting there running for a long time and it suddenly stopped working than it’s feasible that your SD card is wearing out.

1 Like

For the items mentioned in the logs try touching the file e.g. open text editor, add a space to the end of the file and save. I’ve ran into this issue once before and this worked for me hope it helps for you as well.

Hi there,

I dont know what happened, cause it was running on automatic.
As winter/spring is still in swing here the hatches hadnt to open so far. It just was noticed cause we had some problems with opening them manually. This happened in the past cause the relais are a bit “flimsy”. Then did a reboot cause that resetts everything and fixes it.

I did an update and a several reboots to see if that will help. But nothing so far i will try the option with the space and resaving it. Cant do that right now.

Hi there,
ok so far no lick but i got another error wich seems to have an impact i got the following errormessage now:

2020-04-05 18:35:38.410 [hingStatusInfoChangedEvent] - ‘onewiregpio:sensor:livingroom’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error reading GPIO bus file.

2020-04-05 18:35:38.419 [hingStatusInfoChangedEvent] - ‘onewiregpio:sensor:livingroom1’ changed from UNINITIALIZED to INITIALIZING

2020-04-05 18:35:38.428 [hingStatusInfoChangedEvent] - ‘onewiregpio:sensor:livingroom1’ changed from INITIALIZING to ONLINE

2020-04-05 18:35:38.430 [hingStatusInfoChangedEvent] - ‘onewiregpio:sensor:livingroom1’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error reading GPIO bus file.

may that be to a cabling hardware issue? Strange is that it was able to initialize on startup for a short time.

What version of OH are you running?

You can try using the openhabian-config tool and select option number 10. Under that option select 11, 13, and 14.