HAOS is not meant to allow access to install other things in the OS. If you do want OS control on the device running HA, you will need to use another installation method, such as container. That will mean you cannot use addons but need to do everything in containers.
The other option would mean running HAOS in a VM, but I don’t think you can do that on a rpi4.
Could it be those tools you need are already installed in the addon? They might not need to be installed on the bare os.
Thanks for the reply. I run HA in containers in some other installations, but I would like use Hass OS in the powerboat setup, just for simplicity. I more and more start to enjoy the pure simplicity and stability of Hass OS.
If I add the necessary binaries and tools to the container, will the container be able to enable/reach the can0 device? I mean, the hat is physically attached to the RPi and I guess the RPi needs to recognize the device to even present it to the addon container, right?
Yeah, I currently run SignalK on a separate RPi, and I will probably continue to do so. But I still wonder if the can tools in a container potentially/in theory could reach the Pican-M hat if attached to a Hass OS RPi.
I know this is not exactly answering your question, but you can connect your NMEA2000 network directly to HA without the need of SignalK. This makes the deployment much easier. I wrote new HA integration just for that. Will be glad to any feedback if you decide to try it out.
I have the exact same issue here, except that I’m using the 2CH CAN HAT+ from Waveshare.
I solved the problem with a can2tcp AddOn to the SignalK server AddOn that runs in network=host mode or in AddOn terms host_network: true and implements the YachtDevice RAW as described in Appendix E here: https://www.yachtd.com/downloads/ydnu02.pdf
Then I added the SignalK Server AddOn and configured a NMEA2K connection of type “Yacht Devices RAW TCP (canboatjs)” and it works. All other plugins etc that I’m using in SignalK work as far as I know.
It’s not the ideal solution, as it runs in host-mode and opens a tcp port with the can data that will be accessible from the outside and could potentially cause issues with other services/addons. The second is easily remedied as the port-number is configurable, but the first issue is a bit more tricky and not very elegant: Make the host-mode AddOn push the can data to the SignalK server or an intermediate AddOn, that will then expose the port internally.
But at the moment, I’m happy it works.
I also have the Sh-Rpi HAT as a safety measure against power outages and therefore data corruption and that is the next thing that needs integrating.