IKEA ENEBY 30 ESPHome mod

I added an esp8266-01 module to the (old) ENEBY 30 bluetooth speaker. The Esp is powered directly through the internal 3.3v and GND available on the ENEBY volume control. GPIO2 is connected to the POWER_KEY and GPIO3 to the BT_LED test pin.

This is the setup in ESPHome:

switch:
  - platform: gpio
    pin: GPIO2
    inverted: true
    id: relay
    name: eneby Remote
    icon: mdi:speaker
    on_turn_on:
    - delay: 100ms
    - switch.turn_off: relay
    
binary_sensor:
  - platform: gpio
    name: eneby
    pin:
      number: GPIO3

With this setup i can turn the speaker on/off, however I have not found the correct setup to combine the state of the binary sensor (power identification LED) and the switch. In the future I would like to
control the volume remotely through the VOL- and + test pads.

Can somebody suggest a method to set the state of the switch by the binary sensor value? And perhaps come up with a solution where I can simulate the rotary encoder through GPIO 0 and 1?

1 Like

Nice topic! Maybe this will help you for the volume control:
https://www.espruino.com/Ikea+Eneby+Speaker+Controller

There is other project to power it and change volume:

Hi,

Just used your code to control volume.
There are 2 switches, one for volume up and another for volume down.
The only thing is that actually I’m trying to control binary sensor to know if is on or off the speaker

switch:
  - platform: gpio
    pin: GPIO4
    inverted: true
    id: relay
    name: eneby Remote
    icon: mdi:speaker
    on_turn_on:
    - delay: 100ms
    - switch.turn_off: relay
  - platform: gpio
    pin: GPIO12
    inverted: true
    id: relay_volume_up
    name: eneby volume up
    icon: mdi:speaker
    on_turn_on:
    - delay: 20ms
    - switch.turn_on: relay_volume_low
    - delay: 40ms
    - switch.turn_off: relay_volume_up
    - delay: 20ms
    - switch.turn_off: relay_volume_low
  - platform: gpio
    pin: GPIO16
    id: relay_volume_low
    name: eneby volume low
    icon: mdi:speaker
    on_turn_on:
    - delay: 20ms
    - switch.turn_on: relay_volume_up
    - delay: 40ms
    - switch.turn_off: relay_volume_low
    - delay: 20ms
    - switch.turn_off: relay_volume_up
binary_sensor:
  - platform: gpio
    name: eneby
    pin:
      number: GPIO3
      mode:
        input: true

Actually, with esp8266 connected to the eneby, I can’t power it on/off or turn volume up/down without home assistant (It seems that esp8266 disconnects eneby buttons).
Anyone knows how to solve that?
Thanks