Code Monkey home page Code Monkey logo

Comments (6)

HomeSpan avatar HomeSpan commented on July 30, 2024

Have you tried running with less than 18 to see where the cut-off is. For example, does it work with 10 accessories but fail at 11? Also, can you include a copy of your sketch --- I'll try running it on my setup to debug.

from homespan.

maragelis avatar maragelis commented on July 30, 2024

Exception decoded
Decoding stack results
0x40169c83: WiFiClient::operator bool() at C:\Users\marag\OneDrive\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi\src/WiFiClient.h line 69
0x400d8c85: Span::poll() at C:\Users\marag\OneDrive\Documents\Arduino\libraries\HomeSpan\src\HomeSpan.cpp line 193
0x400d19a2: loop() at C:\Users\marag\OneDrive\Documents\Arduino\paradoxHomekit\main/main.ino line 148
0x400ddced: loopTask(void*) at C:\Users\marag\OneDrive\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\cores\esp32\main.cpp line 19
0x40088b9d: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143

from homespan.

HomeSpan avatar HomeSpan commented on July 30, 2024

Thanks - I'm seeing the same thing on my end. Will see if I can find the problem.

from homespan.

maragelis avatar maragelis commented on July 30, 2024

Thanks for the help and quick response

from homespan.

HomeSpan avatar HomeSpan commented on July 30, 2024

I found the issue - a simple buffer overflow I had not anticipated. The quick fix is to increase the size of the HTTP Buffer from where it is now (8096 bytes) to something larger. I changed it to 32767 in my development version and was able to run 30 light bulb accessories (it was failing at about 14). I'll create a more robust solution to allocating this memory dynamically, but for now you can work around the limitation by editing the library and changing line 77 in HAP.h as follows:

static const int MAX_HTTP=32767; // max number of bytes in HTTP message buffer

Please let me know how it goes.

from homespan.

HomeSpan avatar HomeSpan commented on July 30, 2024

The memory overrun problem related to this issue has been solved. The workaround suggested above is no longer needed. Fix is now available in the Development branch and ready for use. Will also be included in the the next full patch release.

I performed some stress-testing and found a bridge with 40 Accessories is near the upper limit before the system starts to run out of memory. There is now a check that throws an error and halts the program if more than 41 Accessories are defined in the sketch (1 bridge Accessory + 40 operating Accessories). Thanks for catching and reporting this bug!

from homespan.

Related Issues (20)

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.