ESPAsyncWebserver - Send chunked response from PROGMEM with template processor

October 27, 2024 @ 01:56

In case someone needs it, I had to search and dig around for quite a while to come up with this solution.

ESPAsyncWebserver is pretty good documented in my opinion. The documentation of the fork from github user mathieucarbou I use for my CanGrow project gets even more into detail.

I had a problem with corrupted responses when the webserver had to send a very big html file processed with some templates in it. So I thought it might help to use chunked responses.

Update: I think I understood the problem and what chunking is and does not correct. So my problem with corrupted pages when using the template processor persists even when using chunked response.

[Read more...]

HowTo: A very simple three step water level indicator for Arduino / ESP

March 31, 2024 @ 06:03

When thinking about my new CanGrow project, which things I want to have data and want to measure, I thought having a water level indicator, for a water tank for example, would be a good idea.

Most things I found were about the premade Waterlevel module, which can be found on ebay, amazon and quite every maker shop. The downside of this module is, that it has a limited length. And I dont want to hack around a module, as my goal for the CanGrow project is, to be very simple.

So I did some further research and thought about those very simple water level indication schematics, which just use a transistor, resistor , led and power source, which brought me also to this arduino projecthub article, which describes how to build such a water level indicator with only a few resistors.

When looking at the schematics, it reminded my heavily to a voltage devicer circuit. So I ignored the “virtual Wheatstone bridge” stuff described in the article and played around a bit and found the solution for my projects problem.

I came up with this schematic:

[Read more...]

HowTo: XCompile Xash3D-NG for ReactOS on Linux

January 17, 2024 @ 00:35

For about a year I haven’t updated my ReactOS server, so it was time to update everything and the new year was a good moment for that.

Installing and stuff was pretty easy, I don’t want to go into much detail about that, as it is mostly unzipping stuff and copy them somewhere. Maybe I go in a future post into detail, how this setup is built up.

Today I want to focus on the way to get an working win32 binary of Xash3D-NG, an fork of Xash3D maintained by a user called tyabus which represents the version 0.19.4 of Xash3D. This particular version is quite popular, even when a much more active developed fork, named Xash3D-FWGS (version 0.20), exists.

Reason for its popularity is, that still many of the Xash3D android apps are based on the old version, so there is a quite large user base. Unfortunately tyabus do not offer (any more?) binaries for his fork.

Update: There is a build pipeline for the Windows client binaries but no for the server ones, Github comment
I will upload my builds to http://hl.la10cy.net/downloads/ when there is a new one

So I have to compile them myself which is not such a big deal for me when it comes to compiling stuff for linux, but cross-compiling windows binaries on linux is something i am really not used to.

A year ago I already had this challange and I only remembered that it was not pretty easy for me. Compiling this time the latest master branch was a much dirtier game in comparison what I remembered from the last time and I forgot most of the things. So I want to write them down for the case I need these steps again or someone other can find some useful information from there, so I also will write about the way to the solution with all errors I came across.

  [Read more...]

How to: Set Firefox Flatpak as default for x-www-browser

June 28, 2023 @ 11:52

Here is just a quick one, I want to share.

On my Debian desktop systems (and ubuntu ones before), I install firefox these days from flatpak. The reason for this is obvious, the freshness of the packages I get compared to the ones from debian, which ship always firefox’ ESR version (what would work for most, but I prefer an up-to-date browser:))

On XFCE and Gnome you can set the default applications, but that is sometimes not enough. Setting the default value for the x-www-browser link, is necessary so all X-applications use the correct browser for links.

With the update-alternatives command we can change those links. Let’s do this for the firefox flatpak example:

In short this command would do the trick

[Read more...]

Meine erste Woche mit FlatPress, ein Rückblick.

June 25, 2023 @ 21:35

Seit nun etwas mehr als einer Woche läuft meine Seite / Blog mit FlatPress.

Vor allem das es sich um ein flat-file CMS handelt, gefiel mir besonders als auch der sonst allgemein recht schlanke Aufbau der Software.

Für mich als “Nicht-Programmierer” ist es mir mit meinen bescheidenen PHP-Kenntnissen dennoch möglich hier und da Anpassungen vorzunehmen, oder gar ein kleines Plugin zurecht zu basteln (syntaxhighlighter-ng).

Auch das Theming gefällt mir sehr, was anscheinend auch an das von Wordpress angelehnt ist. Auch hier konnte ich recht gut selbst Hand anlegen und habe mir das snail-Theme an meine Bedürfnisse angepasst. Mittlerweile ist daraus auch ein eigenes Theme geworden, namens Rainbow

[Read more...]