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.

Home Assistant HACS local_polling MIT

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

  1. Open HACS in Home Assistant.
  2. Click the three-dot menu → Custom repositories.
  3. Enter https://github.com/ElectroAttacks/lametric-hass-local, select category Integration, and click Add.
  4. Search for LaMetric Local and click Download.
  5. Restart Home Assistant.

Manual installation

  1. Download the latest release and extract it.
  2. Copy the custom_components/lametric_hass_local/ folder into your Home Assistant custom_components/ directory. The folder name must be exactly lametric_hass_local.
  3. Restart Home Assistant.
Requirement Home Assistant 2026.4.2 or later. The Python library 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.

Where to find your API key Open the LaMetric mobile app, go to Device → Settings → Wi-Fi, and copy the API key shown there. Alternatively, find it in the developer portal under My 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.

  1. Sign in at developer.lametric.com and click Create new app. Choose type Notification Source (or Personal for private use).
  2. Set the OAuth2 Redirect URI to your Home Assistant external callback URL:
    https://<your-ha-url>/auth/external/callback
  3. Copy the Client ID and Client Secret from the app settings page.
  4. In Home Assistant go to Settings → Devices & Services → Application Credentials, click Add Application Credential, select LaMetric Local, and paste both values.
  5. 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
  6. 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
  7. 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.
Scopes 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.

Tip If automatic discovery does not work, assign a static IP in your router and use the manual setup path. Open the LaMetric app at least once after connecting to Wi-Fi — this triggers the device to announce itself on the local network.

For the full discovery mechanism, see the LaMetric Device Discovery reference.