Local monitoring of TerraMaster NAS devices from Home Assistant over SSH.
- NAS model, TOS version, Linux distribution and kernel
- Uptime, last restart, CPU, CPU cores, memory and temperature
- Physical disks and SMART health information
- RAID arrays, degradation and synchronization progress
- Volumes, capacity and usage
- Network interfaces, counters and real-time throughput
- SSH, Telnet and SNMP service detection
- Shared-folder discovery from the TOS database
- SMB, NFS and AFP protocol detection
- Secure HTML pages for all shares or one selected share
- English and French translations
The integration polls locally and does not require a cloud account.
- Home Assistant with HACS
- SSH enabled on the TerraMaster NAS
- A TOS account allowed to connect through SSH
- Administrator access through
sudofor optional SMART, service and shared-folder details
The integration uses read-only commands. The configured password is used for SSH and, when available, read-only sudo collection.
- Open HACS.
- Open the menu and choose Custom repositories.
- Add
https://github.com/minimicro34/ha-terramaster. - Select Integration as the category.
- Install TerraMaster TOS.
- Restart Home Assistant.
Copy:
custom_components/terramaster
to:
/config/custom_components/terramaster
and restart Home Assistant.
In Home Assistant:
- Go to Settings → Devices & services.
- Select Add integration.
- Search for TerraMaster TOS.
- Enter the NAS address, SSH port, username and password.
The default SSH port is 9222, but the configured TOS port can be used.
The SSH host key is recorded during the first connection and checked on later connections.
The main Shared folders sensor displays the number of detected shares.
Its attributes contain:
- the share names;
- all detected protocols;
open_shares, a secure link to the general shared-folder page.
Each individual shared-folder diagnostic entity keeps the detailed information:
- path, type, visibility and recycle-bin state;
- volume, RAID and filesystem;
- capacity, used space and available space in decimal GB;
- usage percentage;
- SMB, NFS and AFP URLs;
open_share, a secure link to the HTML page for that share.
Passwords are never included in connection URLs. SMB and AFP URLs can include the configured username so the operating system can request or reuse the password.
The NAS is the main Home Assistant device. Physical disks, RAID arrays, volumes and network interfaces are represented as child devices where appropriate.
Some metrics require administrator access. When optional privileged collection is unavailable, the basic NAS metrics continue working.
Confirmed during development:
- TerraMaster F2-210
- TOS 4.2.41
Other TOS 4, TOS 5 and TOS 6 devices may work, but should be treated as unverified until reported by users.
Verify that the configured SSH user can run:
sudo sqlite3 -separator '|' /etc/base/nasdb 'SELECT foldername,mntpath,device,type,hidden,recycle FROM share;'Verify that smartctl is installed on the NAS and that the configured account can execute it through sudo.
Remove and re-add the integration only after confirming that the NAS address and SSH host key change are expected.
- Communication stays on the local network.
- No cloud service is used.
- The SSH server host key is pinned.
- Shared-folder HTML pages use a random token stored in the Home Assistant config entry.
- Passwords are not exposed in entity attributes or URLs.
pytest
mypy custom_components/terramaster
ruff check .First stable release with system, SMART, RAID, volume, network, services and shared-folder monitoring.
Contributions are welcome.
Please read CONTRIBUTING.md before submitting changes.
For significant changes, please open an issue before submitting a pull request.
If you find TerraMaster TOS for Home Assistant useful and would like to support its development, you can buy me a coffee.
Your support helps me dedicate more time to improving the integration, adding new features, testing additional TerraMaster TOS configurations and fixing issues.
Bug reports, feature suggestions, contributions and GitHub stars are also greatly appreciated.
Please use GitHub Issues for bug reports and feature requests.
When reporting an issue, please include whenever possible:
- TerraMaster NAS model;
- TOS version;
- TerraMaster integration version;
- Home Assistant version;
- a clear description of the problem;
- relevant Home Assistant logs;
- Home Assistant diagnostics.
For SSH or data-collection problems, please also include:
- the authentication method used (password or SSH key);
- whether the SSH connection works outside Home Assistant;
- which sensor or data category is affected;
- relevant command errors, with sensitive information redacted.
Never include passwords, SSH private keys, authentication credentials or other sensitive NAS information.
Copyright (c) 2026 minimicro34
This project is licensed under the GNU General Public License v3.0 or later.