openHASP
openHASP copied to clipboard
Guition ESP32-S3-4848S040 Display wakes-up randomly
Perform all steps below and tick them with [x]
- [x] Check the related part of the Documentation
- [x] Update openHASP to the latest version
- [x] Reproduce the issue and describe all steps
Describe the bug
To Reproduce
Install latest beta firmware 7.0 rc11 (Guition ESP32-S3-4848S040)
Expected behavior
The display can not wake up
Screenshots or video
Get this code on console, when the display are wake up:
#[22:50:34.205][98292/109668 10][25324/26056 3] HASP: First touch Disabled
#[22:50:34.219][94196/106476 11][25324/26056 3] MQTT PUB: backlight => {"state":"on","brightness":255}
#[22:50:34.231][90100/106488 15][25324/26056 3] MQTT PUB: idle => off
#[22:50:34.244][90100/104904 14][25324/26056 3] MSGR: File not found: L:/idle_off.cmd
#[22:50:34.272][98292/109556 10][25324/26056 3] MQTT RCV: = backlight {"state": "on", "brightness": 255}
#[22:50:34.285][94196/107960 12][25324/26056 3] MSGR: backlight={"state": "on", "brightness": 255}
#[22:50:34.300][94196/107960 12][25324/26056 3] MQTT PUB: backlight => {"state":"on","brightness":255}
hmm it does not depend on discovery...
I get this, if the display are wakeing up.
#[22:50:34.205][98292/109668 10][25324/26056 3] HASP: First touch Disabled
#[22:50:34.219][94196/106476 11][25324/26056 3] MQTT PUB: backlight => {"state":"on","brightness":255}
#[22:50:34.231][90100/106488 15][25324/26056 3] MQTT PUB: idle => off
#[22:50:34.244][90100/104904 14][25324/26056 3] MSGR: File not found: L:/idle_off.cmd
#[22:50:34.272][98292/109556 10][25324/26056 3] MQTT RCV: = backlight {"state": "on", "brightness": 255}
#[22:50:34.285][94196/107960 12][25324/26056 3] MSGR: backlight={"state": "on", "brightness": 255}
#[22:50:34.300][94196/107960 12][25324/26056 3] MQTT PUB: backlight => {"state":"on","brightness":255}
Possible that some problem with touch panel?
Strange thing... it only happen, if i power it my display via 230V... if i use USB type C port, the problem not happen more than one hour...
I have that screen running on 240V and do not see this problem, how often does it wake up ?
@smcgann99
I did more test and seems maybe not the 230V the problem...
sometimes happen about 5-10 min, sometimes not happen hours... I dont understand... Seems happen more time, if for example the sun is shine directly to the screen... but it only just a idea...
This doesn't really sound like a bug to me. Do you have the complete log prior to the screen idle off, perhaps something is being sent to the screen ?
@smcgann99
Hello sorry the late answer.
Here:
#[20:08:00.000][102388/111876 8][25364/26012 3] MQTT RCV: p0b3.text = 20:08
#[20:08:59.990][102388/111876 8][25364/26012 3] MQTT RCV: p0b3.text = 20:09
#[20:09:38.479][98292/110356 10][25364/26012 3] MQTT PUB: statusupdate => {"node":"nappali_uj","idle":"long","version":"0.7.0-rc12","uptime":37576,"ssid":"iot_network","rssi":-63,"ip":"192.168.31.162","mac":"80:65:99:C8:8D:40","heapFree":111940,"heapFrag":8,"core":"4.4.6","canUpdate":"false","page":1,"numPages":12,"tftDriver":"Other","tftWidth":480,"tftHeight":480}
#[20:09:38.498][102388/111940 8][25364/26012 3] MQTT PUB: sensors => {"time":"2024-04-21T20:09:38","uptimeSec":37576,"uptime":"0T10:26:16"}
#[20:09:47.082][102388/111940 8][25364/26012 3] HASP: First touch Disabled
#[20:09:47.096][98292/108772 9][25364/26012 3] MQTT PUB: backlight => {"state":"on","brightness":255}
#[20:09:47.108][94196/108768 13][25364/26012 3] MQTT PUB: idle => off
#[20:09:47.121][94196/107184 12][25364/26012 3] MSGR: File not found: L:/idle_off.cmd
#[20:09:47.150][102388/111816 8][25364/26012 3] MQTT RCV: = backlight {"state": "on", "brightness": 255}
#[20:09:47.163][98292/110228 10][25364/26012 3] MSGR: backlight={"state": "on", "brightness": 255}
#[20:09:47.178][98292/110228 10][25364/26012 3] MQTT PUB: backlight => {"state":"on","brightness":255}
#[20:09:59.989][102388/111876 8][25364/26012 3] MQTT RCV: p0b3.text = 20:10
#[20:10:04.515][98292/110356 10][25364/26012 3] MQTT PUB: discovery => {"node":"nappali_uj","mdl":"1-S3 4848S040","mf":"openHASP","hwid":"806599c88d40","pages":12,"sw":"0.7.0-rc12","node_t":"hasp/nappali_uj/","uri":"http://192.168.31.162","input":{},"power":[],"light":[40],"dim":[]}
#
Other one. I not see any special
#[20:20:59.988][102388/111876 8][25448/26020 3] MQTT RCV: p0b3.text = 20:21
#[20:21:08.632][102388/111940 8][25448/26020 3] HASP: First touch Disabled
#[20:21:08.646][98292/108772 9][25448/26020 3] MQTT PUB: backlight => {"state":"on","brightness":255}
#[20:21:08.658][94196/108768 13][25448/26020 3] MQTT PUB: idle => off
#[20:21:08.672][94196/107184 12][25448/26020 3] MSGR: File not found: L:/idle_off.cmd
#[20:21:08.697][102388/111816 8][25448/26020 3] MQTT RCV: = backlight {"state": "on", "brightness": 255}
#[20:21:08.710][98292/110228 10][25448/26020 3] MSGR: backlight={"state": "on", "brightness": 255}
#[20:21:08.725][98292/110228 10][25448/26020 3] MQTT PUB: backlight => {"state":"on","brightness":255}
#
Well it doesn't look like anything is waking it via command, so it may just be a faulty screen / local interference ?
I haven't seen this issue with my screen.
This all sounds to me like electromagnetic interference on the device/microcontroller. Make sure all the needed signals have an appropriate pull-up/pull-down resistor. Fixing an issue that only occurs randomly is nearly impossible without knowing the root cause...
Is this problem resolved now?
I have the same problem.
And also with the display 1-S3 4848S040. Sometimes it wakes up randomly and (it seems to me) it clicking in a random place.
Firmware: 0.7.0-rc12
Is this problem resolved now?
not solved, unfortunately...
This sounds more like a hardware issue than a bug. e.g. the screen is registering a touch when there is none.
More troubleshooting is needed to determine the root-cause.
- Does it happen when you detach the screen from the PSU? Power it with a stable 5V power-supply and see what happens.
- Does this also happen with other firmware?
- Do you have multiple screens? Do they all have the same symptoms?
More troubleshooting is needed to determine the root-cause.
- Does it happen when you detach the screen from the PSU? Power it with a stable 5V power-supply and see what happens.
- Does this also happen with other firmware?
- Do you have multiple screens? Do they all have the same symptoms?
@fvanroie
- Does it happen when you detach the screen from the PSU? Power it with a stable 5V power-supply and see what happens.
- Try with USB port, it also happen
- Does this also happen with other firmware?
- I try more RC firmware, it happen all of them
- Do you have multiple screens? Do they all have the same symptoms?
- Only one screen, but others are also affect it.
Thanks for your feedback. It really sounds like a hardware issue to me. Maybe you can try other software like Tasmota, ESPhome, ... and see if that also have the problem.
Like stated before, without a way to replicate the random problem, it will be very hard to fix it.
It might be that the touch driver chip is reacting to electrical noise and generating an interrupt. Been digging in to the GT911 programming notes, and I see a couple of config registers that can be set to filter out noise (and adjust the touch sensitivity). There are a couple of functions within the Arduino Goodix driver for the GT911 that read the config registers. Whilst there is a function call to set the resolution, there isn't one to adjust sensitivity. It would only take a few lines of code to craft a suitable function, but the question is where within openHASP to put it (and when to call). Perhaps add something to the Configuration->Display screen in the web interface ?
The goodix repo is a fork which already has some openHASP tweaks. So it is fine to add the settings function to the goodix driver repo.
Then, openHASP can simple call that function when initializing the driver. At first, a simple test is needed to see if it actually works before thinking about UI changes.
If you do this I glad to test it!
Hacked a few lines of code to read the config registers inside the GT911 chip. In the process, learned a little... My trivial little hack causes openHASP to crash & burn with a panic. Not had time to work out why.
In the meantime, I do have a standalone utility that could be used to tweak the relevant register in the GT911 chip.
OK so it seems that my screen has developed this problem now ;-( Recently noticed that devices were switching on randomly, and traced it to the screen registering a button press when there was none.
Tried adding a short bit of code to openHASP to modify the relevant register in the GT911 chip during setup. Unfortunately, this addition triggered a panic and infinite reboots. As life is short, and using the JTAG interface to debug is impossible, I've put together a standalone "project" - https://github.com/FreeBear-nc/HA-openHASP/tree/main/GT911 Compile, upload, and then reload the openHASP firmware.
To adjust the noise sensitivity, edit the NR_LEVEL flag in the platformio.ini and recompile/upload - I would suggest 6 or 7 to start with.
Does this register fix the ghost touches?
@fvanroie
I can not able to test it...
If @FreeBear-nc could provide a (tested) pre built binary or 2 with different values, I'm willing to try it (not wishing to brick my screen) ;-)
In my case I seem to get a bunch of false touches, a power cycle seems to stop them. It can then go for days without problem, so will not be easy to be sure its helping for some time.
Had a spell of phantom touches on my Guition display. Didn't get round to uploading my code, and the events haven't reoccurred. Intermittent ghost events are a pig to diagnose and to say with any certainty that they have been fixed.
@smcgann99 Do you not have platformio set up on your computer ?
Had a spell of phantom touches on my Guition display. Didn't get round to uploading my code, and the events haven't reoccurred. Intermittent ghost events are a pig to diagnose and to say with any certainty that they have been fixed.
@smcgann99 Do you not have platformio set up on your computer ?
Sounds like you are seeing similar issues to me then, I had it on my desk for weeks before I noticed the problem. I suspect that it may be present on all Guition screens, but others may not have noticed. It would be great to get it fixed as these are really nice screens for the price.
I don't have it setup, I have managed to fumble my way to using gitpod in the past. But if you can do a couple of builds with different values then you can test one value and I can test another. I can leave it running for a week or so and see if I get any events. Would also need to see if it effects usability of the screen.
@smcgann99 Catch me on Discord over the weekend to discuss options.
Pushed three firmware images to my repository. You'll need to use esptool to upload them to your board. Once loaded, do a reset and let it run. Then upload the openHASP firmware. If the nr-7 or nr-10 builds don't work, the nr-5 build should put everything back to stock.
Pushed three firmware images to my repository. You'll need to use esptool to upload them to your board. Once loaded, do a reset and let it run. Then upload the openHASP firmware. If the nr-7 or nr-10 builds don't work, the nr-5 build should put everything back to stock.
Have you installed one of the values to your screen, if so which ?
Have you installed one of the values to your screen, if so which ?
Tried 6 and 7. But I've only had one evening of phantom touch events, and can't say for sure if it made any difference.