Limit on line length in openhab.cfg

Are there limits on the line length in openhab.cfg, if so how do I continue values onto the next line. Need to know this since I have many items that I would like to specify on rrd4j.xxx.items and hate having to replicate the same definition for xxx if nothing changes except items.

There are none documented anywhere I’ve seen.

But if all you are worried about is defining persistence have you considered using Groups? In your persist file you can then just say

MyGroup*: strategy = everyChange, restoreOnStartup

This will cause all members of the Group MyGroup to be saved using that strategy. I find this approach to be much more flexible and easier to maintain than listing each and every Item individually as to move an Item or add an Item to a different strategy all I need to do is add that Item to the right Group.

@rlkoshak, Thanks Rich for your feedback, but I am not concerned about the definition in the *.persistence file, I am concerned about the definitions for rrd4j in the openhab.cfg file like this, which is (one of) my definition for dealing with percentages:

rrd4j:pct5min.def=GAUGE,1500,0,100,300
rrd4j:pct5min.archives=AVERAGE,0.5,1,288:AVERAGE,0.5,6,720:AVERAGE,0.5,24,2000
rrd4j:pct5min.items=rtr_CpuLoad,rtr_DiskUsage,rtr_MemFreePercent,rtr_UsbUsage,cpuCombined,cpuSystem,cpuUser,openhabCpuPercent,memFreePercent,swapFree,raspDiskUsage

This is just the start of my percentage items I want to fit in this regime, I don’t want to duplicate the definition of pct5min just because there is a limitation on line length of the last part of the definition of the items it applies to.

As an old ‘fart’ in ICT (some 40 years) I am a strong believer of ‘if it ain’t documented it isn’t supported’ hence the reason for my question to get it documented. :slight_smile:

If its written in Java (which OH is) the maximum String size is (2^31 - 1) characters or half of your max heap size. So keep your openhab.cfg under 500 mg (assuming you have at least 4G of RAM or 1/8 of your total RAM if less) and you will be fine.

The big question is whether you can avoid having to put it all on the same line. I think the answer to that might be no but would have to look in the code to know for sure.