travisghansen / hass-opnsense

OPNsense integration with Home Assistant
Apache License 2.0
219 stars 29 forks source link

URL Port Configuration #65

Closed neaden closed 1 month ago

neaden commented 1 year ago

My OPNsense URL uses a port that is 5 digits long. I tried https://host:port and immediately get "Unexpected Error". I also tried http://ip:port and get the same "Unexpected Error". If I truncate the last digit of the port, it at least tries to connect, leading me to believe that maybe it doesn't know how to parse a 5 digit port. I know I don't have a syntax error because I tried a number of other syntax's and received the "Invalid URL Format" error. Any other info I can provide that would be useful please let me know.

Neal

travisghansen commented 1 year ago

Can you send over the hass logs?

travisghansen commented 1 year ago

The <scheme>://<host>:<port> syntax should work fine. What version of the integration and opnsense are you running?

neaden commented 1 year ago

I am running Home Assistant 2023.2.5, and OPNsense 23.1.1_2-amd64. I did a 'Ctrl+F' in HA logs after attempting to add the integration again this morning and have pasted the lines in the attached document. Please let me know if I can provide any further info to help.

HA log.txt

travisghansen commented 1 year ago

OK, I don't think the port is a problem at all. That error generally means there's a problem with permissions on the user being used for the integration. Are you using admin key/secret or a specific user? What permissions have you granted to the user?

neaden commented 1 year ago

That was it - I assigned the user I created for the integration admin permissions and it immediately started working. Thanks for your time, I feel a bit dense :)

neaden commented 1 year ago

Maybe I spoke too soon - the integration gave me a 'success' this time, but still getting the "string indices must be integers" error. I'll try an HA restart.

neaden commented 1 year ago

New error is now popping up.

HA log.txt

travisghansen commented 1 year ago

I think now it’s the same as #62