Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

PsychoLlama/filament

Repository files navigation

Filament

GraphQL, but for your lights

Project Status

⛔ UNMAINTAINED

I'm sad to say it, but the project is dead. I'd hoped to find an excuse to dive in again, but it never came. 3rd party apps and integrations became good enough that I no longer got value in maintaining my own automation platform.

Why?

Because GraphQL is amazing and so is home automation. Why not both?

Trying it out

First off, you need lights. The special kind you can control with your smartphone and pretend you're telekinetic. I get mine from Philips. I think you can use other types, but I've never tried.

Assuming you've got some lights, do these things:

  1. Clone this repo
  2. Install (npm install or yarn install or whatever the cool kids do these days)
  3. Do yarn register. That'll poll your Hue bridge until you press the link button
  4. yarn build
  5. yarn start 🎉

Open your browser to localhost:8080 and try some queries!

Lazy person copy & paste

git clone https://github.com/PsychoLlama/filament.git && cd filament
npm install

echo "Press the giant button on your Hue bridge"
npm run register
npm run build
npm start

Queries

Lights

  • ✅ Get a Light by ID
  • ✅ Get all Lights
  • ✅ Get a Light's name
  • ✅ Get a Light's hex color
  • ✅ Get a Light's on/off state
  • ✅ Get whether a Light is reachable
  • ✅ Get a Light's type (e.g. Extended color light)
  • ✅ Get a Light's manufacurer, hardware model, and software version
  • ✅ Get a Light's (cross-Bridge) unique ID
  • ❌ Get Lights that were discovered in the last search for new Lights
  • ❌ Get a Luminaire Light's unique ID
  • ❌ Get a Light's effect state
  • ❌ Get a Light's alert state [1]

Groups

  • ✅ Get a Group by ID
  • ✅ Get all Groups
  • ✅ Get a Group's name
  • ✅ Get a Group's hex color
  • ✅ Get a Group's Lights
  • ✅ Get whether any or all Lights in a Group are on
  • ✅ Get a Group's Room class (e.g. Living room, Bedroom)
  • ✅ Get a Group's type (e.g. Room, Luminaire, LightGroup)
  • ❌ Get a Luminaire Group's hardware model
  • ❌ Get a Luminaire Group's unique ID

Schedules

  • ✅ Get a Schedule by ID
  • ✅ Get all Schedules

Scenes

  • ✅ Get a Scene by ID
  • ✅ Get all Scenes

Sensors

  • ❌ Get a Sensor by ID
  • ❌ Get all Sensors
  • ❌ Get Sensors that were discovered in the last search for new Sensors

Rules

  • ❌ Get a Rule by ID
  • ❌ Get all Rules

Configuration

  • ❌ Get the Bridge's configuration

Resourcelinks

  • ❌ Get a Resourcelink by ID
  • ❌ Get all Resourcelinks

Capabilities

  • ❌ Get the Bridge's Capabilities

Mutations

Lights

  • ✅ Set a Light's hex color
  • ✅ Turn a Light on or off
  • ✅ Smoothly transition from one state to another
  • ✅ Rename a Light
  • ❌ Search for new Lights
  • ❌ Delete Lights from the Bridge [2]

Groups

  • ✅ Set a Group's hex color
  • ✅ Turn a Group on or off
  • ✅ Smoothly transition from one state to another
  • ✅ Rename a Group
  • ✅ Set a Group's Lights
  • ✅ Set a Group's Room class (e.g. Living room, Bedroom)
  • ❌ Create a Group
  • ❌ Delete a Group

Schedules

  • ❌ Create a Schedule
  • ❌ Update a Schedule
  • ❌ Delete a Schedule

Scenes

  • ❌ Run a Scene
  • ❌ Create a Scene
  • ❌ Update a Scene
  • ❌ Delete a Scene

Sensors

  • ❌ Create a Sensor
  • ❌ Update a Sensor
  • ❌ Delete a Sensor
  • ❌ Search for new Sensors

Rules

  • ❌ Create a Rule
  • ❌ Update a Rule
  • ❌ Delete a Rule

Configuration

  • ❌ Update the Bridge's configuration
  • ❌ Create a user
  • ❌ Delete a user

Resourcelinks

  • ❌ Create a Resourcelink
  • ❌ Update a Resourcelink
  • ❌ Delete a Resourcelink

Notes

[1]: The alert state provided by the Hue API contains the last alert sent to the light and not its current state (i.e. whether an alert is active), so this isn't particularly useful.

[2]: Deleting lights can be messy and we haven't needed it, so we haven't added this yet.

Disclaimer

I'm not affiliated with Philips in any way. I'm just a guy on the internet playing with code ❤️

About

💡GraphQL server for Philips Hue

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages