Hi,
The following simple rule compares temperature (Number Items) to a predefined value, and send a push notification if temp. is higher than the value. Unfortunately this rule always throws “no viable alternative at input” warn. Do you have any ide what is wrong in this rule?
2018-10-13 19:24:20.538 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'custom.rules' has errors, therefore ignoring it: [122,83]: no viable alternative at input '23'
rule "Fire Alarm"
when
Member of Heating_temps changed
then
Heating_temps.allMembers.forEach[ht|
if ( ht.state != NULL && ht.state as DecimalType > 23 && Fire_Alarm_Sent.state == OFF ){
sendBroadcastNotification("Might be fire here: "+ht.label)
Fire_Alarm_Sent.sendCommand(ON) //Send push only once
} else if ( ht.state != NULL && ht.state as DecimalType =< 23 ){ //this is the line 122
Fire_Alarm_Sent.sendCommand(OFF) // reset status
}
]
end
rule "Fire Alarm"
when
Member of Heating_temps changed
then
Heating_temps.allMembers.forEach[ ht |
if (ht.state != NULL) {
var htTemp = ht.state as Number
if ( htTemp > 23 && Fire_Alarm_Sent.state == OFF ) {
sendBroadcastNotification("Might be fire here: "+ ht.label.toString)
Fire_Alarm_Sent.sendCommand(ON) //Send push only once
} else if ( htTemp <= 23 ) { //this is the line 122
Fire_Alarm_Sent.sendCommand(OFF) // reset status
}
}
]
end
You are right VSCode extension looks really useful. I am trying to configure although it is still not working.
My openhab runs on an rpi on localhost. I configured the host IP and port, but should I configure a password to make it work?