Question about the configuration for the sager binding

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

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 :slight_smile:

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??

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.

can you elp me with a snipped i am new to this and tried to search a for a example

Exemples here
Documentation here

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

@glhopital Is there also a way to get a translation in other languages?? I can contributing with other languages if I know how :wink:

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

I still see m in my sitemap

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.

For my understanding so it’s now automatically converted from cm to mm??

Translation into german:

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 …

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.

Hello @kiznik, I’m going to take a look at it.
Can you please share your items definition related to SagerCaster channels ?
Thanks

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" }

You have forget to set the follow profile on some input channels (pressure and raining switch).
Also to test, you could decrease the observation period on the thing (6h by default for testing purpose).
I don’t see any existing output channel named “timestamp” :interrobang:
=> got it, it’s an error in the document coming from an older version. I will correct this.

Maybe you should use MainUI to create / link your items and when it works, move to file configuration if you really think it’s needed.

ok i thought that profile follow is just for items which does have channel itself, i’ve removed that from items which are populated by rules… will try to add that back.
removed timestamp, let’s see after one hour.

maybe some kind of debug in log or log in openhab log if there is an error would be nice :wink:

Thank you

edit: documentation is missing input:temperature as well as I can see in channels via openhabUI :wink:

If they are populated by rules, that’s fine to remove the follow profile.
You can get logs by activated logs at debug level for this binding (see appropriate how-to in the forum).
I will push a PR to take in account our discussions, doc enhancement, a bit of more logging.
After the various tests I made, it seems to be predicting.

good morning,
after night, forecast is populated.
I guess it was missing temperature input (as it is missing from documentation) but i found it when I’ve added thing via UI.

As well there is “rain amount” as Number, but in doc you have Number:Lenght so i’ve created another summy with Number only and it works.

Thank you for you effort! :slight_smile: