fwmarcel / home-assistant-divera

This is a custom component that allows to address the Divera 24/7 alarm software from Home Assistant.
46 stars 11 forks source link

[Feature]: Option to enter custom DIVERA_URL and DIVERA_STATUS_URL for own instances seperated from the central divera247.com #108

Closed snarman closed 4 months ago

snarman commented 5 months ago

Requirements

Is your feature request related to a problem?

For Divera Instances that are not hosted directly at divera247.com but at an own Instance at app.[cityname].divera247.de it is not possible to use the Integration without manual changes to const.py.

I have to adjust these lines: DIVERA_URL: str = "https://www.divera247.com/api/v2/pull/all" DIVERA_STATUS_URL: str = "https://www.divera247.com/api/v2/statusgeber/set-status"

to: const.py:DIVERA_URL: str = "https://app.[cityname].divera247.de/api/v2/pull/all" const.py:DIVERA_STATUS_URL: str = "https://app.[cityname].divera247.de/api/v2/statusgeber/set-status"

Describe the solution you'd like

As updates always reset the custom changes to const.py I would be happy to see an option to enter custom DIVERA_URL and DIVERA_STATUS_URL in the GUI and have them preserved through future updates.

Describe alternatives you've considered

No response

Additional context

For reasons our city decided to get its own instance hosted at a custom URL at divera247.de in the form of https://app.[cityname].divera247.de. Maybe there are other cities and communities that do this and it would be very helpful for ease of use to enter the custom URL during setup in the GUI.

Anyway thanks for the already very great integration!

fwmarcel commented 5 months ago

@snarman Thanks for your feedback. I am not currently paying attention to Self Hosted. I'll add that to my list of to-dos.

Is the full url only variable or really just the cityname?

snarman commented 5 months ago

Thanks for adding to your to-do list. I am not sure about the URL. As far as I am aware of the full URL can be variable but for this specific case it is really just the cityname.

github-actions[bot] commented 5 months ago

:tada: This issue has been resolved in version 1.1.0-rc.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

fwmarcel commented 5 months ago

I have now simply made the complete url configurable. Please install the new version and let me know if it is as you imagined.

For my interest: on the "normal" Divera site (https://app.divera247.com) you can't log in at all, right?

snarman commented 5 months ago

Thanks a bunch for the quick work you put in that feature. I really appreciate that. It is working as I imagened and I would like to see just one more thing: The input fields are not labeled with anything. So one could potentially confuse the order (not that it happened to me ;-) ). A label what field is designed for the Access Key and which one for the URL would be super nice!

For my interest: on the "normal" Divera site (https://app.divera247.com/) you can't log in at all, right?

That is exactly right. The instance I am referring to is hosted at https://app.goettingen.divera247.de and is afaik a completely isolated environment. Hence it has it's on database and seemingly no upstream connection or anyhting to divera247.com

fwmarcel commented 5 months ago

Okay thanks for your feedback. Is it different for you than for me?

I have labels on the fields here: image

snarman commented 5 months ago

Nevermind, sorry! I reinstalled the Integration by purging the divera directory and re-extracting the zip. That fixed it. Maybe wrong file permissions, because the first time I moved it after extraction.

github-actions[bot] commented 4 months ago

:tada: This issue has been resolved in version 1.1.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: