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-plex-metadata

v0.5.5

Published

Homebridge plugin exposing Plex playback metadata for automation.

Readme

Plex Metadata plugin for Homebridge

CI

Add sensors to monitor playback state while exposing rich metadata on the currently playing media

Why this plugin exists

This plugin is built for people who want more than "is something playing?" from Plex in HomeKit. It exposes playback metadata as Homebridge characteristics so you can trigger automations based on what is actually on screen, not just whether a player is active.

A practical example is projector control. If a movie starts in 21:9, you can use that metadata value to trigger a HomeKit automation that changes your projector lens memory/profile to match.

The occupancy sensor is still useful for simple "media started/stopped" flows, but the core value of this plugin is metadata-driven automations for advanced setups.

How it works

This plugin leverages both webhooks (optional) and the /sessions API. Webhooks provide realtime updates when playback status changes. The /sessions API provides richer metadata, exposed as custom characteristics, which currently include:

  • Aspect Ratio
  • Resolution
  • Audio Codec
  • Video Codec

Setup

  1. Set your Plex server connection details:

    • plexHost (required): hostname or IP address of your Plex instance (for example 192.168.1.10)
    • plexPort (required): Plex port (usually 32400)
  2. Set your Plex authentication token:

  3. Configure players that should get an occupancy sensor:

    • Add each player under players with:
      • name: the Homebridge accessory name you want to display
      • uuid: player identifier value (machine identifier)
  4. Get player identifiers from Homebridge logs while media is playing:

[homebridge-plex-metadata] Session:
Player machine identifier: some-uuid
Player title: Safari

In the example above, use either some-uuid or Safari as the uuid value for that player entry.

Optional: Realtime updates with webhooks

You can enable Plex webhooks for realtime playback updates instead of relying only on polling.

  • Requires a Plex Pass subscription to use webhooks.
  • Enable enableWebhooks in plugin config.
  • Optionally set plexWebhookPort (default 32500).

After restarting Homebridge with webhooks enabled, look for a log line like:

Plex webhook listener ready at http://0.0.0.0:32500/plex/webhook

Use that URL in Plex webhook settings:

If Homebridge is running on another machine/NAS, replace 0.0.0.0 with the reachable IP/hostname for that Homebridge host.