Announcement

Collapse
No announcement yet.

.ini File vs. Virtual Device for Data Storage

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • .ini File vs. Virtual Device for Data Storage

    I promised myself that I would get around to figuring out how HS .ini files work after getting my system mostly set up - it was not a high priority. 50 or so scripts later, the time has come, and I would like to get the advice of the HS experts here.

    I have data like passwords for alarm arming/disarming and access to sensitive HSTouch screens, as well as phone numbers that HS uses for text alerts that will definitely go into the .ini file. But I also have lots-o-configuration info, all editable via HSTouch screens, that is currently stored in virtual devices, like:
    • Which tablets/phones can disarm the alarm system
    • Which tablets/phones can control media - the screens automatically change when the source changes either by remote or Alexa (ie: DirecTV, Game, Blu-ray, etc)
    • Tablet Names, which ones chime when a door/window opens, whether they default to a standard template or an LCARS template at boot-up. Blah, blah, blah...
    My question is, are there pros/cons for using virtual devices vs. an .ini file with regard to speed and/or stability?

    Thanks in advance for any advice!

    Jeff

  • #2
    Hi Jeff, no real pros or cons. If you only use the values in scripts and never have to use the value in other events, or display them, then an INI file is probably the best spot for them. I've been using INI files for years and have never had any issues with them. In my opinion an INI file is much easier if you need to store and retrieve many values.

    Cheers
    Al
    HS 3.0.0.532: 1963 Devices 1141 Events
    Z-Wave 3.0.1.261: 122 Nodes on one Z-Net

    Comment


    • #3
      If your settings relate to a device , eg you hace a virtual device for each tablet and you store data regarding that tablet to a related device then the device makes sense. If general settings use the ini file, just easier for you to see/access and edit when there are errors or issues.

      Comment


      • #4
        Thanks guys, I appreciate the input.

        I was playing around with it, and you can display the ini values in HSTouch screens. I used this in a text element's Text field, and it worked:

        [$SCRIPT=&hs.GetINISetting("Users", "User1", "", "Tablets.ini")]

        Comment

        Working...
        X