Skip to content
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

Added support for Bluestar Heavy AC #2120

Merged
merged 7 commits into from
Jul 26, 2024

Conversation

harshbhosale01
Copy link
Contributor

@harshbhosale01 harshbhosale01 commented Jul 24, 2024

In the following PR, support was added for Bluestar heavy AC. I don't have information about the model of AC but the following is a picture of the remote.
image
Changes were made according to the given doc in the wiki section [Adding support for a new IR protocol]. I wasn't able to figure out how to begin writing the test code for my model, so I have dropped that part. Else everything works fine from my end. I've tested the ir_sendBluestarHeavy function with esp8266 which works well. Also, the run_tests went well on my device.

I've tried to gather IR codes for Bluestar Heavy AC and attached them in the following sheet link.

In case you need raw IR data, here it is
`IRrecvDump is now running and waiting for IR input on Pin 4
Timestamp : 000001.564
Library : v2.8.6

Protocol : UNKNOWN
Code : 0x3F7789A6 (106 Bits)
uint16_t rawData[211] = {5000, 5060, 478, 1542, 476, 1542, 478, 468, 558, 1542, 476, 500, 526, 1540, 478, 548, 478, 1542, 476, 1542, 478, 1542, 476, 1544, 476, 1542, 476, 1544, 476, 1542, 478, 1542, 476, 474, 552, 1542, 478, 1542, 476, 548, 510, 1510, 476, 548, 478, 1542, 476, 1542, 476, 1544, 474, 550, 478, 1542, 478, 548, 476, 1542, 476, 548, 484, 1536, 476, 1542, 450, 1570, 476, 1542, 476, 1544, 472, 1546, 476, 1544, 478, 1540, 476, 550, 476, 1542, 450, 576, 476, 548, 480, 1540, 476, 550, 476, 1542, 476, 1542, 478, 1542, 476, 1542, 508, 1512, 476, 1542, 478, 1540, 452, 1566, 478, 1540, 478, 1540, 478, 528, 498, 1542, 478, 528, 496, 530, 498, 1540, 452, 554, 496, 1542, 476, 1540, 482, 1518, 496, 1522, 494, 1544, 478, 1522, 496, 1522, 496, 1544, 476, 1542, 476, 1542, 482, 1536, 454, 1566, 478, 1522, 498, 546, 476, 1542, 476, 1542, 476, 1542, 476, 1544, 474, 1544, 478, 1540, 476, 1542, 474, 552, 472, 1544, 448, 1570, 474, 552, 474, 552, 472, 1548, 472, 556, 470, 554, 446, 1574, 468, 1550, 472, 1548, 442, 1576, 466, 1552, 442, 1576, 466, 558, 468, 1552, 466, 1554, 464, 1566, 454, 560, 464, 1554, 464, 1578, 442, 1578, 440, 560, 466, 560, 4966}; // UNKNOWN 3F7789A6

`
If any more support from my end is needed, I would be more than happy to provide it. I've written a blog on how I worked with learning IR using your library, I'm not an electronic expert. So please don't expect much from this blog. You can read it using this link.

NiKiZe
NiKiZe previously requested changes Jul 24, 2024
Copy link
Collaborator

@NiKiZe NiKiZe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work so far, there is some more work that's needs to be done before it could be merged, some of them matches with linter issues, also the supported section, at least we need some model info.

Tests needs to be revisited. Could you also post the codes you get as message from lowest to highest temp to verify endiness of protocol

src/IRsend.h Show resolved Hide resolved
src/IRremoteESP8266.h Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Show resolved Hide resolved
Copy link
Owner

@crankyoldgit crankyoldgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First off, congrats and well done adding a protocol successful! Looks good.

Sorry about the mostly nitpicking comments and feedback. All of it is mostly minor, but it cleans up the code a lot.

Looking forward to the changes so we can merge it.

src/IRremoteESP8266.h Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
src/IRrecv.h Outdated Show resolved Hide resolved
@harshbhosale01
Copy link
Contributor Author

@NiKiZe @crankyoldgit
I've made all the suggested changes mentioned by you both and the recent commit also passes all checks, please review the same.
As asked by @NiKiZe above, we can use the data collected in this sheet, for verifying the endianness of protocol.

@NiKiZe
Copy link
Collaborator

NiKiZe commented Jul 26, 2024

Could you please post the codes you get here (the hex 0x part) as a list from lowest to highest temp.

I tried to check your sheet but it didnt seem to be in order, so I would like to see the actual hex instead.

It might also be good to loop thru fan speeds to verify which bits are actually the checksums.

@crankyoldgit
Copy link
Owner

@NiKiZe @crankyoldgit I've made all the suggested changes mentioned by you both and the recent commit also passes all checks, please review the same. As asked by @NiKiZe above, we can use the data collected in this sheet, for verifying the endianness of protocol.

Hey @harshbhosale01
I've had a look at the data. I think you have the endian-ness correct. But, I think you've got the 1's and 0's mixed.
i.e. https://docs.google.com/spreadsheets/d/1JqRDYir9vIPilomsIa7L0S67Nd7q-53POH_d_6gqzmo/edit?pli=1&gid=0#gid=0&range=D1:D18

If you flip the bits , you'll find the temperature increases by one for each degree.
Basically, swap the values of the Zero and the One Space to:

const uint16_t kBluestarHeavyOneSpace = 572;
const uint16_t kBluestarHeavyZeroSpace = 1548;

Copy link
Owner

@crankyoldgit crankyoldgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more nitpicks to go. And the swap of zeros and ones per other comments.

Otherwise, it now looks good to me. Thanks for doing this!

src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
src/ir_BluestarHeavy.cpp Outdated Show resolved Hide resolved
@harshbhosale01
Copy link
Contributor Author

Oh okay, I'll do that but as asked by @NiKiZe. I've also gathered the HEX codes from Lowest to Highest temp. Please find it in the following link.
https://docs.google.com/spreadsheets/d/18foXvKYk4HnH60Cu6aQZR3OY34SxUbHYN0R61TCOMyM/edit?usp=sharing

@NiKiZe
Copy link
Collaborator

NiKiZe commented Jul 26, 2024

Oh okay, I'll do that but as asked by @NiKiZe. I've also gathered the HEX codes from Lowest to Highest temp. Please find it in the following link. https://docs.google.com/spreadsheets/d/18foXvKYk4HnH60Cu6aQZR3OY34SxUbHYN0R61TCOMyM/edit?usp=sharing

Once the bits are inverted, this will change, but it's still good data to keep here.

TEMP/FAN/MODE	HEX CODE
2
16/AUTO/COOL	0xD5FFDF2FFA5FFA5FFF7F45FDDC
3
17/AUTO/COOL	0xD5FFDE2FFA5FFA5FFF7F44FDDC
4
18/AUTO/COOL	0xD5FFDD2FFA5FFA5FFF7F43FDDC
5
19/AUTO/COOL	0xD5FFDC2FFA5FFA5FFF7F42FDDC
6
20/AUTO/COOL	0xD5FFDB2FFA5FFA5FFF7F41FDDC
7
21/AUTO/COOL	0xD5FFDA2FFA5FFA5FFF7F40FDDC
8
22/AUTO/COOL	0xD5FFD92FFA5FFA5FFF7F3FFDDC
9
23/AUTO/COOL	0xD5FFD82FFA5FFA5FFF7F3EFDDC
10
24/AUTO/COOL	0xD5FFD72FFA5FFA5FFF7F3DFDDC
11
25/AUTO/COOL	0xD5FFD62FFA5FFA5FFF7F3CFDDC
12
26/AUTO/COOL	0xD5FFD52FFA5FFA5FFF7F3BFDDC
13
27/AUTO/COOL	0xD5FFD42FFA5FFA5FFF7F3AFDDC
14
28/AUTO/COOL	0xD5FFD32FFA5FFA5FFF7F39FDDC
15
29/AUTO/COOL	0xD5FFD22FFA5FFA5FFF7F38FDDC
16
30/AUTO/COOL	0xD5FFD12FFA5FFA5FFF7F37FDDC
17
30/FAST/COOL	0xD5FFD133FA5FFA5FFF7F3BFDDC
18
30/MEDIUM/COOL	0xD5FFD137FA5FFA5FFF7F3FFDDC
19
30/SLOW/COOL	0xD5FFD13BFA5FFA5FFF7F43FDDC

Copy link
Owner

@crankyoldgit crankyoldgit left a 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.

Before we merge, can you please check if the temperature range increases sequentually now? It should,

@harshbhosale01
Copy link
Contributor Author

Yes @crankyoldgit
The temperature range is sequentially increasing now. I've recorded the HEX codes for the same in the following sheet. Look into subsheet 2.
https://docs.google.com/spreadsheets/d/18foXvKYk4HnH60Cu6aQZR3OY34SxUbHYN0R61TCOMyM/edit?gid=2000763506#gid=2000763506

@crankyoldgit
Copy link
Owner

Yes @crankyoldgit The temperature range is sequentially increasing now. I've recorded the HEX codes for the same in the following sheet. Look into subsheet 2. https://docs.google.com/spreadsheets/d/18foXvKYk4HnH60Cu6aQZR3OY34SxUbHYN0R61TCOMyM/edit?gid=2000763506#gid=2000763506

Awesome!

@crankyoldgit crankyoldgit merged commit a5c6902 into crankyoldgit:master Jul 26, 2024
42 checks passed
mrninhvn added a commit to mrninhvn/IRremoteESP that referenced this pull request Aug 8, 2024
Added support for Bluestar Heavy AC (crankyoldgit#2120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants