Problems may be solved.
I discovered you can shut off charging by sending data bytes
05 00 00 00 00 00 from master. The relay in the TWC clicks, green lights stop cycling, and the car goes to sleep fully without the little fan running under the hood. Car reports state
03 which is that state I couldn't get out of before, but in this case, you can start charging again later as normal but it won't begin till the next time the car partly wakes to see there's power available. That seems to happen roughly every 15 minutes.
I checked out the
J1772 protocol. It allows 6A to 51A in 0.6A increments and 55A to 80A in 2.5A increments. The TWC obviously has to translate whatever amp limits you give it to that protocol so those are the true level of control we have over power levels. So the only solution to preventing errors at low amp values may be to stop charging when your green energy source falls below 6A. That's what I'm doing for now, though I plan to test 5A as well because the car's UI allows you to go down to 5A.
The issue with the car falling back to 5A when changing amp limits seems to be that the car doesn't like when you
raise amp limits. So I can set a 15A limit, change to 14, 13, 12, etc and the car is fine. As soon as I go from 12 to 13, the car drops to 5A. If I increase to 21A for 10 seconds, then go down to 13A, car is happy to go to 13A. Increasing to 20A or even 20.9A is not enough. What if I go from 21 to 22 or to 23? Not tested yet, though my solar panels never get near that power level. This behavior seems really bizarre but maybe it's a protection against some common failure mode of chargers that causes their reported amp limit to creep up gradually? Just wild guessing.
With these two fixes implemented, I think everything is working as desired. I'll need to see it running for a few days to be sure and then I'll update the git project.