All,
Platform information:
Hardware: Raspi 3 + SSD (no SD)
OS: openhabian 1.4
Java Runtime openjdk version “1.8.0_152”
OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)
openHAB version: OH 2.3 stable
Issue of the topic: Weird chracters in events.log
I generate the path to my icons depending on the weather with th follwing rule
//********************** WEATHER rules **********************
rule "Retrieve weather icon names"
when
// preliminary - later updated by "weather condition changed" (rain -> cloudy)
Time cron "10 0/30 * * * ?" or //every 30 Minutes at Second 10
Item Weather_Current changed or
Item Weather_Nighttime changed
then
// check weather icon path
if(Weather_Icon_Path.state != "http://192.168.178.50:8080/static/weather_icons/white/") {
Weather_Icon_Path.postUpdate("http://192.168.178.50:8080/static/weather_icons/white/")
}
val String json = executeCommandLine("curl -s http://api.wunderground.com/api/xxx/conditions/forecast10day/lang:DL/q/Germany/xxx.json", 10000)
var String current_tmp = ""
var String icon_0_tmp = ""
var String icon_1_tmp = ""
var String icon_2_tmp = ""
var String icon_3_tmp = ""
var String icon_4_tmp = ""
var String icon_5_tmp = ""
var String icon_6_tmp = ""
// check day or night to choose the right icons for now and forecast 0
if(Weather_Nighttime.state == ON && now.getHourOfDay <= 23) {
icon_0_tmp = transform("JSONPATH", "$.forecast.txt_forecast.forecastday.[1]icon", json)
logInfo("weather.rules", "Weather Icon_0 updated (Night).")
}
else {
icon_0_tmp = transform("JSONPATH", "$.forecast.txt_forecast.forecastday.[0]icon", json)
logInfo("weather.rules", "Weather Icon_0 updated (Day).")
}
current_tmp = transform("JSONPATH", "$.current_observation.icon", json)
// Forecast icon 0 is checked for day / night mode (see above)
icon_1_tmp = transform("JSONPATH", "$.forecast.txt_forecast.forecastday.[2]icon", json)
icon_2_tmp = transform("JSONPATH", "$.forecast.txt_forecast.forecastday.[4]icon", json)
icon_3_tmp = transform("JSONPATH", "$.forecast.txt_forecast.forecastday.[6]icon", json)
icon_4_tmp = transform("JSONPATH", "$.forecast.txt_forecast.forecastday.[8]icon", json)
icon_5_tmp = transform("JSONPATH", "$.forecast.txt_forecast.forecastday.[10]icon", json)
icon_6_tmp = transform("JSONPATH", "$.forecast.txt_forecast.forecastday.[12]icon", json)
Weather_Curr_Icon.postUpdate(Weather_Icon_Path.state+current_tmp+".svg")
Weather_Icon_0.postUpdate(Weather_Icon_Path.state+icon_0_tmp+".svg")
Weather_Icon_1.postUpdate(Weather_Icon_Path.state+icon_1_tmp+".svg")
Weather_Icon_2.postUpdate(Weather_Icon_Path.state+icon_2_tmp+".svg")
Weather_Icon_3.postUpdate(Weather_Icon_Path.state+icon_3_tmp+".svg")
Weather_Icon_4.postUpdate(Weather_Icon_Path.state+icon_4_tmp+".svg")
Weather_Icon_5.postUpdate(Weather_Icon_Path.state+icon_5_tmp+".svg")
Weather_Icon_6.postUpdate(Weather_Icon_Path.state+icon_6_tmp+".svg")
end
In my events.log I get:
2018-09-23 06:30:10.964 [vent.ItemStateChangedEvent] - Weather_Curr_Icon changed from http://192.168.178.50:8080/static/weather_icons/white/^_�^H^@^@^@^@^@^@^C��(�ͱ�I�O���r�SH-*�/R�ON.-JM��)(J�KJL�N�KQHK��^A���^Dm��Zl����^@��G^@^@^@.svg to http://192.168.178.50:8080/static/weather_icons/white/cloudy.svg
2018-09-23 06:30:10.981 [vent.ItemStateChangedEvent] - Weather_Icon_0 changed from http://192.168.178.50:8080/static/weather_icons/white/^_�^H^@^@^@^@^@^@^C��(�ͱ�I�O���r�SH-*�/R�ON.-JM��)(J�KJL�N�KQHK��^A���^Dm��Zl����^@��G^@^@^@.svg to http://192.168.178.50:8080/static/weather_icons/white/nt_partlycloudy.svg
2018-09-23 06:30:10.994 [vent.ItemStateChangedEvent] - Weather_Icon_1 changed from http://192.168.178.50:8080/static/weather_icons/white/^_�^H^@^@^@^@^@^@^C��(�ͱ�I�O���r�SH-*�/R�ON.-JM��)(J�KJL�N�KQHK��^A���^Dm��Zl����^@��G^@^@^@.svg to http://192.168.178.50:8080/static/weather_icons/white/partlycloudy.svg
2018-09-23 06:30:11.022 [vent.ItemStateChangedEvent] - Weather_Icon_2 changed from http://192.168.178.50:8080/static/weather_icons/white/^_�^H^@^@^@^@^@^@^C��(�ͱ�I�O���r�SH-*�/R�ON.-JM��)(J�KJL�N�KQHK��^A���^Dm��Zl����^@��G^@^@^@.svg to http://192.168.178.50:8080/static/weather_icons/white/partlycloudy.svg
2018-09-23 06:30:11.043 [vent.ItemStateChangedEvent] - Weather_Icon_3 changed from http://192.168.178.50:8080/static/weather_icons/white/^_�^H^@^@^@^@^@^@^C��(�ͱ�I�O���r�SH-*�/R�ON.-JM��)(J�KJL�N�KQHK��^A���^Dm��Zl����^@��G^@^@^@.svg to http://192.168.178.50:8080/static/weather_icons/white/partlycloudy.svg
2018-09-23 06:30:11.051 [vent.ItemStateChangedEvent] - Weather_Icon_4 changed from http://192.168.178.50:8080/static/weather_icons/white/^_�^H^@^@^@^@^@^@^C��(�ͱ�I�O���r�SH-*�/R�ON.-JM��)(J�KJL�N�KQHK��^A���^Dm��Zl����^@��G^@^@^@.svg to http://192.168.178.50:8080/static/weather_icons/white/partlycloudy.svg
2018-09-23 06:30:11.057 [vent.ItemStateChangedEvent] - Weather_Icon_5 changed from http://192.168.178.50:8080/static/weather_icons/white/^_�^H^@^@^@^@^@^@^C��(�ͱ�I�O���r�SH-*�/R�ON.-JM��)(J�KJL�N�KQHK��^A���^Dm��Zl����^@��G^@^@^@.svg to http://192.168.178.50:8080/static/weather_icons/white/chancerain.svg
2018-09-23 06:30:11.068 [vent.ItemStateChangedEvent] - Weather_Icon_6 changed from http://192.168.178.50:8080/static/weather_icons/white/^_�^H^@^@^@^@^@^@^C��(�ͱ�I�O���r�SH-*�/R�ON.-JM��)(J�KJL�N�KQHK��^A���^Dm��Zl����^@��G^@^@^@.svg to http://192.168.178.50:8080/static/weather_icons/white/partlycloudy.svg
2018-09-23 06:30:18.738 [ome.event.ItemCommandEvent] - Item 'CarUpdate' received command ON
My concern is, that there is file corruption involved.
How to check
How to solve (without formatting and starting from scratch)