按楼主的教程,已经成功控制了电视机的红外遥控,发射管和接收管,给出的RawDataInfo":[85,83,0],是一致的。
但是空调遥控器,用接收管学习到的信号,
{"IrReceived":{"Protocol":"UNKNOWN","Bits":122,"Data":"6FDAA84B","RawData":[8344,4154,568,616,514,1598,518,1598,542,616,518,1622,512,594,518,1622,518,616,516,594,538,570,542,1620,518,592,514,1598,542,1596,542,1598,542,614,520,592,514,618,516,618,514,592,518,590,542,590,516,616,518,616,518,616,512,594,518,592,568,536,544,590,598,512,544,590,596,536,598,512,594,538,598,534,598,510,544,590,596,1542,598,512,544,590,542,590,596,538,538,568,596,538,570,538,542,592,596,514,540,592,542,588,598,538,570,538,596,538,596,512,542,590,596,536,540,594,568,538,596,538,596,512,544,590,596,514,540,590,596,536,570,564,596,512,542,590,596,512,544,590,596,538,568,540,596,536,596,538,596,512,542,590,596,512,590,542,596,538,596,514,542,588,596,536,598,512,564,568,598,538,570,536,544,588,596,514,542,590,596,536,598,538,568,538,596,536,596,512,542,590,598,512,564,568,600,532,596,536,596,512,544,564,620,514,542,590,596,514,594,538,596,538,544,590,598,512,544,590,596,514,592,538,596,536,598,512,544,590,544,588,596,512,590,542,598,1542,596,1518,594,538,544,588,598,510,468],"RawDataInfo":[243,243,0]}}
复制代码
然后使用irsend 0,命令去发射raw码
接收管给出的结果不一致
{"IrReceived":{"Protocol":"UNKNOWN","Bits":63,"Data":"A137C362","RawData":[8352,4126,618,574,510,1608,564,1558,590,574,562,1584,510,602,562,1584,564,576,562,554,536,578,588,1578,564,552,510,1608,590,1554,590,1556,590,572,564,554,560,578,564,578,510,602,564,550,588,550,560,576,564,578,562,578,510,602,564,552,616,492,590,550,644,472,592,550,644,494,646,470,642,496,644,494,646,468,590,550,644,1500,646,470,590,550,588,548,644,496,538,576,644,496,618,496,590,550,642,472,562,576,590,548,646,498,618,496,644,496,644,470,588,550,644,494,586,554,616,496,644,496,644,470,592,550,644,472,586],"RawDataInfo":[125,125,0]}}
复制代码
RawData部分总是不一致的,好像是发射管发出的码,丢了一部分
已经修改my_user_config.h
#define USE_IR_RECEIVE // Support for IR receiver (+7k2 code, 264 iram)
#define IR_RCV_BUFFER_SIZE 2048 // Max number of packets allowed in capture buffer (default 100 (*2 bytes ram))
#define IR_RCV_TIMEOUT 200 // Number of milli-Seconds of no-more-data before we consider a message ended (default 15)
#define IR_RCV_MIN_UNKNOWN_SIZE 6 // Set the smallest sized "UNKNOWN" message packets we actually care about (default 6)
复制代码
PubSubClient.h也修改成了
// MQTT_MAX_PACKET_SIZE : Maximum packet size
#ifndef MQTT_MAX_PACKET_SIZE
//#define MQTT_MAX_PACKET_SIZE 128
#define MQTT_MAX_PACKET_SIZE 2048 // Tasmota v5.11.1c
#endif
复制代码
搞了好几天了,一致找不到解决办法,望楼主指导,谢谢