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 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-mqtt-speaker

v0.0.3

Published

Homebridge plugin to control a mqtt speaker device

Downloads

4

Readme

"homebridge-mqtt-speaker" Plugin

With this plugin you can create HomeKit speaker services which will redirect commands to the specified http API server. This could be handy to outsource the "brains" of the speaker to an separate application, maybe in an entirely different language.

Compatibility notice

The speaker service was introduced within HAP with the release of iOS 10. It is meant for video doorbells to indicate that they support audio output. However Apps like the Eve App just display the service and you can control your speaker volume. Though neither the Home App nor Siri support controlling standalone Speaker services.

Installation

First of all you should already have installed Homebridge on your device. Follow the instructions over at the HomeBridge Repo

To install the homebridge-http-speaker plugin simply run sudo npm install -g homebridge-http-speaker

Configuration

Here is an example configuration. Note that the mute section is the only required one (required by HomeKit Accessory Protocol). volume is fully optional. power was my decision to include it in the code. The power attribute is not foreseen for the speaker but the Eve App manages to handle this 'abnormal' characteristic. We will see what the Home App will do with it.

Every call needs to be status code 200 if successful. The statusUrl call of mute (and of power) expects an 0 or 1 for off or on with no html markup inside the body of the response. The statusUrlof volume expects a value from 0 to 100 with no html markup inside the body. The %s in the setUrl call will be replaced with the volume.

    "accessories": [
        {
            "accessory": "HTTP-SPEAKER",
            "name": "Your Speaker name",
            
            "mute": {
                "onUrl": "http://localhost/api/muteOn",
                "offUrl": "http://localhost/api/muteOff",

                "statusUrl": "http://localhost/api/muteStatus"
            },
            
            "volume": {
                "statusUrl": "http://localhost/api/volumeStatus",
                "setUrl": "http://localhost/api/volumeUpdate/%s"
            },
            
            "power": {
                "statusUrl": "http://localhost/api/powerStatus",
                "onUrl": "http://localhost/api/powerOn",
                "offUrl": "http://localhost/api/powerOff"
            }
        }
    ]