Home Assistant integration to control IKEA OBEGRÄNSAD Wall Lamp hacked with ph1p/ikea-led-obegraensad and an ESP32 device.
- Turn the lamp on and off
- Adjust light intensity (brightness 0-255)
- Switch between available plugins/effects
- Display rotation (0°, 90°, 180°, 270°) *
- Persist current plugin as default *
- Send text messages with custom repeat and delay
- Display graphs alongside text messages
- Remove specific messages by ID
- Get raw display data (256 bytes for 16x16 matrix)
- Set automatic plugin switching schedule
- Start/stop/clear schedule
- Binary sensor for schedule status
- View schedule details in attributes
- Extra state attributes (rotation, schedule, status, rows, cols)
- Full REST API support
- WebSocket support for real-time updates *
- Clear device storage
- Local polling integration
* Requires WebSocket connection.
The installation is made easy with the Home Assistant Community Store (HACS):
- Open the Home Assistant Community Store
- Add this repository using the following URL:
https://github.com/lucaam/ikea-obegransad-led - Once added, navigate to Configuration > Integrations and look for
IKEA OBEGRÄNSAD Led - Configure the integration by providing:
- Hostname or IP address of your device
- Default animation for messages (default: DDP)
The integration creates a light entity that supports:
- Power: Turn on/off
- Brightness: 0-255
- Effects: All available plugins from your device
Display a text message on the LED matrix:
service: ikea_obegransad_led.send_message
data:
message: "Hello World!"
repeat: 3
delay: 70With graph data:
service: ikea_obegransad_led.send_message
data:
message: "Temperature"
graph: "8,5,2,1,0,0,1,4,7,10,13,14,15,15,14,11"
miny: 0
maxy: 15
repeat: 1
delay: 50
message_id: "temp_graph_1"Remove a specific message:
service: ikea_obegransad_led.remove_message
data:
message_id: "temp_graph_1"Automatically switch between plugins:
service: ikea_obegransad_led.set_schedule
data:
schedule: '[{"pluginId": 2, "duration": 60}, {"pluginId": 4, "duration": 120}]'# Start schedule
service: ikea_obegransad_led.start_schedule
# Stop schedule
service: ikea_obegransad_led.stop_schedule
# Clear schedule
service: ikea_obegransad_led.clear_scheduleservice: ikea_obegransad_led.rotate_display
data:
direction: "right" # or "left"Save the current plugin as default:
service: ikea_obegransad_led.persist_pluginClear device storage:
service: ikea_obegransad_led.clear_storageRetrieve raw display data:
service: ikea_obegransad_led.get_display_dataMain control entity with attributes:
brightness: Current brightness (0-255)effect: Current active plugin/effecteffect_list: List of available pluginsrotation: Display rotation (0, 1, 2, 3 = 0°, 90°, 180°, 270°)persist_plugin: ID of persisted pluginschedule_active: Whether schedule is runningschedule: Array of schedule itemsrows: Display rows (16)cols: Display columns (16)status: Current device status
A binary sensor indicating if the plugin schedule is active:
- State:
onwhen schedule is running,offotherwise - Attributes:
schedule: Current schedule configurationschedule_count: Number of items in schedule
automation:
- alias: "Display Temperature Graph"
trigger:
- platform: time_pattern
minutes: "/15"
action:
- service: ikea_obegransad_led.send_message
data:
message: "Temp"
graph: >
{% set temps = state_attr('sensor.temperature_history', 'values') %}
{{ temps | join(',') }}
miny: 15
maxy: 30
repeat: 2automation:
- alias: "Night Effect Rotation"
trigger:
- platform: sun
event: sunset
action:
- service: ikea_obegransad_led.set_schedule
data:
schedule: '[{"pluginId": 5, "duration": 300}, {"pluginId": 8, "duration": 300}]'
- service: ikea_obegransad_led.start_scheduleautomation:
- alias: "Stop Schedule at Sunrise"
trigger:
- platform: sun
event: sunrise
action:
- service: ikea_obegransad_led.stop_scheduleThe integration mirrors the C++ firmware API:
GET /api/info- Device informationPATCH /api/plugin?id={id}- Set pluginPATCH /api/brightness?value={value}- Set brightnessGET /api/message?text=...- Send messageGET /api/removemessage?id={id}- Remove messagePOST /api/schedule- Set scheduleGET /api/schedule/start- Start scheduleGET /api/schedule/stop- Stop scheduleGET /api/schedule/clear- Clear scheduleGET /api/clearstorage- Clear storageGET /api/data- Get display data
WebSocket endpoint: ws://{host}/ws (planned for future releases)
- Verify the IP address/hostname is correct
- Ensure the device is on the same network
- Check that the firmware is properly flashed
- Verify your firmware has the required plugins
- Check the logs for any API errors
- Ensure the device is accessible via HTTP
- Verify the schedule JSON format is correct
- Check that plugin IDs exist on your device
- View the binary sensor state for schedule status
Any contributions you make are greatly appreciated. Please read CONTRIBUTING.md for details on the code of conduct and the process for submitting pull requests.
SemVer is used for versioning. For the versions available, see the tags on this repository.
- Luca Amoriello - @lucaam
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details