travisghansen / hass-pfsense

pfSense integration with Home Assistant
193 stars 27 forks source link

[Feature request] Uncompatible with FreeBSD 12.3-PRERELEASE 2.6.0-DEVELOPMENT (amd64) #33

Closed nobless closed 2 years ago

nobless commented 3 years ago

Hello, amd64 12.3-PRERELEASE FreeBSD 12.3-PRERELEASE devel-12-n226715-1de26c41319 pfSense

[IN PFSENSE] a lot of these PHP crashes:

Crash report details:

PHP Errors:
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 100
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 101
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 100
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 101
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 100
[13-Nov-2021 23:18:29 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 101
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 100
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 101
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 100
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 101
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Use of undefined constant ifdescr - assumed 'ifdescr' (this will throw an Error in a future version of PHP) in /usr/local/www/xmlrpc.php(147) : eval()'d code on line 118
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 100
[13-Nov-2021 23:19:49 Europe/Vilnius] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/www/xmlrpc.php(147) : eval()'d code:118) in /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php on line 101

[IN HA] see these:

2021-11-14 00:14:49 ERROR (MainThread) [custom_components.pfsense] Unexpected error fetching firewall.custom.ua pfSense state data: syntax error: line 2, column 0
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/pfsense/__init__.py", line 94, in async_update_data
    await hass.async_add_executor_job(lambda: data.update())
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/pfsense/__init__.py", line 94, in 
    await hass.async_add_executor_job(lambda: data.update())
  File "/config/custom_components/pfsense/__init__.py", line 248, in update
    self._state["telemetry"] = self._get_telemetry()
  File "/config/custom_components/pfsense/__init__.py", line 224, in _get_telemetry
    return self._client.get_telemetry()
  File "/config/custom_components/pfsense/pypfsense/__init__.py", line 776, in get_telemetry
    data = self._exec_php(script)
  File "/config/custom_components/pfsense/pypfsense/__init__.py", line 58, in inner
    response = func(*args, **kwargs)
  File "/config/custom_components/pfsense/pypfsense/__init__.py", line 78, in _exec_php
    return self._get_proxy().pfsense.exec_php(script)
  File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1116, in __call__
    return self.__send(self.__name, args)
  File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1458, in __request
    response = self.__transport.request(
  File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1160, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1176, in single_request
    return self.parse_response(resp)
  File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1342, in parse_response
    p.feed(data)
  File "/usr/local/lib/python3.9/xmlrpc/client.py", line 445, in feed
    self._parser.Parse(data, False)
xml.parsers.expat.ExpatError: syntax error: line 2, column 0
travisghansen commented 3 years ago

Should be easy enough to clean up. I’ll take a look..

travisghansen commented 3 years ago

Can you by chance give the next branch a try and see what you get?

nobless commented 3 years ago

using HACS, i see only v0.1.0 and main as options

travisghansen commented 3 years ago

OK, moment..

travisghansen commented 3 years ago

I just merged to main. Update and give it another try..

nobless commented 3 years ago

(Y) works flawlessly! no errors till now, only one [Warning] about longer taking device scan, more than 10s. That's ALL :)

Very nice integration, will be my number one integration in HA!

Thanks for this! Keep going this way :)

travisghansen commented 3 years ago

That device scan warning usually only shows up during startup for me. In any case keep me updated on 2.6 compatibility if you see anything funny!