I have a bunch or classes that have configuration data. I need to store/update that data when it changes and read it when homeseer starts. Saveinisetting/getinisetting seems to be the preferred method. However, to make it easier I would like to just serialized and deserialize my classes. This produces binary data which I assume will cause issues since the ini fles are plain text files. Also I want to encrypt certain data. So what is the best way to handle this?
Announcement
Collapse
No announcement yet.
Ini setting and serialization
Collapse
X
-
I prefer to use the PED (plugin extra data). This stores the data directly in the devices themselves. I only store simple data (strings, numeric, boolean) values in the INI settings files.
However, I do serialize the data that goes into PED as JSON as it seems to work better than trying to store the actual objects.
-
Tink explained it like this: PED is best for base types only. If you serialize your object and store it in PED, your object will only work after your plugin is loaded. So, if you have an event that uses your device, it will fail if your plugin is not loaded.
Sent from my Galaxy S7 Edge using TapatalkHS4Pro on a Raspberry Pi4
54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI
HSTouch Clients: 1 Android
Comment
Comment