i’m new with openhab. v4.2.2
come from germany, have fritzbox devices an was looking for more statistics for all the iot things. openhab seems to be the answer!
I have a rasbian (some more pi’s v3B) where openhab should go to after my evaluation.
because openhab software is very complex, i have two, three questions at the beginning.
i could setup my things and my statistics pages. now i’m starting reading some details in the docs.
now i want to move the setup from my linux desktop box to my main 24/7 raspberry.
What do i need to do to have the same setup there?
E.g: copy /etc/openhab to the raspberry and thats it?
I have setup a JDBC store for my historical data. (Persistence) The update possibilities confusing a bit. currently i use: “restoreOnStartup” and a cron each 30min.
What do you think?
What i need: Less storage usage at the db but records for statistics. Each update of the voltage from some devices i dont need at all except one of them.
So i limited it using cron and throw out the voltage from the things.
But: The special decive where i want to track all voltage events: how to do this?
welcome to our community (good choice).
My best tip for new Pi-users would be to use openhabian. Just use the raspberry imager and install the 64-bit version of openhabian.
It provides a lot of useful staff that will make your start so much easier (influxdb, mapdb, zigbee2mqtt…).
Your configuration under /etc/openhab/ can be copied to you new installation but for further backups it’s better to use the built-in functions of openhabian (Amanda, backup config or even the whole SD-card)
Your second question depends very much on your needs: The solution for my needs (just some graphs) is to use rrd4j and mapdb.
One of questions, I am also looking for an answer: I have some items that are VERY verbose. I would like to make it so that certain items are not saved to persistence.
E.g.:
A presence sensor reports the distance of a target.
Is there an easy way to remove the persistence at an item level??
Yes, make a new installation with a new image file based on Openhabian on your SDcard on your new PI system.
Do a basic configuration, and start OH.
Then you can make with the Openhabian config menue a first “empty” backup, that the paths etc are created on the new system.
Then go back to the existing configuration and make a backup via the build in Openhabian
backup tool. Copy the created backup file to your new system and restore this configuration.
The only thing which comes to my mind, is that you remove the link from the existing channel
for this deticated value from the item. Or remove the channel itself from the item which was created.
To your second point:
You could do that with different item groups.
The first step is to create a new group item called PersistEvery30Minutes (or how you want it)
Have a look under settings → persistence settings.
Now choose your configured persistence service.
Here you can set different strategies.
Click on Add Cron Strategy
Set a name like PersistEvery30Minutes with the corresponding Cron expression.
After that, save and go back.
The last step to do, is to connect the item group with the persistence strategy.
Click add configuration.
Select the created group item under select group.
Under strategies select your created Strategy.
But your not completely done. At the default there is a * configuration, which will save all changes on every item. Go in this configuration and disable the persist all items.
You can repeat that for other groups (persistEveryChange, persistEvery10Minutes and so on).
Don’t forget to set the group in every item which you want to save
Another possibility would be to create a filter with an threshold. With that you can configure, that only bigger changes on an items state are save.
Some informations i made are not clear enough:
The raspbery, which exists, has not been restarted since 7 and the last 2 Years and is a important device where OH can be installed using apt because other stuff ins mostly iddling around
The JDBC driver saves my live when the SD Card crashes in the RPi Well not the last 7 Years anymore. I got a solution which seems to work (limiting IO to the SD) And the custom data goes via nfs or db connections else where.
I’m not sure if i want to setup an extra RPi just for one software or complex task using openhabian. Storrage devices, Docker or other VM solutions would be probably more flexible then. Anyway: Thanks for the hints! I’ll check the options an give openhabian i try learing to improve my setup, settings, automisations etc…