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

making some change on Daikin176bits to work with IRMQTTServer #826

Merged
merged 59 commits into from
Jul 26, 2019

Conversation

pasna
Copy link
Contributor

@pasna pasna commented Jul 18, 2019

Most function works except fanspeed.

@pasna
Copy link
Contributor Author

pasna commented Jul 22, 2019

Good morning,

Yes, your are correct and I am sorry for not be exact on the code.
These hex code are all from real remote and when pressing mode change it changes many bytes.
I repeat again, these code from real remote.

power button from OFF to ON,
Power: On, Mode: 7 (COOL), Temp: 25C, Fan: 3 (MAX), Swing (H): 5 (Auto)
11DA171804001E11DA17180073 00 21 00002035002023
state[13] stays 0x00

mode change from COOL to FAN
Power: On, Mode: 6 (FAN), Temp: 17C, Fan: 3 (MAX), Swing (H): 5 (Auto)
11DA171804001E11DA17180063 04 01 000010350020E7
state[13] change from 0x00 to 0x04
state[14] change from 0x21 to 0x01

mode change from FAN to DRY
Power: On, Mode: 2 (DRY), Temp: 17C, Fan: 3 (MAX), Swing (H): 5 (Auto)
11DA171804001E11DA17180023 04 71 00001035002017
state[13] stays at 0x04
state[14] change from 0x01 to 0x71

mode change from DRY to COOL
Power: On, Mode: 7 (COOL), Temp: 25C, Fan: 3 (MAX), Swing (H): 5 (Auto) 11DA171804001E11DA17180073 04 21 00002035002027
state[13] stays at 0x04
state[14] change from 0x71 to 0x21

when press power button from ON to OFF,
Power: Off, Mode: 7 (COOL), Temp: 25C, Fan: 3 (MAX), Swing (H): 5 (Auto)
11DA171804001E11DA17180073 00 20 00002035002022
state[13] change from 0x04 to 0x00

You are right.

Thank you.

@crankyoldgit
Copy link
Owner

Yes, your are correct and I am sorry for not be exact on the code.
These hex code are all from real remote and when pressing mode change it changes many bytes.
I repeat again, these code from real remote.

Yes, I know they are. However, your code fails to be able reproduce these same messages.

Those bold bytes are changing in the real messages, but your code does not make similar changes, like the real remote does.

You need to work out what those changes are and why they change in the real remote messages, what it is linked to, so we can do the same in the ESP code version. Otherwise we are not producing the same message.

For example, Notice how you said two of the codes were the same, but the actual messages were different.
i.e. two different versions of the cold + on message. They should be the same, yet they are not. Something on the remote changed. It could be the clock on the remote if it has one, or some temperature sensor. I don't know. Only you can work that out as you have the remote and can see the display etc. There is still stuff about the bits in the real remote message you don't understand enough yet to all you to make a reliable emulation of the remote and it's messages.

@pasna
Copy link
Contributor Author

pasna commented Jul 22, 2019

Thanks for the comments. I will work hard on the remote.

Best regards

@pasna
Copy link
Contributor Author

pasna commented Jul 23, 2019

I called my local customer service, confirmed that Daikin AC model FHC30NUV2S that I installed has only 2 fan setting Min and Max and nothing in between not ever Auto. I attached pictures of remote control model BRC4C153, this remote has only few function but has complex states. I am stuck, not able to get through this complexity. Need your help.
IMG_8003
IMG_8004
IMG_8005

@crankyoldgit
Copy link
Owner

Some remotes also encode which button was pressed in side one of the bytes.
Does state[13] or state[14] correlate to the the physical button pressed in this or other cases perhaps?
e.g. could 00 be "power button" and 04 be "mode button". Try other buttons to see if they change and have consistent values too.

* Use/enforce only two values for fan speed.
* Use the new common routines in `toString()`.
* Add the fan speed and swing to the default/reset state.
* Simplify some code.
* Update unit tests accordingly.

FYI @pasna
@crankyoldgit
Copy link
Owner

@pasna I've made some more changes. Please git pull from your own github repo to include them.
The changes are basically to enforce the two fan speeds per request.
I've also updated the routines in ::toString() to the new ones used by other protocols.
Plus some other minor changes.

Regarding SwingHorizontal(), you've called it Horizontal (Left<->Right), but the image on the remote indicates it's probably Vertical(Up<->Down). Are you sure it is Horizontal?

@pasna
Copy link
Contributor Author

pasna commented Jul 23, 2019

This model FHC series are ceiling mount (photo attached) and they have 4 vents. I decided to call that horizontal. Please correct me if I am wrong.
Thank you
IMG_7981

@pasna
Copy link
Contributor Author

pasna commented Jul 23, 2019

Real remote unit works like this -
state[13] will change from 0x00 to 0x04 only when mode button is push. Then it will change back to 0x00 again if power button or temperature button or swing button is being push.
state[14] changes comply to mode change
at power ON
from COOL to FAN change from 0x21 to 0x01
from FAN to DRY change from 0x01 to 0x71
from DRY to COOL change from 0x71 to 0x21
at POWER OFF
from COOL to FAN change from 0x20 to 0x00
from FAN to DRY change from 0x00 to 0x70
from DRY to COOL change from 0x70 to 0x20
Thank you and best regards

@crankyoldgit
Copy link
Owner

I'll take a look and see about coding something up to support that.

@crankyoldgit
Copy link
Owner

Currently we have coded up an "Auto" mode. Is there one for this A/C? If there isn't. What should we map requests for "Auto" too? i.e. What should the default be? Cool/Heat/Dry or Fan? (actually, is there a Heat mode?)

@crankyoldgit
Copy link
Owner

If there are those modes, what are their state[14] changes?

@pasna
Copy link
Contributor Author

pasna commented Jul 24, 2019

Currently we have coded up an "Auto" mode. Is there one for this A/C? If there isn't. What should we map requests for "Auto" too? i.e. What should the default be? Cool/Heat/Dry or Fan? (actually, is there a Heat mode?)

This model does not equip with AUTO or HEAT mode, for my region default should be COOL mode.

Thanks

* remove Auto and Heat modes. Not supported.
* Default to cool mode.
* Handle internal message formation for modes better.
* Update unit tests accordingly.
* Remove hacks to get existing unit tests to pass.

FYI @pasna
@crankyoldgit
Copy link
Owner

@pasna I've push more changes to your personal master branch/repo. git pullfrom your repo and let me know how those changes go.
I think that's now covering everything.

@crankyoldgit
Copy link
Owner

Another update. I saw potential future issue.

@crankyoldgit crankyoldgit merged commit 7603a5b into crankyoldgit:master Jul 26, 2019
@pasna
Copy link
Contributor Author

pasna commented Jul 26, 2019

Good morning @crankyoldgit,
Tested e0e8281 and it works without problem. I am binding IRMQTTServer to Home Assistant and Homekit, it respond great on Home Assistant while Homekit for HASSIO is not totally match the protocol. HASSIO only support Thermostat not heaterCooler and Homekit does not has FAN mode and Dry Mode, of which actually not use in this South East Asia region anyway.
I come across another repository of homebridge-mqttthing recently and it support heaterCooler characteristic on Homekit which is kind of interesting. May have it a try.

crankyoldgit added a commit that referenced this pull request Jul 26, 2019
_v2.6.4 (20190726)_

**[Bug Fixes]**
- Fix some swing problems with the Mitsubishi HAVC protocol (#831)
- Fix parameter ordering for Gree in common a/c code. (#815)
- Fix parameters for Coolix in IRac::sendAc() (#829)
- IRMQTTServer: Fix sending >64 bit codes. (#811)

**[Features]**
- Daikin128: Full detailed support & common a/c support. (#832)
- Midea: Support native temp units of Celsius & SwingV. (#823)
- Gree: Support `YBOFB` models and bug fix. (#815)
- Pioneer: Fix sendPioneer with Pioneer specific timings (#830)
- Daikin128: Initial support for Daikin 17 Series/BRC52B63 (#828)
- Coolix: Better `toCommon()` support. (#825)
- Experimental detailed support for Daikin 176 bits (#816)
- Add setting of output options to A/C classes. (#808)
- Add invert flag support to Samsung AC (#807)

**[Misc]**
- Daikin176: making some change on Daikin176 to work with IRMQTTServer (#826)
- Reduce duplicate code to save (3K+) space. (#813)
- Daikin176: Experiment Daikin176bits with IRMQTTServer (#824)
- Update platformio.ini files for PlatformIO v4.0.0 (#812)
- Change repo URLs to new location. (#806)
- Move `htmlEscape()` to the IRutils namespace (#801)
@crankyoldgit crankyoldgit mentioned this pull request Jul 26, 2019
crankyoldgit added a commit that referenced this pull request Jul 26, 2019
_v2.6.4 (20190726)_

**[Bug Fixes]**
- Fix some swing problems with the Mitsubishi HAVC protocol (#831)
- Fix parameter ordering for Gree in common a/c code. (#815)
- Fix parameters for Coolix in IRac::sendAc() (#829)
- IRMQTTServer: Fix sending >64 bit codes. (#811)

**[Features]**
- Daikin128: Full detailed support & common a/c support. (#832)
- Midea: Support native temp units of Celsius & SwingV. (#823)
- Gree: Support `YBOFB` models and bug fix. (#815)
- Pioneer: Fix sendPioneer with Pioneer specific timings (#830)
- Daikin128: Initial support for Daikin 17 Series/BRC52B63 (#828)
- Coolix: Better `toCommon()` support. (#825)
- Experimental detailed support for Daikin 176 bits (#816)
- Add setting of output options to A/C classes. (#808)
- Add invert flag support to Samsung AC (#807)

**[Misc]**
- Daikin176: making some change on Daikin176 to work with IRMQTTServer (#826)
- Reduce duplicate code to save (3K+) space. (#813)
- Daikin176: Experiment Daikin176bits with IRMQTTServer (#824)
- Update platformio.ini files for PlatformIO v4.0.0 (#812)
- Change repo URLs to new location. (#806)
- Move `htmlEscape()` to the IRutils namespace (#801)
@crankyoldgit
Copy link
Owner

FYI, this PR has been included in the v2.6.4 release of the library.

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.

2 participants