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 🙏

© 2025 – Pkg Stats / Ryan Hefner

homebridge-x-sense

v0.24.0

Published

X-Sense Homebridge Plugin

Readme

Homebridge X-Sense

npm

This is a Homebridge plugin for integrating X-Sense smoke and carbon monoxide detectors into Apple HomeKit. It uses the same unofficial API as the Home Assistant integration to provide real-time status updates for your devices.

Features

  • Real-time Updates: Uses a persistent MQTT connection for instant notifications of alarms and status changes.
  • Device Support: Exposes combination Smoke & Carbon Monoxide alarms, smoke-only models, and CO-only models with the correct HomeKit services.
  • Rich Notifications: Provides status for:
    • Smoke Detected
    • Carbon Monoxide Detected
    • Battery Level
    • Low Battery Warnings
  • Automatic Discovery: Automatically discovers all sensors linked to your X-Sense account.
  • Resilient: Automatically handles token refreshes and connection recovery.
  • Secure Connection: Temporary AWS credentials are used to sign the MQTT WebSocket URL via SigV4.

Installation

  1. Install Homebridge using the official instructions.
  2. Install this plugin using the Homebridge UI or npm install -g homebridge-x-sense.
  3. Configure the plugin using the Homebridge UI or by manually editing your config.json file.
  4. The plugin uses temporary AWS credentials from X-Sense to sign the MQTT WebSocket connection.

Configuration

You can configure this plugin via the Homebridge UI. The available options are:

| Field | Description | Required | Default | | ----------------- | ------------------------------------------------------------------------------------------------------- | -------- | ------- | | Email | The email address for your X-Sense account. | Yes | | | Password | The password for your X-Sense account. | Yes | | | Polling Interval | The interval in minutes for how often to poll the API for device status as a fallback to real-time updates. | No | 15 |

Example config.json

{
  "platform": "X-Sense",
  "username": "[email protected]",
  "password": "your-password",
  "pollingInterval": 15
}

Troubleshooting

  • "Cognito authentication failed" Error: This error almost always means your email or password is incorrect. Please double-check your credentials in the plugin configuration.
  • Devices Not Appearing:
    1. Check the Homebridge logs for any errors during startup. Look for messages like "Discovered X devices".
    2. Ensure the devices are online and connected in the official X-Sense mobile app.
    3. Try restarting Homebridge.
  • Status Not Updating: The plugin relies on a real-time MQTT connection. If you see "MQTT client error" or "MQTT client connection closed" in the logs, it may indicate a network issue between your Homebridge server and the X-Sense cloud. The plugin will attempt to reconnect automatically. The periodic polling will also serve as a backup to refresh the state.

Acknowledgements

This plugin was inspired by the ha-xsense-component_test project and would not have been possible without the excellent work of theosnel in decoding the X-Sense API in the python-xsense project.

Disclaimer

This plugin is not officially endorsed by or affiliated with X-Sense. It is a community-driven project that relies on an unofficial API. The API may change at any time, which could break this plugin. Use at your own risk.

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.