lametric-hass-local
A local Home Assistant integration for LaMetric devices. Communicates directly with your device over the local network — no cloud required after setup. Supports automatic discovery and provides full control over display, apps, notifications, and pixel streaming.
10 Entity Platforms
Button, Light (SKY), Notify, Number, Scene, Select, Sensor, Switch, Text, and Update — each representing a controllable aspect of your LaMetric device.
Services
Send messages and charts directly to your device from any Home Assistant automation
using show_message and show_chart.
Entity Services
Screensaver control (set_screensaver) and widget action dispatch
(activate_action).
Pixel Streaming
Push raw RGB888 frames over UDP via the LaMetric Streaming Protocol (LMSP) — SKY devices only.
Auto-Discovery
Devices are found automatically via Zeroconf (_lametric-api._tcp.local.),
SSDP, and DHCP hostname matching.
Cloud-Assisted Setup
Optional OAuth 2.0 flow retrieves the device IP and API key. After setup, all communication is local only.
Installation
Via HACS recommended
- Open HACS in Home Assistant.
- Click the three-dot menu → Custom repositories.
- Enter
https://github.com/ElectroAttacks/lametric-hass-local, select category Integration, and click Add. - Search for LaMetric Local and click Download.
- Restart Home Assistant.
Manual installation
- Download the latest release and extract it.
- Copy the
custom_components/lametric_hass_local/folder into your Home Assistantcustom_components/directory. The folder name must be exactlylametric_hass_local. - Restart Home Assistant.
lametric-py ≥ 1.3.8 is
installed automatically as a dependency.
Configuration
Go to Settings → Devices & Services → Add Integration and search for LaMetric Local. Two setup paths are available.
Option 1 — Manual (IP + API key) recommended
Enter the device's IP address and API key directly. The API key is available in the LaMetric mobile app under Device → Settings → Wi-Fi, or in the developer portal at developer.lametric.com/user/devices.
Option 2 — Cloud-assisted OAuth 2.0
The integration can retrieve your device IP and API key automatically via the LaMetric Cloud OAuth 2.0 flow. This requires registering a developer app in the LaMetric portal and is significantly more involved than the manual path. The cloud is used only once during initial setup — all subsequent communication is purely local.
- Sign in at developer.lametric.com and click Create new app. Choose type Notification Source (or Personal for private use).
-
Set the OAuth2 Redirect URI to your Home Assistant external callback URL:
https://<your-ha-url>/auth/external/callback - Copy the Client ID and Client Secret from the app settings page.
- In Home Assistant go to Settings → Devices & Services → Application Credentials, click Add Application Credential, select LaMetric Local, and paste both values.
-
Start the integration setup and choose Import from LaMetric Cloud. Home
Assistant redirects you to:
https://developer.lametric.com/api/v2/oauth2/authorize ?client_id=<your-client-id> &redirect_uri=https://<your-ha-url>/auth/external/callback &response_type=code &scope=basic+devices_read -
Grant access. LaMetric redirects back with an authorization code. The integration exchanges
it for an access token:
POST https://developer.lametric.com/api/v2/oauth2/token - The integration fetches your device list from the Cloud API and automatically fills in the device IP and API key. No further cloud access is required.
basic and devices_read — read-only cloud scopes. Credentials belong
to your own developer account and are never stored server-side or shared. HACS custom integrations
cannot ship bundled OAuth credentials — you must register your own app in the developer
portal. See the
LaMetric Cloud OAuth2 docs.
Discovery
Three discovery handlers detect LaMetric devices on the local network automatically. When a device is found, the config flow pre-fills the IP address and only asks for the API key (or offers the OAuth path).
| Protocol | Match criteria | Notes |
|---|---|---|
| Zeroconf | Service type _lametric-api._tcp.local. |
Primary method; most reliable on most networks. |
| SSDP | UPnP device type urn:schemas-upnp-org:device:LaMetric:1 |
Fallback when multicast DNS is blocked. |
| DHCP | Hostname prefix lametric-* or registered MAC |
Last resort; relies on hostname propagation from the DHCP server. |
Each discovered device is registered as a separate config entry, so multiple LaMetric devices on the same network are fully supported.
For the full discovery mechanism, see the LaMetric Device Discovery reference.