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-mculed

v0.0.18

Published

Homebridge platform plugin that support's a network of nodemcu's to control various devices.

Downloads

37

Readme

homebridge-mculed

Homebridge Plugin for NodeMCU Based ws2812/sm16703p led strip controller for RGB+W led strips

NOTICE: I'm in the process of deprecating my usage of this plugin.

And in the process of migrating all my devices to the Tasmota firmware and the homebridge-tasmota plugin. With the transition I'm not changing my devices, just flashing them with Tasmota.

If someone wants to take over ownership of this codebase and repository, please let me know.

Device

Table of Contents

Design Concept

  • Realtime device communications via WebSockets, and device discovery via mDNS
  • Nodemcu creates a websocket server
  • Nodemcu advertises websocket server onto network via mDNS
  • Plugin discovers server by watching for mDNS advertisement
  • NodeMCU sends message to plugin containing device config
  • Plugin creates HK accessory for device ( Have ability to alias sensor name in config.json )
  • Nodemcu sends device state changes in realtime to plugin via WebSockets
  • OTA nodeMCU provisioning

Backlog and Roadmap

Backlog - plugin

  • [x] Migrate from mDNS to bonjour
  • [x] Plugin has a circular json issue in accessory, likely timeout
  • [x] After reboot of the device, socket connection does not re-establish
  • [x] Implement websocket ping
  • [x] Websocket socket level events in Plugin
  • [x] Not responding for closed socket
  • [x] Handle device not turned on
  • [x] Identify method and reset button needs rework
  • [x] Complete plugin documentation
  • [x] Aliases don't appear to work
  • [x] Add a Christmas button to rotate thru primary colors

Backlog - nodemcu

  • [x] OTA nodeMCU code provisioning
  • [x] Initial lua code load via script
  • [x] Websocket socket level events in NodeMCU
  • [x] NodeMCU Memory leak from closed socket connections
  • [x] Implement websocket pong
  • [x] Program second button to flip primary colors
  • [x] Remove excessive prints in nodeMCU code
  • [x] Watchdog timer, what should it do - Reset after 5 minutes without HB connection
  • [x] What should the LED's do in a power cycle?
  • [x] Get a case with push button's
  • [x] Create schematic for nodeMCU
  • [x] Create layout for perfboard
  • [x] Power nodemcu with DC-DC Step down from the 24V power supply
  • [x] Create a board level layout to use on a perf board
  • [x] Construct production unit
  • [x] Complete nodemcu documentation
  • [x] Power off LED strip via MOSFET -- Not possible
  • [ ] Revisit perfboard layout, break perf board between nodemcu and output section, and rotate output section 90 degrees
  • [ ] Build 3 more units cottage porch lights, xmas 1 and xmas 2

Roadmap

  • [ ] Collapse the OTA Update server to nodeJS

Supported configurations/devices

  • [x] Costco LED Strip - Intertek 4005244 - This strip is based on the sm16703p LED controller chip

Installation - homebridge-mculed

sudo npm install -g homebridge-mculed

Configuration - homebridge-mculed

{
    "platform": "mculed",
    "name": "mculed",
    "aliases": {
      "NODE-AC5812": "Kitchen Sink"
    }
  }
  • aliases - Friendly names for your sensor's

Provisioning/Configuration - NodeMCU

See README in lua directory

API Documentation

Credits

  • TerryE and Marcelstoer - For nodemcu/lua OTA updates - https://github.com/nodemcu/nodemcu-firmware/tree/master/lua_examples/luaOTA
  • Frank Edelhaeuser - Borrowed lua mDNS Discovery code, and updated to support NodeMCU
  • creationix - Borrowed LUA WebSocket Server code - https://github.com/creationix/nodemcu-webide/tree/master/mcu