POOL LAB FIRMWARE RECOVERY — Windows bench-test release

1. Extract this entire ZIP into a folder (do not run it inside the ZIP).
2. Connect the computer to the same home network as the Pool Lab.
3. Close the Pool Lab mobile app and any other local connections.
4. Double-click PoolLabRecovery.exe.
5. Click Find my Pool Lab. Select your unit and click Update firmware.
6. Leave the controller powered on and connected to the internet.
7. Wait at least 2 minutes before attempting to reconnect with the app or
   recovery tool. Then check its firmware version in the app or Poolpower dashboard afterwards.

If discovery finds nothing, try Search local addresses or use manual IP entry.
The optional address scan probes up to 254 nearby addresses per interface and
may trigger Avast behaviour detection; it is retained for bench testing. If Windows asks about firewall access, allow the tool on your
home/private network. Guest Wi-Fi or network isolation may prevent discovery
or connection.

REQUIREMENTS AND SOURCE
The included EXE is ready to run. Windows with .NET Framework 4.8 or newer
is required (normally present on Windows 10/11). No installation, Python,
PuTTY, administrator access, or compiler is needed to run it.
Source is included. Build.cmd is optional and rebuilds the EXE using Windows'
.NET Framework compiler if you modify the source. Corporate security policy
may block scripts or unsigned executables.

WHAT IT DOES
- Browses IPv4 mDNS _http._tcp.local services with rev 256 MAC-based names.
- Displays POOLLAB_ plus the final six MAC digits, matching provisioning naming.
- Connects to raw TCP port 8080.
- Requires the 'connected' banner and Pool Lab status fields before an update.
- Requests status with up; followed by carriage return after the banner.
- Sends exactly ota_update followed by carriage return, once per update attempt.
- Uses the controller's configured production firmware32.bin download.
- Contains no Firebase account credentials or firmware binaries.
- Does not change pool controls, format storage, or send beta update commands.

LIMITATIONS
Rev 256 provides no socket acknowledgement, OTA progress, or firmware-version
response for this command. 'Update requested' confirms the local send only;
it does not confirm acceptance, download, reboot or installation.
The controller still needs internet access and working Firebase authentication
for its storage download. A broken RTDB stream can be bypassed; missing or
expired download authentication cannot be repaired by this utility.
The locally generated POOLLAB name is derived from mDNS, not read from RTDB.
Status-field checks identify the expected protocol; they are not cryptographic
authentication.

VALIDATION BEFORE CUSTOMER RELEASE
This is a bench-test build. Test automatic discovery and manual entry against
rev 256 on Windows, then test one affected unit's update and confirm it returns
on the current production firmware. Version 1.1 is compiled against Microsoft .NET Framework 4.8 reference
assemblies, without warnings. DNS parser checks and a simulated
TCP controller test passed on Linux/Mono. The Windows UI and real hardware
update have not been tested. Source is included for inspection and changes.

DEVELOPER CHECKS
To compile a console self-test build on Windows, from this folder run:
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\csc.exe /nologo /target:exe /out:RecoveryTests.exe /reference:System.Windows.Forms.dll /reference:System.Drawing.dll PoolLabRecovery.cs
RecoveryTests.exe --self-test

VERSION 1.1
Fixed the TrimEnd(Char) Windows runtime incompatibility by explicitly using
the character-array overload and Windows reference assemblies.
Retained the optional local-address scan as a bench-test fallback.
Changed multicast group membership to
the explicit socket API. Errors now include full exception type and stack
trace in the on-screen log. Antivirus clearance is not assumed.

VERSION 1.2
Added a confirmation warning before scanning local IP addresses, explaining
possible false malware/virus alerts. After sending the update request, a
message, status text and log instruct the customer to wait at least 2 minutes
before attempting to reconnect.
