my OH runs on a windows machine, sometimes you need to restart a windows machine
once i restart the system and restart OH it loads up with values set as NULL this stops my rules from working i have to toggle certain switches so that the rules start working again
eg i have a moviemode switch its set in all my lighting rules to not change the lights if this is switched to on once restarted it gets set to NULL
is there a way to set these values on startup or do i need edit my rules to account for this
Persistence is something that i plan on getting setup i want to record a few values of different items
but it seems complicated and im still trying to understand the basics of just rules , items ect all my setup has been done with paperui apart from a few simple text rules people have helped me create
so iv been scared to dip my toes into that part and alot of other parts until i understand more
i will still look into what you suggested thanks for your response
On every state change, the current state (and only the current!) is persisted for that item; RestoreOnStartup instructs to… restore the state of each item on startup, huh
there are alot of things that i didnt understand about computers and iv never learned by being scared of trying new stuff on computers give me a moment
all these text files have been scaring me since i started all this last month lol
Of course you’re right, $CONFDIR/persistence would be the correct suggestion - but you found it anyways When you’re using * so you tell to store every item, so no further configuration needed at this point. You store every item on every change and restore it on every startup to its last state.
2018-01-08 08:32:01.656 [DEBUG] [pdb.internal.MapDBPersistenceService] - store called for Sun_Azimuth
2018-01-08 08:32:01.662 [DEBUG] [pdb.internal.MapDBPersistenceService] - Stored 'Sun_Azimuth' with state '125.41' in mapdb database
2018-01-08 08:32:01.671 [DEBUG] [pdb.internal.MapDBPersistenceService] - store called for Sun_Elevation
2018-01-08 08:32:01.679 [DEBUG] [pdb.internal.MapDBPersistenceService] - Stored 'Sun_Elevation' with state '-0.09' in mapdb database
If you really want to work without persitence for the time being, then you can also set Item’s at system startup via a rule! I urgently recommend a persistence!
rule"Remove Item Status NULL"
when
System started
then
if (moviemode.state == NULL) moviemode.sendCommand(OFF)
end
i have followed the steps above and setup mapdb persistence the reason i want to avoid some tasks is i dont want to bite off more than i can chew
i have a few posts on here asking how to do some things they have been left open at the moment some are complicated and are going to require more time and learning to get right
alot of learning how to use the text files
setting up persistence for temps and other items
adding calander events
adding my hue motion sensors
its a complicated and expensive hobby thats just a tiny list of the things i want too do but dont understand soon maby
i have followed the steps posted above just restarted my system and set the log to debug persistence
12:00:23.899 [DEBUG] [pdb.internal.MapDBPersistenceService] - store called for Movie_Mode_Trigger
12:00:23.899 [INFO ] [marthome.event.ItemStateChangedEvent] - Movie_Mode_Trigger changed from ON to OFF
12:00:23.900 [DEBUG] [pdb.internal.MapDBPersistenceService] - Stored 'Movie_Mode_Trigger' with state 'OFF' in mapdb database
i dont think it restored the values on startup looks like it was still set to NULL after start
2018-01-08 11:57:41.583 [ItemStateChangedEvent ] - Movie_Mode_Trigger changed from NULL to ON
seems to be ok after second restart maby NULL value was saved ?
the change to moviemode was done by me manually and it changed from NULL to ON and then i pressed it off manually and it changed from ON to OFF
it might be ok now will check again
i will also get back to you on the rule you were helping me create for my hue light iv had a few backup problems (Unrelated Data Backup) still sorting them as we speak