Added support for OpenEVSE 'disabled' state
For some reason $FD doesn't register on the device, investigating...
EDIT: All good, just some local dev machine issue.
Thankyou for this pull request @jpalo. I've updated my home system with your changes and will test for a period of time before merging. Thanks a lot!
Hello @jpalo looking at this a bit more closely today, I'm wondering if we can cater for 'disabled' under the off state. Is there a reason to include disabled in the UI as distinct from off?
From charging (demand shaper) perspective off is same as disabled, but I'm not sure what's the difference internally in OpenEVSE. IIRC, when I had OpenEVSE disabled I couldn't start it anymore via demand shaper leading to this PR. Will need to double check...
Actually, more importantly there needs to be a way to support all possible states of OpenEVSE. Just found out that while vehicle is charging, state is 2 which is not handled by Demandshaper and causes Javascript error, so slightly related to this.
Added support also for EV Charging state (2) which will internally in DS correspond with ON state. Reasoning pretty much same as with the Disabled state support, i.e., support all states of OpenEVSE.
This state 2 support is somewhat more essential fix compared to the added Disabled state as it will prevent DS UI from going grey (off-sync) when charging starts.
I've been thinking of this Disabled state vs Off state and haven't come up with any other reasons to include Disabled except that if you Disable OpenEVSE via it's own portal you can no longer control it at all with DS. Of course one could just include part of the fixes and not show the Disabled button...
Updated changes from master.