-
Notifications
You must be signed in to change notification settings - Fork 30
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
[Bug]: Unable to create connection to OPNSense firewall. #346
Comments
Can you please ensure you are running the latest version of hass-opnsense. 2024.09.0 is not a valid version (nor is 14.1). We've made some fixes to this issue so I want to ensure you're on v0.3.12. If v0.3.12 isn't working, please enable debug logging, try to setup hass-opnsense again and please post the debug logs. |
hello I have the same problem however my version of the plugin is up to date here are the logs which appear in HA Enregistreur: custom_components.opnsense.coordinator Unexpected error fetching opnsense state data |
@neffen37 I don't know if you're having the same issue as @JasonJanelle or not. However, I believe #351 will fix the error you're seeing. For clarification, what Time Zone are you in, both name and offset. |
Hey @Snuffy2, I'm having the same problems as @JasonJanelle. Below is some more detail for you. OPNsense version: 24.7.11_2 I enabled the debugger for the opnsense extension and found the following.
Checking that API endpoint using postman, it just comes back with an open and close square bracket with no further information. |
@NickOllivier, there are 2 queries in your screenshot. To clarify, the one that is returning as [] is: https://example.router.fqdn/api/interfaces/overview/export correct? Does your OPNsense user have Administrator privileges? |
@NickOllivier <https://github.com/NickOllivier> how did you enable the
debugger? I would like to replicate these logs.
@Snuffy2, I'll get you the versions in the same format as Nick did when I
get home tonight.
…On Sun, Dec 29, 2024 at 5:57 PM Nick Ollivier ***@***.***> wrote:
Hey @Snuffy2 <https://github.com/Snuffy2>, I'm having the same problems
as @JasonJanelle <https://github.com/JasonJanelle>. Below is some more
detail for you.
OPNsense version: 24.7.11_2
Home assistant version: Core 2024.12.5, Supervisor 2024.12.0, Operating
System 14.1
I enabled the debugger for the opnsense extension and found the following.
[custom_components.opnsense.pyopnsense] [get] Response 200: OK
[custom_components.opnsense.pyopnsense] [get] url:
https://example.router.fqdn/api/diagnostics/system/systemInformation
[custom_components.opnsense.pyopnsense] [get] Response 200: OK
[custom_components.opnsense.config_flow] [config_flow] system_info:
{'name': 'example.router.fqdn'}
[custom_components.opnsense.pyopnsense] [get] url:
https://example.router.fqdn/api/interfaces/overview/export
[custom_components.opnsense.pyopnsense] [get] Response 200: OK
[custom_components.opnsense.pyopnsense] [get_device_unique_id]
device_unique_id: None
[custom_components.opnsense.config_flow] [config_flow] Device Unique ID:
None
Checking that API endpoint using postman, it just comes back with an open
and close square bracket with no further information.
—
Reply to this email directly, view it on GitHub
<#346 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACYP5OU7MATVNPIOE7GKTL2ICLAJAVCNFSM6AAAAABUFNLZEGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRUHEZDEMRYGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Correct. I was running the interfaces overview export query. I tested under both the built in root account as well as the secondary administrator level account I had for api requests. The only other thing that has happened with my opnsense is I've had to restore from backup recently due to a failed disk. I did read the instruction on the plugin page about a full reinstall if there were hardware changes but I suspect this is not a plugin fault. |
@Snuffy2 mentioned how to do it, but at the bottom of this link there is a configuration line you can paste into the main configuration.yaml for HA to enable. https://github.com/travisghansen/hass-opnsense/blob/main/CONTRIBUTING.md |
@NickOllivier No, as you noted, the plugin shouldn't affect this query. Can you please confirm what version of hass-opnsense you are running? I want to make sure you're not on an older version, but since you're seeing the same thing with Postman, that also is not likely the cause of this. I'm just not clear why the query: https://example.router.fqdn/api/interfaces/overview/export isn't returning anything. It should give a very long list of all of the physical and virtual interfaces. What response do you get in Postman with these queries? You can attach the files or email them to me at [email protected] |
Home Assistant Versions: hass-opnsense is on v0.3.13 now Logs:
|
I upgraded my opnsense system from 24.1 to 24.7 and the problem has resolved. I got the idea after seeing this line in the logs:
I suspect it has something to do with how 24.1 is responding to the legacy get_system_info. My problem is solved but I'm leaving open for @NickOllivier. |
@Snuffy2 Apologies for the delay - I'm about to email through the outputs you requested from the API. Something to note, the very last link (getInterfaceConfig) returned a 200 with no content. |
What happened?
I had this working in the past but something in the updates broke it. I have the plugin installed on OPNSense, a user with admin rights and an API key generated. I can curl the firewall from my home assistant terminal. When I try to create the connection in the UI, it spins for about 10 seconds and the reports this error:
The logs do not display more information than that.
hass-opnsense Version
2024.09.0
OPNsense Firmware
24.1.7_4
Home Assistant Version
14.1
Relevant logs
Additional Details
I have a self signed cert but do uncheck the verify SSL box. I use https://<ip.addr>.
The text was updated successfully, but these errors were encountered: