-
Notifications
You must be signed in to change notification settings - Fork 833
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
Initial support for York AC protocol #1889
Conversation
First off, thanks for creating a PR. It's a big effort, I know. So congrats for making it thus far. I'll answer some of your questions before I start looking at your code.
"On Timer" i.e. IRremoteESP8266/src/locale/defaults.h Lines 90 to 95 in 726b219
IRremoteESP8266/src/IRtext.cpp Line 66 in 726b219
Please use the unit of Minutes. i.e.
Don't use IRremoteESP8266/src/ir_Neoclima.cpp Line 523 in 9228143
|
The automatic code linter found a number of issues, these should hopefully be easy to understand and fix:
|
Many thanks for the thorough review and for your suggestions. As for the OnTimer / OffTimer, additionally to the changes you suggested I also had to use getOnTimer() and getOffTimer in the Message description (it's obvious in hindsight). I just resolved the comments where no comments where needed and added two more questions to the opening message. |
Still got a few Lint issues to address: (See: https://github.com/crankyoldgit/IRremoteESP8266/actions/runs/3134922966/jobs/5090021582)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the other changes .. getting closer now.
Ha! Welcome to the world of AirConditioners and different brand/models/implementations. To keep "Sleep" generic, it means what ever it means for that brand/model etc. So, it's what ever seems appropriate for the device.
No, we don't support On & Off timers in the "Common A/C" ( If the off timer is really needed by someone, via that interface, we might map it to So, only set Edit: Oh, ditto for |
This one was introduced because you said so :-) 😇 In any case it's fixed now. Edit: force pushed since I rebased to solve the conflicts. |
cd83cbd
to
08d5c37
Compare
Thanks, I did as you suggested and used the OffTimer (if set) as sleep value. The remote control offer two buttons: Long story short: I believe it is correct to use sleep the way I now do, thanks a lot for the clarification. Just to be extra sure I got your explanation correctly: there is no way to map in the IRAac class the status of "power on X minutes in the future", is this right? |
Correct. |
Regarding the checksum(s). What have you tried. |
Yes I tried to make sense of it, in the second sheet there are two type of rows "MSG" and "XOR", where the latter is the xor of the 2 rows above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few notes, needs to check more details, and having lack of time.
Coincidentally, I also have an old AC YORK, but with a GZ-12B-E1 remote. I just have no idea if it has the same IR codes. If you haven't figured out the checksum calculation yet, maybe I can help. I tried the online calculator https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/ for a quick reference. I entered the first three codes from the https://docs.google.com/spreadsheets/d/1PsI8KSKzd8HQQeZUcCiCktq7l3xWww1AtdCdbUrWmfg/edit#gid=1789386554 table without the last three bytes. Here is the result for the third code 0810070240080318017800000000 CRC-16-IBM (Bisync, Modbus, USB, ANSI X3.28, many others; also known as CRC-16 and CRC-16-ANSI), Big Endian (ABCD), Reversed 0xA001: D5 F0 |
Wow you have no idea how much time I lost on this. Thank you! Edit: to clarify it looks like the checksum is calculated with the message truncated (-3 bytes), then recomposed like this: |
Confirmed for all the codes I have on record:
|
The protocol is known to almost every detail, checksum is calculated properly. Some basic tests have been added. Setting the sleep timer, scheduled power on, scheduled power off do not work since there are some flags within byte 12 which is not correctly populated ATM.
I removed the WIP: prefix as I believe it might be ready to be merged now. I added checksum calculation and a few tests. Regards, |
@danielegobbetti Thanks for the heads up. I'll take a look now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Sorry for all the nitpicks. Nearly there.
Thanks again for the prompt review. I truly deeply hope that now the current PR could be accepted because I have the impression that the part of the work that needs having a real device to test against is vanishing and my inexperience with c++ is frustrating for both sides. In other words: I am available to test if everything still works after changing parts of the code against my A/C unit but I'm short of time (and knowledge) to dedicate a substantial effort to this PR if it's not yet deemed ready to be merged. Please don't get me wrong: I really appreciated your patience and guidance toward making my code decent enough :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just the style nitpick to go.
Should be ok now. Many thanks again. |
src/ir_York.cpp:290: Missing space before ( in while( [whitespace/parens] [5]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
_v2.8.5 (20230508)_ **[Bug Fixes]** - Fix a bug where we never detached the timer interrupt on ESP32s. (#1984 #1983) - Missing argument in use of midea function (#1959 #1958) - IRMQTTServer: Improve HA MQTT climate handling. (#1911) - SEND_SANYO_AC88: Fix poor cut-n-paste error (#1905 #1897) **[Features]** - Add support for a 40bit variant of the standard Panasonic protocol (#1977 @1976) - Initial support for York AC protocol (#1889) - IRMQTTServer: SHT-3x Temperature Sensor Support (#1951) - IRMQTTServer: HA multi output discovery (#1947) - IRMQTTServer: extended with new A/C common fields (#1940) - IRMQTTServer: Sync the on state to power from mode for HA (#1946) - Experimental basic support for Carrier 84-bit protocol. (#1945 #1943) - Add support the WowWee 11-Bit RoboRaptor-X protocol. (#1939 #1938) - Added 'sensorTemperature' and 'iFeel' to IRac (common) (#1928) - Added extra 'mid' option for Fan & SwingV to IRac (#1929) - Added "commandType" to IRAc (#1921) - Added support for Argo WREM-3 A/C remote protocol [part1] (#1920) - Added Dutch (nl-NL) translation (#1907) - ARGO: Improve code & add support for decoding 32bit sensor msgs. (#1906 #1859) - Added support for Gorenje cooker hood IR protocol (#1888 #1887) **[Misc]** - Add Electrolux YKR-H/531E as a supported device (#1981 #1980) - Update `XMP` status to Stable (#1944) - upgrade to a later version of `googletest` (#1936) - MITSUBISHI128: Added model to supported protocol (#1924) - Added Dutch (nl-NL) README (#1908) - Added GMock to UT Makefile (#1902) - Update HA example config for HA 2022.6+ (#1901 #1900) - Add a `d1_mini_noMDNS` build option to `IRMQTTServer`. (#1985)
## _v2.8.5 (20230508)_ **[Bug Fixes]** - Fix a bug where we never detached the timer interrupt on ESP32s. (#1984 #1983) - Missing argument in use of midea function (#1959 #1958) - IRMQTTServer: Improve HA MQTT climate handling. (#1911) - SEND_SANYO_AC88: Fix poor cut-n-paste error (#1905 #1897) **[Features]** - Add support for a 40bit variant of the standard Panasonic protocol (#1977 @1976) - Initial support for York AC protocol (#1889) - IRMQTTServer: SHT-3x Temperature Sensor Support (#1951) - IRMQTTServer: HA multi output discovery (#1947) - IRMQTTServer: extended with new A/C common fields (#1940) - IRMQTTServer: Sync the on state to power from mode for HA (#1946) - Experimental basic support for Carrier 84-bit protocol. (#1945 #1943) - Add support the WowWee 11-Bit RoboRaptor-X protocol. (#1939 #1938) - Added 'sensorTemperature' and 'iFeel' to IRac (common) (#1928) - Added extra 'mid' option for Fan & SwingV to IRac (#1929) - Added "commandType" to IRAc (#1921) - Added support for Argo WREM-3 A/C remote protocol [part1] (#1920) - Added Dutch (nl-NL) translation (#1907) - ARGO: Improve code & add support for decoding 32bit sensor msgs. (#1906 #1859) - Added support for Gorenje cooker hood IR protocol (#1888 #1887) **[Misc]** - Add Electrolux YKR-H/531E as a supported device (#1981 #1980) - Update `XMP` status to Stable (#1944) - upgrade to a later version of `googletest` (#1936) - MITSUBISHI128: Added model to supported protocol (#1924) - Added Dutch (nl-NL) README (#1908) - Added GMock to UT Makefile (#1902) - Update HA example config for HA 2022.6+ (#1901 #1900) - Add a `d1_mini_noMDNS` build option to `IRMQTTServer`. (#1985)
As mentioned in #1882 (comment) I'm trying to add support for the protocol used by my (pretty old) AC unit by York (AC model: MHH07P17 remote GRYLH2A).
Please consider that I have little to no experience with C++ and therefore have lots of questions, nevertheless I wanted to open the PR since basic decoding works. I am unable to figure out the checksum protocol used by this remote.
So to the questions I have:
result.sleep
in toCommon()) actually is: is it meant to be a "night/low noise mode" or rather "power the unit of after some time" mode?I am aware of having also left some "TODOs" in the code.
Looking forward to some feedback regarding the questions above (and in general about the code).