0.4.0 • Published 7 years ago

homebridge-ikea v0.4.0

Weekly downloads
7
License
ISC
Repository
github
Last release
7 years ago

Homebridge Ikea

A homebridge plugin for Ikeas Trådfri lamps using Ikeas Trådfri gateway with an Ikea trådfri lightbulb. As of now it works just fine for turn lamps on/off and setting the brighness and changing the temperature.

Functionality

  • Find all your Ikea lamps connected to your Gateway.
  • Uses provided lamp information from the Gateway.
  • Turn on and off your lamps.
  • Dim the lamps.
  • Control the temperature/kelvin of your lamps. Currently doesn't work in HomeKit app, only tested in Eve.

Dependencies

If you're running macOS or linux the included binaries should work out of the box for you and you shouldn't have to provide your own version. If you're running another OS or if the provided binaries aren't working please as the path to coap-client using coapClient. Here's how I compiled the included binaries versions.

Add to your config

Manually adding all lamps are no fun, right? We want them to just appear for us!

You'll have to figure out the IP to your gateway yourself (if you've managed to compile coap-client I'm guessing you'll handle that). The PSK will be written under the Gateway.

{
  "platform": "Ikea",
  "name": "Gateway",
  "ip": "192.168.x.xxx",
  "psk": "xxxxxxxxxxxxxxxx"
}

If you need the actual coaps communication for debugging add debug: true to your config.

Todos

  • Improve on Kelvin selection (Cheers sandyjmacdonald)
  • Get lamp state from Gateway on boot (Cheers shoghicp)
  • Don't leak PSKs in log (Cheers Firehed)
  • Clean up code, make it actually readable
  • Break out all IPSOObjects numbers to utils, hiding it away.

Credits

Thanks to r41d for figuring out https://github.com/bwssytems/ha-bridge/issues/570#issuecomment-292188880

Thanks to Hedda for https://github.com/bwssytems/ha-bridge/issues/570#issuecomment-292081839

And a huge thanks to the rest of the people in https://github.com/bwssytems/ha-bridge/issues/570