-
Notifications
You must be signed in to change notification settings - Fork 836
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
Support for Hitachi RAS-70YHA3 (remote RAR-3U3) #1758
Conversation
This protocol seems to have quite a few parity bytes, which I'm not seeing (or can't see) on the other Hitachi protocols. So I've given it my best shot at how it looks like those are all meant to be handled with regards to the union HitachiAC296Protocol{
uint8_t raw[kHitachiAc296StateLength];
struct {
// Byte 0~12
uint8_t pad0[13];
// Byte 13
uint8_t :2;
uint8_t Temp :5; // stored in LSB order.
uint8_t :1;
uint8_t :8;
// Byte 15~16
uint8_t :8;
uint8_t :8;
// Byte 17~24
uint8_t OffTimerLow :8; // LSB
uint8_t /* Parity */ :8;
uint8_t OffTimerHigh :8;
uint8_t /* Parity */ :8;
...
};
}; I'm not sure if I'm handling this correctly in the getter/setter methods either, e.g.: |
I think I now have on/off, temperature, mode and fan speed all working. However, |
Can you elaborate on what you mean by "is not working correctly"? With more info we may be able to help you work out whats wrong. |
Apologies for the vagueness, it was meant as note on my progress. However, some help would be great! Here's the problem: Temp is stored in 5bits, so I've defined it as such, uint8_t :2;
uint8_t Temp :5; // LSB
uint8_t :1; But I'm having trouble correctly assigning the temperature to those 5 bits. I know I need to void IRHitachiAc296::setTemp(const uint8_t celsius) {
uint8_t temp;
temp = std::min(celsius, kHitachiAc296MaxTemp);
temp = std::max(temp, kHitachiAc296MinTemp);
temp = reverseBits(temp << 2, kHitachiAc296TempSize); // kHitachiAc296TempSize = 5
_.Temp = temp;
} |
You shouldn't need to shift the bits. That's one of the points of using the following notation: uint8_t :2;
uint8_t Temp :5; // LSB
uint8_t :1; |
I thought that might be the case. When I try without the bit shift:
I get:
Which shows it needs to shift two bits. Hence my confusion 😵. Apologies, I understand bits and shifting, but I'm very new to c++` |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Just had to make sure it was sending LSB first and now it appears to work! I have control of my heatpump! I'm sure there's a bunch to add/fix before this can be merged, but I guess it's as good as ready for review 🙏 |
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.
First pass at code review comments.
Thanks for the feedback, really appreciate your time 🙏 The unit tests is possibly the last thing I haven't touched yet? |
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.
A few minor changes required.
There is also stuff for the IRac
class that needs to be done, but I can add that after we merge this.
Ditto for unit tests. What I'd like from you before we merge this is full text of raw capture inc. the description of the message. e.g. "Power: On, ..." etc.
I can then construct the Unit tests for this protocol.
Thanks again for the review and help 🙏 I will get on to those change requests.
Reading through the Adding Support for a new A/C protocol doc, there's a few suggestions. Would you like me to map it out in a spreadsheet (like the examples), or do you just need some lines of hex? |
What I'm after is a complete cut & paste of the entire output of IRrevDumpV2 or 3 for a successful capture of the message, and include a description of what the message should be with respect to the settings on the remote. |
Chasing up on those changes. I'd like to get this merged so I can include it in the next release. |
My apologies, this one got away from me. I've been a little busy lately. I'll get on to this as soon as I can 👍 |
@crankyoldgit I've addressed the review comments, but have not yet recorded additional commands. I will get onto that as soon as I can. |
I've finally got a chance to sit down and record these but have found my last 8266 has died 😰 |
Bugger. Got an ESP32 or an Arduino handy? |
I've got an Uno, but that's all. Having a look to see if there's anyway to restore this one. I don't think this library will work with the Uno? |
I found another ESP8266! Recording now 👍 |
No, it won't. But it can collect raw data via another library. |
Okay, here's an assortment of raw output:
|
Excellent. Thanks. I'll incorporate that soon. |
_v2.8.2 (20220314)_ **[Bug Fixes]** - ESP32-C3: Fix reboot/crashes on ESP32-C3s when receiving. (#1768 #1751) **[Features]** - HITACHI_AC296: Add `IRac` class support & tests. (#1776 #1758 #1757) - Support for Hitachi RAS-70YHA3 (remote RAR-3U3) (#1758 #1757) - LG: Add Swing Toggle support for Model `LG6711A20083V` (#1771 #1770) - IRMQTTServer: add `MQTT_SERVER_AUTODETECT_ENABLE` via mqtt mDNS (#1769) - Experimental basic support for Kelon 168 bit / 21 byte protocol. (#1747 #1745 #1744) - MitsubishiAC: Tweak repeat gap timing. (#1760 #1759) - Gree YAP0F8 (Detected as Kelvinator) vertical position set support (#1756) - Make KELON (48 bit) protocol decoding stricter. (#1746 #1744) - IRMQTTServer V1.6.1 (#1740 #1739 #1729) - HITACHI_AC264: Add minimal detailed support. (#1735 #1729) - LG2: Improve Light toggle msg handling. (#1738 #1737) - MIDEA: Add support for Quiet, Clean & Freeze Protect controls. (#1734 #1733) - Add basic support for HITACHI_AC264 264bit protocol. (#1730 #1729) - ESP32-C3: Work around for some C3 specific compiler issues again. (#1732 #1695) **[Misc]** - MIDEA: Update supported devices (#1774 #1773 #1716) - Update devices supported by ELECTRA_AC (#1766 #1765) - Improve documentation for `encodePioneer()` (#1761 #1749) - Update (un)supported DAIKIN128 devices. (#1752) - Refactor `decodeCOOLIX()` code & add another test case. (#1750 #1748) - Simplify code based on state_t being initialised by default. (#1736 #1699) - Add comments to help Teknopoint users. (#1731 #1728) - Fix library version string calculation. (#1727 #1725) - Confirm we can reproduce `TurnOnFujitsuAC.ino` via IRac/IRMQTTServer. (#1726 #1701)
##_v2.8.2 (20220314)_ **[Bug Fixes]** - ESP32-C3: Fix reboot/crashes on ESP32-C3s when receiving. (#1768 #1751) **[Features]** - HITACHI_AC296: Add `IRac` class support & tests. (#1776 #1758 #1757) - Support for Hitachi RAS-70YHA3 (remote RAR-3U3) (#1758 #1757) - LG: Add Swing Toggle support for Model `LG6711A20083V` (#1771 #1770) - IRMQTTServer: add `MQTT_SERVER_AUTODETECT_ENABLE` via mqtt mDNS (#1769) - Experimental basic support for Kelon 168 bit / 21 byte protocol. (#1747 #1745 #1744) - MitsubishiAC: Tweak repeat gap timing. (#1760 #1759) - Gree YAP0F8 (Detected as Kelvinator) vertical position set support (#1756) - Make KELON (48 bit) protocol decoding stricter. (#1746 #1744) - IRMQTTServer V1.6.1 (#1740 #1739 #1729) - HITACHI_AC264: Add minimal detailed support. (#1735 #1729) - LG2: Improve Light toggle msg handling. (#1738 #1737) - MIDEA: Add support for Quiet, Clean & Freeze Protect controls. (#1734 #1733) - Add basic support for HITACHI_AC264 264bit protocol. (#1730 #1729) - ESP32-C3: Work around for some C3 specific compiler issues again. (#1732 #1695) **[Misc]** - MIDEA: Update supported devices (#1774 #1773 #1716) - Update devices supported by ELECTRA_AC (#1766 #1765) - Improve documentation for `encodePioneer()` (#1761 #1749) - Update (un)supported DAIKIN128 devices. (#1752) - Refactor `decodeCOOLIX()` code & add another test case. (#1750 #1748) - Simplify code based on state_t being initialised by default. (#1736 #1699) - Add comments to help Teknopoint users. (#1731 #1728) - Fix library version string calculation. (#1727 #1725) - Confirm we can reproduce `TurnOnFujitsuAC.ino` via IRac/IRMQTTServer. (#1726 #1701)
FYI, the changes mentioned above have now been included in the new v2.8.2 release of the library. |
Guys do you think that "Swing" operation can be decoded for this protocol? |
Please read the FAQ if you haven't already, then consider opening a new issue, but be sure to include all required information. (You need to collect the data) |
Add support for Hitachi RAS-70YHA3 (remote RAR-3U3). Fixes #1757
This PR provides some initial support for the RAR-3U3 remote. It works of initial research found here.