Openhab-addons: [Netatmo] rain24 causing exceptions

Created on 28 Sep 2017  路  8Comments  路  Source: openhab/openhab-addons




Expected Behavior

Value of rain from the station

Current Behavior

get ERR value

openhab.log:
2017-09-28 13:10:47.819 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '0.10' of item NA_Rain24h with format '%d mm / 24h': java.util.IllegalFormatConversionException: d != java.math.BigDecimal
2017-09-28 13:10:47.832 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '0.10' of item NA_Rain24h with format '%d mm / 24h': java.util.IllegalFormatConversionException: d != java.math.BigDecimal
2017-09-28 13:10:47.853 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '0.10' of item NA_Rain24h with format '%d mm / 24h': java.util.IllegalFormatConversionException: d != java.math.BigDecimal

Possible Solution

%d in format replaced with %f, because value is decimal ?

Steps to Reproduce (for Bugs)

clean install
install netatmo binding from PaperUI
add 24h rain item

Your Environment

Openhab 2
openHABian v1.3
binding-netatmo - 2.1.0
RPI2

Most helpful comment

@cweitkamp : I update PR #2682 with this fix.

All 8 comments

I guess the same thing happens if you are using the rain or rain1 channel.

@clinique Can you change the default pattern for those channels in your current PR #2682? Or should I contribute a fix?

@cweitkamp : I update PR #2682 with this fix.

Great to hear that this will get solved!
Could someone please tell me how to get this fix on my system?

As soon as the PR is merged.

Sorry, I am very new to OpenHAB.
Can I update the binding from PaperUI? Or do I have to install/uninstall it?
Or do an apt-get update from linux console?

The Bugfix will be available in the OH2 snapshot version once the PR gets merged. This will take some time. If you want to switch your version follow the instructions in the manual http://docs.openhab.org/installation/openhabian.html#switch-openhab-branch .

You are able to skip the exception by overruling the default pattern of the channel with a manual definition in an *.items file. This solution looks like this:

Number Netatmo_Rain_Current "Rain [%.1f mm]" {
    channel = "netatmo:NAModule3:home:rain:Rain"
}
Number Netatmo_Rain_Last_Hour "Rain 1h [%.1f mm]" {
    channel = "netatmo:NAModule3:home:rain:SumRain1"
}
Number Netatmo_Rain_Last_Day "Rain 24h [%.1f mm]" {
    channel = "netatmo:NAModule3:home:rain:SumRain24"
}

Thank you very much for the perfect explanation!

You are welcome.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

J-N-K picture J-N-K  路  6Comments

gk4 picture gk4  路  3Comments

smyrman picture smyrman  路  4Comments

IOOOTAlan picture IOOOTAlan  路  3Comments

bennybubble picture bennybubble  路  4Comments