Skip to content

Change the colour of your hue lightbulb according to air pollution status

License

Notifications You must be signed in to change notification settings

Alheimsins/luftstatus-hue

Repository files navigation

Build Status js-standard-style

luftstatus-hue

Change the colour of your Philips hue lightbulb according to air pollution status from luftstatus.no

Setup

To make this work you'll need the IP for your bridge, a user for the bridge and the number for the lightbulb you will use. You will also need to add the Area you want to check.

If you have all this just update the values in config.json.

{
  "bridge": "127.0.0.1",
  "username": "c1faa0ab-11aa-466a-b87e-20aefbccfb8b",
  "light": 1,
  "token": 'uihef98efuijef98fewfne0', // Optional. Only needed for remote api
  "serviceUrl": "https://s3.eu-central-1.amazonaws.com/luftstatus/areas.json",
  "area": "Grenland",
  "pollIntervalMinutes": 60
}

If you don't know there is still hope.

Find the Area

Pick your area from this list

Add it to config.json

Find bridgeip

First run find bridge script

$ npm run findBridge

This will return a list of bridges on your network.

[
  {
    "id": "0287dgdt93",
    "internalipaddress": "192.168.1.110"
  }
]

Add the internalipaddress value to your config's bridge

Add a user

Push the link button on your bridge and run the addUser script

$ npm run addUser
[
  {
    "success": {
      "username": "VK5h1bIbP6wtyAz6W4O5VbcuVqbrdqU4-iqLiyVU"
    }
  }
]

Add the values from username to config.json and move on.

Find your lightbulbs

Run the list script

$ npm run list

Find the light you want to use and add the id to config.json

You are now ready to start.

Start

$ npm start

As long as it runs the script will check the status every config.pollIntervalMinutes (defaults to 60)

License

MIT

About

Created with ❤ for Alheimsins

Alhemsins logo

About

Change the colour of your hue lightbulb according to air pollution status

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •