Announcement

Collapse
No announcement yet.

can we dynamically change a SettingsPage using CreateSettingsPage

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

    can we dynamically change a SettingsPage using CreateSettingsPage

    can we rebuild/dynamically change a settings page based on user input? for example, after a user enters a value, and clicks save, rebuild the page, and redisplay
    Mark

    HS3 Pro 4.2.19.5
    Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
    Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
    Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

    #2
    I wanted something similar early on, but in the brief time I fooled with SettingsPage, there's just limited functionality.
    For example, I wanted the user to enter something like an IP, username, and password. From there, I wanted the page to validate that info and return something back. I could not figure it out.

    Subscribing to see if this is possible...
    HS4Pro 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


      #3
      within the OnSettingChange, based on my logic, i called Settings.RemoveAll() and then called my routine to rebuild the Settings page. Based on the new logic the settings page are changed and registered to the plugin menu.

      i don't know if this is a good idea or supported, but at first glance it seems to work.
      Mark

      HS3 Pro 4.2.19.5
      Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
      Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
      Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

      Comment


        #4
        Thats good info... Are you able to rearrange anything on the SettingsPage when you rebuild it?
        HS4Pro 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


          #5
          Originally posted by rmasonjr View Post
          Thats good info... Are you able to rearrange anything on the SettingsPage when you rebuild it?
          all this requires the users to Save the page before you can change it. rearranging shouldn't be a problem

          i have two setting pages (basic & advanced): on the basic page, i add a username/pswd field based on the input value of the first field and Save. on the advanced. i completely change a few settings on the advanced page as well.

          Mark

          HS3 Pro 4.2.19.5
          Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
          Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
          Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

          Comment

          Working...
          X