My setup:
Openhabian running on a Raspberry PI with OpenHab 2.2
ZWave binding, working without issues and logging all that I put in the persist file
icloud binding that receives data properly too. Looks like this:
2017-12-28 14:15:24.360 [vent.ItemStateChangedEvent] - IPhone7Plus_Location changed from XX.XXX728819336835,-X.XXX418103077689 to XX.XXX75788937955,-X.XXXX170208076405
2017-12-28 14:20:26.117 [vent.ItemStateChangedEvent] - IPhone7Plus_BatteryLevel changed from 83.99999737739563 to 81.00000023841858
I have properly working a InfluxDB + Grafana setup that logs and plots whatever I put in my ./persistence/influxdb.persist file. This looks like this:
Logs look clean and even when enabling from the cli the DEBUG for the icloud or openhab, I get nothing related to an error with Influx/Grafana posting/persistance.
I am tring to persist specifically the GPS position of my iPhone to influxdb so later I can plot it to a map. But nothing gets logged or attempted to be logged.
Can anyone help or point to the right direction on how to get that done?
Am I right assuming that what I see in the logs is what’s been tried to be persisted?
2017-12-28 14:15:24.360 [vent.ItemStateChangedEvent] - IPhone7Plus_Location changed from XX.XXX728819336835,-X.XXX418103077689 to XX.XXX75788937955,-X.XXXX170208076405
If so that’s just a GPS location in DD (Decimal Degrees) separated by a comma.
I thought that the persist file as specified above, if the format was just like that, would take care of storing it in influx pretty much as every other type I already sent without defining it. Seems I am wrong?
The persistence service does not seem to accept the Location datatype. I guess the reason being that this is a complex type.
One solution could be to create a new item
String StringLocation "This is a string representation of Lat,Lon"
create a rule to trigger whenever the Location item is changes and update the StringLocation
I had the same issue (locations not persisted) with MySQL and thus changed to InfluxDB, to no avail. I also thought of the workaround with an additional string, but according to the sources I understand InfluxDB should be able to store locations, thus this might be a bug of the InfluxDB persistence addon ?