OpenSprinkler Forums OpenSprinkler Unified Firmware “The request was too large” error until OpenSprinkler.sh restart Reply To: “The request was too large” error until OpenSprinkler.sh restart

#81360

Ray
Keymaster

@dun4cheap, look, you need to provide some more specifics about your setup. Not everyone who gets this error has the same setup. Let me first clarify that this error is due to the OpenThingsCloud library that we use for enabling OTC remote access. The library handles both local and remote connections. The error occurs if it receives a header that’s larger than its allows size. Because OpenSprinkler hardware 2.x does not support OTC, this doesn’t apply to 2.x. So it’s only relevant to hardware v3.x.

As you can read from the above, some users encountered this because they are using CloudFlare Tunnels. I don’t have it so I can’t test it myself, but the bottom line is that it’s sending a request to the controller with an overly large header, causing the request too large error.

I don’t see any evidence you are using CloudFlare Tunnels. So if I had to take a guess, your Visual Basic script is probably sending a header that’s overly large. The first thing to try is to figure out what header it’s sending, and if it’s possible to reduce itself. Look, when you access the controller using a browser, you never encounter this issue because the browser doesn’t send a very large header. This error almost always happens when you use a script, or as said above, CloudFlare Tunnels, which possibly appends a large header.

We can certainly modify the OpenThingsCloud library to increase the allowed header size, but ESP8266 has limited memory size, so we can’t increase the limit arbitrarily. The question really is why your script is sending a very large header, and if it’s possible to shrink it.

Regarding the app: the app is just a front end / UI that we provide. Please note that you have access to the OpenSprinkelr API, you can write a custom front end / UI as you want, to provide backup features. The thing is no matter how we change the UI, it’s not going to fit everyone’s need. The whole point of making the project open-source is to give users the freedom to customize the firmware, the UI, in any way you want, instead of always relying on us to provide these custom features.

I also recommend you to use more modern scripting languages, like Python, Javascript, etc. I am not sure how many people still use Visual Basic. You are likely to get a lot more community support and sample code with Python and Javascript, than VB.

Finally, ChatGPT and other similar generative AI can easily write simple scripts in no time. Just describe what you want, the basic constraints, the variable names, it can produce the script / program you want instantly.