Skip to content

This NodeJS application listens to MQTT messages and transforms them into Philips Hue API calls

License

Notifications You must be signed in to change notification settings

iomax/mqtt-hue-bridge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mqtt-hue-bridge

This node.js server listens on MQTT messages for lights and translates it to the philips hue bridge

Installation

$ git clone https://github.com/iomax/mqtt-hue-bridge.git
$ cd mqtt-hue-bridge
$ npm install

Using

Start up the server by editing the config.js first to suit your needs

$ $EDITOR config.js
$ node server.js

Or by using environment variables

$ MQTT_HOSTNAME="192.168.0.1" HUE_HOSTNAME="192.168.0.2" HUE_USERNAME=$(whoami) node server.js

Publish some MQTT messages to try it out (I use mosquitto server for this, but whatever MQTT server should work)

$ mosquitto_pub -m "on" -t "light/all/state"
$ mosquitto_pub -m "off" -t "light/1/state"
$ mosquitto_pub -m "toggle" -t "light/1/state"
$ mosquitto_pub -m "50" -t "light/2/brightness"

An empty message will produce a JSON object detailing the status of the lamp.

Credit

The original mqtt-hue-bridge work was done by Dennis de Greef in his mqtt-hue-bridge project.

About

This NodeJS application listens to MQTT messages and transforms them into Philips Hue API calls

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.3%
  • Dockerfile 1.7%