Hi,
I have the problem that openHAB does not save constant values in the influxDB.
I need this so that I can get beautiful Charts from Grafna.
I checked the entire configuration and can’t find any errors. In general, persistence works very well for me … as long as the value changes constantly.
Here is my setup:
openhabian installed on Raspberry Pi 4 Model B
Raspbian GNU/Linux 10 (buster)
Linux 4.19.75-v7l+
openHAB 2.5.0-1 (Release Build)
InfluxDB v1.7.9
Hadn’t changed the persist file for a long time.
Still started the raspi yesterday(23:20) on suspicion.
Then it worked for about 2 hours (see picture).
In the log EVERY minute the following error. Until 8:12 a.m. Then no more!:
2019-12-31 07:38:01.315 [ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
java.lang.RuntimeException: {"error":"partial write: field type conflict: input field \"value\" on measurement \"gWnachten\" is type float, already exists as type string dropped=1"}
at org.influxdb.impl.InfluxDBErrorHandler.handleError(InfluxDBErrorHandler.java:19) ~[influxdb-java-2.2.jar:?]
at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:242) ~[retrofit-1.9.0.jar:?]
at org.influxdb.impl.$Proxy222.writePoints(Unknown Source) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:151) ~[influxdb-java-2.2.jar:?]
at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:171) [influxdb-java-2.2.jar:?]
at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:144) [influxdb-java-2.2.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
I’m not sure if that’s the trigger or a consequence.
I have now deleted the measurement from the DB so that he can create it again with the correct definition:
influx -database openhab_db
> auth
username: admin
password: ********
> SHOW MEASUREMENTS
name: measurements
name
----
Ankleide_Luft
Ankleide_PING
Ankleide_Reboot
Ankleide_Temp
Ankleide_TempSoll
Ankleide_Update
Ankleide_Uptime
Ankleide_WLAN
gWnachten
...
DROP MEASUREMENT gWnachten
>
> SHOW MEASUREMENTS
name: measurements
name
----
Ankleide_Luft
Ankleide_PING
Ankleide_Reboot
Ankleide_Temp
Ankleide_TempSoll
Ankleide_Update
Ankleide_Uptime
Ankleide_WLAN
...
then restarted openHAB but it no longer saves constant values
even not after a RasPi reboot
following error in log:
2019-12-31 14:15:00.104 [WARN ] [ore.internal.scheduler.SchedulerImpl] - Scheduled job failed and stopped
java.lang.NullPointerException: null
at org.openhab.persistence.influxdb.internal.InfluxDBPersistenceService.store(InfluxDBPersistenceService.java:243) ~[?:?]
at org.openhab.core.persistence.internal.PersistenceServiceDelegate.store(PersistenceServiceDelegate.java:59) ~[?:?]
at org.eclipse.smarthome.core.persistence.internal.PersistItemsJob.run(PersistItemsJob.java:58) ~[?:?]
at org.eclipse.smarthome.core.internal.scheduler.CronSchedulerImpl.lambda$0(CronSchedulerImpl.java:61) ~[?:?]
at org.eclipse.smarthome.core.internal.scheduler.CronSchedulerImpl.lambda$1(CronSchedulerImpl.java:69) ~[?:?]
at org.eclipse.smarthome.core.internal.scheduler.SchedulerImpl.lambda$12(SchedulerImpl.java:163) ~[?:?]
at org.eclipse.smarthome.core.internal.scheduler.SchedulerImpl.lambda$1(SchedulerImpl.java:75) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]