npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

homebridge-lametric

v1.1.4

Published

Homebridge plugin for controlling LaMetric Time devices from Apple HomeKit.

Downloads

821

Readme

Homebridge LaMetric

Homebridge platform plugin for integrating LaMetric Time devices into Apple HomeKit.

This plugin exposes a LaMetric Time as native HomeKit controls for display power, app selection, brightness, volume, mute, and optional configurable actions. It uses the LaMetric local API and does not require any cloud service for normal HomeKit control.

The plugin does not include analytics, telemetry, or user tracking.

Features

  • Exposes each LaMetric Time as one HomeKit accessory with multiple services.
  • Switch apps from the Home app by using TV input sources.
  • Control display brightness from the same HomeKit accessory.
  • Control speaker volume and mute from the same HomeKit accessory.
  • Turn the display "off" by activating a configured blackout widget.
  • Turn the display "on" by activating the clock widget.
  • Optional configurable helper switches for temporary app display and display wake actions.
  • Supports one or more configured LaMetric devices.
  • Automatically removes stale HomeKit accessories when a device IP changes.

Requirements

  • Homebridge 1.8.0 or newer
  • Node.js 22 or 24
  • A LaMetric Time reachable on the local network
  • A LaMetric developer API key for the device
  • The BlackScreen LaMetric app if you want HomeKit off/on to blank the display

BlackScreen App

LaMetric Time does not provide a real hardware display-off command through the local API. To make the HomeKit power toggle blank the display, install the BlackScreen app on your LaMetric Time:

The plugin can discover the installed BlackScreen app automatically. You can also add it explicitly in apps with the id blackout if you want stable naming.

Installation

Install the plugin in your Homebridge environment:

npm install -g homebridge-lametric

Then add the platform to your Homebridge configuration.

Configuration

The platform name is:

"platform": "LaMetricPlatform"

The LaMetric API port is 4343 by default. Only change it if you know your device is using a custom local API port.

Single Device Example

{
  "platform": "LaMetricPlatform",
  "name": "LaMetric",
  "ip": "192.168.1.21",
  "port": 4343,
  "apiKey": "YOUR_LAMETRIC_API_KEY",
  "apps": [
    {
      "id": "clock",
      "name": "Clock",
      "package": "com.lametric.clock",
      "widget": "00000000000000000000000000000000"
    },
    {
      "id": "blackout",
      "name": "BlackScreen",
      "package": "YOUR_BLACKSCREEN_PACKAGE_ID",
      "widget": "YOUR_BLACKOUT_WIDGET_ID"
    },
    {
      "id": "crypto",
      "name": "Crypto",
      "package": "com.lametric.439e235927e03d3f184562dd909174bf",
      "widget": "YOUR_CRYPTO_WIDGET_ID"
    }
  ],
  "actions": [
    {
      "enabled": false,
      "id": "showCrypto",
      "name": "Show Crypto",
      "type": "temporaryApp",
      "appId": "crypto",
      "restoreAppId": "clock",
      "durationMs": 80500
    },
    {
      "enabled": false,
      "id": "wakeDisplay",
      "name": "Wake Display",
      "type": "wakeDisplay",
      "restoreAppId": "clock",
      "durationMs": 5000,
      "minBrightness": 2,
      "maxBrightness": 25,
      "step": 5,
      "stepIntervalMs": 200
    }
  ]
}

Multiple Device Example

{
  "platform": "LaMetricPlatform",
  "name": "LaMetric",
  "devices": [
    {
      "id": "office",
      "name": "Office LaMetric",
      "ip": "192.168.1.21",
      "port": 4343,
      "apiKey": "YOUR_LAMETRIC_API_KEY",
      "apps": [
        {
          "id": "clock",
          "name": "Clock",
          "package": "com.lametric.clock",
          "widget": "00000000000000000000000000000000"
        }
      ],
      "actions": [
        {
          "enabled": false,
          "id": "wakeDisplay",
          "name": "Wake Display",
          "type": "wakeDisplay"
        }
      ]
    }
  ]
}

App Configuration

LaMetric apps are identified by package and widget IDs. The plugin can discover installed apps from the device, but defining important apps explicitly gives stable names and enables special actions.

Recommended app IDs:

  • clock: used when HomeKit turns the display on.
  • blackout: used when HomeKit turns the display off.
  • crypto: used by the Show Crypto helper switch.

For display-off support, install the BlackScreen app. The app is maintained at rafaelreverberi/lametric-blackscreen.

Each app entry supports:

| Field | Required | Description | | --- | --- | --- | | id | No | Short identifier used by helper actions, for example clock, blackout, or crypto. | | name | No | Display name shown in HomeKit input sources. | | package | Yes | LaMetric app package identifier. | | widget | Yes | LaMetric widget identifier. |

Action Configuration

Actions are optional HomeKit switches. They are hidden unless enabled is set to true.

Supported action types:

| Type | Purpose | | --- | --- | | temporaryApp | Activates an app/widget for a configured duration, then restores another app. | | wakeDisplay | Briefly raises display brightness, then dims back down and restores the previous app. |

Each action supports:

| Field | Description | | --- | --- | | enabled | Set to true to expose the action as a HomeKit switch. | | id | Stable action identifier. Keep this stable after pairing to avoid duplicate HomeKit services. | | name | Display name shown in HomeKit. | | type | temporaryApp or wakeDisplay. | | appId | App id/name/package from the apps list. Used by temporaryApp. | | package / widget | Direct LaMetric app package and widget IDs. Alternative to appId. | | restoreAppId | App to restore after the action, typically clock. | | durationMs | Action duration in milliseconds. | | minBrightness, maxBrightness, step, stepIntervalMs | Brightness ramp settings for wakeDisplay. |

HomeKit Accessory

For every configured LaMetric device, the plugin creates one accessory containing:

| Service | Purpose | | --- | --- | | Television | Main on/off state and app input selection. | | Lightbulb | Display brightness and display active state. | | TelevisionSpeaker | Volume and mute controls. | | Switch | One switch per enabled action. |

Development

Install dependencies:

npm install

Build the plugin:

npm run build

Run linting:

npm run lint

Start a local Homebridge instance with the Homebridge UI and the local plugin build:

npm run debug:homebridge

The local UI opens at http://localhost:8581. The test storage lives in .local-homebridge-test/ and is ignored by git.

To install a local package into another Homebridge installation:

npm pack
npm install -g ./homebridge-lametric-1.1.1.tgz

If Homebridge runs on the same machine and you prefer npm linking:

npm link

Restart Homebridge after linking or installing a local package.

Release Checklist

Before publishing a new version:

npm install
npm run lint
npm run build
npm pack --dry-run

Publish to npm:

npm publish

Push to GitHub:

git status
git add README.md config.schema.json package.json package-lock.json src/platform.ts src/platformAccessory.ts scripts/local-homebridge-ui.sh .gitignore
git commit -m "Release v1.1.1"
git push origin main
git tag v1.1.1
git push origin v1.1.1

Then create a GitHub release for the same version tag with release notes.

After publishing, users can update with:

npm install -g homebridge-lametric@latest

Then restart Homebridge.

Notes

  • The plugin communicates with the LaMetric local API over HTTPS on port 4343 by default.
  • The local LaMetric API uses a self-signed certificate, so the plugin accepts that certificate for device requests.
  • Keep your LaMetric API key private. Do not commit real API keys to GitHub.
  • If the LaMetric IP changes, update the Homebridge config and restart Homebridge. The plugin removes stale cached LaMetric accessories automatically.

License

Apache-2.0