Player item states are not persisted

Does anyone know if this is a known issue or expected behavior? I guess it could also just be a problem with my setup. I only have one Player item, which is linked to the control channel from a Kodi Medicenter Thing. I’m using the 2.x Kodi binding.

Player DS_FamilyRoom_Kodi_Control       "Kodi (Family Room) Control"               <none>      (gKodiFamilyRoom)     { channel="kodi:kodi:kodifamilyroom:control" }

The item works, but no table has been created in my persistence database. I’m using JDBC for persistence with MariaDB for the database on OH2.2.0 snapshot build 1054 (earlier builds behaved the same, IIRC). Persistence is working for everything else, and all items are configured to be persisted. With JDBC in debug, I only see errors on startup or when a rule is trying to access the item’s nonexistent persistence data:

2017-Oct-14 13:00:07.603 [WARN ] [b.persistence.jdbc.internal.JdbcPersistenceService] - JDBC::query: unable to find table for query, no data in database for item 'DS_FamilyRoom_Kodi_Control'. Current number of tables in the database: 1408
2017-Oct-14 13:00:07.605 [WARN ] [b.persistence.jdbc.internal.JdbcPersistenceService] - JDBC::query: no way to generate the table for item 'DS_FamilyRoom_Kodi_Control'

Does anyone have Player items with persistence data?

@cweitkamp, I don’t thing this is Kodi specific, but do you persist your Kodi_Control item?

Dear Scott,

I personally don’t use persistence for any Player items. It’s moreover a call-to-action item for me which doesn’t hold any relevant data.

To verify if this behavior is related to the Kodi binding you maybe want to create another Player item without linking it to any channel. If you see the same messages in the log file the root cause is located anywhere else.

Do you see any message in the logs while or maybe after you have used the Player item?

Dummy Player items behave the same (not persisted). So definitely not Kodi related.

Nothing shows in the logs, even when jdbc is in TRACE. When non-Player items’ states change, they do show in the log. Event.log shows the Player item has changed.

Thank you for replying! I knew you would definitely have a player item, so was hoping you also had them persisted. I have a rule that pauses Kodi during audio notifications and unpauses after. I used the persisted data to know if it had been playing when it was paused. I threw in a variable to store the state, so my rule is working fine, but thought I’d try to identify if this was actually a bug effecting others before submitting a PR. Thanks again! Hopefully someone with a persisted Player item will come along.

Dear Scott, dear Christoph,

just to confirm your symptoms:

I have openHab 2.1.0-1 up and running on a RIP3.
Persistence is jdbc-mariadb to an external DB on my Synology.
Database is set up with some latin (not-utf8) collation.

I have 151 items persisted correctly, only my single Player-item fails with the same message (“JDBC::query: no way to generate the table for item”).

So if you have found sime solution or workaroung, I’d be keen getting to know it.

Kind regards,
Michael

Dear Micheal,

Thanks for confirming our observations. We already come to the conclusion that this behavior is not related to the Kodi binding. Imho it is more a problem located in the JDBC persistence.

May I ask one of you to open an issue in the OH1 Repo? Thanks.

I completely forgot to follow up with this. I have now opened an issue.

1 Like

It seems while I was asleep (German local timezone = UTC+1) you’ve already filed a bug report. If only all my tasks would be handled while I was asleep… Regards, Michael.

:slight_smile: I had been meaning to submit one but it got away from me. Your post was a welcomed reminder!