Weatherbit type=precipitation, property=rain not working?

Hi there,

I recongnized that I never receive any value above 0 for the current rain amount using weatherbit.io (all other value are receiving values as expected).

Item configuration is
Number WeatherRain “Rain [%.2f mm/h]” (gWeather) {weather=“locationId=home, type=precipitation, property=rain”}

I checked the API directly with the example below
{“data”:[{“rh”:80,“pod”:“d”,“lon”:8.53333,“pres”:979.43,“timezone”:“Europe/Berlin”,“ob_time”:“2020-06-05 16:16”,“country_code”:“DE”,“clouds”:100,“ts”:1591373775,“solar_rad”:78.2525,“state_code”:“07”,“city_name”:“Bielefeld”,“wind_spd”:6.29415,“last_ob_time”:“2020-06-05T15:47:00”,“wind_cdir_full”:“west-southwest”,“wind_cdir”:“WSW”,“slp”:991.855,“vis”:24.135,“h_angle”:56.3,“sunset”:“19:40”,“dni”:669.37,“dewpt”:8.2,“snow”:0,“uv”:0.776824,“precip”:3.63158,“wind_dir”:240,“sunrise”:“03:11”,“ghi”:313.01,“dhi”:77.24,“aqi”:49,“lat”:52.03333,“weather”:{“icon”:“r01d”,“code”:“500”,“description”:“Light rain”},“datetime”:“2020-06-05:16”,“temp”:11.4,“station”:“E6958”,“elev_angle”:30.39,“app_temp”:11.4}],“count”:1}

And as you can see there is no item called “rain” but only “precip” that seems to contain the “rain” value (see also documentation https://www.weatherbit.io/api/weather-current).

My assumption is that the internal mapping of the item to the API-call does’t relect this. And there is no item property called “precip” (error is generated).

Anyone who could give an advice how to fix this issue?

Thanks
Thomas

Open an issue in GitHub, the binding developer will likely pick it up

Thanks, just created https://github.com/openhab/openhab-addons/issues/7865

I currently use a workaround with http binding and JSONPath transformation:
service/http.cfg:

configuration of the first cache item

weatherCurrent.url=https://api.weatherbit.io/v2.0/current?city=MyCity&country=DE&key=MyKey
weatherCurrent.updateInterval=1800000

configuration of the second cache item

weatherForecast.url=https://api.weatherbit.io/v2.0/forecast/daily?city=MyCity&country=DE&days=1&key=MyKey
weatherForecast.updateInterval=1800000

items:
Number WeatherRain {http="<[weatherCurrent:120000:JSONPATH($.data[0].precip)]" }
Number WeatherFCRain {http="<[weatherForecast:120000:JSONPATH($.data[0].precip)]" }
weatherForecast.updateInterval=1800000

Is there any way to progress this, it seems like a simple change, is there an easy way to modify the source in my own machine without going through all the setting up needed for developing a plugin?

I’ve updated the above issue with the problem (it’s a typo ‘percip’ instead of ‘precip’)