Setting influxdb as default

Once again, the fact that rrd4j is saving the values is completely irrelevant.

What matters is why InfluxDB isn’t saving those Items. Completely uninstall the add-ons. Get rid of rrd4j entirely. It won’t change anything.

You keep talking about Channels but Channels have nothing to do with persistence. Persistence saves the states of Items.

As I said, there is something about these Items that InfluxDB doesn’t like. What is it? :man_shrugging: You’ve not even indicated what type these Items are, let alone event logs, queries to InfluxDB to see if there is even anything there for those Items, etc.

I tried to save you the effort of starting over because I knew from the start that wouldn’t change anything. Same Items, same problems.

Which actual version?
influxdb 2 had a problem with underscore in Item names at 3.1 I think.

Sorry, I was not very specific:
This is the thing
UID: avmfritz:FRITZ_DECT_301:192_168_1_10:099950058880
label: “301 #1 GästeKlo”
thingTypeUID: avmfritz:FRITZ_DECT_301
configuration:
ain: “099950058880”
bridgeUID: avmfritz:fritzbox:192_168_1_10

With these channels

Where I linked one to an item

It only appears in the chart when deselecting the default DB

None of the persistence services are remotely interested in your Things or channels. They operate on Items - it looks like the Item of interest is named
3011GasteKlo_CurrentTemperature
and it’s of type Number:Temperature

The type should be fine.

I note that there is an underscore in the name, which should be okay BUT has been associated with influxdb problems in some OH versions - what’s yours?

Of more concern though, your Item name starts with a number.

Names must not begin with numbers. Spaces and special characters are not permitted.

I know parts of openHAB deal with it, but parts don’t.

I am running OH 3.2.0
I renamed another Fritz thing without numbers and added a link to its channels. The chart shows two values went into influxdb, but then it switched to rrd4j. Would I need to reboot?

Hello,
I have now created an influx.persist file that looks like that. Sill, my Fritz Temperatures can only be seen in the RRD4J db. I hopped that specifying “*” as Item would save all items into the influx db. What else could I possibly do?

Strategies {
everyMinute : “0 * * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
default = everyUpdate
}

Items {
* : strategy = everyUpdate
}

May we see one of the Items that doesn’t work now?

… what do you need?

I show a couple of screenshot to illustrate the issue:
The good one:
Senec Power channels



nice chart out of influxdb

The bad one. Fritz Thermostate Temperature




Data goes into RRDJ4 (Influxdb set as Default)

no data in Influxdb

So the bad ones, and only the bad ones, all start with a number in the name?

How long did you wait, and what are you using to confirm data in the influx database?

Please note that the Default persistence does nothing except for set the default historical data source for charts and rules. So RRD4J is not interfering with anything, it’s not stealing any data - its existence is irrelevant, as the others have said. It did not ‘switch’ to RRD4J - it was going there already

Yesterday I did a fresh install and renamed a data channel with letters only. Same result.
I “read your lips”, but why are the Fritz temperatures not stored in influxdb but the Senec power channels are? I can only assume that somehow influxdb does not like them (why?) and so they are stored in the default db.

The only sure fire way is to use the API Explorer to query the influxDB (or look in the DB itself with a separate tool, I guess).


They will be stored in every Persistence service that you have installed, and that can accept the Item type, and that you have not explicitly configured not to store them. It’s not “they didn’t go into influx, so they went to RRD4J”. They go to RRD4J anyway, unless you configured RRD4J not to store them too. If you install another persistence service it’ll probably be stored by that one too, assuming it likes the Item.

This still seems to apply.

[Item] Names must not begin with numbers.

Thanks, so items are always stored in Rrjd4 even if influx is the default. That helps understanding the issue. I think that sometimes I see funny lines in the charts from the temperature in influxdb, but it is hard to reproduce. How could I look into influxdb? Should I use grafana? Should I change the strategy for influxdb? I guess that the Fritzbox acts as bridge and all Dect item‘s data goes „via“ the Fritzbox (the polling interval is defined there). The box seemes to apply some datareduction, probably only sending changed data, but no regular one. I could imagine that that messes up the influxdb‘s data intake somehow.

Oh, no, I checked: The Senec powerchannels can only be charted from Influxdb, but not from RRDJ4, that dB is empty for these channels. So the above seems doubtful

Ok, I think I know what is happening. The Fritzbox polls the data from the Thermostate every 15 Minute only. And then it sends its further only whenever a value changes. Somehow RRdj4 handles that well by simply connecting data points via lines or by even extending an old unchanged value for hours. So data can always be seen. Influxdb stores only changed data. And it does not connect unchanged values. So, in order to see data, I switched to scatter - and there it is. I guess what influxdb does is correct as Fritz is not updating unchanged values.


RRdj4 connecting and extrapolating data

Influx showing the same data. The chart is empty in case scatter is not selected as visual!

Sorry for the confusion. That still leaves the question why RRdj4 seems not to contain Senec‘s power data. May be it is the inverse problem as that data is is polled every 15sec…

This is why

Glad you’ve found a solution/answer!

Maybe when you set a different strategy, your graph will look different. Now you’ve set to write to influx on every update. I write to influx every 5 minutes, no matter if the values changed or not.
If you read influx with Grafana, you can choose to connect all points, so it looks like you have data for every moment.

I agree that connecting the points smartly will ge bood. I have not tried Grafena yet, but will try. The data rate is very limited as the Fritzbox uses a special DECT low power mode that limits data to a minimum. I believe that the device sends data only every 15 minutes but only if data changed. The Fritzbox does some clever data augmentation within the plots that is not available within the Openhab charts.

That’s okay, you can have persistence store a value at regular intervals, changed or not. That’s what rrd4j is set up to do by default, because it makes charting easy.

1 Like