mirror of https://github.com/arendst/Tasmota.git
tuya: set wifi-state
This commit is contained in:
parent
1700450936
commit
e84f78b395
|
@ -242,6 +242,16 @@ void TuyaInit()
|
||||||
TuyaSerial->write((uint8_t)0x00); // following data length 0x00
|
TuyaSerial->write((uint8_t)0x00); // following data length 0x00
|
||||||
TuyaSerial->write((uint8_t)0x07); // checksum:sum of all bytes in packet mod 256
|
TuyaSerial->write((uint8_t)0x07); // checksum:sum of all bytes in packet mod 256
|
||||||
TuyaSerial->flush();
|
TuyaSerial->flush();
|
||||||
|
|
||||||
|
TuyaSerial->write((uint8_t)0x55); // header 55AA
|
||||||
|
TuyaSerial->write((uint8_t)0xAA);
|
||||||
|
TuyaSerial->write((uint8_t)0x00); // version 00
|
||||||
|
TuyaSerial->write((uint8_t)0x03); // command 03 - set wifi state
|
||||||
|
TuyaSerial->write((uint8_t)0x00);
|
||||||
|
TuyaSerial->write((uint8_t)0x01); // following data length 0x01
|
||||||
|
TuyaSerial->write((uint8_t)0x03); // wifi state 4 (configured and connected)
|
||||||
|
TuyaSerial->write((uint8_t)0x06); // checksum:sum of all bytes in packet mod 256
|
||||||
|
TuyaSerial->flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue