I am using the OH 4.3.0 (windows) with following rule (only the first lines are shown at this point):
rule "AudioBad_DimmerDown"
when
Item Audio__Bad_Audio_Bad_Taster_unten_links received command
then
switch receivedCommand {
case OFF : {
logInfo("Squeezebox AudioBad_DimmerDown","Bad Audio Titel zurueck")
// Get and log the current number
**var currNumber = Integer::parseInt(SqueezeBox_Player_Play_a_Favorite.state.toString())**
About every second time I call this rule I get following strange error message:
[INFO ] [.script.Squeezebox AudioBad_DimmerUp] - Bad Audio Titel vor
[ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'AudioBad_DimmerUp-1' failed: For input string: "NULL" in AudioBad_DimmerUp
For me it looks that error is thrown when I try to read the “currNumber” which is the last favorite of my favoritelist of the squeezelite-X player. The favorite list is a mix of some local files and some online radio stations.
When i check in OH the favoritelist I can see the last played number, so that works. But what I am doing wrong here?
Thanks for the help