From 7a6b493b45d9eceffe618061ec3b85c374160208 Mon Sep 17 00:00:00 2001 From: Sascha Seidel Date: Mon, 30 Oct 2023 22:30:28 +0100 Subject: [PATCH 1/8] Update display.py --- components/obegraensad_panel/display.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/obegraensad_panel/display.py b/components/obegraensad_panel/display.py index 50593e8..763562a 100644 --- a/components/obegraensad_panel/display.py +++ b/components/obegraensad_panel/display.py @@ -49,6 +49,6 @@ async def to_code(config): if CONF_LAMBDA in config: lambda_ = await cg.process_lambda( - config[CONF_LAMBDA], [(display.DisplayBufferRef, "it")], return_type=cg.void + config[CONF_LAMBDA], [(display.DisplayRef, "it")], return_type=cg.void ) cg.add(var.set_writer(lambda_)) From d144efdba07c7ac6c001cbbbead9235198d18708 Mon Sep 17 00:00:00 2001 From: Sascha Seidel Date: Mon, 30 Oct 2023 22:30:42 +0100 Subject: [PATCH 2/8] Update display.py --- components/frekvens_panel/display.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/frekvens_panel/display.py b/components/frekvens_panel/display.py index 7afec82..65f686b 100644 --- a/components/frekvens_panel/display.py +++ b/components/frekvens_panel/display.py @@ -49,6 +49,6 @@ async def to_code(config): if CONF_LAMBDA in config: lambda_ = await cg.process_lambda( - config[CONF_LAMBDA], [(display.DisplayBufferRef, "it")], return_type=cg.void + config[CONF_LAMBDA], [(display.DisplayRef, "it")], return_type=cg.void ) cg.add(var.set_writer(lambda_)) From aaf879927c2f7b5e704baaa4cb33dcb2f97944ce Mon Sep 17 00:00:00 2001 From: Sascha Seidel Date: Mon, 6 Nov 2023 00:06:05 +0100 Subject: [PATCH 3/8] Update README.md --- README.md | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index af21fe8..84668c5 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,22 @@ -# esphome IKEA LED matrix components for Frekvens & Obegränsad +# ESPHome IKEA LED matrix components for Frekvens & Obegränsad +Both Frekvens and Obegränsad are 16 by 16 LED Matrixes from IKEA and they are Hackable for Usage with HomeAssistant / ESPHome. +This Repository is a custom component for ESPHome to interface these two Matrixes. -A custom component for esphome to interface with IKEA's Frekvens Cube and Obegränsad panel. +❗❗❗TODO❗❗❗ I will create a custom PCB for both Frekvens Cube and Obegränsad Panel that you can build yourself for a sleek integration. ❗❗❗TODO❗❗❗ -## Sources +## Wiring -This repo is heavily based on the original [FrekvensPanel library by @frumperino](https://github.com/frumperino/FrekvensPanel). +You have to wire your ESP32 or ESP8266 according to this Schematics. -It's also inspired from the esphome component PCD8544. +### Frekvens -## Usage +❗❗❗TODO❗❗❗ -Currently there is a dependency upon Adafruit GFX library. In your esphome config, add these lines: +### Obegränsad -- Declare necessary libraries -- Define frekvenspanel component +❗❗❗TODO❗❗❗ -```yaml - lib_deps: - - Wire # Also required by GFX. - - SPI # Also required by GFX. - - adafruit/Adafruit BusIO # Required by GFX Library. - - adafruit/Adafruit GFX Library # Required for FrekvensPanel. - - me-no-dev/ESPAsyncTCP -``` +## Software Here is a short config to demonstrate the usage to display time on Frekvens and Obegränsad: @@ -135,9 +129,3 @@ display: it.strftime(4, 8, id(b03), "%M", id(ntp_time).now()); ``` - -## License -[TBD] the original library does not specify the license. This repo is consecutively not licensed yet either. - -## Credits -Thanks to @speckij \ No newline at end of file From 69181c645584ab5d248766a6969db3eaa64183b7 Mon Sep 17 00:00:00 2001 From: Sascha Seidel Date: Mon, 6 Nov 2023 00:07:00 +0100 Subject: [PATCH 4/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 84668c5..9fd3033 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Both Frekvens and Obegränsad are 16 by 16 LED Matrixes from IKEA and they are Hackable for Usage with HomeAssistant / ESPHome. This Repository is a custom component for ESPHome to interface these two Matrixes. -❗❗❗TODO❗❗❗ I will create a custom PCB for both Frekvens Cube and Obegränsad Panel that you can build yourself for a sleek integration. ❗❗❗TODO❗❗❗ +I will create a custom PCB for both Frekvens Cube and Obegränsad Panel that you can build yourself for a sleek integration. ❗❗❗TODO❗❗❗ ## Wiring From a2301fdf870b51d6d7904a1cdd5b3f615e6c3251 Mon Sep 17 00:00:00 2001 From: Sascha Seidel Date: Mon, 6 Nov 2023 00:07:22 +0100 Subject: [PATCH 5/8] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9fd3033..816f253 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # ESPHome IKEA LED matrix components for Frekvens & Obegränsad Both Frekvens and Obegränsad are 16 by 16 LED Matrixes from IKEA and they are Hackable for Usage with HomeAssistant / ESPHome. + This Repository is a custom component for ESPHome to interface these two Matrixes. I will create a custom PCB for both Frekvens Cube and Obegränsad Panel that you can build yourself for a sleek integration. ❗❗❗TODO❗❗❗ From 650f00ff92b36d7f50a102409de99700308cb8bc Mon Sep 17 00:00:00 2001 From: Markus Langer Date: Wed, 27 Dec 2023 23:13:36 +0100 Subject: [PATCH 6/8] update 2023.12. --- components/obegraensad_panel/display.py | 4 +++- components/obegraensad_panel/obegraensad-panel.h | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/components/obegraensad_panel/display.py b/components/obegraensad_panel/display.py index 763562a..a5cf5be 100644 --- a/components/obegraensad_panel/display.py +++ b/components/obegraensad_panel/display.py @@ -7,6 +7,7 @@ CONF_PAGES, CONF_CONTRAST, ) +from esphome.const import __version__ as ESPHOME_VERSION DEPENDENCIES = [] @@ -38,7 +39,8 @@ async def to_code(config): var = cg.new_Pvariable(config[CONF_ID]) - await cg.register_component(var, config) + if cv.Version.parse(ESPHOME_VERSION) < cv.Version.parse("2023.12.0"): + await cg.register_component(var, config) await display.register_display(var, config) cg.add(var.set_pins( diff --git a/components/obegraensad_panel/obegraensad-panel.h b/components/obegraensad_panel/obegraensad-panel.h index 741549c..5920517 100644 --- a/components/obegraensad_panel/obegraensad-panel.h +++ b/components/obegraensad_panel/obegraensad-panel.h @@ -1,5 +1,7 @@ #pragma once +#include "esphome/core/defines.h" +#include "esphome/core/version.h" #include "esphome/core/component.h" #include "esphome/components/display/display_buffer.h" @@ -9,8 +11,11 @@ namespace esphome { namespace obegraensadpanel { -class Panel : public PollingComponent, - public display::DisplayBuffer { +#if ESPHOME_VERSION_CODE >= VERSION_CODE(2023, 12, 0) +class Panel : public display::DisplayBuffer { +#else +class Panel : public PollingComponent, public display::DisplayBuffer { +#endif // VERSION_CODE(2023, 12, 0) public: int p_latch; int p_clock; @@ -23,7 +28,7 @@ class Panel : public PollingComponent, } float get_setup_priority() const override { return setup_priority::PROCESSOR; } - + display::DisplayType get_display_type() override { return display::DisplayType::DISPLAY_TYPE_BINARY; } void data(uint8_t value); From c8d94e02e5a17e32eb7fec960496cfcae0d5ccb5 Mon Sep 17 00:00:00 2001 From: Sascha Seidel Date: Tue, 2 Jan 2024 06:11:20 +0100 Subject: [PATCH 7/8] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 816f253..10bb5ee 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ esphome: - me-no-dev/ESPAsyncTCP external_components: - - source: github://phiten/esphome-ikea-led-matrix@master + - source: github://sascha-hemi/esphome-ikea-led-matrix@master components: [ frekvens_panel ] light: @@ -91,7 +91,7 @@ esphome: - me-no-dev/ESPAsyncTCP external_components: - - source: github://phiten/esphome-ikea-led-matrix@master + - source: github://saschahemi/esphome-ikea-led-matrix@master components: [ obegraensad_panel ] light: From 9b4677404ce10686be0503b110b045fceecd6b9d Mon Sep 17 00:00:00 2001 From: Sascha Seidel Date: Tue, 2 Jan 2024 06:13:28 +0100 Subject: [PATCH 8/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10bb5ee..a2d80f5 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ esphome: - me-no-dev/ESPAsyncTCP external_components: - - source: github://saschahemi/esphome-ikea-led-matrix@master + - source: github://sascha-hemi/esphome-ikea-led-matrix@master components: [ obegraensad_panel ] light: