Home Assistant custom integration for MeshCentral — the open-source remote management platform.
MeshCentral is a free, open-source remote device management platform you can self-host on your own server. It lets you remotely monitor, manage and control computers and devices — Windows, Linux, and macOS — from a single web interface. Think of it as your own private TeamViewer or AnyDesk, without subscriptions or cloud dependency.
Running MeshCentral alongside Home Assistant is a powerful combination for anyone who wants full control over their home network:
- See all your devices in one place — PC online/offline status, OS info, last boot time, and logged-in users appear as native HA entities alongside your lights, sensors, and other smart home devices.
- Automate around your computers — trigger automations when a PC comes online (start casting music, turn on the desk lamp), or when it goes offline (cut power to peripherals via a smart plug).
- Power control from HA — wake, reboot, sleep, hibernate or shut down any managed device via HA buttons or automations. Wake-on-LAN works even across subnets since MeshCentral relays the magic packet through its agents.
- Security monitoring — Windows Defender, firewall and antivirus status exposed as binary sensors. Get notified if real-time protection goes offline.
- Hardware insight — CPU, GPU, RAM, disk usage and more available as optional sensors, updated every 5 minutes.
- Real-time push — the integration uses MeshCentral's WebSocket API for instant online/offline updates, not slow polling.
EntityDescriptionbinary_sensor.<n>_onlineAgent connectivity (online/offline) — real-timesensor.<n>_osOS descriptionsensor.<n>_ip_addressLast known IP addresssensor.<n>_last_bootLast boot time (timestamp)sensor.<n>_idle_timeUser idle time in secondssensor.<n>_active_usersCurrently logged-in userssensor.<n>_descriptionDevice description from MeshCentralsensor.<n>_agent_last_seenWhen agent last contacted serverdevice_tracker.<n>_trackerHome/not_home based on agent connectivity
EntityDescriptionbinary_sensor.<n>_antivirus_okAntivirus statusbinary_sensor.<n>_firewall_okFirewall statusbinary_sensor.<n>_defender_real_time_protectionWindows Defender real-time protection
EntityDescriptionbutton.<n>_rebootReboot devicebutton.<n>_shutdownShut down devicebutton.<n>_sleepSleep (Windows only)button.<n>_hibernateHibernate (Windows only)button.<n>_wake_on_lanWake-on-LAN via MeshCentral agents
Wake-on-LAN works even without direct network access — MeshCentral automatically finds online agents on the same network and uses them to broadcast the magic packet.
These sensors are fetched every 5 minutes via a separate getsysinfo call. They are disabled by default — enable them individually under Settings → Devices & Services → MeshCentral → device → Entities.
All platforms:
EntityDescriptionsensor.<n>_cpuCPU model namesensor.<n>_gpuGPU model namesensor.<n>_bios_versionBIOS version (vendor + date as attributes)sensor.<n>_motherboardMotherboard model (vendor as attribute)
Windows only:
EntityDescriptionsensor.<n>_ram_totalTotal RAM in GBsensor.<n>_disk_c_totalC: drive total size in GBsensor.<n>_disk_c_freeC: drive free space in GBsensor.<n>_disk_c_free_percentC: drive free space in %sensor.<n>_running_processesNumber of running processessensor.<n>_screen_resolutionCurrent screen resolution (e.g. 1920x1080)
Linux only:
EntityDescriptionsensor.<n>_disk_usedRoot filesystem used in MBsensor.<n>_disk_freeRoot filesystem free in MB
ServiceDescriptionmeshcentral.run_commandRun a shell command on any online device
- Open HACS → Integrations → ⋮ → Custom repositories
- Add
https://github.com/andlo/ha-meshcentral— category: Integration - Install MeshCentral and restart Home Assistant
Copy custom_components/meshcentral/ into your HA custom_components/ directory and restart.
A custom card is included in the www/ folder. Add it as a resource and use it in your dashboards.
Add as resource — Settings → Dashboards → Resources → Add resource:
- URL:
/local/meshcentral-card.js - Type: JavaScript module
Copy the card file to HA:
cp www/meshcentral-card.js /config/www/Card configuration:
type: custom:meshcentral-card
title: My Computers
devices:
- fedora
- ASUS-GamerPC
- ASRockThe card shows online/offline status, OS, IP, logged-in users, last boot, security badges, and hardware info (CPU, RAM, disk) for each device — if the hardware sensors are enabled.
Go to Settings → Devices & Services → Add Integration → MeshCentral and enter:
| Field | Description |
|---|---|
| Host | IP or hostname of your MeshCentral server |
| Port | Default: 443 |
| Username | MeshCentral username |
| Password | MeshCentral password |
| Login Key | Server-level LoginKey for 3FA — leave empty if not used (see below) |
| Use SSL | Enable for HTTPS/WSS (default: off) |
| Verify SSL | Disable if using self-signed cert (default: off) |
If your account has two-factor authentication enabled, create a Login Token in MeshCentral → My Account → Login Tokens. Use the generated username (~t:...) and password as credentials in HA — this bypasses 2FA entirely.
Some MeshCentral servers are configured with a LoginKey in config.json. This is a server-level 3FA feature that requires all requests — including the login page itself — to include a ?key=<value> query parameter. Without it, the server blocks access before any authentication can occur.
If your server uses this, you will see an auth failure even with correct username and password. Enter the LoginKey value in the Login Key field during setup.
LoginKey vs Login Token — these are two different things:
What it is Where to find it Used as Login Key (3FA) Server-level URL access key config.json→ run server with--logintokenkeyThe Login Key field in this integration Login Token (2FA bypass) Per-user temporary token MeshCentral → My Account → Login Tokens The Username field (as ~t:...)You may need both at the same time if your server uses LoginKey AND your account has 2FA enabled.
If MeshCentral runs behind a reverse proxy (Nginx, Cloudflare Tunnel) with tlsOffload: true, set Use SSL = off and point directly at the internal plain HTTP port — even if that port is 443. The server accepts plain HTTP/WS on that port while the proxy handles TLS externally.
The integration uses two mechanisms in parallel:
- Real-time WebSocket push — a persistent connection to MeshCentral's
/control.ashxendpoint receivesnodeconnectevents the moment a device goes online or offline. Online/offline status updates are instant. - Polling fallback — a full device list refresh runs every 5 minutes to ensure nothing is missed if the WebSocket drops an event.
- Hardware data — a separate
getsysinfocall runs every 5 minutes for each online device to update the hardware detail sensors.
# Turn on desk lamp when PC comes online
automation:
trigger:
platform: state
entity_id: binary_sensor.fedora_online
to: "on"
action:
service: light.turn_on
target:
entity_id: light.desk_lamp
# Alert if Windows Defender is disabled
automation:
trigger:
platform: state
entity_id: binary_sensor.asus_gamerpc_defender_real_time_protection
to: "off"
action:
service: notify.mobile_app
data:
message: "⚠️ Windows Defender disabled on ASUS-GamerPC!"
# Run a command on a device
service: meshcentral.run_command
data:
device_id: fedora
command: "systemctl restart nginx"- MeshCentral Add-on — Run MeshCentral as a Home Assistant add-on (no separate server needed)
- MeshCentral — Official MeshCentral website
- MeshCentral GitHub — MeshCentral source code
MIT

