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

Codes generated aren't accepted by my AC #3

Open
dov opened this issue Jul 25, 2020 · 2 comments
Open

Codes generated aren't accepted by my AC #3

dov opened this issue Jul 25, 2020 · 2 comments

Comments

@dov
Copy link

dov commented Jul 25, 2020

I tried to use this code to send commands to my Electra AirConditioner. As I only wanted the raw codes,I removed the irSling stuff and did some other tweaks to get it to compile.

I have written a http server for an ESP8266 LOLIN D1 mini chip through which I'm able to send raw commands as simply as:

  wget -O /dev/null "http://192.168.1.13/?code=$CODE"

where $CODE is the raw code that I want to send to my AC. Meanwhile I'm using a couple of codes that recorded from my remote control through the arduino IRrecvDumpV2 program and it works fine. E.g. the following command turns on the AC at 22°C:

     wget -O /dev/null 'http://192.168.1.13/?code=38000,3002,3820,1914,962,978,1898,954,964,1916,962,980,898,1020,938,980,940,956,964,978,912,1008,1870,982,934,1004,942,1892,960,1004,940,978,912,1006,912,1008,940,980,938,978,914,1002,940,980,940,978,914,1006,938,978,940,978,938,980,940,978,940,978,938,980,1870,1944,974,2944,3786,1946,964,954,1922,954,964,1914,962,980,938,982,940,980,938,978,938,980,940,980,1868,984,964,954,964,1914,964,978,940,980,940,980,940,978,940,954,964,956,966,980,938,978,938,980,940,978,938,980,914,982,964,978,910,1008,940,1004,914,954,1894,1946,974,2920,3810,1946,966,954,1896,982,966,1890,988,978,940,978,942,978,940,954,966,954,966,976,1872,1008,940,978,940,1914,964,978,940,978,942,976,942,952,966,954,968,976,940,978,940,954,966,974,942,956,966,978,942,978,942,976,944,954,936,980,964,954,1898,1916,1002,3942'

Before comparing to to the output of Electra-AC-Remote I rounded these numbers to multiples of 100 and I got the following command that works just the same.

      wget -O /dev/null '38000,3000,4000,2000,1000,1000,2000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,1000,1000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,1000,3000,4000,2000,1000,1000,2000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,1000,1000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,1000,3000,4000,2000,1000,1000,2000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,1000,1000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,1000,4000'

So now I tried generating the equivalent code through electraAcRemote as follows:

    ./electraAcRemote 1 COOL 22 ON SWING_OFF

which generated:
[3000,3000,1000,1000,1000,1000,1000,2000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,1000,1000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,1000,3000,3000,1000,1000,1000,1000,1000,2000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,1000,1000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,1000,3000,3000,1000,1000,1000,1000,1000,2000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,1000,1000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,1000,4000,0,0,0,0,0,0,0]

I modifed the output (removed square brackets and added the leading "38000") value and send the output to the 8266 chip:

    wget -O /dev/null 'http://192.168.1.13/?code=38000,3000,3000,1000,1000,1000,1000,1000,2000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,1000,1000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,1000,3000,3000,1000,1000,1000,1000,1000,2000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,1000,1000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,1000,3000,3000,1000,1000,1000,1000,1000,2000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,1000,1000,1000,1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,1000,4000,0,0,0,0,0,0,0'

The result was a no-op. The AC did not recognize this code.

Any idea why? Meanwhile I'll record some more codes for myself to use, but I'd much rather have them computer generated.

@dov dov mentioned this issue Jul 26, 2020
@sabag
Copy link

sabag commented Aug 3, 2020

it did not work for me either, i am using Arduino Pro Micro.

@nryhbhue
Copy link
Owner

Well, it's been a long time since I did this and actually don't have access to this kind of AC to test anymore.
The equivalent code you created using 'electraAcRemote' doesn't seem quite equivalent, I think this would give what you generated with your remote: "./electraAcRemote 3 COOL 22 OFF SWING_OFF".

Anyhow since what you sent to the AC should also be a valid code I can only suggest some debug options:

  1. Try sending the code generated by "./electraAcRemote 3 COOL 22 OFF SWING_OFF" multiple times, if one of the times sticks then it could be a timing issue.
  2. You said you have the capability to record the IR signals. Try recording the "./electraAcRemote 3 COOL 22 OFF SWING_OFF" when it's sent from your hardware and see if it's any different from the code recorded from your remote.
  3. For the timing issue (if exists), try playing with the division factor generating the number of cycles ("cycles = time / 28") depending on what you get in the recording (pulses longer/shorter than 1000 by a significant amount of time). For instance increase it to 30 to get shorter pulses etc..
  4. Lastly, I see that in the codes you sent you omitted the trailing 0's, try doing that for the code generated by 'electraAcRemote', I don't think this is the issue though, but who knows.

What I can confirm is that back in the day this worked on two different Electra ACs with both pi and esp8266.

Good Luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants