Satisfied with the performance and reliability of the dashboard for my Victron system, I’m finally ready to release the source code. The data collector is written in PHP and implemented as a pair of console commands within the Laravel framework, one that queries the ModbusTCP service for the bulk of the data and the other that queries the MQTT broker…
With the increasing centralization of personal web content into huge, monolithic entities, the traditional personal site is becoming increasingly scarce. Self-hosting your own web content used to be the rule rather than the exception, and I think that’s a loss not fully realized yet. Those centralized services are no better at preventing stale links, which has historically been the biggest…
My system is almost entirely Victron. In designing the system, I researched A LOT of options but ultimately decided on Victron for two reasons: (1) price; and (2) the various components I needed were all available from Victron and could communicate with each other. There’s now a third reason: the systems are very open and can easily be made to…
PHP arrays are sort of a combination of traditional C-style arrays (i.e., index-based lookup) and hash tables (plus a few extra bits). With this comes a decent amount of overhead — they use a lot of memory! For something as basic as an array of 64-bit integers, it uses around 152 bytes per entry: Memory usage in MB for an…
PHP is largely a stateless language. With few exceptions, its environment is completely constructed from scratch for each request. Consequently, maintaining a semblance of state persistence requires a storage backend so each iteration of the environment can be initialized accordingly. Retrieving from storage is a more expensive operation than storing in active memory, so a naive approach to rate limiting…
PHP is a language that has largely had its development driven by the real world use and demands by its users. Those users, unfortunately, have not always updated in a timely fashion, so functionality that has been implemented over multiple versions is not always fully available and can create problems for the unaware. The zlib family of functions are one…
I had a debugging problem recently with some server code. It involved passing a list of IP addresses and associated metadata to the central server so that list could be pulled into a different host later. The problem was that, as soon as it reached 127 IPs, everything after that was ignored. Searching for a hint on why produced very…