openHASP: An MQTT driven Touchscreen / Scene controller

Typically this forum is good. But I’m not sure whether it’s the best for openHASP questions.
You could also start here: OpenHASP

1 Like

Ask away. There are plenty of lanbon users.

1 Like

I have been trying to flash the Adafruit ESP32-S3 Feather for a couple of days and am getting a message “this ESP-S3 is not Supported” not that I was able to use the web installer, but it is listed in the Docs. The module is ESP-32-S3-Mini-1.
Am I doing something wrong or do I need a different ESP32? I tried 6.3 and 7.0. Flashing the Full bin gives me a boot loop.
Thanks!

Hi, I don’t own this hardware combination myself. This configuration is user-contributed, so if these binaries don’t work it will require some tweaking and compilation of the firmware locally…

Okay, I will work on that one. I did get the WSESP32-S3-Touch-4.3 working so I have that one to work with for now.

1 Like

Can I change the background color of a label object?

{
  "comment":"----- Dexcom Value",
  "page":1,"id":1,
  "obj":"label",
  "bg_color": "blue",
  "x":10,"y":0,"w":240,"h":40,
  "text":"p1b1","align":0,"text_color":"#FFFFFF"
}

But the background is still black.

Try adding

{
  "comment":"----- Dexcom Value",
  "page":1,"id":1,
  "obj":"label",
  "bg_color": "blue",
  "bg_opa":255,
  "x":10,"y":0,"w":240,"h":40,
  "text":"p1b1","align":0,"text_color":"#FFFFFF"
}
1 Like

Thanks. I did not realize that the background opacity level defaults to zero…
The docs don’t mention this.

SOLVED
I am using the background color of my labels to fine-tune the w: and h parameters of my labels, but, nothing I do with w: and h:, even leave them out of the configuration, nothing on the screen changes:

I am leaving the post up as a lesson to other newbies…

I accidentally had two “page”:1,“id”:1, lines. The second was supposed to be “id”:11

Oops.

Hello all, I’m trying to flash several Lanbon L8 plates with openHASP & am following Cameron Gray’s video guide.

I’m using Windows 10, have installed esptool and finally got it to run using the command:
python -m esptool
(all the commands I tried from numerous guides came back as: “‘esptool.py’ is not recognized as an internal or external command,operable program or batch file” so it took days to get this far!!)

This is what it outputs when it starts up:

However, when I plug in the L8 plate via a UART adaptor, I dont get debugging info, either in normal or flashing mode. I’ve triple checked my connections, but nothing shows up.

Is there an extra command I need to type once I’ve started esptool? I can’t see one being entered in the tutorial.

Many thanks in advance :sunglasses:

Hi,
I have a WT-32 SC01 that i’ve used with firmware v0.6x for a couple of months.
Today I wanted to upgrade both firmware and the OpenHASP integration to v0.7x. So, I installed firmware v0.7.0-rc12 and OpenHASP HA integration/component v0.7.2. I did a clean install of the firmware.
The plate in itself works great, but when I try to load a pages.json (via the HA integration) i get the following error:

Exception in lwt_message_received when handling msg on 'hasp/kitchen_large/LWT': 'online' Traceback (most recent call last): File "/config/custom_components/openhasp/__init__.py", line 479, in lwt_message_received await self.async_load_page(self._pages_jsonl) File "/config/custom_components/openhasp/__init__.py", line 658, in async_load_page json_data = json.load(pages_file) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/__init__.py", line 293, in load return loads(fp.read(), ^^^^^^^ AttributeError: 'str' object has no attribute 'read'

I’ve tried to make a very basic pages.json and get the same error. However, if I load that file directly using the units web interface (pages.jsonl). What can be the problem?

EDIT: I manage to solve it by renaming the file to pages.jsonl (and pointing the integration to it instead). But, only a few of the elements that I had earlier is showing. If I put the same config in pages.jsonl directly on the device, it works as it should.

The issue with the custom component can be tracked here on GitHub.

Ok, I see. Thank you.

Love OPENHASP

2 Likes

Learning to use widgets…
Here is my configuration for testing the Gauge widget. In the screenshot that follows there is a blue tic at 80. Any guesses why?

{
"comment":" ----------------------- Page 4 - Gauge Demo  ------------------------"
}
{
"comment":"Page 4 title",
"page":4,
"id": 1,
"obj":"label",
"x":5,
"y":5,
"h":35,
"w":480,
"text":"Gauge Demo",
"align":0,
"text_color":"#FFFFFF",
"text_font":30
}
{
"page":4,
"id":2,
"obj":"gauge",
"x":20,
"y":70,
"w":300,
"h":300,
"min":0,
"max":100,
"val":50,
"critical_value":90,
"angle":270
}

I think your blue tick at 80 is down to the critical_value being 90, and the tick at 80 is the nearest major one.
One of two solutions spring to mind:
Add “line_color”:“cyan” to the guage (colours all the major ticks cyan), or:
Add “label_count”:11 - This increases major ticks to 10s rather than the 20s you currently have.

There could well be an undocumented style option that I’m not aware of…

cyan_tick
11_tick

1 Like

Thanks. Both solutions work.

Hi all,

Got my first plate up and running this weekend, I have got stuck on one section of my design, I want a “are you sure warning” after a particular button is pressed, currently the button just carried out the action immediately.

I have tested and can publish a msgbox using jsonl from home assistant and it has two options, currently when either option is picked the msgbox closes. I have tried adding lines to my yaml config to listen for an update event of the message box object and then look for a value of 1, but I have had no luck.

I cannot find any documentation for how to use the options within a msgbox to trigger actions, could anyone point me in the right direction, or if you have something similar working share the code, so I can reverse engineer?

Thanks in advance!

I’m also dealing with my guition lcd. After frist trying esphome i switched to openhasp, since i find it easier to understand and program (for my basic needs) - esphome is too complicated for me (for now…).
What i can’t find though is: guition have 3 built-in relays, so how can i activate internal relay for set period, say half a second? I’ll be using my guition for cover control, so i programmed two buttons which activate “up” and. “down” relays (button activates relay group 1 or 2), but only as long as i keep lcd button presses. So, if i press and release it too quickly cover won’t move, because signal will be too short.

I’d like to solve this internally, without HA automation, so if Ha goes down i can still move my cover.

My command for relay 1:

{“id":1,“obj”:“btn”,“x”:0,“y”:0,“w”:150,“h”:150,“toggle”:false,“text”:“\uF11E”,“text_font”:120,“mode”:“break”,“align”:1,“groupid”:1}

This should help, although the original poster was using spook for random messages because you can (?). Lots of good examples in discussions on GitHub page.

Using spook random input.Select service it's easy to add random popup messages


trigger:
  - platform: time_pattern
    seconds: "2"
    hours: /1
condition: []
action:
  - service: input_select.random
    metadata: {}
    data: {}
    target:
      entity_id: input_select.love_notes
  - service: mqtt.publish
    data:
      qos: 0
      topic: hasp/plates/command/jsonl
      payload: >-
        {"page":0,"id":75,"obj":"msgbox","bg_color":"white","text_color":"Red","text":"
        {{ states("input_select.love_notes") }} ","options":["Close"]}
  - type: turn_on
    device_id: 23afc290179d4e3298cf60c1dd840683
    entity_id: light.desk_backlight
    domain: light
    brightness_pct: 100
  - type: turn_on
    device_id: 88b53314416b4ce885e73c349b11de1b
    entity_id: bd94ccdbb0517bfc7b0a9a3ac5cb0981
    domain: light
    brightness_pct: 100
mode: single

Better description and YAML examples