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-2n-intercom

v2.2.4

Published

Complete Homebridge plugin for 2N intercoms with door control, live video streaming, and doorbell notifications

Readme

Homebridge 2N Intercom

npm version verified-by-homebridge

Practical Homebridge plugin for 2N intercoms. It provides a HomeKit door switch (relay control), camera stream with snapshots, and an optional doorbell service exposed inside the camera accessory. The guide below is written for Homebridge users with basic DIY experience.

Install the plugin

npm install -g homebridge-2n-intercom

Or simply install it from the Plugins tab inside Homebridge Config UI X. The UI form is the recommended way to configure it.


Homebridge UI form – what to fill in

Open the plugin settings in Config UI X. Every field maps 1:1 to the list below.

| UI Label | What it does | What to type | | --- | --- | --- | | Platform Name | How the accessory shows up in logs / HomeKit. | Any friendly name, e.g. Front Gate | | 2N Intercom IP Address | Where the plugin talks to. | Your intercom IP (add :port if you changed HTTPS port) | | Username / Password | Account used for the HTTP API. | Use a service user you created on the intercom | | Door Relay Number | Which relay the HomeKit switch should trigger. | Usually 1. Pick 2-4 if you wired a different relay | | Enable Doorbell Notifications | Exposes the doorbell service within the camera accessory (generates HomeKit notifications). | Enable unless you only want the door switch | | Doorbell Filter by Phone Number | Optional filter so only one directory entry rings HomeKit. | Leave blank for “everyone”. Otherwise pick one of the dropdown values the plugin discovered | | Video Stream Quality | Tells FFmpeg which stream profile to use. | VGA (640×480) starts fastest, HD needs more CPU | | Snapshot Refresh Interval | How often a fresh picture is pulled. | 30 seconds is a good default. Use 10 if you want faster refresh | | Connection Protocol | HTTP vs HTTPS. | Stick with HTTPS unless your unit is legacy | | Verify SSL Certificates | Whether to validate the HTTPS certificate. | Turn off if you kept the factory self‑signed cert; turn on if you uploaded a trusted one |

Doorbell filter

  • On startup the plugin reads the 2N directory and shows discovered button names in the dropdown.
  • Leave the field empty to allow all incoming calls (any button press).
  • Select a discovered entry to limit notifications to that button only.
  • Advanced users may enter a SIP identifier manually when needed.

Defaults at a glance

  • HTTPS enabled, SSL verification disabled (best for self-signed factory certs).
  • Door relay 1, doorbell enabled, VGA video, snapshots cached for 30 seconds.
  • Hidden power-user options (doorOpenUrl, streamUrl, etc.) are auto-generated—no need to touch JSON.

2N intercom setup checklist

You only have to configure this once on the intercom web UI. Follow the steps in order.

  1. Create a service account
  • Log into the 2N web UI → Services → HTTP API → enable it.
  • Create a user (or reuse one) and allow it to call these endpoints: /api/dir/query, /api/call/status, /api/switch/ctrl, /api/camera/snapshot.
  • Test in a browser: https://IP/api/call/status. If you see JSON after logging in, your account works.
  1. Match the relay number
  • Go to Hardware → Switches and note which relay drives your door strike.
  • Use that number in Door Relay Number inside Homebridge. When you toggle the HomeKit switch, the plugin runs /api/switch/ctrl?switch=<number>&action=trigger for you.
  1. Program the directory buttons
  • Under Directory → Users / Buttons, create entries for each physical button or keypad slot.
  • Assign them so that pressing the hardware button places a call to a specific peer.
  • Restart Homebridge once—you should now see those entries listed in the doorbell filter dropdown and in the logs (startup log lists discovered peers).
  1. Enable video streaming
  • Visit Services → Streaming → ensure an H.264 profile such as h264_stream is active.
  • Test it with VLC: rtsp://user:pass@IP:554/h264_stream. If VLC plays it, the Home app will as well.
  1. Check snapshots
  • Open https://IP/api/camera/snapshot in a browser while logged in as the service user.
  • You should download a JPEG still. If you get HTML or an error, fix the account permissions.
  1. Decide on HTTPS vs HTTP
  • If you leave the factory certificate, keep Verify SSL Certificates off.
  • If you uploaded a trusted cert (under System → Certificates), feel free to enable verification.
  • Only choose HTTP if your unit truly cannot serve HTTPS.
  1. Final sanity checks
  • From your Homebridge box you can run:

    curl -u user:pass https://IP/api/call/status
    curl -u user:pass https://IP/api/dir/query
    curl -u user:pass "https://IP/api/switch/ctrl?switch=1&action=trigger"
  • Each command should succeed. After that, open the Home app, tap the camera tile, and test the door switch + doorbell notification.


Need help?

  • Enable Debug logs in Homebridge if something does not show up; the plugin prints very explicit hints (missing permissions, unknown caller, etc.).
  • File issues or share ideas on GitHub.
  • Pull requests that improve wording or cover other 2N models are welcome.

MIT © Jan Maštalíř