openHASP: An MQTT driven Touchscreen / Scene controller

All I get is a white screen. When I look at the logs and compare to what you have above, I am missing one, TFT_BCKL=32? Any thoughts?

e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       5.971]e[91m[65524/189052 65]e[91m[    0/    0  0]e[37m TFT : Starting...e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       6.110]e[91m[65524/189052 65]e[91m[    0/    0  0]e[96m GUI : Backlight  : Pin not sete[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       6.559]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : Rotation   : 0e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       6.701]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : Invert Disp: Noe[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       6.878]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : TFT_eSPI   : v2.3.81e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       7.026]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : Transactns : Yese[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       7.169]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : Interface  : SPIe[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       7.313]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : Driver     : ILI9341e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       7.461]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : Resolution : 240x320e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       7.609]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : MOSI       : 23 (GPIO 23)e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       7.763]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : MISO       : 19 (GPIO 19)e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       7.916]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : SCLK       : 18 (GPIO 18)e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       8.069]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : TFT_CS     : 14 (GPIO 14)e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       8.222]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : TFT_DC     : 27 (GPIO 27)e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       8.376]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : TFT_RST    : 33 (GPIO 33)e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       8.529]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : TOUCH_CS   : 12 (GPIO 12)e[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       8.682]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : Display SPI freq. : 40.0 MHze[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       8.838]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : Touch SPI freq.   : 2.5 MHze[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       8.994]e[91m[65524/188832 65]e[91m[    0/    0  0]e[96m TFT : DMA        : Disablede[0m
e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       9.143]e[91m[65524/188832 65]e[91m[    0/    0  0]e[97m TFT : Startede[0m

I added pin 32 in the display config as the backlight and i now see this in the log, however the panel just locks up. Is there anything physically I need to do to the board to enable the backlight on 32?

e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[       5.995]e[91m[65524/189052 65]e[91m[    0/    0  0]e[96m GUI : Backlight  : Pin 32e[0m

I have added the firmware lolin-d32-pro_ili9341_full_16MB_v0.6.2.bin to the pre-compiled binaries of the v0.6.2 release. If you upload this firmware to your device the screen should work out of the box.

Thanks, I will give that a shot.

1 Like

I am trying to use the messagebox object.
Can someone share their integration of messagebox with home assistant.

I had integrated lights and sensors successfully, still struggling with the mesaagebox.

Purpose of using message box:

Scenario 1: need to have a confirmation message displayed when i press a certain button on the screen.

When confirm button is pressed it fires an action to home assistant. Maybe turns on a switch.

Scenario2: when an alram is triggered in Home assistant, message box appears on the screen as a warning, confirmation button needs to be pressed to initiate clear alarm action.

Any chance that a SSD1963 based screens will work? I do see some reference in the lvgl source, but nothing definitive. Here is an example (it is 7 inches, which is the attraction as far as I am concerned.) 7" 7 inch 800x480 TFT LCD Display Touch Screen Module SSD1963 LCD controller For Arduino AVR STM32 ARM MCU 800*480 800 480|Instrument Parts & Accessories| - AliExpress

I think you’ll need to use the HA custom integration, and do the automations in HA. You could create the msgbox via a jsonl command over mqtt, then set it to hidden to make it disappear. Or switch to a page that has the msgbox, then back again after you click disable.

Any chance that a SSD1963 based screens will work? I do see some reference in the lvgl source, but nothing definitive.

As long as there’s a driver for it, it should work. Both TFT_eSPI and LovyanGFX seem to have configuration options for SSD1963 panels. But to have a definitive answer you would have to test it proper.

I’m quite bad at HA integrations myself, but you will need to check the {{ val }} or {{ text }} that is sent in the up event. Similar to this button matrix example:

      - obj: "p1b24"
        event:
          "up":
            - service: >
                {% if val == 0 %}     # First button pressed
                climate.turn_on
                {%-elif val == 1 %}   # Second button pressed
                climate.turn_off
                {%-elif val == -1 %}  # Msgbox contents pressed
                # ignored
                {% endif %}
              target:
                entity_id: "climate.thermostat_1"

I have not tested this to confirm, but I think that should point you in the right direction.

I have issue on Unicode, I make a label in Unicode : “Chiếu điểm” actually I got just “Chiêu iêm”. Mean I lost “Đ”, “ế, ể”.
image

I believe these letters belong to the Vietnamese character set, which we currently don’t support in full.
I’ve added a reply in Github discussions on how the go forward with adding support for Vietnamese.

1 Like

Thanks. I shall try this

Fan and scent diffuser


Animated fan icon example at:
https://haswitchplate.github.io/openHASP-docs/0.6.2/integrations/home-assistant/sampl_conf/#fan-and-scent-diffuser

1 Like

First a big thanks for this project - I had 4 spare FreeTouchDeck circuit boards and matching screens sitting around and was wondering about how I could integrate them into my HA setup.

I seem to be missing something with the file editor though. I can delete files, create files, upload and download files but for the life of me how do you EDIT files??? I can make changes to a file chosen in the editor, but how do I save those changes?

Just type Ctrl-S or Cmnd-S on a Mac to save the file to flash.

1 Like

Lol! You know I was actually going to try that - but I thought: “no - why would they just not have a save button?”.

Thanks.

I wonder how difficult it would be to add a rotary encoder to the GPIO options. A clickable knob would be great for navigation and contextual stuff like changing volume or temperature

1 Like

I think it would need to be added to the source, but it is a pretty simple library. I agree it would be great.

EDIT: Espressif ESP32 WROVER E KIT 4.1 · Discussion #219 · HASwitchPlate/openHASP · GitHub

It is possible but you will have to add a rotary encoder driver in LVGL to use it.

1 Like

I think he means adding it independently of LVGL. Just forward the rotary encoder events via MQTT.

1 Like