milo
(M)
April 21, 2020, 7:17am
1
Hello,
in the configuration fo the sager binding it is written:
wind-speed-beaufort input Number Wind speed expressed using the Beaufort scale
But i only get kph from my weather station and I have a item with a transformation to beaufort
Number windbeaufort "Wind" [SCALE(kmh_beaufort.scale):%d] {channel="weewx"}
How can I use this now for the sager plugin?
Thanks
glhopital
(Gaël L'hopital)
April 21, 2020, 11:18am
2
I would recommend doing the Beaufort transformation in a rule and send the result to the item linked to the wind-speed-beaufort channel.
glhopital
(Gaël L'hopital)
April 21, 2020, 11:39am
4
Something like this :
beaufort = transform("SCALE", "kmh_beaufort.scale", wind_kph.state.toString())
postUpdate(target_item, beaufort)
milo
(M)
April 21, 2020, 11:54am
5
Is this correct
Number number_sagercaster_beaufort "Beaufort [%d]" <beaufort> {channel="sagercaster:sagercaster:triel:input#wind-speed-beaufort" [profile="follow"] }
rule "set number_sagercaster_beaufort"
when
Item MQTT_number_weewx_windSpeed_kph changed
then
var beaufort = transform("SCALE", "kmh_beaufort.scale", MQTT_number_weewx_windSpeed_kph.state.toString())
postUpdate(number_sagercaster_beaufort, beaufort)
logInfo("set number_sagercaster_beaufort", number_sagercaster_beaufort.toString())
end
glhopital
(Gaël L'hopital)
April 21, 2020, 12:06pm
6
Yes, it seem correct. Note, you do not need the follow profile anymore on the item definition as you will be setting the value via rule. I also think it should be sendCommand instead of postUpdate.
Note 2 : if it works as expected, you’re welcome to enrich the Sager doc with your code snippet
milo
(M)
April 21, 2020, 12:37pm
7
One other issue
this value
Number:Length number_sagercaster_rainspeed "Précipitation 1h [%.2f %unit%]" <rain> {channel="sagercaster:sagercaster:smarthome:input#rain-qtty" [profile="follow"]}
rule "set number_sagercaster_rain1h"
when
Item MQTT_number_weewx_hourRain_cm received update
then
var rainrate = ((MQTT_number_weewx_hourRain_cm.state as Number) * 10)
number_sagercaster_rainspeed.sendCommand(rainrate)
logInfo("set number_sagercaster_rain1h", number_sagercaster_rainspeed.toString())
end
should be mm ? but displayed in m …
is this correct??
glhopital
(Gaël L'hopital)
April 21, 2020, 12:40pm
8
You are sending a Number value while it expects a Number:Length, so you’re omitting the unit (“mm”) in the sendCommand (please refer UoM usage in the forum, or in the OH documentation).
But in fact it does not heart so much, Sager only checks if its different of 0 to decide wether its raining or not.
milo
(M)
April 21, 2020, 12:50pm
9
glhopital:
Number:Length
can you elp me with a snipped i am new to this and tried to search a for a example
glhopital
(Gaël L'hopital)
April 21, 2020, 12:54pm
10
milo
(M)
April 21, 2020, 1:00pm
11
I am confused can you help me with this rule how to do it correctly??
rule "set number_sagercaster_rain1h"
when
Item MQTT_number_weewx_hourRain_cm received update
then
var rainrate = ((MQTT_number_weewx_hourRain_cm.state as Number) * 10)
number_sagercaster_rainspeed.sendCommand(rainrate)
logInfo("set number_sagercaster_rain1h", number_sagercaster_rainspeed.toString())
end
milo
(M)
April 21, 2020, 1:10pm
12
@glhopital Is there also a way to get a translation in other languages?? I can contributing with other languages if I know how
glhopital
(Gaël L'hopital)
April 21, 2020, 2:04pm
13
This is the file you have to translate in order to have it in another language. You can make a pull request on openhab-addons repo or transfer me the file if you’re not used to.
You could do something like :
var rainrate = String::format(“%.1f cm”,(MQTT_number_weewx_hourRain_cm.state as Number))
…not tested but should be close to what you need
milo
(M)
April 22, 2020, 6:22am
14
I still see m in my sitemap
glhopital
(Gaël L'hopital)
April 22, 2020, 6:26am
15
Yes, because of the default SI definition of length that is “m”.
You can change the definition of your item this way :
Number:Length number_sagercaster_rainspeed "Précipitation 1h [%.2f mm]" ......
And please, read the docs. I know there’s a lot but you will gain in autonomy and knowledge of the system.
milo
(M)
April 22, 2020, 6:56am
16
For my understanding so it’s now automatically converted from cm to mm??
Translation into german:
opened 07:18AM - 22 Apr 20 UTC
closed 04:37PM - 22 Apr 20 UTC
question
Hello,
please insert this German translation into the sager binding and provide… the possibility of changing language
```
# binding
binding.sagercaster.name = SagerCaster Binding
binding.sagercaster.description = Die SagerCaster-Erweiterung wird zur Erstellung von Wettervorhersagen verwendet.
# channel types
channel-type.sagercaster.forecast.state.option.0 = Warten Sie etwas länger auf eine Vorhersage
channel-type.sagercaster.forecast.state.option.A = Gutes Wetter
channel-type.sagercaster.forecast.state.option.B = Gutes Wetter und Erwärmung
channel-type.sagercaster.forecast.state.option.C = Gutes Wetter und Abkühlung
channel-type.sagercaster.forecast.state.option.D = Instabil
channel-type.sagercaster.forecast.state.option.E = Instabil und Erwärmung
channel-type.sagercaster.forecast.state.option.F = Instabil und Abkühlung
channel-type.sagercaster.forecast.state.option.G = Zunehmende Bewölkung oder sehr bewölkt, gefolgt von Niederschlag oder Schauern / Schnee
channel-type.sagercaster.forecast.state.option.G1 = Zunehmende oder sehr trübe Bewölkung, gefolgt von Niederschlag oder Schauern
channel-type.sagercaster.forecast.state.option.G2 = Zunehmende Bewölkung oder sehr bewölkt, gefolgt von Niederschlag oder Schnee
channel-type.sagercaster.forecast.state.option.H = Zunehmende Bewölkung oder sehr bewölkt, gefolgt von Niederschlag oder Schauern und Erwärmung
channel-type.sagercaster.forecast.state.option.J = Regengüsse
channel-type.sagercaster.forecast.state.option.K = Regengüsse/Schnee und Erwärmung
channel-type.sagercaster.forecast.state.option.K1 = Regengüsse und Erwärmung
channel-type.sagercaster.forecast.state.option.K2 = Schnee und Erwärmung
channel-type.sagercaster.forecast.state.option.L = Regengüsse/Schnee und Abkühlung
channel-type.sagercaster.forecast.state.option.L1 = Regengüsse und Abkühlung
channel-type.sagercaster.forecast.state.option.L2 = Regengüsse und Abkühlung
channel-type.sagercaster.forecast.state.option.M = Niederschlag
channel-type.sagercaster.forecast.state.option.N = Niederschlag und Erwärmung
channel-type.sagercaster.forecast.state.option.P = Niederschlag und Abkühlung dann wahrscheinliche Besserung innerhalb von 24 Stunden
channel-type.sagercaster.forecast.state.option.R = Niederschlag oder Schauer / Schnee und Besserung innerhalb von 12 Stunden
channel-type.sagercaster.forecast.state.option.R1 = Niederschlag oder Schauer und Besserung innerhalb von 12 Stunden
channel-type.sagercaster.forecast.state.option.R2 = Niederschlag oder Schnee und Besserung innerhalb von 12 Stunden
channel-type.sagercaster.forecast.state.option.S = Niederschlag oder Schauer / Schnee und Verbesserung innerhalb von 12 Stunden und Abkühlung
channel-type.sagercaster.forecast.state.option.S1 = Niederschlag oder Regengüsse und Besserung innerhalb von 12 Stunden und Erfrischung
channel-type.sagercaster.forecast.state.option.S2 = Niederschlag oder Schnee und Verbesserung innerhalb von 12 Stunden und Abkühlung
channel-type.sagercaster.forecast.state.option.T = Niederschlag oder Schauer / Schnee und schnelle Besserung innerhalb von 6 Stunden
channel-type.sagercaster.forecast.state.option.T1 = Niederschlag oder Schauer und schnelle Besserung innerhalb von 6 Stunden
channel-type.sagercaster.forecast.state.option.T2 = Niederschlag oder Schnee und schnelle Besserung innerhalb von 6 Stunden
channel-type.sagercaster.forecast.state.option.U = Niederschlag oder Schauer / Schnee und schnelle Besserung innerhalb von 6 Stunden, dann Abkühlung
channel-type.sagercaster.forecast.state.option.U1 = Niederschlag oder Schauer und schnelle Besserung innerhalb von 6 Stunden, dann Abkühlung
channel-type.sagercaster.forecast.state.option.U2 = Niederschlag oder Schnee und schnelle Besserung innerhalb von 6 Stunden, dann Abkühlung
channel-type.sagercaster.forecast.state.option.W = Niederschlag oder Schauer / Schnee, gefolgt von gutem Sonnenwetter innerhalb von 6 Stunden und Erfrischung
channel-type.sagercaster.forecast.state.option.W = Niederschlag oder Schauer, gefolgt von gutem Sonnenwetter innerhalb von 6 Stunden und Erfrischung
channel-type.sagercaster.forecast.state.option.W = Niederschlag oder Schnee, gefolgt von gutem Wetter innerhalb von 6 Stunden und Abkühlung
channel-type.sagercaster.forecast.state.option.X = Instabil, gefolgt von gutem Wetter
channel-type.sagercaster.forecast.state.option.Y = Instabil, gefolgt von gutem Wetter innerhalb von 6 Stunden und Erfrischung
channel-type.sagercaster.velocity.state.option.N = Wahrscheinlich steigend
channel-type.sagercaster.velocity.state.option.F = Mäßig bis frisch
channel-type.sagercaster.velocity.state.option.S = Starke Winde können dem Sturm im offenen Raum vorausgehen
channel-type.sagercaster.velocity.state.option.G = Sturm
channel-type.sagercaster.velocity.state.option.W = Gefährlicher Sturm
channel-type.sagercaster.velocity.state.option.H = Orkan
channel-type.sagercaster.velocity.state.option.D = Abkühlend oder moderat, wenn die aktuellen Winde kühl oder stark sind
channel-type.sagercaster.velocity.state.option.U = Keine wesentliche Änderung. Tendenz zur Zunahme während des Tages, Abnahme am Abend.
channel-type.sagercaster.wind-evolution.state.option.1 = Stabil
channel-type.sagercaster.wind-evolution.state.option.2 = Stätig
channel-type.sagercaster.wind-evolution.state.option.3 = Variabel
channel-type.sagercaster.trend.state.option.1 = Schneller Anstieg
channel-type.sagercaster.trend.state.option.2 = Langsamer Anstieg
channel-type.sagercaster.trend.state.option.3 = Stabil
channel-type.sagercaster.trend.state.option.4 = Mäßiger Rückgang
channel-type.sagercaster.trend.state.option.5 = Schneller Rückgang
```
milo
(M)
April 22, 2020, 7:42am
17
get this error now:
2020-04-22 09:41:20.466 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'set number_sagercaster_rainamount1h': f != org.eclipse.smarthome.core.library.types.DecimalType
And the timestamp is not set …
kriznik
(kriznik)
November 25, 2021, 10:04am
18
Hello,
I have a question about how to determine if sager is working? Cos even after 12hours i have not yet populated output items and nothing in log so far.
is there anything i can debug?
yes, i have all inputs set, some items are populated like velocity-beaufort and wind-evolution but nothing else.
glhopital
(Gaël L'hopital)
November 26, 2021, 3:32pm
19
Hello @kiznik , I’m going to take a look at it.
Can you please share your items definition related to SagerCaster channels ?
Thanks
kriznik
(kriznik)
November 26, 2021, 4:18pm
20
sure here they are, thank you very much…
nothing in log nothing in the timestamp, just in
SWC_velocity_beaufort and SWC_windevolution
sagercaster:sagercaster:triel "Sager Triel" @ "Outside" [location="50.0,14.6"]
Number House_Pressure_Sealevel "Sea level [%s hPa]" <pressure> (gStore10, Graph_Pressure) { channel="sagercaster:sagercaster:triel:input#pressure" }
Switch Weather_RainHelperSwitch { channel="sagercaster:sagercaster:triel:input#is-raining"}
Number WS_Beaufort "Beaufort [MAP(beaufort.map):%s]" <wind> (gStoreChange, gWeather) { channel="sagercaster:sagercaster:triel:input#wind-speed-beaufort"}
Number:Angle WS_WindAngle "Wind Angle" (gStoreChange, gWeather) { channel = "mqtt:topic:weatherstation:wind_degrees", channel="sagercaster:sagercaster:triel:input#wind-angle" [profile="follow"]}
Number:Length WS_RainfallHourly "Last Hour [%.1f mm]" <rain> (gStoreHourly, gWeather, Graph_Weather_Rainfall) ["Measurement","Rain"] { channel = "mqtt:topic:weatherstation:rainfallhour", channel="sagercaster:sagercaster:triel:input#rain-qtty" [profile="follow"]}
Number:Dimensionless forecastCurrentCloudiness "Cloudiness [%d %unit%]" <clouds> { channel="openweathermap:weather-and-forecast:api:local:current#cloudiness", channel="sagercaster:sagercaster:triel:input#cloudiness" [profile="follow"] }
and outputs for now default
// SAGER CASTER outputs
Group gSager
String SWC_forecast "Weather Forecast" (gSager) {channel="sagercaster:sagercaster:triel:output#forecast"}
String SWC_velocity "Wind Velocity" (gSager) {channel="sagercaster:sagercaster:triel:output#velocity"}
Number SWC_velocity_beaufort "Wind beaufort" (gSager) {channel="sagercaster:sagercaster:triel:output#velocity-beaufort"}
String SWC_wind_from "Wind from" (gSager) {channel="sagercaster:sagercaster:triel:output#wind-from"}
String SWC_Wind_to "Wind To" (gSager) {channel="sagercaster:sagercaster:triel:output#wind-to"}
String SWC_windevolution "Wind Evolution" (gSager) {channel="sagercaster:sagercaster:triel:output#wind-evolution"}
String SWC_presstrend "Pressure Trend" (gSager) {channel="sagercaster:sagercaster:triel:output#pressure-trend"}
String SWC_Temperature_trend "Temperature Trend" (gSager) {channel="sagercaster:sagercaster:triel:outpu#temperature-trend"}
DateTime SWC_ObservationTime "Timestamp [%1$tH:%1$tM]" <time> (gSager) {channel="sagercaster:sagercaster:triel:output#timestamp" }