Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

[influxdb] InfluxDB persistence does not work with #1356 and #1357 #5658

Closed
sihui62 opened this issue Sep 9, 2018 · 7 comments · Fixed by openhab/openhab-core#397
Closed

Comments

@sihui62
Copy link
Contributor

sihui62 commented Sep 9, 2018

With the snapshot versions mentioned above persistence for InfluxDB does not work anymore.

Related Community Thread:

https://community.openhab.org/t/snapshot-build-1357-items-persisted-by-influxdb-are-not-restored/51122

@sihui62 sihui62 changed the title [influxdb] InfluxDB restoreOnStartup does not work with #1356 and #1357 [influxdb] InfluxDB persistence does not work with #1356 and #1357 Sep 9, 2018
@9037568
Copy link
Contributor

9037568 commented Sep 9, 2018

This will probably have to be fixed in ESH. The persistence bundle here hasn't changed.

@9037568 9037568 added the esh label Sep 9, 2018
@sihui62
Copy link
Contributor Author

sihui62 commented Sep 10, 2018

Thx, I think you are right. After writing this issue I realized that mqtt and caldav are not working properly, too.
Reverting to snapshot #1338 solved the problem for me.

@sihui62 sihui62 closed this as completed Sep 10, 2018
@kaikreuzer
Copy link
Member

The log says:

Tried to set invalid state xxx (StringType)

So although nothing has changed about InfluxDB persistence service, it seems as if it has always already posted wrong values and now it is only checked and noticed by the framework.
I'd claim it needs to be fixed in the InfluxDB service.

@kaikreuzer kaikreuzer reopened this Sep 10, 2018
@kaikreuzer kaikreuzer removed the esh label Sep 10, 2018
@kaikreuzer
Copy link
Member

It seems the service tries to get the correct type, but somehow always ends up doing String as a fallback (which should not be done in any case). Maybe there's a startup order issue that the itemRegistry is still missing?

@sihui62
Copy link
Contributor Author

sihui62 commented Sep 10, 2018

Maybe there's a startup order issue that the itemRegistry is still missing?

That was one of my other problems with # 1356 regarding the caldav binding: log message "item registry not set" on default logging level.
Also my mqtt action switch was sending "1" regardless it I set the switch to ON or OFF where it normally sends ON/OFF.
No idea if it has anything to do with it, so I wanted just to mention it. Reverting back to an older snapshot #1338 solved all problems.

@kaikreuzer
Copy link
Member

@sihui62 I have no good idea what might have changed the startup behavior, but in any case the code seems to be not correct and thus the whole construct is fragile. #5659 should hopefully address this for the InfluxDB service. Other add-ons will have to be treated independently.

@kaikreuzer
Copy link
Member

@sihui62 I have meanwhile found the real cause for this problem - and have created a fix for it with openhab/openhab-core#397. All should be fine with tonight's snapshot again, I would hope.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants