No announcement yet.

Ini setting and serialization

  • Filter
  • Time
  • Show
Clear All
new posts

  • Ini setting and serialization

    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?

  • #2
    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.


    • #3
      Thanks for the response. I am not familiar with PED. Do you have a link to documentation? Also does it allow encrypting the data?


      • #4
        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 Tapatalk
        HS3Pro Running on a Raspberry Pi3
        64 Z-Wave Nodes, 168 Events, 280 Devices
        UPB modules via OMNI plugin/panel
        Plugins: Z-Wave, BLRF, OMNI, HSTouch, weatherXML, EasyTrigger
        HSTouch Clients: 3 Android, 1 Joggler