mvdwetering / websitechecker

Custom integration for Home Assistant to monitor if websites are reachable or not
22 stars 2 forks source link

Ability to extend timeout - feature request #6

Open doug86i opened 6 months ago

doug86i commented 6 months ago

Hey there!

Thanks for this very useful integration!

I have an internal system that becomes quite slow to respond during backups.

Currently this causes it to time out occasionally, triggering a problem and the associated automations.

It would be great to be able to set the time out globally and on a per url basis in the configuration.

Many thanks again!

mvdwetering commented 6 months ago

I think I have it working. Could you give it a try as I have no way to test with such long timeouts.

This is the branch that has the changes https://github.com/mvdwetering/websitechecker/tree/add_connection_timeout You would need to download the zip manually by pressing the green Code button and select download ZIP. After that overwrite the files from the installed version with the ones from the ZIP, update your configuration and restart Home Assistant.

Note that, judging from my comments in the code, timeouts would lead to a warning (or error) from Home Assistant, so it might not even work for timeouts > 10 seconds. But as mentioned I don't know how to test such long timeouts.

doug86i commented 6 months ago

Thanks! Will give it a go x

executed commented 1 month ago

Can this be closed? I think README.md says it's possible. I would add a little explanation to why 10min is default timeout and if there are any issues with decreasing it.

P.S. @mvdwetering thank you very much for this integration. I would add some "Buy Me a coffee" links in README.md

mvdwetering commented 1 month ago

It is only documented in the README on the branch for this change. It was never merged into the main branch since I don't have a setup to test such timeouts and never got feedback if it worked or not.

Thanks for the kind words, but I will probably not be adding a "Buy me coffee" button or something. I kind of want to keep money out of my hobbies. I want it to be just for fun or because it is useful and share with others without any additional pressure which accepting donations could bring.

doug86i commented 1 month ago

I would support closing.

It's a very neiche requirement.

Applogogies for not reporting back but have found a solution that works for us.

Many thanks @mvdwetering it's a great integration and we still use it extensively x

Dx