[SOLVED] Items no more found after clean-cache

OH 2.5.8
OpenHabian

Problem:
after I have cleared the cache of OH, one Item IsModulHueActiv is no more found in a rule

.openhab-cli

[11:53:48] openhabian@openhab-server:~$ sudo /bin/systemctl stop openhab2.service
[11:54:43] openhabian@openhab-server:~$ sudo openhab-cli clean-cache

This command will delete the temporary files within openHAB.
May resolve issues with addon installation and configuration.
The next start of openHAB will take a bit longer.

Okay to Continue? [y/N]: y
[11:57:50] openhabian@openhab-server:~$ sudo /bin/systemctl start openhab2.service
[11:57:59] openhabian@openhab-server:~$

modul.items (this item is lost)

/**
* Modul Konfiguration "ON" / "OFF" (siehe modul.rules)
*/
Switch IsModulHueActiv "Modul HUE ist: [%s]" <switch> 

.rules

[...]
rule "Hue Bridge rule: Check state.on and state.reachable every minute (hue-bridge-changed.rules)"
when 
    Time cron "0 */1 * ? * *" // every minute. Source: https://crontab.guru/examples.html
then

   if (IsModulHueActiv.state == ON ) {
    

.log

2020-09-13 12:19:00.009 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Hue Bridge rule: Check state.on and state.reachable every minute (hue-bridge-changed.rules)': The name 'IsModulHueActiv' cannot be resolved to an item or type;

.rest api

http://192.168.2.122:8080/rest/items/IsModulHueActiv

{"error":{"message":"Item IsModulHueActiv does not exist!","http-code":404}}

Question:
I found no error in log about loading modul.items.

Any hint?

Regards,
Thomas

After clearing the cache sometimes multiple restarts are needed After an upgrade some have needed up to 3.

2 Likes

Thanks… after one restart OH seems to be found everything again

[11:57:59] openhabian@openhab-server:~$ sudo /bin/systemctl stop openhab2.service
[sudo] Passwort für openhabian:
[12:40:12] openhabian@openhab-server:~$ sudo /bin/systemctl start openhab2.service
[12:40:16] openhabian@openhab-server:~$
1 Like