[ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost java.lang.NullPointerException: null

Sure, you need to have sshpass and exec binding installed, and run it once for openhab user for it to work.
Exec.things

Thing exec:command:influxdb "Restart InfluxDB Binding" @ "InfluxDB" [command="/usr/bin/sshpass -p habopen ssh -p 8101 openhab@localhost 'bundle:restart org.openhab.persistence.influxdb'", interval=0, timeout=15, autorun=true, transform="REGEX((.*))"]

Influx.items

Switch InfluxDB_restart_binding	"InfluxDB - Reset Binding" { channel="exec:command:influxdb:run" }
DateTime InfluxDB_last_restart		"InfluxDB - Last Restart binding [%1$ta %1$tr]" { channel="exec:command:influxdb:lastexecution" }

Influx.rules

rule "restart influxdb"
when
  Time is midnight or
  Time is noon
then
  InfluxDB_restart_binding.sendCommand(ON)
end
1 Like