travisghansen / hass-opnsense

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

[Bug]: installation problems on opnsense #317

Open nordmann666 opened 2 days ago

nordmann666 commented 2 days ago

What happened?

tried to install this today and i´m stuck at the part of integration

i got "Unable to get OPNsense Firmware version" and found under the resolved issues that i need to trigger update on opnsense. i did that and it installed some missing(?) packages - and it delete the packages in same step?!

hass-opnsense Version

0.3.9

OPNsense Firmware

OPNsense 25.1.a_490-amd64

Home Assistant Version

2024.11.2

Relevant logs

***GOT REQUEST TO UPDATE***
Currently running OPNsense 25.1.a_490 at Mon Nov 18 06:45:19 CET 2024
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
Updating SunnyValley repository catalogue...
SunnyValley repository is up to date.
Updating mimugmail repository catalogue...
Waiting for another process to update repository mimugmail
All repositories are up to date.
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
Updating SunnyValley repository catalogue...
Waiting for another process to update repository SunnyValley
Updating mimugmail repository catalogue...
mimugmail repository is up to date.
All repositories are up to date.
Checking for upgrades (16 candidates): .......... done
Processing candidates (16 candidates): ....... done
The following 5 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    alsa-lib: 1.2.12 [mimugmail]
    brotli: 1.1.0,1 [SunnyValley]
    freetype2: 2.13.2 [SunnyValley]
    libfontenc: 1.1.8 [SunnyValley]
    png: 1.6.43 [SunnyValley]

Number of packages to be installed: 5

The process will require 5 MiB more space.
2 MiB to be downloaded.
[1/5] Fetching freetype2-2.13.2.pkg: .......... done
[2/5] Fetching alsa-lib-1.2.12.pkg: .......... done
[3/5] Fetching brotli-1.1.0,1.pkg: .......... done
[4/5] Fetching png-1.6.43.pkg: .......... done
[5/5] Fetching libfontenc-1.1.8.pkg: ... done
Checking integrity... done (0 conflicting)
[1/5] Installing brotli-1.1.0,1...
[1/5] Extracting brotli-1.1.0,1: .......... done
[2/5] Installing png-1.6.43...
[2/5] Extracting png-1.6.43: .......... done
[3/5] Installing freetype2-2.13.2...
[3/5] Extracting freetype2-2.13.2: .......... done
[4/5] Installing alsa-lib-1.2.12...
[4/5] Extracting alsa-lib-1.2.12: .......... done
[5/5] Installing libfontenc-1.1.8...
[5/5] Extracting libfontenc-1.1.8: ......... done
=====
Message from freetype2-2.13.2:

--
The 2.7.x series now uses the new subpixel hinting mode (V40 port's option) as
the default, emulating a modern version of ClearType. This change inevitably
leads to different rendering results, and you might change port's options to
adapt it to your taste (or use the new "FREETYPE_PROPERTIES" environment
variable).

The environment variable "FREETYPE_PROPERTIES" can be used to control the
driver properties. Example:

FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
    cff:no-stem-darkening=1 \
    autofitter:warping=1

This allows to select, say, the subpixel hinting mode at runtime for a given
application.

If LONG_PCF_NAMES port's option was enabled, the PCF family names may include
the foundry and information whether they contain wide characters. For example,
"Sony Fixed" or "Misc Fixed Wide", instead of "Fixed". This can be disabled at
run time with using pcf:no-long-family-names property, if needed. Example:

FREETYPE_PROPERTIES=pcf:no-long-family-names=1

How to recreate fontconfig cache with using such environment variable,
if needed:
# env FREETYPE_PROPERTIES=pcf:no-long-family-names=1 fc-cache -fsv

The controllable properties are listed in the section "Controlling FreeType
Modules" in the reference's table of contents
(/usr/local/share/doc/freetype2/reference/index.html, if documentation was installed).
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 5 packages:

Installed packages to be REMOVED:
    alsa-lib: 1.2.12
    brotli: 1.1.0,1
    freetype2: 2.13.2
    libfontenc: 1.1.8
    png: 1.6.43

Number of packages to be removed: 5

The operation will free 5 MiB.
[1/5] Deinstalling freetype2-2.13.2...
[1/5] Deleting files for freetype2-2.13.2: .......... done
[2/5] Deinstalling png-1.6.43...
[2/5] Deleting files for png-1.6.43: .......... done
[3/5] Deinstalling libfontenc-1.1.8...
[3/5] Deleting files for libfontenc-1.1.8: ......... done
[4/5] Deinstalling brotli-1.1.0,1...
[4/5] Deleting files for brotli-1.1.0,1: .......... done
[5/5] Deinstalling alsa-lib-1.2.12...
[5/5] Deleting files for alsa-lib-1.2.12: .......... done
Checking all packages: .......... done
The following package files will be deleted:
    /var/cache/pkg/os-homeassistant-maxit-1.0~e91cca1fb8.pkg
    /var/cache/pkg/freetype2-2.13.2~76fa19cd6b.pkg
    /var/cache/pkg/os-homeassistant-maxit-1.0.pkg
    /var/cache/pkg/png-1.6.43~e10fcb01ca.pkg
    /var/cache/pkg/freetype2-2.13.2.pkg
    /var/cache/pkg/alsa-lib-1.2.12~d796f9a3c6.pkg
    /var/cache/pkg/alsa-lib-1.2.12.pkg
    /var/cache/pkg/brotli-1.1.0,1~8e55295843.pkg
    /var/cache/pkg/brotli-1.1.0,1.pkg
    /var/cache/pkg/libfontenc-1.1.8.pkg
    /var/cache/pkg/png-1.6.43.pkg
    /var/cache/pkg/libfontenc-1.1.8~c32e4188e2.pkg
The cleanup will free 2 MiB
Deleting files: .......... done
All done
Nothing to do.
Starting web GUI...done.
***DONE***

Additional Details

No response

Snuffy2 commented 2 days ago

This integration should no longer require triggering an OPNsense firmware update check to get it to work.

You appear to be running OPNsense 25.1 beta. As that is not released, I'm not sure what changes they may have made. It is possible that they made some changes to the API.

Are you able to run a curl or command to test? curl -k -u "$key":"$secret" https://$opnsense_url/api/core/firmware/info -v

Replace $key and $secret with the OPNsense API credentials you are using with Home Assistant and $opnsense_ip with the IP or hostname of your OPNsense router.

Post the results here please.

nordmann666 commented 2 days ago

_* Trying 192.168.0.1:4443...

after a while i got many more output and this is the last part

_"Sun Nov 10 06:28:38 CET 2024","product_version":"25.1.a_490","productwebsite":"https:\/\/opnsense.org\/"}}* Connection #0 to host 192.168.0.1 left intact

Snuffy2 commented 1 day ago

after a while i got many more output and this is the last part

I need the whole output please.

You can print the curl to a file and post the file if you prefer. curl -k -u "$key":"$secret" https://$opnsense_url/api/core/firmware/info > opnsense_firmware.log

nordmann666 commented 1 day ago

this is output without "-v"

firmware.log

this is output with "-v"

firmware2.log

Snuffy2 commented 1 day ago

So 25.1.a_490 is not a valid Semantic Version. Thus it is failing the check to ensure the version is greater than the minimum required version. Based on #315, we may be changing how we are checking firmware. Not sure if we should adapt the integration to also handle Non-Semantic Versions, but I'll think about it. I'd probably just use the product_abi (ex. 25.1) if the version was invalid.

2024-11-18_21-28-37 237