Coder Social home page Coder Social logo

girgitt / homepoint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sieren/homepoint

1.0 1.0 0.0 25.38 MB

Espressif ESP32 Based Smarthome screen for MQTT. This fork attempts to fix M5Core2 support. Take a look at dev_1_0 branch. Some mounting tips for 55mm frame can be found in wiki.

License: MIT License

CMake 0.03% C++ 5.43% Makefile 0.01% C 94.45% HTML 0.02% Shell 0.02% Python 0.02% JavaScript 0.01%
esp32 gui homepoint iot m5core2 mqtt touchscreen

homepoint's People

Contributors

ghosty-be avatar jholthusen avatar sieren avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

homepoint's Issues

re-enable screen saver

Screen saver was not activation automatically but after timeout following a touch event.
When activated it was deactivation by touch event and screen remained black.
Due to above issues as of dev_1_0_0 the screen saver is disabled.

Affected version: dev_1_0_0
Target version: rel_1_0_0

To do:

  1. make screen saver activating automatically after configured timeout
  2. when activated make screen saver deactivate on touch
  3. add back-lit control so the screen turns off completely and not just becomes black
  4. lower clock to 80MHz when screen saver is active

Add support for M5Core2 being powered via 5v rail

M5Core2 enters boot crash loop when powered by 5V rail. This is caused by axp192 configured to expect external power from USB.

Add configuration option to config.json to specify how M5Core2 is powered (5V or USB) and initialize axp192 accordingly.

improve tapping reliability

On M5Core2 tapping works as expected maybe 6-8 ouf of 10 tries.

Reliability should be improved.

Also motor could be used to:

  1. pulse-vibrate once when short tap is registered (on first "running" state)
  2. pulse-vibrate two times when long tap is registered (fafter MSBeforeLongPress)
  3. vibrate continuously until released when too long press is registered (after MSBeforeInvalid)

unreliable touch detection; especially long touch does not work at all

The touch driver of M5Core2 uses internal firmware and version other than 0x11 has issues.

If you experience problems with touch sensing build code from this repo: https://github.com/m5stack/M5Core2-TouchPanel-Recovery (quite straightforward process especially if you have VSCode with Platformio - just open cloned repo, add M5Unified lib via PIO/libraries and run project task m5stac-core2/Geenral/Upload)

if you see
regA1 LIB Version: 0x300e
regA6 Firmware ID : 0x10

then it is required to downgrade the firmware to version 0x11. To do so choose option "write first model FW (0x11)" and write firmware.

After downgrade you should see
regA1 LIB Version: 0x3008
regA6 Firmware ID : 0x11

With this FW version the touchscreen should be more reliable and long presses should be detected most of the time.

I will leave this issue open as a reference for others.

wifi disconnected, repetitive alloc failed ?

During plaing with lowering CPU freq to 80MHz with screen saver active suddenly hit a bug in wifi stack?

W (959003) wifi:m f probe req l=0

E (959126) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (959127) wifi:alloc eb len=76 type=2 fail, heap:135912

W (959127) wifi:m f probe req l=0

E (959250) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (959251) wifi:alloc eb len=76 type=2 fail, heap:135912

W (959251) wifi:m f probe req l=0

E (959374) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (959375) wifi:alloc eb len=76 type=2 fail, heap:135912

maybe related to: https://www.esp32.com/viewtopic.php?t=8598&start=10

after touch and resume screen and cpu freq to 240MHz got short log output following reboot:

E (983641) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (983643) wifi:alloc eb len=76 type=2 fail, heap:135856

W (983648) wifi:m f probe req l=0

I (983651) wifi station: retry to connect to the AP
I (983685) SharedGlobalState: registering tap
I (983735) screen saver: switching screen ON, new mCurrentState: 0
I (983772) wifi:new:<9,0>, old:<9,0>, ap:<255,255>, sta:<9,0>, prof:1
I (983773) wifi:state: init -> auth (b0)
I (983874) wifi:state: auth -> assoc (0)
CORRUPT HEAP: multi_heap.c:431 detected at 0x3ffbe9a0
abort() was called at PC 0x4008b037 on core 0

ELF file SHA256: 790a0842d9f2fa1d

Backtrace: 0x400877b0:0x3ffc19c0 0x40087b89:0x3ffc19e0 0x4008b037:0x3ffc1a00 0x4008b3a1:0x3ffc1a20 0x400822d6:0x3ffc1a50 0x40082304:0x3ffc1a80 0x4008e57e:0x0

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)

it looks like it is related to ntp sync:

I (513402) SharedGlobalState: sec_since_last_tap  56 sec
I (513452) screen saver: idleSec  56 sec
I (513452) screen saver: timeOutMin  1 min
I (513604) NTP: Waiting for system time to be set... (1/10)
I (515604) NTP: Waiting for system time to be set... (2/10)
I (517525) screen saver: switching screen OFF, new mCurrentState: 1
I (517525) screen saver: setting CPU freq to: 80
I (517604) NTP: Waiting for system time to be set... (3/10)
I (518487) SharedGlobalState: uptime 500 sec
I (518487) SharedGlobalState: sec_since_last_tap  61 sec
I (518537) screen saver: idleSec  61 sec
I (518537) screen saver: timeOutMin  1 min
I (519604) NTP: Waiting for system time to be set... (4/10)
I (521604) NTP: Waiting for system time to be set... (5/10)
I (523335) wifi:bcn_timout,ap_probe_send_start
I (523487) SharedGlobalState: uptime 505 sec
I (523487) SharedGlobalState: sec_since_last_tap  66 sec
I (523537) screen saver: idleSec  66 sec
I (523537) screen saver: timeOutMin  1 min
I (523604) NTP: Waiting for system time to be set... (6/10)
I (525604) NTP: Waiting for system time to be set... (7/10)
I (525838) wifi:ap_probe_send over, resett wifi status to disassoc
I (525838) wifi:state: run -> init (c800)
I (525839) wifi:pm stop, total sleep time: 371351919 us / 523627093 us

I (525843) wifi:new:<9,0>, old:<9,0>, ap:<255,255>, sta:<9,0>, prof:1
E (525849) event: system event loop not initialized via esp_event_loop_init
E (525859) TRANS_TCP: tcp_poll_read select error 113, errno = Software caused connection abort, fd = 54
I (525860) wifi station: retry to connect to the AP
E (525867) MQTT_CLIENT: Poll read error: 0, aborting connection
I (525879) MQTT: MQTT_EVENT_DISCONNECTED
I (527604) NTP: Waiting for system time to be set... (8/10)
E (527908) event: system event loop not initialized via esp_event_loop_init
I (527910) wifi station: retry to connect to the AP
I (528487) SharedGlobalState: uptime 510 sec
I (528487) SharedGlobalState: sec_since_last_tap  71 sec
I (528537) screen saver: idleSec  71 sec
I (528537) screen saver: timeOutMin  1 min
I (529604) NTP: Waiting for system time to be set... (9/10)
E (529959) event: system event loop not initialized via esp_event_loop_init
I (529961) wifi station: retry to connect to the AP
E (530685) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (530685) wifi:alloc eb len=76 type=2 fail, heap:135452

W (530685) wifi:m f probe req l=0

E (530809) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=4000
W (530809) wifi:alloc eb len=76 type=2 fail, heap:135452

W (530810) wifi:m f probe req l=0

E (530934) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (530934) wifi:alloc eb len=76 type=2 fail, heap:135452

W (530934) wifi:m f probe req l=0

E (531058) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=4000
W (531058) wifi:alloc eb len=76 type=2 fail, heap:135452

W (531059) wifi:m f probe req l=0

E (531183) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=4000
W (531183) wifi:alloc eb len=76 type=2 fail, heap:135452

W (531183) wifi:m f probe req l=0

E (532028) event: system event loop not initialized via esp_event_loop_init
E (532030) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (532031) wifi:alloc eb len=76 type=2 fail, heap:135392

W (532036) wifi:m f probe req l=0

I (532040) wifi station: retry to connect to the AP
E (532160) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (532161) wifi:alloc eb len=76 type=2 fail, heap:135452

W (532161) wifi:m f probe req l=0

E (532285) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (532285) wifi:alloc eb len=76 type=2 fail, heap:135452

W (532285) wifi:m f probe req l=0

E (532409) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=4000
W (532409) wifi:alloc eb len=76 type=2 fail, heap:135452

W (532410) wifi:m f probe req l=0

E (532533) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
W (532534) wifi:alloc eb len=76 type=2 fail, heap:135452

W (532534) wifi:m f probe req l=0

E (532658) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=4000
W (532658) wifi:alloc eb len=76 type=2 fail, heap:135452

W (532659) wifi:m f probe req l=0

E (532782) wifi:esf_buf: t=2 l=76 max:32, alloc:32 no eb, TXQ_BLOCK=0
``

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.