Closed heyitsyang closed 1 day ago
Thanks for the update it's working with 24.1 @travisghansen
There is an update to 24.1.1, as soon as I update it's stops working again.
With an opnsense-revert -r 24.1 opnsense
, it immediately starts working again.
Thanks for the update it's working with 24.1 @travisghansen
There is an update to 24.1.1, as soon as I update it's stops working again. With an
opnsense-revert -r 24.1 opnsense
, it immediately starts working again.
t works fine for me for 24.1.1:
My opnsense is on the same version as homonto above, and I have updated to the latest firmware update, but I am still getting an error. I deleted the integration and reinstall it again, even set up with a new user but it is still the same issue. Appreciate if someone can guide me on this issue.
Device tracker works (with the updated version) but I am getting this timeout error.
The user I created on opnsense has full admin rights, but as soon as I update to 24.1.1 I get this error. home-assistant.log:
2024-02-13 23:09:18.369 ERROR (SyncWorker_21) [custom_components.opnsense.pyopnsense] Unexpected get_telemetry error err=<ProtocolError for API_KEY:API_SECRET@192.168.0.1/xmlrpc.php: 500 Internal Server Error>, type(err)=<class 'xmlrpc.client.ProtocolError'>
2024-02-13 23:09:18.370 ERROR (MainThread) [custom_components.opnsense] Unexpected error fetching OPNsense OPNsense state data: <ProtocolError for API_KEY:API_SECRET@192.168.0.1/xmlrpc.php: 500 Internal Server Error>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 269, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/opnsense/__init__.py", line 97, in async_update_data
await hass.async_add_executor_job(lambda: data.update())
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/opnsense/__init__.py", line 97, in <lambda>
await hass.async_add_executor_job(lambda: data.update())
^^^^^^^^^^^^^
File "/config/custom_components/opnsense/__init__.py", line 316, in update
self._state["telemetry"] = self._get_telemetry()
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/opnsense/__init__.py", line 225, in inner
response = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/opnsense/__init__.py", line 249, 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 1037, 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.12/xmlrpc/client.py", line 1122, in __call__
return self.__send(self.__name, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/xmlrpc/client.py", line 1461, in __request
response = self.__transport.request(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/xmlrpc/client.py", line 1166, in request
return self.single_request(host, handler, request_body, verbose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/xmlrpc/client.py", line 1196, in single_request
raise ProtocolError(
xmlrpc.client.ProtocolError: <ProtocolError for API_KEY:API_SECRET@192.168.0.1/xmlrpc.php: 500 Internal Server Error>
and on opnsense crash report:
PHP Errors:
[13-Feb-2024 23:09:11 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code:26
Stack trace:
#0 /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code(60): interfaces_api()
#1 /usr/local/etc/inc/xmlrpc/hass.inc(12): eval()
#2 /usr/local/opnsense/contrib/IXR/IXR_Library.php(446): exec_php_xmlrpc('\nini_set('displ...')
#3 /usr/local/opnsense/contrib/IXR/IXR_Library.php(384): IXR_Server->call('opnsense.exec_p...', '\nini_set('displ...')
#4 /usr/local/opnsense/contrib/IXR/IXR_Library.php(357): IXR_Server->serve('<?xml version='...')
#5 /usr/local/etc/inc/xmlrpc.inc(67): IXR_Server->__construct(Array)
#6 /usr/local/www/xmlrpc.php(104): XMLRPCServer->start()
#7 {main}
thrown in /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code on line 26
[13-Feb-2024 23:09:18 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code:26
Stack trace:
#0 /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code(60): interfaces_api()
#1 /usr/local/etc/inc/xmlrpc/hass.inc(12): eval()
#2 /usr/local/opnsense/contrib/IXR/IXR_Library.php(446): exec_php_xmlrpc('\nini_set('displ...')
#3 /usr/local/opnsense/contrib/IXR/IXR_Library.php(384): IXR_Server->call('opnsense.exec_p...', '\nini_set('displ...')
#4 /usr/local/opnsense/contrib/IXR/IXR_Library.php(357): IXR_Server->serve('<?xml version='...')
#5 /usr/local/etc/inc/xmlrpc.inc(67): IXR_Server->__construct(Array)
#6 /usr/local/www/xmlrpc.php(104): XMLRPCServer->start()
#7 {main}
thrown in /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code on line 26
There is an update to 24.1.1, as soon as I update it's stops working again.
Works fine with 24.1.1 here. It's just minor patches:
I got my problem fixed. It is as described here #127 I had one WireGuard VPN not enabled, that was causing the issue. Enabling or removing it fixed it. Would be nice to get it working without doing that, sometimes I want that VPN not active.
Strangly it was working with the VPN not activated with 24.1, but not with 24.1.1
Strangly it was working with the VPN not activated with 24.1, but not with 24.1.1
Doesn't make sense. Nothing major changed in OPNsense. So the bug should affect also 24.1.
but I am getting this timeout error.
"timeout error" and "remote disconnection" errors. looks like network issues more than an integration bug.
I’ll do some testing and see if we can’t pinpoint the issue.
Please try the update to see if the issue with inactive/disabled interfaces is fixed.
Just installed the latest version and the integration is working again. Many thanks Travis!
Heyhey, I'm on the latest version, but still getting timeout issues like this..
And my OPNSense Sensors are all on & off.. (meaning switching between unavailable and available).
This used to be different before this wave of updates. Sensors just used to be constantly available..
Weird...
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: 08:05:21 (5 occurrences)
Last logged: 08:08:29
Unexpected get_telemetry error err=TimeoutError('The read operation timed out'), type(err)=<class 'TimeoutError'>
Unexpected get_system_info error err=TimeoutError('The read operation timed out'), type(err)=<class 'TimeoutError'>
Unexpected _list_services error err=TimeoutError('The read operation timed out'), type(err)=<class 'TimeoutError'>
Unexpected get_services error err=TimeoutError('The read operation timed out'), type(err)=<class 'TimeoutError'>
I have got the same issue as @knom above
I had this error for a while, but works perfectly fine now after the latest v0.1.21 update and Homeassistant Core 2024.3.3
All sensors unavailable, hope this helps anyone with the symptom
I increased socket timeout from 60 to 120 resolved it for me
edit the following: /homeassistant/custom_components/opnsense/pyopnsense/init.py
DEFAULT_TIMEOUT = 120
Since upgrading to OPNSense 24.1 today, all of my opnsense sensors in HA are no longer working and I get the following in my log.