A puppet module that controls the philips hue. It is designed for teaching purposes.

TP Honey



5,503 latest version

4.3 quality score

Version information

  • 0.2.0 (latest)
  • 0.1.1
  • 0.1.0
released Oct 3rd 2016
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=4.0.0 <5.0.0
  • Ubuntu

Start using this module


tphoney/simple_hue — version 0.2.0 Oct 3rd 2016


Table of Contents

  1. Module Description - This module controls the Philips hue
  2. Setup - The basics of getting started with [modulename]
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module
  7. Feedback - Get in touch !

Module description

The philips Hue is a hub that controls wirelessly connected lightbulbs. This module allows you to connect to the hub and control the lightbulbs. The purpose of this module is for teaching, and providing a simple framework to start development with. simple_hue will not get any new features, the smart_hue module exposes more features in the philips hue.


### What the simple hue affects

-Changes the state of light bulbs connected to the philips hue.

Setup requirements

  • a philips hue hub
  • a philips hue light bulb or compatible
  • a puppet agent

Beginning with simple_hue

These two attributes are needed for puppet to control the philips hue hub: DEVELOPER_KEY: Grab a developer key from your hue hub, follow the steps here: DEVELOPER_ID: Find the IP / hostname of your hue hub. Use a uPNP scanner, Nmap, your router / DHCP logs.

We use environment variables to store this. On a Ubuntu box we would set them like export HUE_KEY=pUAUbcowosjBKgE5VQTrD6kkfkfoQK1ZtN14pHl8; export HUE_IP=


Your puppet manifest file that turns the first light on would look something like: hue_light { '1': on => 'true', hue => '0', }

To apply the manifest run the following (you will need to have set some environment variables mentioned above)

puppet apply manifest.pp

Query the hue hub

Run the following: (you will need to have set some environment variables mentioned above) puppet resource hue_light



There are no known limitations. Currently only tested on Ubuntu, developed on the mac.


This is a simple module designed for teaching, this is not the place for new features. Fixes or improvements to hat is already here, are welcome.

Running the acceptance tests

  • Get virtual box installed
  • Get vagrant installed
  • clone the repo ''
  • grab the necessary gems 'bundle install --path .bundle/gems/'
  • run 'bundle exec rake acceptance' and set the necessary environment variables
  • profit !!!

Stopping the VM from dissapearing when the tests run

  • alternately run 'BEAKER_provision=yes BEAKER_destroy=no bundle exec rspec spec/acceptance' NB make sure the environment variables are set


Feel free to leave issues or PR's on the github page.