How did the B came in? I never edited this file manually. Same char at legacy! So true means all bindings are downloaded? When? On every start? Where to change it, what to do about the char B?
I know, but as the Debian installation is still my first installation and I wanted to start from scratch and configure everythings by files this time. All good, I do as I told me, just want to clean up too.
Update: The openhabian installation is driving me nuts!!!
I’ve got pretty far by adding things, items, bindings. Then I went to copying rules. I copied first 18 rules at once. Measured the boot time by stopwatch. About 4 Minutes. After I added additional few rules, time went up to 7 Minutes. So I erased the last added rules. 4 Minutes again.
I wrote a shell script which is starting by cron @reboot.
It saves the OS boot timestamp. After that it sends ON to an item (boot_input) by REST api frequently (every 5 seconds) and see if bootTestRule is working and boot_output has changed from NULL to ON. After that the script writes the difference between the OS boot timestamp and now timestamp into that file, waits 30 seconds, stops openhab service, reboots the OS and starts again.
That is done 10 times. So I have time measurements of startup time of 10 startups without any changes by me. So i can compare startup time with every change I will further do.
rule
"bootTestRule"
when
Item boot_input changed
then
boot_output.sendCommand( ON )
end
This is the startup duration time until the the bootTestRule worked out with 18 rules:
5:25 Minutes
4:36 Minutes
5:54 Minutes
6:14 Minutes
4:53 Minutes
4:41 Minutes
4:44 Minutes
4:34 Minutes
4:31 Minutes
After that I added another rule and startes the script again (automatically 10 times). Not so complicated rule to me.
5:18 Minutes
6:09 Minutes
6:48 Minutes
5:29 Minutes
5:24 Minutes
6:56 Minutes
5:23 Minutes
5:13 Minutes
5:07 Minutes
Rule which added almost a minute of startup time:
rule
"regelStatusHelligkeitAenderung"
when
Item Bewegungsmelder1_helligkeit changed
then
var helligkeit = Bewegungsmelder1_helligkeit .state
var leicht = 175
var mittel = 149
var dunkel = 122
var voll = 10
var rollo_mittel = 70
var rollo_sehr = 20
if (helligkeit < voll && st_helligkeit_dunkel_voll.state != ON) st_helligkeit_dunkel_voll.sendCommand(ON)
else if (helligkeit > (voll + 20) && st_helligkeit_dunkel_voll.state != OFF) st_helligkeit_dunkel_voll.sendCommand(OFF)
if ( helligkeit < dunkel || ( helligkeit < (dunkel + 10) && st_helligkeit_dunkel_sehr.state != OFF ) ) {
if ( st_helligkeit_dunkel_sehr.state != ON ) logInfo("st_helligkeit.rules", "regelStatusHelligkeitAenderung: jetzt dunkel.")
if ( st_helligkeit_dunkel_sehr.state != ON ) st_helligkeit_dunkel_sehr.sendCommand(ON)
if ( st_helligkeit_dunkel_mittel.state != OFF ) st_helligkeit_dunkel_mittel.sendCommand(OFF)
if ( st_helligkeit_dunkel_leicht.state != OFF ) st_helligkeit_dunkel_leicht.sendCommand(OFF)
if ( st_helligkeit_dunkel_aus.state != OFF ) st_helligkeit_dunkel_aus.sendCommand(OFF)
} else if (helligkeit < mittel || ( helligkeit < (mittel + 10) && st_helligkeit_dunkel_mittel.state != OFF )) {
if ( st_helligkeit_dunkel_mittel.state != ON ) logInfo("st_helligkeit.rules", "regelStatusHelligkeitAenderung: jetzt mittel.")
if ( st_helligkeit_dunkel_sehr.state != OFF ) st_helligkeit_dunkel_sehr.sendCommand(OFF)
if ( st_helligkeit_dunkel_mittel.state != ON ) st_helligkeit_dunkel_mittel.sendCommand(ON)
if ( st_helligkeit_dunkel_leicht.state != OFF ) st_helligkeit_dunkel_leicht.sendCommand(OFF)
if ( st_helligkeit_dunkel_aus.state != OFF ) st_helligkeit_dunkel_aus.sendCommand(OFF)
} else if (helligkeit < leicht || ( helligkeit < (leicht + 10) && st_helligkeit_dunkel_leicht.state != OFF )) {
if ( st_helligkeit_dunkel_leicht.state != ON ) logInfo("st_helligkeit.rules", "regelStatusHelligkeitAenderung: jetzt leicht.")
if ( st_helligkeit_dunkel_sehr.state != OFF ) st_helligkeit_dunkel_sehr.sendCommand(OFF)
if ( st_helligkeit_dunkel_mittel.state != OFF ) st_helligkeit_dunkel_mittel.sendCommand(OFF)
if ( st_helligkeit_dunkel_leicht.state != ON ) st_helligkeit_dunkel_leicht.sendCommand(ON)
if ( st_helligkeit_dunkel_aus.state != OFF ) st_helligkeit_dunkel_aus.sendCommand(OFF)
} else {
if ( st_helligkeit_dunkel_aus.state != ON )logInfo("st_helligkeit.rules", "regelStatusHelligkeitAenderung: jetzt hell.")
if ( st_helligkeit_dunkel_sehr.state != OFF ) st_helligkeit_dunkel_sehr.sendCommand(OFF)
if ( st_helligkeit_dunkel_mittel.state != OFF ) st_helligkeit_dunkel_mittel.sendCommand(OFF)
if ( st_helligkeit_dunkel_leicht.state != OFF ) st_helligkeit_dunkel_leicht.sendCommand(OFF)
if ( st_helligkeit_dunkel_aus.state != ON ) st_helligkeit_dunkel_aus.sendCommand(ON)
}
if ( helligkeit < rollo_sehr || ( helligkeit < ( rollo_sehr + 5) && st_helligkeit_rollo_sehr.state != OFF ) ) {
if ( st_helligkeit_rollo_sehr.state != ON ) logInfo("st_helligkeit.rules", "regelStatusHelligkeitAenderung: Rollo jetzt sehr.")
if ( st_helligkeit_rollo_sehr.state != ON ) st_helligkeit_rollo_sehr.sendCommand(ON)
if ( st_helligkeit_rollo_mittel.state != OFF ) st_helligkeit_rollo_mittel.sendCommand(OFF)
if ( st_helligkeit_rollo_aus.state != OFF ) st_helligkeit_rollo_aus.sendCommand(OFF)
} else if (helligkeit < rollo_mittel || ( helligkeit < ( rollo_mittel + 5) && st_helligkeit_rollo_mittel.state != OFF )) {
if ( st_helligkeit_rollo_mittel.state != ON ) logInfo("st_helligkeit.rules", "regelStatusHelligkeitAenderung: Rollo jetzt mittel.")
if ( st_helligkeit_rollo_sehr.state != OFF ) st_helligkeit_rollo_sehr.sendCommand(OFF)
if ( st_helligkeit_rollo_mittel.state != ON ) st_helligkeit_rollo_mittel.sendCommand(ON)
if ( st_helligkeit_rollo_aus.state != OFF ) st_helligkeit_rollo_aus.sendCommand(OFF)
} else {
if ( st_helligkeit_rollo_aus.state != ON )logInfo("st_helligkeit.rules", "regelStatusHelligkeitAenderung: Rollo jetzt hell.")
if ( st_helligkeit_rollo_sehr.state != OFF ) st_helligkeit_rollo_sehr.sendCommand(OFF)
if ( st_helligkeit_rollo_mittel.state != OFF ) st_helligkeit_rollo_mittel.sendCommand(OFF)
if ( st_helligkeit_rollo_aus.state != ON ) st_helligkeit_rollo_aus.sendCommand(ON)
}
end
After that, I have tried to add all missing rules (another 14) at once to see what startup time will turn to. My srcipt run endlessly. After checking what happend, I found out that not all rules were loaded. Even after hours of running. The bootTestRule, which worked before and was not touched since than, was not loaded anymore. I can reboot as often or wait as long as I want, rules are not loaded. Files are there, permissions and ownership are equal, filesystem is fine.
What is going on? Why are not all rules loaded? Why is adding one rule so much time to startup. Where to seach? I try so hard with karaf, but I don’t know where to look at.