The TSL2591 gives a read-out of light intensity in lux. For those numbers to be numerically accurate, the device should be calibrated under lab conditions. Luckily, I wasn't as interested in the accuracy and precision of the values as I was in distinguishing among "none", "a little bit", and "quite a bit". I still refer to the values as lux values, but I always remember that they are probably not accurate.
I "installed" the sensor with its face against the little glass window. I still have plenty of room to observe the pilot light during the re-lighting procedure. Although I only stuck it in place with some tape, the location is behind a metal plate and some insulation that only gets removed a couple of times a year when I have to re-light the pilot light. It seems happy where it is. As you can see, "QC 12", that's my motto. The angle is intentional to get the I2C wires to the notched gap. The ESP8266 board is to the left, just out of the frame.
After doing some experiments and observing the actual numerical outputs, I was happy to find a pleasant consistency.
- With the pilot light turned off (and the cover back in place), the output was 0.
- With the pilot light on, the reading is somewhere between 50 and 100; generally in the 70s, though there is some drift.
- With the main burner ignited, the reading climbs up to 50,000-60,000.
- There was an unexpected effect when the main burner shuts off. The sensor drops down to a reading of 0 for a couple of minutes, then goes up to a reading of 300-400 for a minute or so, then settles down to the expected value of 50-100 for the pilot light. I compensated for that in software (refer to "dazzled" later in this description).
Here is a graph of the values for a typical burn cycle. At this scale, you can just barely see the drop-to-zero effect I described in the final bullet point above.
After getting this far, I would periodically check the graphs of the values in Home Assistant. I was kind of surprised at how seldom the main burner comes on. It's usually only when someone has a shower or we use a fair amount of hot water for something else. It seems the water heater keeps things toasty with passive insulation most of the time. That's nice.