Howto: Integrate IKEA SLAGSIDA (Under Cupboard Light)

The Ikea Slagsida is a under Cupboard Light with a touch sensor to turn it on/off with a 50% brightness step in between.

Specs on this lamp (60cm variant):

110-240V
6.6 W
warm-white
TYP L1616

Example offering:

I always thought turning multiple of those on/off was pretty annoying.

So here’s the howto integrate them into HA:

You’ll need:

Disassembly

After disconnecting the lamp from power at the back side (four screws, a cap, a small plastic retainer bar), remove all small screws on this side.

You can now pull off the front side on the thicker side of the housing, then pull the front side towards the thin side. It should release easily (if not you might have missed a screw in the back).

The two side pieces might fall off in this process. But they are easy to put back into place when assembling again.

Below the front panel is the pcb inside a plastic housing. Release the housing with the two plastic clips and pull a bit towards the clips.

It should slide out on the other side. If not: You can release the third latch on the back if necessary.

You can now bent both parts of the housing away from each other by inserting a flat screw driver between. The front plate with the touch sensor should pop out with no issue.

Now release the power connection plug by prying with a screwdriver below it, and then (carefully!) do the same on the PCB.

Disconnect the old controller

On the board are two controllers, one is for receiving the touch input and sending the brightness signal and the other one will receive the dimming signal and power the LEDs.

The brightness signal is on the original controller 3.3 V, so we can easily replace it by an Esp8266 which will also output 3.3 V signals.

First we need to scratch away 4 connections on the PCB with the knive (cut marks marked in violet):

Solder new connections

Now you need to solder 4 wires to the original PCB. The 24 V and Ground connections will feed your DC-to-DC power supply. Connect the 3.3 V pwm to D2 on the Esp8266, the touch button to A0, the Vcc out from your the power supply to the 5V port and ground to G.

Program the Esp8266

Now plug your computer into the USB port and open ESPHome in your HA instance (with a webserial compatible browser, like Chrome).

Create a new configuration in the guide for a Wemos D1 Mini and extend the configuration like this:

output:
  - platform: esp8266_pwm
    pin: D2
    frequency: 2000 Hz
    id: pwm_output
    min_power: 0.005
    zero_means_zero: true

light:
  - platform: monochromatic
    output: pwm_output
    name: "Kitchen Under Cabinet Light 01"

If you want to experiment with touch, try this:

sensor:
  - platform: adc
    pin: A0
    name: "Touch Switch ADC"
    id: touch_switch_adc
    update_interval: 100ms
    filters:
    - multiply: 100
    - delta: 3
    
switch:
  - platform: template
    name: "Touch Switch"
    id: touch_switch
    optimistic: true
    
globals:
 - id: t_sw_bool
   type: bool
   
binary_sensor:
  - platform: template
    id: touch_switch_pressed
    name: "touch switch pressed"
    lambda: |-
      if (id(touch_switch_adc).state > 1) {
        if (id(t_sw_bool) == false){
          id(touch_switch).toggle();
        }
        id(t_sw_bool) = true;
        return true;
      } else {
        id(t_sw_bool) = false;
        return false;
      } 

Source for the analog port touch code:

You may need to adjust the dead zone by raising or lowering the delta-filter.

I’m not using the touch buttons, but using a delta of 10 and touching the bare metal worked flawlessly for me. Haven’t tested it with the enclosure around it, though.

1 Like

This conversion was added to the custom component powercalc.

manufacturer and model need to be specified manually, so it’s “ikea” and “Slagsida” .

Hope this helps :slight_smile:

1 Like