-
Notifications
You must be signed in to change notification settings - Fork 839
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
Electra A/C aircon control #1033
Comments
FYI, v0.5.6 was the version of IRMQTTServer, not the library version (currently v2.7.3), Back then, the library was v2.5.1. In the v2.6.0 release notes we had to change the bit ordering of the Electra protocol. That's probably why your old codes no longer work. If you reverse the bit order of each byte you send, you will probably get a working message again. "Detailed" Electra support wasn't added until v2.6.3 of the library. (#788) You are now attempting to use the "Common A/C" API to control the Electra device. Different models and brands have different levels of support. This is what is currently supported by the library for Electra: https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/IRac.cpp#L464-L488 So the library/code/example is working as intended at the moment.
If you can work out what parts/bits of the
Per earlier, yes (or no). The bit ordering changed for the Electra protocol, so you can either re-capture the messages with the current
It is just a html form. You should be able to construct & submit a URL with the correct arguments to make the changes you want. |
So I probably looked at the wrong version number. How many codes will I need to record so you’ll add a more detailed support for my A/C? Will it be enough to record a couple (with those options toggled on or off) or will I have to record everything? |
How long is a piece of string? ;-) Read: https://github.com/crankyoldgit/IRremoteESP8266/wiki/Adding-support-for-a-new-AC-protocol#working-out-the-details & https://github.com/crankyoldgit/IRremoteESP8266/wiki/Adding-support-for-a-new-AC-protocol#binary-settings As you're probably looking at "binary" controls/settings, you are probably only looking at a couple of messages per setting.
It all depends. It will only take you as many as it takes you to understand what bits are changing & why. |
Also, can you please provide the Brand & Model numbers for your A/C head unit and your remote? |
A/C and remote brand: Electra |
Thanks. Looking forward to your reverse-engineering/analysis of your capture data so I can add your missing features. |
Btw, How can I select Electra A/C when controlling it through Home Assistant using MQTT? |
Select via MQTT-only, read: https://github.com/crankyoldgit/IRremoteESP8266/blob/master/examples/IRMQTTServer/IRMQTTServer.ino#L182-L189 [Edit: fixed the link to the docs] |
oh, ok, ty. And last thing: How can I add my temperature sensor to it so it will show up correctly and know the room temp? (my temperature sensor is already connected and working in home assistant). |
You will have to add the code to Or use another device that reports the temp sensor results to where ever you've told HA's MQTT climate to look for it. e.g. https://www.home-assistant.io/integrations/climate.mqtt/#current_temperature_topic FYI, all of that is out of scope for this library/support channel. |
My temperature sensor is connected to my RPI's GPIO pins with the onewire protocol. |
Then have it report it to MQTT to the topic you've setup in that HA doc I linked. |
ok, I'll try that |
Hmm, MQTT commands are doing nothing when I try to turn on the A/C (for example). Here is the MQTT command The ESP is connected to my RPI |
Sorry, I gave you the wrong link to the docs earlier. See: https://github.com/crankyoldgit/IRremoteESP8266/blob/master/examples/IRMQTTServer/IRMQTTServer.ino#L182-L189 e.g. Try sending |
still nothing |
What does the |
i.e. http://your_esp.local/aircon |
And what is the "Climate Information" section say on the "info" tab/page? |
According to that, the MQTT topic you need to send to is |
ok, its working. |
and why doesn't it work if I add |
You set it in your initial setup. To reset it, you need to reset the config on the ESP device. e.g. https://github.com/crankyoldgit/IRremoteESP8266/blob/master/examples/IRMQTTServer/IRMQTTServer.ino#L58-L59
It will use the MQTT prefix. If it isn't set, it will use the hostname as the start of the MQTT topic.
Because that isn't how MQTT topics work. It's only listening on certain ones. You just used a different topic that it isn't programmed to listen too. |
and how do I update it? Do I need to create a bin file? |
A/C on - Cooling mode - 24° - Fan speed set to 1 - flaps off - turbo off - clean off
A/C on - Cooling mode - 24° - Fan speed set to 1 - flaps off - turbo on - clean off
|
Then you are going to need to do more analysis on exactly what changes, and why between the "changing the light" messages and other "normal" messages. e.g. A temp change.
Thanks. turbo off: turbo on: The last byte is the checksum, so we can ignore that. I'll code something up based on that soon. Edit: |
@ShonP40 Turbo support added. Please redownload and test. |
Ok, I’ll do it today |
1. I re-recorded the light command: A/C on - Cooling mode - 24° - Fan speed set to 1 - flaps off - turbo off - clean off - pressed light
2. Turbo is not working so I re-recorded its commands again A/C on - Cooling mode - 24° - Fan speed set to 1 - flaps off - turbo on - clean off
A/C on - Cooling mode - 24° - Fan speed set to 1 - flaps off - turbo off - clean off
Do I need to select another A/C model? |
Okay, I utterly failed with my bit math for Turbo (See Edit: in #1033 (comment))
Nope. Electra doesn't (yet) have support for different models. It's all the same so far.
I'm not sure you get it. You have to analyse and isolate what has changed and be able to predict/explain what should happen (which bytes and bits change) when you set/toggle a feature.
IF Light is really a toggle switch, Messages 3 & 6 should be identical. If they are not, then it isn't a toggle. It's storing the information somewhere in the IF Light is not a toggle, Messages 3 & 6 will probably be different. Compare those two messages to see what changes. In all cases, Messages 1 & 7, and Messages 2 & 8 should be identical, if not. We've got problems. The known & expected differences between those states are:
If anything other than When you've worked it out, get back to me with what you've worked out & the data. P.S. You don't need to include the |
Ok, ty. |
1. Turbo is working! 2. Here are the commands you requested me to record (I really don't know that to look for in them. When you tell me to look at a specific state, nothing is different between the messages so idk how to find the one you meant): 1
2
3
4
5
6
7
8
|
So mesgs 1, 4, & 7 are the same. Mesgs 2, 5, & 8 are the same. And mesgs 3 & 6 are the same. So it is a toggle. That leaves the only other change is Given we have seen weird values in To confirm this theory, can you try capturing the other buttons when pressed, and see if It could be that |
Sorry that I didn't respond yet. |
This is not a long term/good fix. But it should work, in theory. For #1033
- get/setLightToggle, get/setTurbo, & get/setClean added. - Unit tests added and updated. - Common A/C api updated according. - Fudge `ConstructKnownState` test to pass. TODO add for @ShonP40 to explain why this is needed. - Increase string reserve size for `toString()` - Horrible hack to make set/getLightToggle() work. * Turbo & Clean confirmed to be working. LightToggle still iffy. Ref: * #1033 * #1033 (comment)
_v2.7.4 (20200226)_ **[Bug Fixes]** - IRMQTTServer: Fix bug when receiving an IR A/C message and not re-transmitting it. (#1035, #1038) - Coolix: `setRaw()` doesn't update power state. (#1040, #1041) **[Features]** - Electra: Add improved feature support. (#1033, #1051) - Add support for Epson protocol. (#1034, #1050) - Add options to `decode()` to aid detection. Improve NEC detection. (#1042, #1046) - SamsungAc: Add support for Light & Ion (VirusDoctor). (#1045, #1048, #1049) - Add Italian (it-IT) locale/language support. (#1047) (kudos @egueli) - gc_decode: Add repeat support for pronto codes. (#1034, #1043) **[Misc]** - Update supported SamsungAc devices (#1045) - Coolix: Subtle protocol timing adjustments (#1036, #1037) - Add supported Electra device model info (#1033)
_v2.7.4 (20200226)_ **[Bug Fixes]** - IRMQTTServer: Fix bug when receiving an IR A/C message and not re-transmitting it. (#1035, #1038) - Coolix: `setRaw()` doesn't update power state. (#1040, #1041) **[Features]** - Electra: Add improved feature support. (#1033, #1051) - Add support for Epson protocol. (#1034, #1050) - Add options to `decode()` to aid detection. Improve NEC detection. (#1042, #1046) - SamsungAc: Add support for Light & Ion (VirusDoctor). (#1045, #1048, #1049) - Add Italian (it-IT) locale/language support. (#1047) (kudos @egueli) - gc_decode: Add repeat support for pronto codes. (#1034, #1043) **[Misc]** - Update supported SamsungAc devices (#1045) - Coolix: Subtle protocol timing adjustments (#1036, #1037) - Add supported Electra device model info (#1033)
The changes mentioned thus far have been included in the latest IRremoteESP8266 v2.7.4 release. |
Light control is working! Thank you so much! |
@ShonP40 Thanks for confirming my horrible hack works. I'd still like us to get to the bottom of it as per #1033 (comment) if you can. i.e. we've seen 4 possible values for that byte, and right now we are only guessing what it does. Future changes may break it etc. |
I’ll try |
Any progress? |
I didn’t try it yet because I was busy with my smart room project. I’ll try to do it tomorrow probably. |
Any luck? |
1 similar comment
Any luck? |
Nope |
Oh well I guess we give up on it then until you find something. |
I recently updated my WeMos D1 Mini from v0.5.6 to v2.7.3 because I saw that it has an Home Assistant integration.
After I updated, I noticed that none of my IR commands that I used before to control my Electra A/C work.
I tried the new aircon menu and the main functions in it are working great but the Quiet, Turbo, Econo, Light, Filter, Clean, Beep functions do nothing.
My A/C has an option to toggle the display, turbo mode and clean mode and I was able to use them in the past with the old version (via A/C complex commands).
So, can you fix those commands please (in the aircon menu)?
And do I need to re-record the old "complex" commands I have so they would work again?
And is there a way to toggle options in the aircon menu with a URL?
The text was updated successfully, but these errors were encountered: