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-esphome-ts

v1.5.3

Published

New plugin for integrating for esphome into homebridge

Downloads

72

Readme

homebridge-esphome-ts

This plugin integrates the esphome platform into homebridge so that you don't have to go through homeassistant if you don't want to (not that there is anything wrong with that). It makes use of the native API of esphome so that you can expect instant updates for all your binary sensors what have you.

Supported components include:

  • Lights
  • Switches
  • BinarySensors (motion, window, door, smoke and leakage)
  • Sensors (temperature & humidity at the moment)

This project is currently still in beta, but I thought that many eyes see more than just my two :)

Installation

Unless you haven't done so already, make sure to install homebridge first. See instructions here. Once you have done this, you can install this plugin by typing

npm i -g homebridge-esphome-ts

Once this is done, you can configure your homebridge config.json according to the next section.

Getting Started

{
    "platform": "esphome",
    "devices": [
        {
            "host": "my_esp.local",
            "password": "Passw0rd!",
            "port": 9001,
            "retryAfter": 120000 // optional, time in milliseconds!
        }
    ],
    "retryAfter": 60000 // optional, time in milliseconds!
}

Only the host key is mandatory under devices. As password '' is assumed aka no password and the default port number 6053 is also wired into the plugin. You can add, in theory, as many ESP devices as you want to that array.

If some of your devices are password-less you can enable devices discovery to let the plugin find all your devices by setting discover: true in platform configuration. In case if you don't have any password-secured devices you can even fully omit "devices" section in platform configuration.

In case you don't have a working esphome configuration you can have look at the examples folder. There you will find both an example homebridge config.json file as well as an example esphome configuration. For further guidance on esphome please check out their website.

retryAfter

Both retryAfter keys are as explained optional and need to contain an integer that tells this plugin after what time frame it should try to reconnect. Keep in mind that this value needs to be in milliseconds. The inner retryAfter will trump the outer value if present. The default value is 90 seconds.

Blacklisting

If for some reason you want to exclude a specific component from this plugin just add a key containing its name (as it was defined in esphome and is shown initially in HomeKit) to a string array under the key blacklist:

{
    "platform": "esphome",
    "devices": [
        ...
    ],
    "blacklist": [
        "My blacklisted switch"
    ]
}

Todo

  • [x] Implement a blacklist for components
  • [ ] Testing, especially with the new homebridge version
  • [x] Implement sensor component

Troubleshooting

Please make sure to add the api entry to your config!

If you still have problems please feel free to open a ticket on GitHub. Before doing so add this to your config "debug": true. The plugin will now output what it has gotten from your ESP device. Please append this when you open a ticket here on GitHub. Please attach your config as well and make sure to remove any sensitive information such as WiFi passwords.

In addition to simply writing stuff to the console, it will also write everything received from your devices to individual files under /tmp. You can then submit these files with any issues you might file on GitHub.

Slight warning The writing of these files means that it will also occupy more space on your SD card or whatever you might have. So simply turn off this option once you don't need it anymore.