Domi04151309/HomeApp

Refresh question

clach04 opened this issue · 2 comments

Either a doc issue or a bug.

From #25 it sounds like refresh is NOT expected unless refresh-True is returned.

With version 1.10.0, I'm seeing /commands issued every 1 second (test case clach04/homeapp_demo_server@ed415df). This seems excessive as the title/summary strings are not update.

Should the refresh be happening? If so:

  • what should the expected poll rate be?
  • why not update the title/summary display?

The expected poll rate should be 1 second. This should only happen when there is an entry using the switch action to update the switch state in real-time. Do you have any suggestions how this could be included in the wiki? The title and summaries are not updated because this is specific to the switch action's state and should not trigger other layout updates. See here.

@Domi04151309 for me the 1 second rate was unexpected. A few ideas:

  1. Doc in the wiki, e.g. https://github.com/Domi04151309/HomeApp/wiki/SimpleHome-API#list-of-commands in the commands section to expect a refresh rate of 1 second (if a switch is present?)
  2. Offer an option in config to control that. Ideas:
    • in the UI on the phone

    • better; commands payload could return a "rate" integer value with units seconds, if omitted defaults to 1 second, That way the server can control this.

        {
          "rate": 1,
          "commands": {
            "example": {
              "title": "Title of the command",
              "summary": "Summary of the command",
              "icon": "display",
              "mode": "action"
            }
          }
        }