Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

homebridge-mculed

0.0.17 • Public • Published

homebridge-mculed

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

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

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

Backlog - nodemcu

  • OTA nodeMCU code provisioning
  • Initial lua code load via script
  • Websocket socket level events in NodeMCU
  • NodeMCU Memory leak from closed socket connections
  • Implement websocket pong
  • Program second button to flip primary colors
  • Remove excessive prints in nodeMCU code
  • Watchdog timer, what should it do - Reset after 5 minutes without HB connection
  • What should the LED's do in a power cycle?
  • Get a case with push button's
  • Create schematic for nodeMCU
  • Create layout for perfboard
  • Power nodemcu with DC-DC Step down from the 24V power supply
  • Create a board level layout to use on a perf board
  • Construct production unit
  • Complete nodemcu documentation
  • 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

  • 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

Install

npm i homebridge-mculed

DownloadsWeekly Downloads

29

Version

0.0.17

License

Apache-2.0

Unpacked Size

187 kB

Total Files

62

Last publish

Collaborators

  • avatar