Errors after upgrade to 2.2

Yeah very lucky that we are close to some. Even if it is not working there is more coming to try it again :smiley:

I already fixed all my rules with null in it and added === & !==; I tried to understand it, but yeah… I just did it.

Thank you for your help - I will mark it as done in my list.

@DaAndy, please see this discussion regarding the Queue Full message. If you need the older astro binding, just let me know.

I did not look for the reason, I just did this:

rule "Xiaomi Switch - SHORT_PRESSED"
when
    Channel "mihome:sensor_switch:<ID>:button" triggered SHORT_PRESSED
then
    logInfo("RULE.XiaomiSwitch","<-- SHORT_PRESSED")
end

Hello Brad,

the discussion you linked is a blogpost about “Taipei Signal Army”? :smiley: I do not have that Queue Full message anymore after the upgrade to 2.2 - main reason for the upgrade.

@Olymp
Hey Sergey,
I want to avoid to change all my rules - most of my buttons do need short, double & long pressed, so I will have three rules for one button then. That is why I am asking. The overview with one rule for each button was really good in my files and I do not want to loose it. Even it worked for some time and if you look for these ChannelTriggeredEvents there is even “getEvent” listed, so this has to be a bug or something - at least I think so.

But thank you for your help. I guess that I will just do a backup and then split up the rules to have the buttons working again and when the problem is solved I can just put my backup in again. :slight_smile:

I suggested the option to work now! It is better to have 3 rules that work than one that does not work.

Um yeah - about that…

Someone sent me the following
’’’

       *             ,
                   _/^\_
                  <     >
 *                 /.-.\         *
          *        `/&\`                   *
                  ,@.*;@,
                 /_o.I %_\    *
    *           (`'--:o(_@;
               /`;--.,__ `')             *
              ;@`o % O,*`'`&\
        *    (`'--)_@ ;o %'()\      *
             /`;--._`''--._O'@;
            /&*,()~o`;-.,_ `""`)
 *          /`,@ ;+& () o*`;-';\
           (`""--.,_0 +% @' &()\
           /-.,_    ``''--....-'`)  *
      *    /@%;o`:;'--,.__   __.'\
          ;*,&(); @ % &^;~`"`o;@();         *
          /(); o^~; & ().o@*&`;&%O\
    jgs   `"="==""==,,,.,="=="==="`
       __.----.(\-''#####---...___...-----._
     '`         \)_`"""""`
             .--' ')
           o(  )_-\
             `"""` `

‘’'
to which I had replied that one could just imagine that coming out of an old teletype like a Model 15 or Kleinschmidt on Christmas Eve many years ago.

The thread I was supposed to be referring you to is here.

2 Likes

I’ve made these changes too, it is working, but this did not fix the error messages in log.

Any idea?

Oh, it’s important. It’s possible/likely that discovery will not work, or will not work correctly, by the binding for which this error was generated.

This does not solve it on my side.
can you post the code you use?

Post the code you use and the errors you get.
That way we can have a look.

I played around a lot. For me it looks like a timing problem.

Sometimes no error in log after OH restart, sometimes a lot.

What I see, the timing between items load and persistance load is faster now. On OH2.1 it take up to 5sec between items and persistance ae loaded.

Can this be configured?

Soemtimes I get error messages that the items do not exist at the time the on startup persistance runs or a rule triggers after restart of OH2.2

You were referring to an observed error while executing the holiday script. However that does not correlate with your reported findings.
Please verify.

Not sure. The errors are related to the holiday.script. But the do not come on every restart of OH2.2

In this case please post the code used and the error observed,.
I’m using the holiday script (probably with slight differences to your code) and I do not see any errors.

This is the code of the holiday script:

Mostly original only == changed to === and the last lines with the postUpdate.

//https://github.com/openhab/openhab1-addons/wiki/Samples-Rules#how-to-calculate-public-holidays
var int year = now.getYear

var int a = year % 19
var int b = year / 100
var int c = year % 100
var int d = b / 4;
var int e = b % 4;
var int f = (b + 8) / 25;
var int g = (b - f + 1) / 3;
var int h = (19 * a + b - d - g + 15) % 30;
var int i = c / 4;
var int k = c % 4;
var int L = (32 + 2 * e + 2 * i - h - k) % 7;
var int m = (a + 11 * h + 22 * L) / 451;

var int month = (h + L - 7 * m + 114) / 31;
var int day = ((h + L - 7 * m + 114) % 31) + 1;

var boolean holiday = false
var String holidayName = null
var org.joda.time.DateTime easterSunday = parse(year+"-"+month+"-"+day)
var org.joda.time.DateTime stAdvent = parse(year+"-12-25").minusDays(((parse(year+"-12-25").getDayOfWeek) + 21))

var int dayOfYear = now.getDayOfYear
// bundesweiter Feiertag
if (dayOfYear==parse(year+"-01-01").getDayOfYear) {
    holidayName = "new_years_day" // Neujahr
    holiday = true
}
// Baden-Württemberg, Bayern, Sachsen-Anhalt
else if (dayOfYear==parse(year+"-01-06").getDayOfYear) {
    holidayName = "holy_trinity"// Heilige 3 Könige
    holiday = ture 
}
// Carnival ;-)
else if (dayOfYear==easterSunday.getDayOfYear-48) {
    holidayName = "carnival_monday" // Rosenmontag
    holiday = false
}
// bundesweiter Feiertag
else if (dayOfYear==easterSunday.getDayOfYear-2) {
    holidayName = "good_friday" // Karfreitag
    holiday = true
}
// Brandenburg
else if (dayOfYear==easterSunday.getDayOfYear) {
    holidayName = "easter_sunday" // Ostersonntag
    holiday = true
}
// bundesweiter Feiertag
else if (dayOfYear==easterSunday.getDayOfYear+1) {
    holidayName = "easter_monday" // Ostermontag
    holiday = true
}
// bundesweiter Feiertag
else if (dayOfYear==parse(year+"-05-01").getDayOfYear) {
    holidayName = "1st_may"// Tag der Arbeit
    holiday = true 
}
// bundesweiter Feiertag
else if (dayOfYear==easterSunday.getDayOfYear+39) {
    holidayName = "ascension_day" // Christi Himmelfahrt
    holiday = true
}
// Brandenburg
else if (dayOfYear==easterSunday.getDayOfYear+49) {
    holidayName = "whit_sunday" // Pfingstsonntag
    holiday = true
}
// bundesweiter Feiertag
else if (dayOfYear==easterSunday.getDayOfYear+50) {
    holidayName = "whit_monday" // Pfingstmontag
    holiday = true
}
// Baden-Württemberg, Bayern, Hessen, NRW, Rheinland-Pfalz, Saarland sowie regional in Sachsen, Thüringen
else if (dayOfYear==easterSunday.getDayOfYear+60) {
    holidayName = "corpus_christi" // Frohnleichnahm
    holiday = true
}
// Saarland sowie regional in Bayern
else if (dayOfYear==parse(year+"-08-15").getDayOfYear) {
    holidayName = "assumption_day" // Mariä Himmelfahrt
    holiday = false
}
// bundesweiter Feiertag
else if (dayOfYear==parse(year+"-10-03").getDayOfYear) {
    holidayName = "reunification" // Tag der deutschen Einheit
    holiday = true
}
// Brandenburg, Mecklenburg-Vorpommern, Sachsen, Sachsen-Anhalt, Thüringen
else if (dayOfYear==parse(year+"-10-31").getDayOfYear) {
    holidayName = "reformation_day" // Reformationstag
    holiday = false
}
// Baden-Württemberg, Bayern, NRW, Rheinland-Pfalz, Saarland
else if (dayOfYear==parse(year+"-11-01").getDayOfYear) {
    holidayName = "all_saints_day" // Allerheiligen
    holiday = true
}
// religiöser Tag
else if (dayOfYear==stAdvent.getDayOfYear-14) {
    holidayName = "remembrance_day" // Volkstrauertag
    holiday = false
}
// religiöser Tag
else if (dayOfYear==stAdvent.getDayOfYear-7) {
    holidayName = "sunday_in_commemoration_of_the_dead" // Totensonntag
    holiday = false
}
// Sachsen
else if (dayOfYear==stAdvent.getDayOfYear-11) {
    holidayName = "day_of_repentance" // Buß- und Bettag
    holiday = false
}
// kann auch der 4te Advent sein
else if (dayOfYear==parse(year+"-12-24").getDayOfYear) {
    holidayName = "christmas_eve" // Heiligabend
    holiday = false
}
// bundesweiter Feiertag
else if (dayOfYear==parse(year+"-12-25").getDayOfYear) {
    holidayName = "1st_christmas_day" // 1. Weihnachtstag
    holiday = true
}
// bundesweiter Feiertag
else if (dayOfYear==parse(year+"-12-26").getDayOfYear) {
    holidayName = "2nd_christmas_day" // 2. Weihnachtstag
    holiday = true
}
// Silvester
else if (dayOfYear==parse(year+"-12-31").getDayOfYear) {
    holidayName = "new_years_eve" // Silvester
    holiday = false
}
if (holidayName!==null) {
    SpecialDay.postUpdate(holidayName)
}
if (holiday) {
    Holiday.postUpdate(ON)
}
else {
    Holiday.postUpdate(OFF)
}

And this is the error message in the log on OH startup. Hopefully this will help.

But this error messages do not come on every startup, only most of the startups.

2017-12-26 15:56:22.398 [ERROR] [xbase.resource.BatchLinkableResource] - resolution of uriFragment '|::0.0.1.2::0::/1' failed.
java.lang.IllegalStateException: SpecialDay uses unsupported uri fragment tmp_holidays.script#/1/@members.47
    at org.eclipse.xtext.xbase.typesystem.internal.ScopeProviderAccess.getCandidateDescriptions(ScopeProviderAccess.java:158) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.getLinkingCandidates(AbstractTypeComputationState.java:409) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer._computeTypes(XbaseTypeComputer.java:1086) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer.computeTypes(XbaseTypeComputer.java:100) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.doComputeTypes(AbstractTypeComputationState.java:121) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.computeTypes(AbstractTypeComputationState.java:109) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.createResolvedLink(AbstractTypeComputationState.java:429) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.ExpressionTypeComputationState.createResolvedLink(ExpressionTypeComputationState.java:119) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.ScopeProviderAccess.getKnownFeature(ScopeProviderAccess.java:80) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.getLinkingCandidates(AbstractTypeComputationState.java:385) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer._computeTypes(XbaseTypeComputer.java:1086) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer.computeTypes(XbaseTypeComputer.java:100) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.doComputeTypes(AbstractTypeComputationState.java:121) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.ExpressionTypeComputationState.doComputeTypes(ExpressionTypeComputationState.java:59) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.computeTypes(AbstractTypeComputationState.java:109) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer._computeTypes(XbaseTypeComputer.java:473) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer.computeTypes(XbaseTypeComputer.java:106) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.doComputeTypes(AbstractTypeComputationState.java:121) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.ExpressionTypeComputationState.doComputeTypes(ExpressionTypeComputationState.java:59) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.computeTypes(AbstractTypeComputationState.java:109) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer._computeTypes(XbaseTypeComputer.java:247) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer.computeTypes(XbaseTypeComputer.java:120) [164:org.eclipse.xtext.xbase:2.12.0.v20170519-0752]
    at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.doComputeTypes(AbstractTypeComputationState.java:121) 

snipped, are a lot of more lines.

OK, the only thing I can say is that I’m not seeing this error. Sorry no help from my side (at least at the moment).

The problem is this line:

SpecialDay.postUpdate(holidayName)

If I comment this out there is no error. The question is, how is the type convertion correct.

And from here:

I comes only on system startup, if I run the script by other tirgger there is no problem.

My guess is, that it is caused by something loaded later during start-up while script is already running.

maybe, but if I change the line
from
SpecialDay.postUpdate(holidayName)
to
SpecialDay.postUpdate(“I dont know”)
no error.

Looks like a type conversation problem.