Dear Zigbee2mqtt members!
I’m working on the support for the Immax Neo Thermostatic head. I sniffed the communication with the proprietary gateway and I could understand most of the messages. Both devices are based on the Tuya hardware and using the same packet format for the basic communication as the other Tuya thermostats with some differences…
After connecting to the controller it sends all the settings and status information like: room temperature, set temperature, child lock status, weekly temperature program by day etc. . At the end of the initial communication It sends a 0x24 command with two zeroes in the data section. I called that “reqest clock” packet. As a reply the proprietary gateway sends back a 0x24 command with two zeroes and then the GMT and the local “UNIX timestamp” in big endian format in the data section. That sets the device clock and it is needed for further communication. If it is not received the device tries to send continuously 0x24 commands and won’t send any other status messages (e.g. temperature, heating status) to the controller.
I added the new commands (0x24) in zigbee-herdsman for the request and the clock response. If I send the “set clock” command using e.g. mosquitto_sub to the device through zigbee2mqtt it initializes itself, sets the clock and works more or less as expected.
Of course I can make an external program which subsrcibes the “request clock” MQTT message and then activates the “set clock” command, but I would like to integrate this into zigbee2mqtt as this conversation needed for normal operation.
My question is how can I initiate a response packet from the fromZigbee.js when receiving the request? What is the recommended method for that? Is it possible at all?
Thank you for all your suggestions!