OhEzTouch - Simple wall mount touch display with ESP32

Hi,

about a year ago, I’ve discovered a simple and quite cheap wall mount touch display called ArduiTouch.

I’ve created a little project, which make it usable as a control device for OpenHAB. All elements are created dynamically from sitemaps.

Since it is very usable now, I’d like to share the project with you. :slight_smile:

GitHub Project

It is an on-going project. If you have any comments, suggestions or even code to submit, please let me know. I’m happy to hear from you.

Kind regards
Carsten

3 Likes

Very impressive and usable. I think i create two. One for my garage to control lights and music and the other to control the extractor hood in my kitchen.

Great project.

Wow really interested in this but I’ll have to wait until they get more stock… Wondering what the best way would be to power this on a wall. Guess it would need some channelling of some wires or something.

Rexz

Hey Carsten,

Had a play around with mine tonight. I am getting an error that its trying to access the sitemap via http://:/rest/sitemaps/oheztouch/oheztouch?type=json

I tried browsing to that via my browser and it fails. I can however receive JSON by removing the last bit (oheztouch?type=json). Is this based on an older openhab version? I did look in the src code and found where you are creating the url (curren_page) but my modifications just caused a blank screen.

Cheers
Rexz

Hi Rexz,

when your browser throws an error as well, than something might be wrong with you sitemap.

Is your sitemap showing up when you try to open
http://YOURSERVER:8080/basicui/app
in your browser?

One common issue: make sure the first line in your oheztouch.sitemap is sitemap oheztouch label="something" - the sitemap name has to match the filename.

Please take a look at the openhab logs when you touch your sitemap file and make sure, no error occurs when openhab reloads the file.

I’m on OpenHAB 2.5.11. I haven’t tested OpenHAB 3 yet.

Kind regards
Carsten

That was it! Thanks! Now I have another problem. My display touch is like flipped and mirrored to the actual screen layout. Not sure what problem that is.

Rexz

—EDIT----

Turns out it just needed the flip set to 1 for ArduiTouchMOD in the platformio.ini.
My new issue which you might have seen is my wifi keep disconnecting and reconnecting on the device. It seems to happen every few minutes. Any idea?

Rexz

Hey Rexz,

what kind of ArduiTouch do you have?
The ArduiTouchMOD one with SMD parts on it? 2.4" or 2.8" display?

I have an ArduiTouchMOD with 2.8" and multiple ArduiTouch with 2.4". The only difference between them regarding the firmware is the flipped touch input. I have an idea - and maybe I was wrong by distinguishing between MOD and not MOD and the type of display is the source of the flip issue…

Regarding your WiFi problem, check the RSSI level. You can get details about your connection/wifi/etc by touching the status bar on the display.

Kind regards,
Carsten

Hey Carsten,

Thanks for the reply. I have the ArduiTouchMOD with the 2.4" screen. My RSSI is -42 dBm which I think is ok. I am doing some more experimenting as I found another issue with OH3. I was getting an error from openhab stating:

javax.ws.rs.WebApplicationException: HTTP 415 Unsupported Media Type

Other people were having problems using the API with some existing developed tools and their solution was to add a Content-Type of text/plain to the header as an easy fix so I went into the openhab_connector.cpp and added in http.addHeader("Content-Type", "text/plain"); to the item::publish() and Item::update() functions. Seems to be happy now with switches. The next issue I have is as soon as I link an item to a slider the esp32 seems to reset when I go into that menu with the slider in it (exactly like when it auto resets itself every few minutes). I’m wondering if they are linked in someway.

Is there any way to debug the serial via wifi or something? I can’t debug the screen if I disconnect the ESP32 from the arduitouch and connect it to USB.

----------------EDIT---------------------

Ok I didn’t realise connecting solely via USB would power the whole thing… oops. When I enter the menu with a slider I get a panic and the whole thing reboots. This is the error:

[AC] http server started
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x400edb13  PS      : 0x00060c30  A0      : 0x800edc61  A1      : 0x3ffb1d30
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x3ffb1e51  A5      : 0x0000000c  
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x00000000  A9      : 0xffffffff  
A10     : 0x00000073  A11     : 0x0000002b  A12     : 0x00000004  A13     : 0x0000002d
A14     : 0x00000002  A15     : 0x00000030  SAR     : 0x00000016  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff

Backtrace: 0x400edb13:0x3ffb1d30 0x400edc5e:0x3ffb1da0 0x400e8dda:0x3ffb1dd0 0x400dd3fd:0x3ffb1e30 0x400deb8e:0x3ffb1e80 0x400dec91:0x3ffb1ed0 0x400d908a:0x3ffb1f30 0x4010a6a5:0x3ffb1fb0 0x4008ab55:0x3ffb1fd0

Rebooting...

Any Idea what this could be? The sitemap is simply a dumbed down version of yours:

sitemap oheztouch label="ArduiTouch KE WS2"
{
    Switch item=ff_bedroom3_ledstrip_power
    Text label="LED Light" icon="colorlight"
    {
        Slider item=ff_bedroom3_ledstrip_brightness label="Geschwindigkeit" minValue=0 maxValue=100 step=5 
    }
}

Rexz

Hey Rexz,

thank you very much for the information. I’m very sorry, you have trouble with compatibility issues with OH3 and burned some time. :frowning:

The reboot are caused by a recovery mechanism, which tries to reconnect if items can not be updated for a while. You can disable it temporarily. Search for “ESP.restart()” in openhab_ui.cpp and comment out that line.

I haven’t tested OhEzTouch with OH3 yet. But I’m installing it on a test machine right now and will try to get everything working this weekend.

Kind regards,
Carsten

Hey Carsten, It’s all good! I’m enjoying getting it working actually! I shall have a look at ESP.restart(). I found out that that restart was created from ‘dumb’ items I had in the sitemap originally so I don’t have that issue anymore. Did you see the crash log from above? That is from the slider in a sub menu… not sure how I will debug that one.

Rexz

Ok so a little feedback on my crash. It may be down to the item being a dimmer. I noticed in your updated readme you had added in some items and noticed your slider was set to a Number item not dimmer.

Another thing I need to look into the code is to change the step label to a floating number to allow for a decimal place. I did try a couple of things but neither worked.

Another thing I have done is create a python script to add in the build_flag for the git revision. Your !echo would not let me build on windows unfortunately.

Sam

I have tagged a new release which fixes the following issues:

  • fix crash with dimmer items
  • add content type text/plain to http post request (for OH3)
  • rename ArduiTouchMOD to ArduiTouch28 and fix description

Rexz, to have floating values set the conversion in the item.

Example:

Number OHEZTOUCH_Number     "Number [%0.1f sec]"   <time>

Thanks Carsten

  • fix crash with dimmer items

Unfortunately this doesn’t fix the crash with dimmer items. I looked through the connector and there doesn’t seem to be any handling of the dimmer item, only:

enum ItemType
{
    type_number,
    type_text,
    type_selection,
    type_unknown
};

Do you want me to add an issue to show you a change I made to allow compiling on windows?

Rexz

Hey Rexz,
please double check. Without the patch I can reproduce your issue. With the fix applied, the dimmer items are working fine so far.

I’m going to remove the git hash from the build since it is just for information in the debug output and has no further usage. I don’t want to raise a python dependency only for that on Windows.

Please send me an eMail for in detail discussion about your specific issue with the dimmer item.

Thanks, Carsten

I have talked to https://www.az-delivery.de/ and they expect to have devices in stock within the next 2 weeks. Anyways, if you have any device with an ESP32 and a touch display which is suitable for OhEzTouch, please let me know.
Thanks Carsten

I found that they had stock on Amazon but not on their website when I ordered. No idea why.

Rexz

Hi, I’m currently playing with OhEzTouch and want to control my squeezebox player with it. I can make basic things working like power, control, volume etc. but my favorite list does not work. When I look at the sitemap in the browser the items are there but not on the OhEzTouch.
Also would it be possible to show the coverart as well?

Thanks,
Michael