Replies: 6 comments 6 replies
|
Berry needs to keep track of all webhooks because of Arduino limitations. The compile constant Either increase this compile time constant or try to reduce the number of |
|
Okay, first of all, thank you very much for the input. I'm using several Berry files in the program, each of which contains webserver.on() twice. The error message appears when I add a sixth file. So, a total of 12 webserver.on() occurrences. Do the remaining four come from the original Tasmota code? A quick note about the program. There are several "submenus," each with its own file (e.g., Umluft_ui.be). Each of these files contains the following code (the file has also been adapted): Can I write this differently so that I comply with the Arduino restrictions? |
|
Okay, but sorry for the questions. I'm just starting out with Berry. Before a submenu (e.g., http://192.168.8.130/Umluft_ui?) is called, the following MUST be defined in the code: Is that correct? I would have assumed I could change this directly at runtime.
Then at least I would always have only 2 hooks, no matter how many submenus I have. |
|
Sorry for the late reply... I'll briefly explain what I'm trying to do:
To avoid confusion during programming, each submenu has its own file (e.g., Umluft_ui.be, Licht_ui.be, etc.) I'm still very new to Berry Script and therefore still need this clarity :-) or Now the problem is that with this approach, the slots of the web server hooks are insufficient. So c is the expression when the button for the /Umluft_ui submenu is pressed. This could then be evaluated and the correct webserver.on selected. BUT, you write that webserver.on must be loaded at startup; otherwise, no update will occur. So, what you wrote above won't work. I have no idea how to solve this. |
|
@sfromis
I described at the beginning what should happen. The idea with "variableHandler" was just an idea of how I could make the code around "webserver.on" dynamic. I'm also not sure how many webserver.on need to be registered at the same time. "When" and "where" this needs to happen are unclear to me. All I know is that all ".be" files are loaded at boot time, and consequently, all the webserver.on files they contain are also registered. This leads to the original error. Perhaps I should rephrase the question: How can I reduce the number of webserver.on registrations without losing functionality? Please provide an example. |
|
@sfromis In summary, it won't work in my case. Here is another picture, maybe it makes the idea clearer: |

Uh oh!
There was an error while loading. Please reload this page.
Hello everyone,
Can someone explain the error to me?
Are the hooks being limited?
How can I work around this?
Thanks!

All reactions