Cool - mind reporting back and detailing your set up? What optocoupler are you using? Something like this?
Yes, I was thinking that 14-18VAC output from ATS Pins 5 & 6 could be monitored to display generator RPM/Frequency, since its an actual winding from the stator, guessing they rectify this and use it to charge the 12V battery, and for the ATS they use it to tell if the generator is "on".
I did find a 4 input optoisolator board on Amazon, as well as a 4 output relay board that can be controlled from a microcontroller.. these are cheap enough and have screw terminals, that they can be used for the outputs/inputs to the D1 Mini and easily wired up. The opto-isolator is limited to 4Khz, but the generator should be running at 3600RPM, so it might work just fine. Thinking the relay board can be used for the ATS Pin 3 to turn the generator on/off, and also used for the contactor to switch on the AC to your system on/off, and you can even use a separate output for the Propane valve, this way.. just another relay output to switch the 12VDC on/off.. The "Generator Request" input can now also be opto-isolated.. this is almost a complete product, might even be a market for it for people with the Westinghouse generators with the ATS input :-) it can certainly be built and sold for less than the $349 Westinghouse is asking for a transfer switch that really doesn't do much (and can't even be found recently). Keep up the good work, and looking forward to an update on the sketch, someday :-) One thing that would be nice is if you can refresh the client browser on a status change, or update the generator RPM display, if that gets implemented.
Reason the run the D1 Mini off the 12V from the ATS connector is, you can make a standalone box that has inputs and outputs, and it's powered by the 12V Generator battery.. the trickle charger that comes with the generator will be plenty to keep the 12V battery maintained an run the D1 Mini, and of course when the generator is running, keep the Propane valve open as well... battery charging windings usually can support up to 8A on generators.
Mitch
opto-isolator, 4 channel, $7
https://www.amazon.com/gp/product/B07GMHLL2M/ref=ox_sc_act_title_4?smid=ATCVC199CHVK0&psc=1
relay board, 4 channel $8
https://www.amazon.com/gp/product/B07K5D7XNW/ref=ox_sc_act_title_5?smid=A2VFJ72EDNQOQ5&th=1