That is a simple analog circuit to build for less than 15 USD or an easy job for an Arduino or a Raspberry Pi connected up to a photocell to accomplish digitally for less than 40. There are large internet communities that will describe how to build either project. Alternatively, perhaps you could modify a garage door photocell safety sensor system to get the voltage you need like this product https://www.amazon.com/gp/product/B0...736184-1310369.

- Ed Morra -