Thank you for your very fast feedback!
I’ve now added the python_scripts functionality and added an “modprobe_canbus.py” script inside /config/python_scripts/modprobe_canbus.py with the content as described.
This script is started on HA startup with an Automation.
subprocess.call(['modprobe', 'can'])
subprocess.call(['modprobe', 'can_raw'])
subprocess.call(['modprobe', 'can_dev'])
subprocess.call(['modprobe', 'gs_usb'])
subprocess.call(['modprobe', 'slcan'])
os.system("apk add /config/python_scripts/canutils.apk")
#os.system("slcand -o -c -s4 /dev/ttyACM0 can0")
#os.system("ifconfig can0 txqueuelen 1000")
#os.system("ifconfig can0 up")
How can I check if it is working now?
When I open up the Terminal via the Terminal addon (supervisor addon “Terminal & ssh”) there is still no can interface showing up when I enter “ip link list”.
Is it a problem that I’m using Home Assistant OS?
I found something on another discussion where you’ve been involved
Has it something to do with me “looking” inside the wrong system with the terminal addon?
When I enter “slcand” or “candump”, there is no package even after restarting HA with the Python script.
Sorry for the inconvenience, I think I haven’t fully understood the Home Assistant structure yet…