Platform information:
Hardware: Raspberry Pi 3 Model B Rev 1.2
Fritz-Box 7490 as Router, Fritz-Box 7390 as Repeater, Fritz/Comet Thermostates, Fritz-Poweroutlests, several Sonoff-Tasmota-Switches (basic, pow, th16, S20,Touch, T1)
OS: _ Raspbian GNU/Linux 8 (jessie)_
openHAB version: openHAB 2.3.0-1 (Release Build)
*Bindings:Astro, AVM, EXEC, MQTT, Network, NTP, Samsung, Sonos, Weather (binding-weather1 - 1.12.0), MapDB-Persitence
*Transformations: exec, Javascript, JSONPATH, Map, RegEx, Scale
Hi all,
I have a little problem with two Rules which should concatinate two items into one.
The error messages are:
2018-08-30 00:42:24.880 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'moondistances': The name 'Date_Kilometer_actual' cannot be resolved to an item or type; line 134, column 5, length 21
2018-09-01 00:15:49.409 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'moondistances': The name 'Date_Kilometer_actual' cannot be resolved to an item or type; line 173, column 5, length 21
2018-09-02 16:14:42.491 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'moondistances': The name 'Date_Kilometer_actual' cannot be resolved to an item or type; line 173, column 5, length 21
2018-09-03 15:34:45.361 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'moondistances': The name 'Date_Kilometer_actual' cannot be resolved to an item or type; line 173, column 5, length 21
2018-09-04 14:20:07.229 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'weather forecast formatting': The name 'Date_MinMax7' cannot be resolved to an item or type; line 12, column 25, length 12
2018-09-05 13:24:45.900 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'moondistances': The name 'Date_distance' cannot be resolved to an item or type; line 173, column 38, length 13
2018-09-05 18:16:37.448 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'weather forecast formatting': The name 'Temp_MinMax4' cannot be resolved to an item or type; line 9, column 96, length 12
2018-09-08 23:39:34.286 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'moondistances': The name 'Kilometer_distance' cannot be resolved to an item or type; line 165, column 99, length 18
2018-09-09 00:49:37.691 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'moondistances': The name 'Date_Kilometer_perigee' cannot be resolved to an item or type; line 166, column 5, length 22
2018-09-09 12:10:21.148 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'moondistances': The name 'Kilometer_distance' cannot be resolved to an item or type; line 165, column 99, length 18
2018-09-10 02:58:42.402 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'weather forecast formatting': The name 'Forecast_1' cannot be resolved to an item or type; line 6, column 3, length 10
2018-09-16 11:43:57.029 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'weather forecast formatting': The name 'Forecast_7' cannot be resolved to an item or type; line 12, column 3, length 10
2018-09-16 23:06:45.104 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'weather forecast formatting': The name 'Date_MinMax2' cannot be resolved to an item or type; line 7, column 25, length 12
2018-09-18 13:02:45.647 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'moondistances': The name 'Date_distance' cannot be resolved to an item or type; line 134, column 38, length 13
The Rules are:
rule "moondistances"
when
//Item Dummy2 changed to ON
Item LastUpdate changed // item defined in yahoo.items
then
Date_Kilometer_actual.postUpdate(Date_distance.state.format("%1$ta, %1$td.%1$tb. ") + " / " + Kilometer_distance.state.toString)
Date_Kilometer_perigee.postUpdate(Date_perigee.state.format("%1$ta, %1$td.%1$tb. ") + " / " + Kilometer_perigee.state.toString)
Date_Kilometer_apogee.postUpdate(Date_apogee.state.format("%1$ta, %1$td.%1$tb. ") + " / " + Kilometer_apogee.state.toString)
logInfo(filename + "_99"," " + Date_Kilometer_actual.state + Date_Kilometer_perigee.state + Date_Kilometer_apogee.state)
end
and
rule "weather forecast formatting"
when
//Item Dummy2 changed to ON
Item LastUpdate changed
then
Forecast_1.postUpdate(Date_MinMax1.state.format("%1$ta, den %1$td.%1$tb. ") + " min/max " + Temp_MinMax1.state.toString)
Forecast_2.postUpdate(Date_MinMax2.state.format("%1$ta, den %1$td.%1$tb. ") + " min/max " + Temp_MinMax2.state.toString)
Forecast_3.postUpdate(Date_MinMax3.state.format("%1$ta, den %1$td.%1$tb. ") + " min/max " + Temp_MinMax3.state.toString)
Forecast_4.postUpdate(Date_MinMax4.state.format("%1$ta, den %1$td.%1$tb. ") + " min/max " + Temp_MinMax4.state.toString)
Forecast_5.postUpdate(Date_MinMax5.state.format("%1$ta, den %1$td.%1$tb. ") + " min/max " + Temp_MinMax5.state.toString)
Forecast_6.postUpdate(Date_MinMax6.state.format("%1$ta, den %1$td.%1$tb. ") + " min/max " + Temp_MinMax6.state.toString)
Forecast_7.postUpdate(Date_MinMax7.state.format("%1$ta, den %1$td.%1$tb. ") + " min/max " + Temp_MinMax7.state.toString)
end
The associated Item-file looks like:
// Weather - Binding - Provider - Yahoo
Group gWeather "Wetter" <sun_clouds> (home)
Number Temperature "Temperatur [%.1f °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, property=current"}
Number Temp_Feel "GefĂŒhlte Temperatur [%.1f °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, property=feel"}
Number Humidity "Luftfeuchtigkeit [%d %%]" <humidity> (gWeather) {weather="locationId=home-yh, type=atmosphere, property=humidity"}
String CommonId "Himmel [MAP(weather_de.map):%s]" <sun_clouds> (gWeather) {weather="locationId=home-yh, type=condition, property=commonId"}
Number Clouds "Bewölkung [%.0f %%]" (gWeather) {weather="locationId=home-yh, type=clouds, property=percent"}
Number Sight "Sichtweite [%.1f km]" <binoculars1> (gWeather) {weather="locationId=home-yh, type=atmosphere, property=visibility"}
Number Ozone "Ozon [%d ppm]" (gWeather) {weather="locationId=home-yh, type=atmosphere, property=ozone"}
Number UV_Index "UV Index" (gWeather) {weather="locationId=home-yh, type=atmosphere, property=uvIndex, scale=0"}
Number Rain "Niederschlagsmenge [%.2f mm/h]" <rain> (gWeather) {weather="locationId=home-yh, type=precipitation, property=rain"}
Number Snow "Schneefall [%.2f mm/h]" <snow> (gWeather) {weather="locationId=home-yh, type=precipitation, property=snow"}
Number Precip_Probability "Niederschlagswahrscheinlichkeit [%d %%]" (gWeather) {weather="locationId=home-yh, type=precipitation, property=probability"}
Number Temp_Dewpoint "Taupunkt [%.1f °C]" (gWeather) {weather="locationId=home-yh, type=temperature, property=dewpoint"}
Number Wind_Speed "Windgeschwindigkeit km/h [%.2f km/h]" <wind> (gWeather) {weather="locationId=home-yh, type=wind, property=speed"}
Number Wind_Speed_Mps "Windgeschwindigkeit m/s [%.2f m/s]" <wind> (gWeather) {weather="locationId=home-yh, type=wind, property=speed, unit=mps"}
String Wind_Direction "Windrichtung [MAP(weather_de.map):%s]" <compass> (gWeather) {weather="locationId=home-yh, type=wind, property=direction"}
Number Wind_Degree "Windrichtung in Grad [%.0f °]" <compass1> (gWeather) {weather="locationId=home-yh, type=wind, property=degree"}
Number Wind_Gust "Windböen [%.2f km/h]" <wind> (gWeather) {weather="locationId=home-yh, type=wind, property=gust"}
Number Wind_Chill "Wind-Frösteln [%.1f °C]" <windchill1> (gWeather) {weather="locationId=home-yh, type=wind, property=chill, unit=inches"}
// min and max values only available in forecasts
String Temp_MinMax "Temp Min/Max heute [%s °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, forecast=0, property=minMax, scale=1"}
DateTime Date_MinMax1 "Vorhersage fĂŒr [%1$ta, den %1$td.%1$tm.%1$ty]" <calendar> (gWeather) {weather="locationId=home-yh, type=condition, forecast=1, property=observationTime"}
String Temp_MinMax1 "Temp Min/Max morgen[%s °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, forecast=1, property=minMax, scale=1"}
DateTime Date_MinMax2 "Vorhersage fĂŒr [%1$ta, den %1$td.%1$tm.%1$ty]" <calendar> (gWeather) {weather="locationId=home-yh, type=condition, forecast=2, property=observationTime"}
String Temp_MinMax2 "Temp Min/Max ĂŒbermorgen[%s °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, forecast=2, property=minMax, scale=1"}
DateTime Date_MinMax3 "Vorhersage fĂŒr [%1$ta, den %1$td.%1$tm.%1$ty]" <calendar> (gWeather) {weather="locationId=home-yh, type=condition, forecast=3, property=observationTime"}
String Temp_MinMax3 "Temp Min/Max in 3 Tagen[%s °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, forecast=3, property=minMax, scale=1"}
DateTime Date_MinMax4 "Vorhersage fĂŒr [%1$ta, den %1$td.%1$tm.%1$ty]" <calendar> (gWeather) {weather="locationId=home-yh, type=condition, forecast=4, property=observationTime"}
String Temp_MinMax4 "Temp Min/Max in 4 Tagen[%s °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, forecast=4, property=minMax, scale=1"}
DateTime Date_MinMax5 "Vorhersage fĂŒr [%1$ta, den %1$td.%1$tm.%1$ty]" <calendar> (gWeather) {weather="locationId=home-yh, type=condition, forecast=5, property=observationTime"}
String Temp_MinMax5 "Temp Min/Max in 5 Tagen[%s °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, forecast=5, property=minMax, scale=1"}
DateTime Date_MinMax6 "Vorhersage fĂŒr [%1$ta, den %1$td.%1$tm.%1$ty]" <calendar> (gWeather) {weather="locationId=home-yh, type=condition, forecast=6, property=observationTime"}
String Temp_MinMax6 "Temp Min/Max in 6 Tagen[%s °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, forecast=6, property=minMax, scale=1"}
DateTime Date_MinMax7 "Vorhersage fĂŒr [%1$ta, den %1$td.%1$tm.%1$ty]" <calendar> (gWeather) {weather="locationId=home-yh, type=condition, forecast=7, property=observationTime"}
String Temp_MinMax7 "Temp Min/Max in 7 Tagen[%s °C]" <thermometer_red_earth> (gWeather) {weather="locationId=home-yh, type=temperature, forecast=7, property=minMax, scale=1"}
// Strings fĂŒr formatierte Ausgabe. Die Aufbereitung und Formatierung erfolg ĂŒber eine Regel
String Forecast_1 "Vorhersage fĂŒr [%s °C]" <thermometer_red_earth> (gWeather)
String Forecast_2 "Vorhersage fĂŒr [%s °C]" <thermometer_red_earth> (gWeather)
String Forecast_3 "Vorhersage fĂŒr [%s °C]" <thermometer_red_earth> (gWeather)
String Forecast_4 "Vorhersage fĂŒr [%s °C]" <thermometer_red_earth> (gWeather)
String Forecast_5 "Vorhersage fĂŒr [%s °C]" <thermometer_red_earth> (gWeather)
String Forecast_6 "Vorhersage fĂŒr [%s °C]" <thermometer_red_earth> (gWeather)
String Forecast_7 "Vorhersage fĂŒr [%s °C]" <thermometer_red_earth> (gWeather)
DateTime LastUpdate "Letzte Vorhersage[%1$td.%1$tm.%1$tY %1$tH:%1$tM]" <time> (gWeather) {weather="locationId=home-yh, type=condition, property=lastUpdate"}
Number Pressure "Luftdruck [%.1f mbar]" <pressure> (gWeather) {weather="locationId=home-yh, type=atmosphere, property=pressure, unit=inches"}
String Pressure_Trend "Luftdrucktrend [%s]" <pressure> (gWeather) {weather="locationId=home-yh, type=atmosphere, property=pressureTrend"}
// condition
//String Condition "Bedingungen ll [%s]" <wind> (gWeather) {weather="locationId=home-yh, type=condition, forecast=0, property=text"}
String Condition_ID "Bedingungen [MAP(weather_de.map):%s]" <sun_clouds> (gWeather) {weather="locationId=home-yh, type=condition, forecast=0, property=commonId"}
Extract of my sitemap:
Text label="Astro - Wetter" icon="sun_clouds"
{
Frame
{
Default item=Current_DateTime
Default item=Day_Phase icon="sun"
visibility=[Day_Phase=="DAYLIGHT",Day_Phase=="SUN_RISE",Day_Phase=="SUN_SET",Day_Phase=="UNDEF"]
Default item=Day_Phase icon="fullmoon"
visibility=[Day_Phase=="CIVIL_DUSK",Day_Phase=="NAUTIC_DUSK",Day_Phase=="ASTRO_DUSK",Day_Phase=="NIGHT",
Day_Phase=="ASTRO_DAWN", Day_Phase=="NAUTIC_DAWN",Day_Phase=="UNDEF"]
Default item=Sunset_Time visibility=[Day_Phase=="DAYLIGHT",Day_Phase=="SUN_RISE",Day_Phase=="SUN_SET",Day_Phase=="UNDEF"]
Default item=Sunrise_Time visibility=[Day_Phase=="CIVIL_DUSK",Day_Phase=="NAUTIC_DUSK",Day_Phase=="ASTRO_DUSK",Day_Phase=="NIGHT",
Day_Phase=="ASTRO_DAWN", Day_Phase=="NAUTIC_DAWN",Day_Phase=="UNDEF"]
Default item=Season_Name
Default item=Zodiac_Sign
Default item=Sun_Elevation
Default item=Sun_Azimuth
Default item=Moon_Elevation
Default item=Moon_Phase
Default item=Moon_Next_Full
Default item=Moon_Next_New
Default item=Date_Kilometer_actual
Default item=Date_Kilometer_perigee
Default item=Date_Kilometer_apogee
Default item=Radiation_Direct
Default item=Radiation_Diffuse
Default item=Radiation_Total
}
Frame label="Yahoo-Wetter Daten (weather-binding)" icon="rain"
{
Text item=Temperature valuecolor=[>=90="fuchsia",>=25="red",>=18="orange",>=12="blue",>=8="green",>=4="teal",<4="silver"]
labelcolor=[>=90="fuchsia",>=25="red",>=18="orange",>=12="blue",>=8="green",>=4="teal",<4="silver"]
Text item=Temp_Feel valuecolor=[>=90="fuchsia",>=25="red",>=18="orange",>=12="blue",>=8="green",>=4="teal",<4="silver"]
labelcolor=[>=90="fuchsia",>=25="red",>=18="orange",>=12="blue",>=8="green",>=4="teal",<4="silver"]
Text item=Humidity
Default item=Leiste_01_Hum
Default item=Pressure visibility=[Pressure<2000] //Da steht eigentlich nur Schrott drin, hab's in yahoo.items mit unit=inches probiert.Scheint zu klappen
Default item=Pressure_Trend visibility=[Pressure_Trend>0]
Default item=Condition_ID
Default item=CommonId
Default item=Clouds //visibility=[Clouds>0]
Default item=Sight visibility=[Sight>0]
Default item=Ozone visibility=[Ozone>0]
Default item=UV_Index visibility=[UV_Index>0]
Default item=Rain visibility=[Rain>0]
Default item=Snow visibility=[Snow>0]
Default item=Precip_Probability visibility=[Precip_Probability>0]
Default item=Temp_Dewpoint visibility=[Temp_Dewpoint>0]
Default item=Wind_Speed visibility=[Wind_Speed>0]
Default item=Wind_Speed_Mps visibility=[Wind_Speed_Mps>0]
Default item=Wind_Direction
Default item=Wind_Degree visibility=[Wind_Degree>0]
Default item=Wind_Gust visibility=[Wind_Gust>0]
Default item=Wind_Chill visibility=[Temperature<=10]
Default item=Temp_MinMax visibility=[Temp_MinMax>0]
Default item=Forecast_1
Default item=Forecast_2
Default item=Forecast_3
Default item=Forecast_4
Default item=Forecast_5
Default item=Forecast_6
Default item=Forecast_7
Default item=LastUpdate visibility=[LastUpdate>0]
}
Frame
{
Text label="Wettervorhersage - Web-Dienst" icon="sun_clouds"
{
Webview item=Wetter label="Wetterdienst" url="https://www.wetterdienst.de/Deutschlandwetter/Schwaebisch_Gmuend/" height=22
}
}
} // Ende "Astro - Wetter"
But the result seems to be correct when the rules are fired a second time as one can see in the snapshot below
As one can see in the error messages, itâs not always the same item which is reported.
Is it my Rule-Syntax ?
Has anyone an idea ?
Regards
Peter