travisghansen / hass-opnsense

OPNsense integration with Home Assistant
194 stars 25 forks source link

Failed setup #121

Closed WayneManion closed 7 months ago

WayneManion commented 7 months ago

I am running Home Assistant 2024.1.6 (Supervisor 2023.12.1, HA OS 11.4, Frontend 20240104.0) and OPNsense OPNsense 24.1_1-amd64. The integration does not load. I'm not sure when this stopped working, but I think it was within the last couple of weeks.

Log excerpt:

This error originated from a custom integration.

Logger: custom_components.opnsense
Source: helpers/update_coordinator.py:300
Integration: OPNsense (documentation, issues)
First occurred: 9:45:03 AM (27 occurrences)
Last logged: 10:13:13 AM

Unexpected error fetching OPNsense.wang OPNsense state data: <ProtocolError for REDACTED@192.168.1.1/xmlrpc.php: 500 Internal Server Error>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/opnsense/__init__.py", line 96, in async_update_data
    await hass.async_add_executor_job(lambda: data.update())
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/opnsense/__init__.py", line 96, in <lambda>
    await hass.async_add_executor_job(lambda: data.update())
                                              ^^^^^^^^^^^^^
  File "/config/custom_components/opnsense/__init__.py", line 315, in update
    self._state["telemetry"] = self._get_telemetry()
                               ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/opnsense/__init__.py", line 224, in inner
    response = func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/opnsense/__init__.py", line 248, in _get_telemetry
    return self._client.get_telemetry()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/opnsense/pyopnsense/__init__.py", line 101, in inner
    raise err
  File "/config/custom_components/opnsense/pyopnsense/__init__.py", line 98, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/opnsense/pyopnsense/__init__.py", line 992, in get_telemetry
    data = self._exec_php(script)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/opnsense/pyopnsense/__init__.py", line 88, in inner
    response = func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/opnsense/pyopnsense/__init__.py", line 131, in _exec_php
    response = self._get_proxy().opnsense.exec_php(script)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1122, in __call__
    return self.__send(self.__name, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1464, in __request
    response = self.__transport.request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1166, in request
    return self.single_request(host, handler, request_body, verbose)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1196, in single_request
    raise ProtocolError(
xmlrpc.client.ProtocolError: <ProtocolError for REDACTED@192.168.1.1/xmlrpc.php: 500 Internal Server Error>

and

This error originated from a custom integration.

Logger: custom_components.opnsense.pyopnsense
Source: custom_components/opnsense/pyopnsense/__init__.py:100
Integration: OPNsense (documentation, issues)
First occurred: 9:45:03 AM (27 occurrences)
Last logged: 10:13:13 AM

Unexpected get_telemetry error err=<ProtocolError for REDACTED@192.168.1.1/xmlrpc.php: 500 Internal Server Error>, type(err)=<class 'xmlrpc.client.ProtocolError'>
alexdelprete commented 7 months ago

It's always appropriate to check past issues before opening a new one. Please check the issue right below yours (#118), discussion is there. Please close this issue when you can. Thanks.

WayneManion commented 7 months ago

Sorry I did not realize it was the same thing.

alexdelprete commented 7 months ago

Sorry I did not realize it was the same thing.

No problem at all. Thank you.