Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including homebridge-udp-lightsensor with all npm packages installed. Try it out:

var homebridgeUdpLightsensor = require("homebridge-udp-lightsensor")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

homebridge-udp-lightsensor v1.0.1

UDP server light sensor plugin for Homebridge


UDP server light sensor input plugin for Homebridge


  1. Install Homebridge using npm install -g homebridge
  2. Install this plugin npm install -g homebridge-udp-lightsensor
  3. Update your configuration file - see below for an example


  • accessory: "UdpLightSensor"
  • name: descriptive name
  • listen_port: UDP port to listen on for incoming messages

Example configuration:

    "accessories": [
            "accessory": "UdpLightSensor",
            "name": "Lighting",
            "listen_port": 8267

Creates a LightSensor service named Lighting.

Listens for UDP datagrams on port 8267, and reports the light level as the payload interpreted as an ASCII string representing the light level in lux.

See also



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free