Influxdb (v1.8) persistence is not working for me in OH3. I have an instance of OH 2.4 running and it interacts perfectly with my influx server. I have installed instances of OH3 on both my Synology Docker and separately on a Pi (running one at a time). They target a second database in Influxdb. The permissions for both databases are the same.
In each OH3 instance, measurement labels are written to the db, but no values. OH 2.4 continues to perform perfectly on the same influx db server. To be clear, these are not measurementPoints with blank values. There is literally only one record in the database, and it is for the measurement label/name. In both cases, the settings in my persist files are followed without any problem. There is no restoreOnStartup setting.
Logs show update commands are issued from OH3, and the influx log shows the POST command executing and I do not see any errors. (I have not figured out how to change the Influx log level on either platform)
My best guess is that there is some defect in the construction of the POST that does not conform to the Influxdb line protocol and for some reason does not throw off an error. I am able manually to add values to Influxdb using the cli and the insert command, with no problems.
I am unable to see the actual line protocol commands sent to the server.
FOR OH3, in the OH TRACE log I see (first time using code fences here):
00:49:41.465 [TRACE] [e.influxdb.InfluxDBPersistenceService] - Storing item 2OfficeLt_OffOn (Type=SwitchItem, State=ON, Label=Off/On, Category=Switch, Tags=[Point], Groups=[2OfficeLt, gPersist]) in InfluxDB point InfluxPoint{measurementName='2OfficeLt_OffOn', time=2021-08-25T00:49:41.465386Z, value=1, tags={item=2OfficeLt_OffOn, label=Off/On, category=Switch, type=Switch}}
This is logged on the influx side as this:
"[httpd] 172.17.0.3 - openhab [25/Aug/2021:00:49:41 +0000] "POST /write?db=openhab_2&rp=90_days&precision=n&consistency=o
ne HTTP/1.1" 204 0 "-" "okhttp/3.14.4" 5511c7b7-053e-11ec-822c-001132d2f82b 395207 "
FOR OH2, in the OH TRACE log I see:
18:15:03.291 [TRACE] [b.internal.InfluxDBPersistenceService] - storing isy_variable_4fbead30_state_38_value in influxdb value 580, isy_variable_4fbead30_state_38_value (Type=NumberItem, State=580)
``
This is logged on the influx side as this:
[httpd] 192.168.1.120 - openhab [25/Aug/2021:01:15:03 +0000] "POST /write?consistency=one&db=openhab_db&p=%5BREDACTED%5D&pr
ecision=n&rp=90_days&u=openhab HTTP/1.1" 204 0 "-" "okhttp/2.4.0" e035da8a-0541-11ec-824e-001132d2f82b 255315
I notice how this latter influx log entry uses both the -p and -u parameters, where the OH3 version uses neither. Also, it has no timestamp parameter, which by definition is optional in the line protocol.
In any case, the formats are obviously different, and I don’t know what to make of that.
I wonder if the timestamp parameter in OH3 is being translated to UTC format correctly?
Perhaps I just need help getting to a more granular logging level in Influxdb?