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

Add a button to force-update the state #160

Closed
Mark-64 opened this issue May 3, 2024 · 6 comments · Fixed by #165
Closed

Add a button to force-update the state #160

Mark-64 opened this issue May 3, 2024 · 6 comments · Fixed by #165

Comments

@Mark-64
Copy link

Mark-64 commented May 3, 2024

This integration works in principle very well, however my system is connected through a mobile connection and I only have 200 MB/month, which is very common in Italy for IoT subscriptions.
If I set a polling interval of 120 sec or so, to get a decently responsive interface, the the data consumption is way too high. If I set a polling interval compatible with my subscription plan, then the update is way too slow.
My proposal is to introduce a button to force-update the status, so that one can set a long polling interval and then force-update in HA when required through scripts and automations.

@Mark-64 Mark-64 changed the title Add a butto to force-update the state Add a button to force-update the state May 3, 2024
@palazzem palazzem self-assigned this May 15, 2024
@palazzem
Copy link
Owner

Hello @Mark-64 ! I think your suggestion makes 100% sense. As a solution, I can create a Home Assistant service that you can use/call directly from your automations (e.g. you may force an update after some conditions are met), or manually from your UI (e.g. you add a button to your dashboards that triggers the update) as you are suggesting!

I have a question though as you are using a long scan interval: are you impacted by #117 ? I think I still need to fix that issue first because the force update may not work properly if the refresh tokens are not refreshed in time.

Anyway, I'll be sure to include your suggestion in the next release coming this week!

@palazzem palazzem moved this to Todo in e-Connect Roadmap May 15, 2024
@palazzem palazzem added this to the 2.4.0 milestone May 15, 2024
@Mark-64
Copy link
Author

Mark-64 commented May 17, 2024

I have a question though as you are using a long scan interval: are you impacted by #117 ?

No, I am not.
Thank you for accepting my suggestion!

@palazzem
Copy link
Owner

Hello @Mark-64!

The force-update feature you suggested has been fully implemented, and your feedback is very welcome to see if it works as you expect! Currently, you can either add a button to force the update or use this service in your automations.

Update Your Version

As I still need to test and verify if everything works as expected, I've released this feature as a beta version, so you need to install the beta version. You have two options:

  1. Download and use the version available on this release page: https://github.com/palazzem/ha-econnect-alarm/releases/tag/v2.4.0b1
  2. If you use HACS, just enable the beta channel and you should see the v2.4.0b1 version available (be sure to install b1 and not b0).

Add the Update Button

Once the new version is installed, you can add a button in the Lovelace dashboard as follows:

  1. Add a card of type "button".
  2. In "Entity", select your Alarm Panel.
  3. In "Tap Action", select "Call Service".
  4. In "Service", select "e-Connect/Metronet Alarm: Update Alarm State".
  5. Click "Save".

And then you are done! By clicking that button, you'll force the update regardless of the delay you set. The screenshot below is a configuration example; update it based on your needs:
image

How Can You Help Further?

Your feedback is important, as I may have missed something you need. Just write here with your feedback, and as soon as everything works as you expect, I'll release a new official version. Let me know when you have time to play with it!

@palazzem palazzem moved this from In Progress to Waiting for Feedback in e-Connect Roadmap May 20, 2024
@palazzem palazzem moved this from Waiting for Feedback to In Progress in e-Connect Roadmap May 20, 2024
@palazzem
Copy link
Owner

Hello @Mark-64 ! I'm wondering if you had a chance to try 2.4.0b1 version, just to double check if the new feature fits your needs!

I'm planning to release a stable one tomorrow so that I can move forward with the development. Thanks again for your time and feedback!

@github-project-automation github-project-automation bot moved this from In Progress to Done in e-Connect Roadmap May 31, 2024
@palazzem
Copy link
Owner

@Mark-64 As I didn't hear back, I'm moving forward with the version release! Of course, if something doesn't work as you expect, feel free to reopen the ticket and I'll prepare a bugfix release!

I'll update this post as soon as the release is out!

@palazzem
Copy link
Owner

@Mark-64 v2.4.0 has been release! You can find it here: https://github.com/palazzem/ha-econnect-alarm/releases/tag/v2.4.0

If you use HACS, simply update to the latest non-beta version! Keep us posted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants