-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IRLibrary update! (MITSUBISHI_AC) is in IRremoteESP8266 library, but missing from ours #526
Comments
So, the upstream library is https://github.com/crankyoldgit/IRremoteESP8266 ? |
Looks like the upstream library is actually https://github.com/Arduino-IRremote/Arduino-IRremote |
yes, I think that was the one. It's kind of the root library for many of the IR implementations - but e.g. IRremoteESP8266 has had updates and mods - probably mainly because of Tasmota's use of it? |
Any news or plans to do it? I'm very busy these days (Youtube, BL602 OTA, teardowns, misc features, as you may see in commits history) but it would be really nice to have latest IR Libr working! |
I am trying to integrate with IRremoteESP8266, the interface is completely different from Arduino-IRremote though, so it is not very straightforward. Take a look: https://github.com/vfonov/OpenBK7231T_App/tree/IR_UPGRADE |
@vfonov any news on this? huh, they changed receive handling? The ISR is different... new version is different. |
The new IRRemote version seems to be using an interrupt instead of 50us timer. I am still investigating. I am trying to to somehow get it running. |
I managed to make a sender compiling, but it didn't really work with my TV so maybe I am missing something. https://github.com/vfonov/OpenBK7231T_App/tree/IR_UPGRADE - should compile and IRSend should work, but receiving is disabled for now. |
@vfonov I have based on your work, but I am unable to get receive working in spite of apparently running receive every 50us. I will push my code to separate branch today, maybe you can give some insights. but to be more precise, the problem is that it seems the new version is using pin change interrupts and not 50us timer, and it's getting time from micros. I tried to simulate the change interrupt behaviour with timer and to plug old 50us interrupt directly but neither worked. |
@vfonov here are my changes: This: Both approaches receive random garbage when I press button on my remote. |
So, it's impossible to have interrupt on pin change in bk7231 ? |
@vfonov well, something like that is used here: What do you think? Also... I still don't know why my hack is not working. A timing issue? |
Hi all, I'm also interested on this topic. Based on the page https://tasmota.github.io/docs/Tasmota-IR/ appear that the used libray is the first one but there are different build of the firmware the main one that support only the IRSend command and the RC5, RC6 and NEC protocol only (https://tasmota.github.io/docs/Commands/#ir-remote) and the tasmota-ir that support the IRHVAC Command and manage all the IRremoteESP8266 protocol. Are you working on manage also the IRHVAC command? |
Yes, once the new library is properly integrated that would be the idea to add control for HVAC |
If is useful I can support with test on bk7231n CBU module |
changing pinModeFast in drv_ir.cpp:110 seem to made it work:
i.e now it uses |
Well, that's very good news if it works! I will check this out right away. But if it works, it's all thanks to you, so can you just maybe open a pull request so you can officially become one of our contributors? |
How can I test the fix? on the branch ir_update_test tha last commit is of 3 days ago. |
@vfonov are you sure that only this change makes IRRecv works? It's still not working for me, hmm |
So, I enabled DEBUG messages from the IRRecv and submodules, so now IR recieve dumps lots of info in debug console. I tried only with two remotes : Panasonic and Fuji AC
|
ok, I updated logging a little bit, using resultToHumanReadableBasic from the IRremoteESP8266 now. Panasonic Power button:
Fujitsu AC power button several times:
|
So, maybe there is a bug in the code putting raw bits values into the buffer, before the IRrecv::decode actually decodes them? |
I figured it out, there is a need to have a timeout for the complete message .
and it also decodes it into a human readable form:
|
@vfonov great progress, I will try now that build from your fork: |
At least it correctly decodes parameters of my Fujitsu AC remote - with temperature and power mode |
So, I fixed a bug in sending and it seem to be working. Although I currently made only a subset of protocols: RC5,RC5,NEC,PANASONIC,JVC,SAMSUNG,LG |
What is the last value, 1 or 0? Is it "repeats"? It seems to be always 1 in the new version |
Thanks a lot how can i manage also the other Protocol I'm interested on the CARRIER_AC |
Yes, it's repeats. I think some change of logic is need to actually count repeated codes. |
So, I didn't enable any of the AC protocols yet. To properly support them we would need to implement a new command protocol. I suggest taking it from MQTT server implementation here: https://github.com/crankyoldgit/IRremoteESP8266/blob/master/examples/IRMQTTServer/IRMQTTServer.ino Then for Carrier AC,this protocol will work : https://github.com/vfonov/OpenBK7231T_App/blob/ir_update_test/src/libraries/IRremoteESP8266/src/ir_Carrier.h |
We are trying to keep Tasmota standard, and I think that Tasmota has some kind of "raw" IR message system for handling events. |
Another way integrates with homeassistant |
Hi all Thnx for continued good work on this firmware Is there any way currently to send a RAW IR signal, rather than using an existing protocol? Some A/C units use proprietary protocols so it would really help to be able to send the RAW timings (with fairly large buffer to support some longer signals). It's possible on Tasmota, so hopefully it should be a relatively simple patch? Received signal shows in log as Another user who encountered this issue before me: https://www.elektroda.com/rtvforum/viewtopic.php?p=20416701#20416701 Sending with Tasmota using I guess in the meanwhile I'll need to stick to my raspberry pi solution ! |
Tasmota uses the same underlying Library for ir signal handling, do if somebody could take raw pulse sequence handling from there and transplant it here, it will work. There is is an issue with c++ standard Library implementation on openbkt though, it's doesn't seem to work, so if tasmota uses |
I don't think that formatting binary data to string can be a problem. It should be very easy. Okay, so it the base library (as replacement to our old one) now functional? Will we use any functionality if we do the port now? If the base is ready, then please open pull request @vfonov and do the honors. Great job! We will finalize MQTT and tasmota style support later. |
I found in Tyua tuya_pin_irq_init() they have TUYA_PIN_MODE_IN_IRQ_RISE_FALL, but I don't know if it's applicable to BK7231. Another idea is after rising edge interrupt set next interrupt to falling edge and vice versa. I'm not sure if it is possible at all. |
So, right now this is not an issue for capturing IR, timer based method seem to be working |
I looked at edge triggering, but it goes through about three layers of API if you call thier API - we'd need to get right to the actual registers to flip the edge bit raw to be quick. Also would need to figure out how to read a raw clock.... |
Hi. Sorry to write here, but I didn't find a better option. |
So, #723 integrates the same version of IR decode library as Tasmota into OpenBK, and it supports goodweather AC ( https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Goodweather.h ) but there are a few remaining issues:
|
Wouldn't it make more sense to just support RAW IR patterns than trying to support all these proprietary protocols? Then anyone can get any device to work in theory, even if it means they need to put more work than usual, but at least every device could theoretically work, and the impact on ROM size would be small, consistent, and futureproof. Then some major protocols like NEC could be included but with all due respect what is GOODWEATHER or Mitsubishi.. that should be removed in favour of RAW support if you ask me |
Ok, can you implement that? |
If that was easy for me I'd have done it already |
Thanks for everything I think the only solution is to proceed as tasmota that have a specific build for AC IR that correctly fit on the flash dimension but have a minor set of other function/plugin |
So whats the status of this task? Would really love to get it working with Fujitsu AC. I have the Avatto S06 Pro (ir+temperatur+humidity). Perfect comobo, works with most IRs but not the needed Fujitsu AC :( |
Unfortunately, i didn't have time to debug this. |
But would is be option to just support raw? |
One user just made my realize that our IRLibrary is an older version and Tasmota has newer.
@btsimonh , are you aware about that? Would you be able to update it?
For example, MITSUBISHI_AC is missing from ours...
The text was updated successfully, but these errors were encountered: