phifogg / ioBroker.sainlogic

An IoBroker Adapter for Sainlogic based weather stations
MIT License
20 stars 11 forks source link

State value for soilmoisture is too large (or maxvalue too small) #122

Closed pancetta closed 2 years ago

pancetta commented 2 years ago

Describe the bug
Adapter throws a warning each time values are received: State value to set for "sainlogic.0.weather.current.3.soilmoisture" has value "57" greater than max "24"

To Reproduce
Added soil moisture sensors to my Froggit DP1500 dongle and used the adapter to get the values into iobroker (using Ecowitt as protocol, see #121).

Expected behavior
I'm not sure why 24 is the maxvalue here. This is percentage, so I'd assume a range of values from 0 to 100.

Screenshots & Logfiles
State value to set for "sainlogic.0.weather.current.3.soilmoisture" has value "57" greater than max "24"

Versions:

Additional context
Looks like this is the relevant line: https://github.com/phifogg/ioBroker.sainlogic/blob/master/lib/constants.js#L991

phifogg commented 2 years ago

Fixed in 0.9.0 - make sure to delete the states in ioBroker manually, this will allow the adapter to create them with the new settings.