Unit mismatch - where do I start finding the issue?

Hi

I am running OH3.1 on RPi4 since Jan 21. I am pretty happy up to now, I just wish I had more time to get my automation fancy like those some folks around here :wink:

Looking to my log file and I can see the following message (repeated '000 of times, every minute, always the same value)

2021-10-03 21:07:00.467 [WARN ] [d4j.internal.RRD4jPersistenceService] - Failed to convert state '4.396 V' to unit 'one'. Please check your item definition for correctness.

If relevant, this is the influxdb.persist file

Strategies {
    // for rrd charts, we need a cron strategy
    everyMinute : "0 * * * * ?"
    everyHour   : "0 0 * * * ?"
    everyDay    : "0 0 0 * * ?"

    default = everyUpdate
}

Items {
    // persist items on every update
    gTemperatureAvg*, gTemperatureAvg, gHumidityAvg*, gHumidityAvg, gWindowContactBatteryLevels*, gWindowContactBatteryLevels : strategy = everyUpdate
    gThermoStatMode : strategy = everyChange, restoreOnStartup
}

I suspect one of the battery item is misconfigured, but I have dozen of items and this value is (AFAIK) an old one.

How can I find the culprit? Or at least delete the value, admitting that meanwhile the item delivers matching units? I cannot see any similar error with different value, so I could imagine this has been a temporary misconfiguration when I added a thing in the past.

Thanks in advance!
Max

Good guess; the units it is complaining about suggest an Item of type Number:Dimensionless (i.e. a percentage most likely) or of type Number:ElectricPotential (voltage)

I suspect you’ve somewhere got an Item of one type with ‘pattern’ metadata suited to the other - at a guess, a Number:ElectricPotential type with blank units in ‘pattern’ (which equates to unit ‘ONE’ in Dimensionless)

Thanks @rossko57 ! The funny thing is, I am not actively using rrd4j, the only persistence service configured and used as default is influxDB… is it safe to uninstall rrd4j and simply forget about it? Sometimes a pragmatic solution is all what is needed :sweat_smile:

Max

See

and

Deinstalled and error disappeared :slight_smile:

I would just be interested to know why the addon is active despite it should not be used for any state :thinking:

Thanks @rossko57 !
Max

What makes you think that?
You may have multiple persistence services installed.
They each will work with default settings, unless you configure otherwise.

I guess I need to understand better how persistence work.

Let me explain my thoughts

  1. I have multiple persistence services installed
  2. One of those (in my case: InfluxDB) is defined as default service, i.e. the used if not specified otherwise
  3. I have one .persist file only - influxdb.persist (see original post)

My question is: which are the items rrd4j is working on? My understanding is that, if no other persist files exist, no other quantities are going to be permanently stored, right?

Thanks!
Max

If you don’t specify rrd4j.persist
All of them, everyMinute and everyChange I believe, with restoreOnStartup thrown in.
(Except compound types like Color and Location that can’t be persisted in rrd4j)

In OH3 each service gets a default strategy in the absence of manual config, which boils down to ‘everything’.

That’s the default for charting or retrieving data from rules. Absolutely nothing to do with how any installed service manages its storing.