MySQL specific sensors don't persist their value's

Some of my sensor values are not persisted and i can’t seem to find the cause. The values do change, i checked to be sure using the basic UI i see different value’s during the day for this sensor. I have other sensors with the same setup (using _grpPersist) that have their value persisted as expected. I don’t see any validation errors on this items file or persist file in the logs. I don’t see any problem in the logs. Anyone with a suggestion to look into?

Number	verd0_keuken_pir1_lux			    "Lux [%d]"                          <battery>	    (_grpBeveiliging,_grpVerd0,_grpPersist)     { channel="zwave:device:512:node33:sensor_luminance" }
Number	verd0_woonkamer_pir2_lux		    "Lux [%d]"                          <battery>	    (_grpBeveiliging,_grpVerd0,_grpPersist)     { channel="zwave:device:512:node34:sensor_luminance" }

Items {
	_grpPersist*				: strategy = restoreOnStartup, everyChange
}

The query SELECT * FROM Items WHERE ItemName like ‘%lux%’ doesn’t yield any results

Just to make sure you’re looking in the right place, does this return anything?

http://<your OH server>:8080/rest/items/verd0_keuken_pir1_lux

If it does return some values, then try querying the ‘items’ table.

If it says the item doesn’t exist, I’d set jdbc to debug (log:set DEBUG org.openhab.persistence.jdbc) and restart OH while tailing the log file to watch for errors. The error may be in one of the other items files that is being loaded before this one, which then prevents the rest of the items from being restored at startup or persisted.

It does return something:

{"link":"[cut]/rest/items/verd0_keuken_pir1_lux","state":"50","stateDescription":{"pattern":"%d","readOnly":true,"options":[]},"editable":false,"type":"Number","name":"verd0_keuken_pir1_lux","label":"Lux","category":"battery","tags":[],"groupNames":["_grpBeveiliging","_grpVerd0","_grpPersist"]}

none of the item files give a validation warning. Other items in the same .items file do persist their values.

Still SELECT * FROM Items WHERE ItemName = ‘verd0_keuken_pir1_lux’ gives no results.

Did you try lowercase items, or are you sure it is Items? If you’re getting data from the REST API, then it is persisting data. Wait a minute… I gave you the wrong URL. Try this…

http://<your OH server>:8080/rest/persistence/items/verd0_keuken_pir1_lux

This may be helpful too…

I have an average knowledge of MySQL and it is not storing the value’s in the database. The provided url returns nothing usefull:

{"name":"verd0_keuken_pir1_lux","datapoints":"0","data":[]}

So we can conclude the data is changing (observed in basic ui) and it is not persisted to the database. Is there any logging i can turn on? Just to be sure, i’m using snapshot 2.4.0 build #1310

Yes… looks like it is definitely not persisting.

Look at my first post.

I may be wrong, but afaik underscore is not allowed as first char in item names (also no number).

Only the group start with an underscore and other items (in the same group) are corectly persisted. I did discover some warnings about the same node/channel: OH2 Z-Wave refactoring and testing... and SECURITY
Well not sure if it is related because the basicUI gets updated and so should the database. I will set de debugging today.

openhab restarted and all trouble seem to have gone. Weird. Thanks for everyones time.