Skip to content

A raspberry pi server for controlling the IKEA Dioder lights using redoid

Notifications You must be signed in to change notification settings

alec-chan/raspberrypi-dioder-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi Dioder Server License: MIT

Overview

This project is mostly intended for personal use and is specifically tailored to my setup, but with very little modification, it is easy to personalize all the features you need.


This project requires that you make (somewhat) irreversible changes to your IKEA Dioder light control unit and you also run the risk of accidentally permanently damaging your control unit.


Setup

Required Materials:

  • A soldering iron
  • Solder and flux
  • Wire (I used 22 gauge standard breadboard wire, but almost any small kind will work)
  • IKEA Dioder LED Light Kit
  • Raspberry Pi w/internet connection (I used the Raspberry Pi 2, but any Pi with GPIO pins will work)

Process:

Wiring diagram (source: ffraenz/redoid) Dioder control unit circuit board

  1. Open the plastic casing of the Dioder control unit to access the PCB
  2. Solder a wire to connect terminal "2" to a ground pin on the GPIO port
  3. Solder wires between "R", "G", "B" and GPIO_4, GPIO_17 and GPIO_18 respectively
  4. Install dependencies on your Pi: apt install nodejs && apt install npm, and install pi-blaster with your preferred build method
  5. Clone this repository: git clone https://github.com/alec-chan/raspberrypi-dioder-server.git
  6. cd raspberrypi-dioder-server && npm install
  7. nodejs app.js to start the server

Now you should be able to connect to your Raspberry Pi's ip address through your browser and be presented with this page: image

API

The raspberry pi dioder server hosts an API for controlling the lights. The API can be interfaced with through HTTP GET and POST requests. Currently there are only two endpoints for this API:

/submit

The /submit endpoint listens for a POST request with a body containing a JSON object formatted like so: {"off": boolean, "color": string} the off property tells the server to turn off the light and the color property tells the server what color to transition the lights to. If off is true, the color property will be disregarded.

/status

The /status endpoint allows clients to query the current state of the lights. /status listens for a GET request and responds with a JSON object: {"off": boolean, "color": string}.

About

A raspberry pi server for controlling the IKEA Dioder lights using redoid

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published