Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh question #89

Open
clach04 opened this issue Jun 11, 2023 · 2 comments
Open

Refresh question #89

clach04 opened this issue Jun 11, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@clach04
Copy link

clach04 commented Jun 11, 2023

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?
@Domi04151309
Copy link
Owner

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 Domi04151309 added the enhancement New feature or request label Jun 14, 2023
@clach04
Copy link
Author

clach04 commented Jun 17, 2023

@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"
            }
          }
        }
      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants