i have a tuyamcu based device that occasionally gets a flipped bit in
messages it receives from the muc. those usually show up as checksum
failures, but if the bit flips in the length field then we wait for
bytes that just arent going to arrive, so we don't get to the cksum
field for that test to fail. instead, add a timeout that the tick
checks, and reset the recv state machine on a timeout.
if the message that was corrupted was a dp update, we'll end up with
an inconsistent view of the state of the DPs. maybe we should send a
request for all datapoint values when this or a cksum failure happens?
- ESP32 support for eigth energy phases/channels
- ESP32 command ``EnergyCols 1..8`` to change number of GUI columns
- ESP32 command ``EnergyDisplay 1..3`` to change GUI column presentation
- support for SEN5X gas and air quality sensor by Tyeth Gundry (#17736)
* support on/true/off/false/toggle in the tuyamcubool command.
i wanted a tasmotized wall switch to be able to blindly send "toggle" to
a fan/light and have it do the right thing. the dp value is kept by the
driver, so it can easily read, modify, and write it.
* "on"/"off"/"toggle" etc are parsed when XdrvMailbox is set up
so i don't have to do it, i just have to use the payload.
* handle get local time requests from the MCU.
from what i can tell from the tuya serial communication protocol
documentation, we only have to send the time if MCU requests it. this is
unlike how TUYA_SET_TIME is implementing in xdrv_16, where if
USE_TUYA_TIME is enabled it will send unsolicited time updates every
minute as well as in response to a request from the MCU.
i couldn't find an easy to check flag to see if tasmota was synced to a
real clock, so this blindly tells the MCU that our time is valid and
copies it over, the same as xdrv_16.
the tuya doco also describes a "Get system time in GMT" request and
response structure which would be mostly a copy of this code if i knew
if and where tasmota keeps track of UTC/GMT.
lastly, i'm not convinced RtcTime.day_of_week is right. it's friday
here which should be 6 if you start counting sunday as 1, but i read 2
* local time sync is implemented, but not gmtime