Skip to content

Installed plugins in _pkg are not persistent across add-on restarts #6

Description

@bencrazy

FUXA plugins are lost after Home Assistant add-on restart

Description

Plugins installed through the FUXA plugin interface do not appear to persist across restarts of the Home Assistant add-on.

I am using the FUXA Home Assistant add-on and need the node-snap7 server plugin for communication with a Siemens PLC.

When I initially open FUXA, node-snap7 shows no installed version. If I click Install, the installation appears to complete successfully:

  • A version number appears in the FUXA plugin interface.
  • Communication with the Siemens PLC immediately starts working correctly.

However, if I stop/start the FUXA add-on or reboot Home Assistant, the plugin is no longer available and PLC communication stops working. The FUXA log then reports that the required plugin is missing.

Reinstalling node-snap7 from the FUXA interface restores communication until the next add-on restart.

Steps to reproduce

  1. Install and start the FUXA Home Assistant add-on.
  2. Configure a Siemens S7 connection that requires node-snap7.
  3. Open the FUXA plugin/server plugin interface.
  4. Install node-snap7.
  5. Confirm that the plugin now shows an installed version.
  6. Confirm that communication with the Siemens PLC works.
  7. Stop and restart the FUXA Home Assistant add-on.
  8. Open FUXA again.

Actual behavior

node-snap7 is no longer available after the add-on restart, and FUXA reports that the plugin is missing.

The plugin must be manually installed again after every restart.

Expected behavior

Plugins installed through the FUXA interface should persist across normal Home Assistant add-on restarts and Home Assistant reboots.

Possible cause

It appears that FUXA installs runtime plugins into its _pkg directory, but this directory may not currently be mapped to persistent Home Assistant add-on storage.

The add-on already appears to provide persistent mappings for directories such as _appdata, _db, _images, and _logs, but not _pkg.

If _pkg resides only in the container filesystem, that would explain why the plugin works immediately after installation but disappears when Home Assistant recreates the add-on container.

Possible fix

Consider adding persistent storage for the FUXA _pkg directory in the add-on configuration.

For example, if the FUXA plugin directory is:

/usr/src/app/FUXA/server/_pkg

a persistent data mapping similar to the following may resolve the issue:

- type: data
  read_only: false
  path: /usr/src/app/FUXA/server/_pkg

Alternatively, node-snap7 could potentially be included in the add-on image if that is preferable.

Thanks for maintaining the FUXA Home Assistant add-on. Please let me know if there are any logs or configuration details I can provide to help troubleshoot this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions