Hi folks,
is there anybody who can explain to me the following openhab.log entry:
[ERROR] [.script.engine.ScriptExecutionThread] - Rule ‘MqttPostionParseiPhone’: null
[ERROR] [.script.engine.ScriptExecutionThread] - Rule ‘MqttPostionParseiPhone’: null
The rule itself looks like this:
/* ---------------- MQTT OwnTracks ---------------- */
import org.openhab.core.library.types.*
//////////////////////////////////////////////////////////////////////////////////////
rule "MqttPostionParseiPhone"
when
Item mqttPositioniPhoneRaw changed or
Item mqttPositioniPhoneRaw received update
then
val String json = (mqttPositioniPhoneRaw.state as StringType).toString
val String type = transform("JSONPATH", "$._type", json)
if (type == "location") {
val String lat = transform("JSONPATH", "$.lat", json)
val String lon = transform("JSONPATH", "$.lon", json)
val String acc = transform("JSONPATH", "$.acc", json)
val String batt = transform("JSONPATH", "$.batt", json)
val String alt = transform("JSONPATH", "$.alt", json)
val String vel = transform("JSONPATH", "$.vel", json)
mqttiPhoneLatitude.postUpdate(lat)
mqttiPhoneLongitude.postUpdate(lon)
locationiPhone.postUpdate(new PointType(lat + "," + lon))
mqttiPhoneAccuracy.postUpdate(new DecimalType(acc))
mqttiPhoneBattery.postUpdate(new PercentType(batt))
mqttiPhoneAltitude.postUpdate(new DecimalType(alt))
mqttiPhoneVelocity.postUpdate(new DecimalType(vel))
}
end
The rule seems to work fine, however I would like to know what that error code means and if there is a way to maybe have some more detailed logging. The log entry is double (that´s another thing I don´t understand)
Does anybody have an idea?