openHASP: An MQTT driven Touchscreen / Scene controller

Yes, just like any other gpio setting.

I see, I guess that can indeed be useful to control other HA entities external to the plate.

You can add additional sensors and libraries using the custom code hooks in the firmware.

1 Like

My use case would be a volume control on the side of a media controller. I love openhasp, but I donā€™t like any form of on screen sliders. Iā€™d prefer to dial a knob and see the effect represented on a UI.

I think this would/should be handled like any gpio button or switch

rotary encoder -gpio-> openhasp -mqtt->home assistant -mqtt-> openhasp ā†’ screen

1 Like

Have look at the custom code example as to how to achieve this.

FYI the WirelessTag Circular display is now available to order samples Iā€™m told, Seriously thinking of getting one but the shape of the display and the physical rotating interface will take some work to get going

2 Likes

Goodmorning,

I already pointed at this device in the past (somewhere up this subject). But I understood that the big problem is that there is no touch screen making implementation of LVGL and openHASP very difficult.

But I am curious to see workarounds for this. This device looks like the perfect controller for me.

Gr. Remco

I donā€™t think that would necessarily a barrier. You get a screen with two inputs - the circular position and the press.

Interesting. This page has a video showing a device being used via touch. Or so it seems. Wt-0-s2-240mw1 2.4" 2.4 Inch Rotary Switch Knob Round Touch Screen Lcd Display 320*240 Based On Esp32 Module For Iot Solution - Buy 2.4" Lcd,2.4 Inch Lcd Display,2.4 Inch Lcd Screen Display Product on Alibaba.com

EDIT: Having watched the video a few more times I am not convinced I was right about it being a touch screen. I think the operator is just touching the screen in the middle rather than at the edge.

If there are some details about the actual hardware being used that would be niceā€¦

This is found on the Alibaba site:

Rotary switch screen is Using ESP32-S2 module, XTENSA Ā® 32-bit LX7 single-core processor, the main frequency up to 240MHz, external Flash and off-chip RAM can support up to 1 GB each. S2 module integrates 43 GPIO ports, which has a great advantage over the 34 GPIO ports of ESP32, so there is no need to worry about the lack of IO ports.Use 2.4 inch color screen, resolution 320 times 240 (RGB interface), color depth 262K, interface using 3 SPI + 18 RGB The module comes with WiFi function, so it can be upgraded remotely by OTA, which is easy to upgrade and optimize.

Looks like @nickrout is right - the device isnā€™t a touch screen as such, just a single button. In the video a short press launches the selected item, a long press goes back a level. It doesnā€™t appear to matter where the screen is touched.

This may mean that - depending on the hardware - you could simply drive it with ESPHome. But Iā€™m getting off topic - I would also like something like this supported by OpenHASP.

The beauty about openhasp is the ease of creating a gui.

1 Like

One has been ordered :slight_smile:

EDIT bugger I seem to have run into the Lunar New Year. Such is life!

1 Like

Hi guys, I have installed the latest 0.6.2 FW on my WT32-SC01 and I cannot get MQTT to work, this is what it logs:

e[1000De[9Ce[1000De[0Ke[96m[08:58:20.128]e[92m[110440/110964  0]e[92m[41300/41324  1]e[97m MQTT: plate_fde810e[0m
13:58:20.445 -> e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[08:58:21.256]e[92m[107004/109904  2]e[92m[41300/41324  1]e[93m MQTT: Unauthorizede[0m
13:58:21.565 -> e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[08:58:25.116]e[92m[110340/110924  0]e[92m[41300/41324  1]e[37m MQTT: Disconnected from broker, reconnection...e[0m
13:58:25.416 -> e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[08:58:25.131]e[92m[110340/110864  0]e[92m[41300/41324  1]e[97m MQTT: plate_fde810e[0m
13:58:25.463 -> e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[08:58:26.998]e[92m[109608/110020  0]e[92m[41300/41324  1]e[93m MQTT: Unauthorizede[0m
13:58:27.316 -> e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[08:58:30.112]e[92m[110240/110824  0]e[92m[41300/41324  1]e[37m MQTT: Disconnected from broker, reconnection...e[0m
13:58:30.419 -> e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[08:58:30.127]e[92m[110240/110764  0]e[92m[41300/41324  1]e[97m MQTT: plate_fde810e[0m
13:58:30.419 -> e[1000De[0KPrompt > e[1000De[9Ce[1000De[0Ke[96m[08:58:31.274]e[92m[107400/109704  2]e[92m[41300/41324  1]e[93m MQTT: Unauthorizede[0m

And this is that HA mqtt broker is logging:

1643810520: New connection from 192.168.0.198 on port 1883.
1643810520: Socket error on client <unknown>, disconnecting.
1643810525: New connection from 192.168.0.198 on port 1883.
1643810525: Socket error on client <unknown>, disconnecting.

All mqtt details are correct and verified as working with MQTT explorer and other mqtt devices which work ok.
image

Using the Home Assistant MQTT device broker and these are the settings:

logins: []
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Any ideas why it still says unauthorized?

If you are using the mosquitto addon the mqtt user cannot be homeassistant or user.

1 Like

Thatā€™s a strange limitation on the username, I wonder why.
So need to create a new user under logins: []?
If I do that will that remove the homeassistant one unless I put it inside there also?

No, you set up a user in home assistant itself. I set up one called mosquitto and set a password. That user can not only log in to Home Assistant, but also to the mqtt server (the recommended though is to use that user only for mqtt).

Also, you can try setting the credential using the command line:

mqtthost 192.168.0.123
mqttport 1883
mqttuser myUsername
mqttpass myPassword
reboot

I thought I saw this referred to before but damned if I can find it in the thread.

Is there a drag and drop UI for creating json or jsonl files? You know, drag and drop a few icons about and create beautiful UI, rather than calculating co-ordinates and hand writing jsonl?

I am aware of tools like squareline and walv, but they create C or python files, which arenā€™t much use. (Or they might be if I knew how to turn them into jsonl!)

I only know of this effort, which is still under very early development.
Please check out that project and contribute where possible.