After openhabe 2.3 update, homematic binding don't update item status

  • Platform information:
    • Hardware: RaspberryPi3 with 32GB
    • OS: Raspbian 4.14.34-v7+
    • Java Runtime Environment: Java™ SE Runtime Environment (build 1.8.0_121-b13)
    • openHAB version: 2.3.0 (Build)

Hi, yesterday i update my Openhab to version 2.3, but my roller shutter rule don’t work anymore.

It is the same error in every Roller Shutter rule.

2018-06-06 16:02:00.081 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter Vorne Kinderzimmer1 Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 414, column 20, length 51
2018-06-06 16:02:00.084 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter Esszimmer Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 298, column 20, length 42
2018-06-06 16:02:00.112 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter Kueche Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 298, column 20, length 39
2018-06-06 16:02:00.113 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter Seite Kinderzimmer1 Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 562, column 20, length 51
2018-06-06 16:02:00.118 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter Fenster EG Wohnzimmer Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 414, column 20, length 50
2018-06-06 16:02:00.141 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter EG Schlafzimmer Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 298, column 20, length 45
2018-06-06 16:02:00.139 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter OG Schlafzimmer Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 298, column 20, length 45
2018-06-06 16:02:00.156 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter Balkon OG Wohnzimmer Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 557, column 20, length 49
2018-06-06 16:02:03.595 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter Fenster OG Wohnzimmer Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 409, column 20, length 49
2018-06-06 16:02:03.604 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter OG Bad Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 298, column 20, length 36
2018-06-06 16:02:03.605 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter Arbeitszimmer Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 298, column 20, length 46
2018-06-06 16:02:03.617 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollershutter Terrasse EG Wohnzimmer Action': Could not cast NULL to org.eclipse.smarthome.core.library.types.DecimalType; line 562, column 20, length 51

It is this line of code:

	var int actual = (Rolladen_OG_Bad.state as DecimalType).intValue

It seems that the rule don’t get the roller shutter level from the homematic binding.

The Rule:

import java.util.Random
import java.util.Calendar
import org.eclipse.smarthome.core.library.types.DecimalType
import org.eclipse.smarthome.core.library.types.DateTimeType

rule "Rollershutter OG Bad Init"
when
    System started
then
	if (AufZeitStundeMontagOGBad.state == NULL) {
		AufZeitStundeMontagOGBad.postUpdate(7);
	}
	if (AufZeitMinuteMontagOGBad.state == NULL) {
		AufZeitMinuteMontagOGBad.postUpdate(0);
	}
	if (AbZeitStundeMontagOGBad.state == NULL) {
		AbZeitStundeMontagOGBad.postUpdate(22);
	}
	if (AbZeitMinuteMontagOGBad.state == NULL) {
		AbZeitMinuteMontagOGBad.postUpdate(0);
	}
	if (AufZeitStundeDienstagOGBad.state == NULL) {
		AufZeitStundeDienstagOGBad.postUpdate(7);
	}
	if (AufZeitMinuteDienstagOGBad.state == NULL) {
		AufZeitMinuteDienstagOGBad.postUpdate(0);
	}
	if (AbZeitStundeDienstagOGBad.state == NULL) {
		AbZeitStundeDienstagOGBad.postUpdate(22);
	}
	if (AbZeitMinuteDienstagOGBad.state == NULL) {
		AbZeitMinuteDienstagOGBad.postUpdate(0);
	}
	if (AufZeitStundeMittwochOGBad.state == NULL) {
		AufZeitStundeMittwochOGBad.postUpdate(7);
	}
	if (AufZeitMinuteMittwochOGBad.state == NULL) {
		AufZeitMinuteMittwochOGBad.postUpdate(0);
	}
	if (AbZeitStundeMittwochOGBad.state == NULL) {
		AbZeitStundeMittwochOGBad.postUpdate(22);
	}
	if (AbZeitMinuteMittwochOGBad.state == NULL) {
		AbZeitMinuteMittwochOGBad.postUpdate(0);
	}
	if (AufZeitStundeDonnerstagOGBad.state == NULL) {
		AufZeitStundeDonnerstagOGBad.postUpdate(7);
	}
	if (AufZeitMinuteDonnerstagOGBad.state == NULL) {
		AufZeitMinuteDonnerstagOGBad.postUpdate(0);
	}
	if (AbZeitStundeDonnerstagOGBad.state == NULL) {
		AbZeitStundeDonnerstagOGBad.postUpdate(22);
	}
	if (AbZeitMinuteDonnerstagOGBad.state == NULL) {
		AbZeitMinuteDonnerstagOGBad.postUpdate(0);
	}
	if (AufZeitStundeFreitagOGBad.state == NULL) {
		AufZeitStundeFreitagOGBad.postUpdate(7);
	}
	if (AufZeitMinuteFreitagOGBad.state == NULL) {
		AufZeitMinuteFreitagOGBad.postUpdate(0);
	}
	if (AbZeitStundeFreitagOGBad.state == NULL) {
		AbZeitStundeFreitagOGBad.postUpdate(22);
	}
	if (AbZeitMinuteFreitagOGBad.state == NULL) {
		AbZeitMinuteFreitagOGBad.postUpdate(0);
	}
	if (AufZeitStundeSamstagOGBad.state == NULL) {
		AufZeitStundeSamstagOGBad.postUpdate(9);
	}
	if (AufZeitMinuteSamstagOGBad.state == NULL) {
		AufZeitMinuteSamstagOGBad.postUpdate(0);
	}
	if (AbZeitStundeSamstagOGBad.state == NULL) {
		AbZeitStundeSamstagOGBad.postUpdate(22);
	}
	if (AbZeitMinuteSamstagOGBad.state == NULL) {
		AbZeitMinuteSamstagOGBad.postUpdate(0);
	}
	if (AufZeitStundeSonntagOGBad.state == NULL) {
		AufZeitStundeSonntagOGBad.postUpdate(9);
	}
	if (AufZeitMinuteSonntagOGBad.state == NULL) {
		AufZeitMinuteSonntagOGBad.postUpdate(0);
	}
	if (AbZeitStundeSonntagOGBad.state == NULL) {
		AbZeitStundeSonntagOGBad.postUpdate(22);
	}
	if (AbZeitMinuteSonntagOGBad.state == NULL) {
		AbZeitMinuteSonntagOGBad.postUpdate(0);
	}
	if (ModeNachtschaltungOGBad.state == NULL) {
		ModeNachtschaltungOGBad.postUpdate("GLOBAL");
	}
	if (ModeSonnenschutzFensterOGBad.state == NULL) {
		ModeSonnenschutzFensterOGBad.postUpdate(OFF);
	}
	if (MaxSonnenschutzFensterOGBad.state == NULL) {
		MaxSonnenschutzFensterOGBad.postUpdate(40);
	}
	if (WinkelLinksSonnenschutzFensterOGBad.state == NULL) {
		WinkelLinksSonnenschutzFensterOGBad.postUpdate(219);
	}
	if (WinkelRechtsSonnenschutzFensterOGBad.state == NULL) {
		WinkelRechtsSonnenschutzFensterOGBad.postUpdate(264);
	}
	if (NachtsRolladenStandFensterOGBad.state == NULL) {
		NachtsRolladenStandFensterOGBad.postUpdate(100);
	}
	if (WolkenSonnenschutzFensterOGBad.state == NULL) {
		WolkenSonnenschutzFensterOGBad.postUpdate(40);
	}
	if (AlterRolladenStandFensterOGBad.state == NULL) {
		AlterRolladenStandFensterOGBad.postUpdate(0);
	}
end

rule "Rollershutter OG Bad Update"
when
	Item Rolladen_OG_Bad changed
then
	var int upTime = 0
	var int downTime = 0

	var Nachtmodus = false

	if(ModeNachtschaltungOGBad.state.toString == "ASTRO") {
		upTime = (SunriseTime.state as DateTimeType).getCalendar.get(Calendar.HOUR_OF_DAY).intValue * 60 + (SunriseTime.state as DateTimeType).getCalendar.get(Calendar.MINUTE).intValue
		downTime = (SunsetTime.state as DateTimeType).getCalendar.get(Calendar.HOUR_OF_DAY).intValue * 60 + (SunsetTime.state as DateTimeType).getCalendar.get(Calendar.MINUTE).intValue
		Nachtmodus = true
	} else if(ModeNachtschaltungOGBad.state.toString == "GLOBAL") {
		if(0 < now.getDayOfWeek && now.getDayOfWeek < 6) {
			upTime = (AufZeitStundeWerktagsAllgemein.state as DecimalType).intValue * 60 + (AufZeitMinuteWerktagsAllgemein.state as DecimalType).intValue
			downTime = (AbZeitStundeWerktagsAllgemein.state as DecimalType).intValue * 60 + (AbZeitMinuteWerktagsAllgemein.state as DecimalType).intValue
		} else if(5 < now.getDayOfWeek && now.getDayOfWeek < 8) {
			upTime = (AufZeitStundeWochenendeAllgemein.state as DecimalType).intValue * 60 + (AufZeitMinuteWochenendeAllgemein.state as DecimalType).intValue
			downTime = (AbZeitStundeWochenendeAllgemein.state as DecimalType).intValue * 60 + (AbZeitMinuteWochenendeAllgemein.state as DecimalType).intValue
		}
		Nachtmodus = true
	} else if(ModeNachtschaltungOGBad.state.toString == "LOCAL") {
		if(now.getDayOfWeek == 1){
			upTime = (AufZeitStundeMontagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteMontagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeMontagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteMontagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 2) {
			upTime = (AufZeitStundeDienstagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteDienstagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeDienstagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteDienstagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 3) {
			upTime = (AufZeitStundeMittwochOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteMittwochOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeMittwochOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteMittwochOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 4) {
			upTime = (AufZeitStundeDonnerstagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteDonnerstagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeDonnerstagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteDonnerstagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 5) {
			upTime = (AufZeitStundeFreitagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteFreitagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeFreitagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteFreitagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 6) {
			upTime = (AufZeitStundeSamstagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteSamstagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeSamstagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteSamstagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 7) {
			upTime = (AufZeitStundeSonntagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteSonntagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeSonntagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteSonntagOGBad.state as DecimalType).intValue
	    }
	    Nachtmodus = true
	}
	
	var int currentTime = now.getHourOfDay * 60 + now.getMinuteOfHour
	var int azimuth = (SunAzimuth.state as DecimalType).intValue
	var int left = (WinkelLinksSonnenschutzFensterOGBad.state as DecimalType).intValue
	var int right = (WinkelRechtsSonnenschutzFensterOGBad.state as DecimalType).intValue
	
	if(upTime < downTime) {
	    if((currentTime > downTime || currentTime < upTime) && Nachtmodus == true) {
	    	NachtsRolladenStandFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)
	    } else if ((currentTime <= downTime && currentTime >= upTime) || Nachtmodus == false) {
	    	if(left < right) {
				if ((azimuth > left && azimuth < right) && ModeSonnenschutzFensterOGBad.state == ON) {
					MaxSonnenschutzFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)
			    } else {
					AlterRolladenStandFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)
			    }
			} else {
				if ((azimuth > left || azimuth < right) && ModeSonnenschutzFensterOGBad.state == ON) {
	    			MaxSonnenschutzFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)		
			    } else {
					AlterRolladenStandFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)					
			    }
			}
	    }
    } else {
	    if((currentTime > downTime && currentTime < upTime) && Nachtmodus == true) {
	    	NachtsRolladenStandFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)
	    } else if ((currentTime <= downTime || currentTime >= upTime) || Nachtmodus == false) {
	    	if(left < right) {
				if ((azimuth > left && azimuth < right) && ModeSonnenschutzFensterOGBad.state == ON) {
	    			MaxSonnenschutzFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)					
			    } else {
					AlterRolladenStandFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)					
			    }
			} else {
				if ((azimuth > left || azimuth < right) && ModeSonnenschutzFensterOGBad.state == ON) {
	    			MaxSonnenschutzFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)					
			    } else {
					AlterRolladenStandFensterOGBad.postUpdate((Rolladen_OG_Bad.state as DecimalType).intValue)					
			    }
			}
	    }
    }
end

rule "Rollershutter OG Bad Action"
when
	Item SunAzimuth changed or
	Time cron "0 0/5 * * * ?" or
	Item AufZeitStundeMontagOGBad changed or
	Item AufZeitMinuteMontagOGBad changed or
	Item AbZeitStundeMontagOGBad changed or
	Item AbZeitMinuteMontagOGBad changed or
	Item AufZeitStundeDienstagOGBad changed or
	Item AufZeitMinuteDienstagOGBad changed or
	Item AbZeitStundeDienstagOGBad changed or
	Item AbZeitMinuteDienstagOGBad changed or
	Item AufZeitStundeMittwochOGBad changed or
	Item AufZeitMinuteMittwochOGBad changed or
	Item AbZeitStundeMittwochOGBad changed or
	Item AbZeitMinuteMittwochOGBad changed or
	Item AufZeitStundeDonnerstagOGBad changed or
	Item AufZeitMinuteDonnerstagOGBad changed or
	Item AbZeitStundeDonnerstagOGBad changed or
	Item AbZeitMinuteDonnerstagOGBad changed or
	Item AufZeitStundeFreitagOGBad changed or
	Item AufZeitMinuteFreitagOGBad changed or
	Item AbZeitStundeFreitagOGBad changed or
	Item AbZeitMinuteFreitagOGBad changed or
	Item AufZeitStundeSamstagOGBad changed or
	Item AufZeitMinuteSamstagOGBad changed or
	Item AbZeitStundeSamstagOGBad changed or
	Item AbZeitMinuteSamstagOGBad changed or
	Item AufZeitStundeSonntagOGBad changed or
	Item AufZeitMinuteSonntagOGBad changed or
	Item AbZeitStundeSonntagOGBad changed or
	Item AbZeitMinuteSonntagOGBad changed or
	Item ModeNachtschaltungOGBad changed or
	Item ModeSonnenschutzFensterOGBad changed or
	Item MaxSonnenschutzFensterOGBad changed or
	Item WinkelLinksSonnenschutzFensterOGBad changed or
	Item WinkelRechtsSonnenschutzFensterOGBad changed or
	Item WolkenSonnenschutzFensterOGBad changed or
	Item Clouds changed
then	
	var int upTime = 0
	var int downTime = 0
	
	var Nachtmodus = false

	if(ModeNachtschaltungOGBad.state.toString == "ASTRO") {
		upTime = (SunriseTime.state as DateTimeType).getCalendar.get(Calendar.HOUR_OF_DAY).intValue * 60 + (SunriseTime.state as DateTimeType).getCalendar.get(Calendar.MINUTE).intValue
		downTime = (SunsetTime.state as DateTimeType).getCalendar.get(Calendar.HOUR_OF_DAY).intValue * 60 + (SunsetTime.state as DateTimeType).getCalendar.get(Calendar.MINUTE).intValue
		Nachtmodus = true
	} else if(ModeNachtschaltungOGBad.state.toString == "GLOBAL") {
		if(0 < now.getDayOfWeek && now.getDayOfWeek < 6) {
			upTime = (AufZeitStundeWerktagsAllgemein.state as DecimalType).intValue * 60 + (AufZeitMinuteWerktagsAllgemein.state as DecimalType).intValue
			downTime = (AbZeitStundeWerktagsAllgemein.state as DecimalType).intValue * 60 + (AbZeitMinuteWerktagsAllgemein.state as DecimalType).intValue
		} else if(5 < now.getDayOfWeek && now.getDayOfWeek < 8) {
			upTime = (AufZeitStundeWochenendeAllgemein.state as DecimalType).intValue * 60 + (AufZeitMinuteWochenendeAllgemein.state as DecimalType).intValue
			downTime = (AbZeitStundeWochenendeAllgemein.state as DecimalType).intValue * 60 + (AbZeitMinuteWochenendeAllgemein.state as DecimalType).intValue
		}
		Nachtmodus = true
	} else if(ModeNachtschaltungOGBad.state.toString == "LOCAL") {
		if(now.getDayOfWeek == 1){
			upTime = (AufZeitStundeMontagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteMontagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeMontagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteMontagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 2) {
			upTime = (AufZeitStundeDienstagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteDienstagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeDienstagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteDienstagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 3) {
			upTime = (AufZeitStundeMittwochOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteMittwochOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeMittwochOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteMittwochOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 4) {
			upTime = (AufZeitStundeDonnerstagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteDonnerstagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeDonnerstagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteDonnerstagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 5) {
			upTime = (AufZeitStundeFreitagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteFreitagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeFreitagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteFreitagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 6) {
			upTime = (AufZeitStundeSamstagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteSamstagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeSamstagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteSamstagOGBad.state as DecimalType).intValue
		} else if(now.getDayOfWeek == 7) {
			upTime = (AufZeitStundeSonntagOGBad.state as DecimalType).intValue * 60 + (AufZeitMinuteSonntagOGBad.state as DecimalType).intValue
			downTime = (AbZeitStundeSonntagOGBad.state as DecimalType).intValue * 60 + (AbZeitMinuteSonntagOGBad.state as DecimalType).intValue
	    }
	    Nachtmodus = true
	}

    var int currentTime = now.getHourOfDay * 60 + now.getMinuteOfHour
    var int azimuth = (SunAzimuth.state as DecimalType).intValue
	var int actual = (Rolladen_OG_Bad.state as DecimalType).intValue
	var int max = (MaxSonnenschutzFensterOGBad.state as DecimalType).intValue
	var int left = (WinkelLinksSonnenschutzFensterOGBad.state as DecimalType).intValue
	var int right = (WinkelRechtsSonnenschutzFensterOGBad.state as DecimalType).intValue

	if((RandomMaxTime.state as DecimalType).intValue != (RandomMinTime.state as DecimalType).intValue) {
		var int random = (RandomMaxTime.state as DecimalType).intValue - (RandomMinTime.state as DecimalType).intValue
	
		upTime = upTime + (((new Random).nextInt(random)) + (RandomMinTime.state as DecimalType).intValue)
		downTime = downTime + (((new Random).nextInt(random)) + (RandomMinTime.state as DecimalType).intValue)
	}
	
    if(upTime < downTime) {
	    if((currentTime <= downTime && currentTime >= upTime) || Nachtmodus == false) {
			if(left < right) {
				if ((azimuth > left && azimuth < right) && (WolkenSonnenschutzFensterOGBad.state as DecimalType).intValue > (Clouds.state as DecimalType).intValue && actual <= max && ModeSonnenschutzFensterOGBad.state == ON) {
					if( actual != max ) {
						sendCommand(Rolladen_OG_Bad, max)
					}
			    } else if(actual != (AlterRolladenStandFensterOGBad.state as DecimalType).intValue) {
			    	sendCommand(Rolladen_OG_Bad, (AlterRolladenStandFensterOGBad.state as DecimalType).intValue)
			    }
			} else {
				if ((azimuth > left || azimuth < right) && (WolkenSonnenschutzFensterOGBad.state as DecimalType).intValue > (Clouds.state as DecimalType).intValue && actual <= max && ModeSonnenschutzFensterOGBad.state == ON) {
					if( actual != max ) {
						sendCommand(Rolladen_OG_Bad, max)
					}
			    } else if(actual != (AlterRolladenStandFensterOGBad.state as DecimalType).intValue) {
			    	sendCommand(Rolladen_OG_Bad, (AlterRolladenStandFensterOGBad.state as DecimalType).intValue)
			    }
			}
		} else if(actual < (NachtsRolladenStandFensterOGBad.state as DecimalType).intValue && Nachtmodus == true) {
			sendCommand(Rolladen_OG_Bad, (NachtsRolladenStandFensterOGBad.state as DecimalType).intValue)
	    }
    } else {
	    if((currentTime <= downTime || currentTime >= upTime) || Nachtmodus == false) {
			if(left < right) {
				if ((azimuth > left && azimuth < right) && (WolkenSonnenschutzFensterOGBad.state as DecimalType).intValue > (Clouds.state as DecimalType).intValue && actual <= max && ModeSonnenschutzFensterOGBad.state == ON) {
					if( actual != max ) {
						sendCommand(Rolladen_OG_Bad, max)
					}
			    } else if(actual != (AlterRolladenStandFensterOGBad.state as DecimalType).intValue) {
			    	sendCommand(Rolladen_OG_Bad, (AlterRolladenStandFensterOGBad.state as DecimalType).intValue)
			    }
			} else {
				if ((azimuth > left || azimuth < right) && (WolkenSonnenschutzFensterOGBad.state as DecimalType).intValue > (Clouds.state as DecimalType).intValue && actual <= max && ModeSonnenschutzFensterOGBad.state == ON) {
					if( actual != max ) {
						sendCommand(Rolladen_OG_Bad, max)
					}
			    } else if(actual != (AlterRolladenStandFensterOGBad.state as DecimalType).intValue) {
			    	sendCommand(Rolladen_OG_Bad, (AlterRolladenStandFensterOGBad.state as DecimalType).intValue)
			    }
			}
		} else if(actual < (NachtsRolladenStandFensterOGBad.state as DecimalType).intValue && Nachtmodus == true) {
	    	sendCommand(Rolladen_OG_Bad, (NachtsRolladenStandFensterOGBad.state as DecimalType).intValue)
		}
    }
end

OG_Bad.items

Rollershutter	Rolladen_OG_Bad			"Rolladen Bad oben"										(OG_Bad, OG_Rolladen)			[ "Switchable" ]			{ channel="homematic:HM-LC-Bl1-FM:NEQ1573894:NEQ1557267:1#LEVEL" }

Contact			Fensterkontakt_OG_Bad	"Fenster Bad oben"						<window>		(OG_Bad, OG_Fenster)

Switch			Deckenleuchte_OG_Bad	"Deckenleuchte [%s] Bad oben"           <light>			(OG_Bad, OG_Lampen)				[ "Lighting" ]
Switch			Schrankleuchte_OG_Bad	"Schrankleuchte [%s] Bad oben"          <light>			(OG_Bad, OG_Lampen)				[ "Lighting" ]


Number			Temperatur_OG_Bad		"Temperatur Ist [%.1f °C] Bad oben"		<temperature>	(OG_Bad, OG_Temperatur)			[ "CurrentTemperature" ]
Number			Heizung_OG_Bad			"Temperatur Soll [%.1f °C] Bad oben"	<heating>		(OG_Bad, OG_Heizung)			[ "Thermostat" ]
Number			Luftfeuchtigkeit_OG_Bad	"Luftfeuchtigkeit [%.1f %%] Bad oben"	<humidity>		(OG_Bad, OG_Luftfeuchtigkeit)

OG_Bad_Options.items

Number  AufZeitStundeMontagOGBad              "Hochfahrzeit Stunde [%s]"      <clock>
Number  AufZeitMinuteMontagOGBad              "Hochfahrzeit Minute [%s]"      <clock>
Number  AbZeitStundeMontagOGBad               "Abfahrzeit Stunde [%s]"        <clock>
Number  AbZeitMinuteMontagOGBad               "Abfahrzeit Minute [%s]"        <clock>
Number  AufZeitStundeDienstagOGBad            "Hochfahrzeit Stunde [%s]"      <clock>
Number  AufZeitMinuteDienstagOGBad            "Hochfahrzeit Minute [%s]"      <clock>
Number  AbZeitStundeDienstagOGBad             "Abfahrzeit Stunde [%s]"        <clock>
Number  AbZeitMinuteDienstagOGBad             "Abfahrzeit Minute [%s]"        <clock>
Number  AufZeitStundeMittwochOGBad            "Hochfahrzeit Stunde [%s]"      <clock>
Number  AufZeitMinuteMittwochOGBad            "Hochfahrzeit Minute [%s]"      <clock>
Number  AbZeitStundeMittwochOGBad             "Abfahrzeit Stunde [%s]"        <clock>
Number  AbZeitMinuteMittwochOGBad             "Abfahrzeit Minute [%s]"        <clock>
Number  AufZeitStundeDonnerstagOGBad          "Hochfahrzeit Stunde [%s]"      <clock>
Number  AufZeitMinuteDonnerstagOGBad          "Hochfahrzeit Minute [%s]"      <clock>
Number  AbZeitStundeDonnerstagOGBad           "Abfahrzeit Stunde [%s]"        <clock>
Number  AbZeitMinuteDonnerstagOGBad           "Abfahrzeit Minute [%s]"        <clock>
Number  AufZeitStundeFreitagOGBad             "Hochfahrzeit Stunde [%s]"      <clock>
Number  AufZeitMinuteFreitagOGBad             "Hochfahrzeit Minute [%s]"      <clock>
Number  AbZeitStundeFreitagOGBad              "Abfahrzeit Stunde [%s]"        <clock>
Number  AbZeitMinuteFreitagOGBad              "Abfahrzeit Minute [%s]"        <clock>
Number  AufZeitStundeSamstagOGBad             "Hochfahrzeit Stunde [%s]"      <clock>
Number  AufZeitMinuteSamstagOGBad             "Hochfahrzeit Minute [%s]"      <clock>
Number  AbZeitStundeSamstagOGBad              "Abfahrzeit Stunde [%s]"        <clock>
Number  AbZeitMinuteSamstagOGBad              "Abfahrzeit Minute [%s]"        <clock>
Number  AufZeitStundeSonntagOGBad             "Hochfahrzeit Stunde [%s]"      <clock>
Number  AufZeitMinuteSonntagOGBad             "Hochfahrzeit Minute [%s]"      <clock>
Number  AbZeitStundeSonntagOGBad              "Abfahrzeit Stunde [%s]"        <clock>
Number  AbZeitMinuteSonntagOGBad              "Abfahrzeit Minute [%s]"        <clock>
String  ModeNachtschaltungOGBad               "Mode [%s]"
Number  AlterRolladenStandFensterOGBad
Number  NachtsRolladenStandFensterOGBad
Switch  ModeSonnenschutzFensterOGBad          "Mode [%s]"
Number  WolkenSonnenschutzFensterOGBad        "Wolken [%s %%]"
Number  WinkelLinksSonnenschutzFensterOGBad   "Sonnenwinkel Links [%s]"       <incline>
Number  WinkelRechtsSonnenschutzFensterOGBad  "Sonnenwinkel Rechts [%s]"      <incline>
Number  MaxSonnenschutzFensterOGBad           "Maximaler Rolladenstand [%s]"  <rollershutter>

things

Bridge homematic:bridge:NEQ1573894 [ gatewayAddress="192.168.13.130" ] {
	Thing	HM-RCV-50			BidCoS-RF	"HM-RCV-50 BidCoS-RF"
	Thing	GATEWAY-EXTRAS-CCU	GWE00000000	"GATEWAY-EXTRAS-CCU"
	Thing	HM-PB-4Dis-WM-2		NEQ0396235	"Display Diele" @ "Diele"
	Thing	HM-PB-2-WM55		NAA0003833	"Schalter Bad OG Rolladen" @ "Bad OG"
	Thing	HM-RC-2-PBU-FM		NEQ1318291	"Schalter Treppe Licht Unten" @ "Treppe"
	Thing	HM-RC-2-PBU-FM		OEQ1215879	"Schalter Treppe Licht Oben" @ "Treppe"
	Thing	HM-LC-Sw1-FM		NEQ1504097	"Nachtlicht Treppe" @ "Treppe"
	Thing	HM-LC-Sw2-FM		NEQ1222482	"Seitenlicht Treppe" @ "Treppe"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793811	"Rolladen Anbau" @ "Anbau"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793815	"Rolladen Arbeitszimmer" @ "Arbeitszimmer"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793824	"Rolladen Bad EG" @ "Bad EG"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793832	"Rolladen Esszimmer" @ "Esszimmer"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793780	"Rolladen Küche" @ "Küche"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793795	"Rolladen Fenster Wohnzimmer EG" @ "Wohnzimmer EG"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793383	"Rolladen Terrasse Wohnzimmer EG" @ "Wohnzimmer EG"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793822	"Rolladen Schlafzimmer EG" @ "Schlafzimmer EG"
	Thing	HM-LC-Bl1-FM		NEQ1557267	"Rolladen Bad OG" @ "Bad OG"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793823	"Rolladen Vorne Kinderzimmer 1" @ "Kinderzimmer 1"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793828	"Rolladen Seite Kinderzimmer 1" @ "Kinderzimmer 1"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793831	"Rolladen Kinderzimmer 2" @ "Kinderzimmer 2"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793912	"Rolladen Schlafzimmer OG" @ "Schlafzimmer OG"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793930	"Rolladen Fenster Wohnzimmer OG" @ "Wohnzimmer OG"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793942	"Rolladen Balkon Wohnzimmer OG" @ "Wohnzimmer OG"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793908	"Rolladen Treppe" @ "Treppe"
	Thing	HM-LC-Bl1PBU-FM		NEQ1793807	"Makiese Terrasse" @ "Garten"
	Thing	HM-LC-Sw1-DR		NEQ0369977	"Schalter aussen Garage" @ "Garten"
	Thing	HM-LC-Sw2PBU-FM		NEQ1661065	"Schalter aussen Anbau" @ "Garten"
	Thing	HM-LC-Sw2PBU-FM		NEQ1660368	"Schalter aussen Diele" @ "Garten"
	Thing	HM-LC-Sw2PBU-FM		NEQ1660451	"Schalter aussen Wohnzimmer EG Licht" @ "Garten"
	Thing	HM-LC-Sw2PBU-FM		NEQ1660373	"Schalter aussen Wohnzimmer EG Steckdose" @ "Garten"
	Thing	HM-LC-Sw2PBU-FM		NEQ1661060	"Schalter aussen Wohnzimmer OG" @ "Garten"
	Thing	HM-Sec-SCo			OEQ0706840	"Balkontürkontakt Wohnzimmer OG" @ "Wohnzimmer OG"
	Thing	HM-Sec-SCo			OEQ0708726	"Terassentürkontakt Wohnzimmer EG" @ "Wohnzimmer EG"
	Thing	HM-Sec-SCo			OEQ0706869	"Terassentürkontakt Anbau" @ "Anbau"
	Thing	HM-CC-RT-DN			OEQ1712064	"Heizkörper Wohnzimmer EG" @ "Wohnzimmer EG"
}

Use === for compare with NULL.

I changed it to ===, but it did not fix the problem, since the problem comes from the shutter item itself.

Not quite right. null !== NULL

NULL is an Object of type State and it is a special State Items can have to indicated the Item is uninitialized. As an Object, NULL does have a .equals method so == should be used.

null is a primitive speical work in the programming langauge to indicate no value. As a primitive, null does not have a .equals method so one should use the identity operator === instead of the equivalency operator ==.

So === and !== should only be used with null and never used with NULL.

Its confusing and I rue the day they changed from using UNDEF to using NULL.

From what version of OH did you upgrade from?

Do not import anything from org.eclipse.smarthome. They are already imported for you.

When you Rule runs Rolladen_OG_Bad’s state is NULL. NULL is not of type DecimalType so you cannot cast it to DecimalType. As for why that is the case I cannot say but as long as that Item’s state remains NULL, that line as written will always generate an error. To avoid the error you need to do something like:

var int actual = -1
if(Rolladen_OG_Bad.state == NULL) {
    // what to do in an error
}
else {
    actual = (Rolladen_OG_Bad.state as DecimalType).intValue
}
1 Like

Nice to know the fact about null and NULL.
I’ve already undo the === and i’ve also delete the org.eclipse.smarthome imports.
Now to the version question, i think i updated from 2.2.
I’ve updated via apt, so the version before 2.3.

The question is, why is the homematic binding not updating the state of the roller shutters.
Your solution is like a try and catch block, but will not solve the main problem.

It seems to be, that openhab is overloaded, the webpage only shows the “REST API” Site, but no Paper or Basic UI. And i restarted the pi for more than 3 hour.

Try Clear the Cache.

If that doesn’t work, log into the karaf console and check to see if the binding is even installed.

Please change the title and the tags of this posting to make it clear the problem is with the homematic binding, not just openHAB Rules.

After cleaning and checking karaf with no effect, I test the setup on a bigger machine.
Now it works.

it seems that the binding init took to much time, and the rule engine spams the log, so that the CPU of the pi was non stop on 100%. a complete startup tooks over 5h.