From: Bengt M. <bu...@be...> - 2014-08-07 10:44:44
|
On 08/07/14 10:49, Jiechao Li wrote: > Hi, everyone > > I have been using lirc on my raspberry pi to control Haier A/C,and it > works fine now. > > The strange thing is that, when I use lirc to send IR signal, it's not > that stable. Sometimes it works, sometimes I have to try multiple times > to make it work. But with the original IR remote, it works perfectly > almost everytime. The question is why mine is much less stable than the > original one? With the information you give, it is impossible to go into details, so I will be general. The most common cause of unreliable operation is "dirty" learns. An IR signal is a sequence of durations, and "learning" records these. As all physical measurements, these have errors, and when you transit your learned signal, you are sending the slightly erroneously learned to the device. The receiver has a certain error tolerance, but sending and receiving adds yet more errors, and at one point the signal is not recognized any more. Generally speaking, the best thing you can do is to identify the learned signals as being from a well-known protocol (e.g. NEC1, RC-5, Sony, etc.) and replace the learned signal with a generated signal. The latter then contains NO learning errors, and in many cases is just as reliable as the original remote -- or even more reliable, in the case of stronger/better sending hardware. Unfortunately, not all IR signals identify as a known protocol. In particular, air conditioning units (is your "Haier A/C" one such?) are known to have long and "hairy" IR signals. I have written a tool, IrScrutinizer http://www.harctoolbox.org/IrScrutinizer.html which may help you to identify, analyze, and re-generate your IR signals. Greets, Bengt |