I wondering if someone can assist and provide a step by step process to mounting a USB drive specifically on a Home Assistant Green.
Everything online i’ve found online is fragmented, based on a much older versions of home assistant that use a “Import from USB” which doesn’t exist on the more recent versions of it.
I specifically bought a
Transcend ESD310 256GB usb key to use with home assistant.
This is a very fast USB key and will maximise the use of the USB2 port provided
Ultimately my use case (a lot of solar data) is to have it automount and then move the recorder to it and run it off Maria-DB instead of sqlite3 (as the Home Assistant Green has a small 32GB of emmc storage)
I am currently running latest version at time of writing on Home Assistant Green
Core 2023.12.4
Supervisor 2023.12.0
Operating System 11.2
Frontend 20231208.
I have formatted the USB Key to ext4 format and labelled it
When i
login to Advanced SSL & Terminal
install lsblk
apk add lsblk
and run it I see the drive is visible as part sda1 inside a disk sda but is NOT mounted
I created a folder inside media called usb
Then chmod 777 /media/usb
Then I try to mount it
sudo mount -t ext4 /dev/sda1 /media/usb
I get a message
mount: permission denied (are you root?)
I’ve also tried the above starting with sudo -i first and got the same result
What am I doing wrong here?
If you have a working solution how do I then have it automount on boot on the Home Assistant Green
Update: worked out how to do it so this is what I did
To Mount a USB External Drive/Stick (Tested on and For Home Assistant Green Hardware)
NOTE : Attempt this at own risk
Prequisites
1 Home Assistant Green (already configured, running and logged with username)
1 Spare Micro SD Card (any size)
Just used to setup import process
Format it to NTFS in windows
Label it CONFIG
Create a folder called udev
Using notepad in windows , create a text file containing the following script, call it
80-mount-usb-to-media-by-label.rules
and copy it into the udev folder. Make sure filename is not ending with a .txt. Rename if necessary
Prepare a Seperate USB Stick In Windows for later use in Home Assistant Green
USB Stick must be formatted to ext4 format. It might work with NTFS but havent tested it
Use a free tool like AOMEI Partition Assistant Standard in windows to do it
Label the drive HA-USB (Do not label this drive CONFIG!)
Insert the microsd in a running Home Assistant Green
Please ensure no USB Sticks are plugged into USB Green
From a website enter
yourHAIPaddress:8123/hassio/system/info
Select the 3dots icon in the “Host” Section
Select “Import from USB”
In the bottom section Supervisor scroll down to the bottom and press “Refresh”
If it worked you should see 2 lines with the most recent date
YY-MM-DD 10:52:38 INFO (MainThread) [supervisor.os.manager] Synchronizing configuration from USB with Home Assistant Operating System.
YY-MM-DD 10:52:41 INFO (MainThread) [supervisor.host.services] Restarting local service hassos-config.service
Remove the Micro SD Card
Plug in the USB Stick
Wait a minute for it to be detected
Log back onto your Home Assistant Green
From a website enter
yourHAIPaddress:8123
If you click on
Media → My Media
You should see your drive HA-USB Mounted
At this point drive is mounted but not usable
Final step, a reboot is needed
Settings → System → Top Right Gadget Symbol → Advanced Options Dropdown → Reboot System
Drive should now be read write and persistent and survive a cold boot
NOTE: the mount point is /media/HA-USB
If you have SSH Terminal Installed you can see it by typing df
I have the same problem. Followed the instructions but still no USB in the media! Can anyone help to add an external USB drive in Home Assistant Green? Thanks!