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

Room temperature formula #8

Open
niclet opened this issue Mar 2, 2019 · 115 comments
Open

Room temperature formula #8

niclet opened this issue Mar 2, 2019 · 115 comments

Comments

@niclet
Copy link

niclet commented Mar 2, 2019

Hi,
Thanks for you excellent work.
I'm trying to make it work on ESP8266 directly.
But in my case, the room temperature seems to be not very accurate.
Do you remember why the formula was set to
//Calculate current room temperature in degrees Celsius from bitfield 7 using:
// (BF7 - 61) / 4 (note: Calibration of temperature needs to be checked further)
Is it estimated or is there any "reason" for this formula, especially the "- 61" ?
Or does it mean my aircon is not correctly calibrated ?

Best regards.

@coyote1
Copy link

coyote1 commented Mar 5, 2019

Hi,
did you manage it only with the esp8266?
I have problems with current setup, sometimes connection to MQTT failed and then it can't connect again. I don't know why.
Hope anyone keeps this project alive (maybe you :-)) For tests, I like to make myself available

@niclet
Copy link
Author

niclet commented Mar 5, 2019

Hi,

For now, I have started from scratch.
Since SPI slave seems to be quite undocumented on esp8266, I read MOSI data directly from a simple input pin. For now, I get 20 bytes fields with expected signature, checksum and so on. And in my case (SRK35ZMX-S) the room temperature seems to be quite inaccurate, which led to my question about temperature formula. Maybe the temperature field is just a thermistor value which needs to be used with a temperature table, I don't know. Moreover, since the thermistor is inside the aircon, I don't know how it keeps on getting the correct room temperature while heating.

If you're interested, please take care of voltage, I have burned many components.
MOSI line is ~5V, which is too high for esp8266. I now use a logic level convertor to 3.3V

Still many work :)

@mukowman
Copy link

If you want someone to test I have some NodeMCUs and an MHI AC, willing to test if you want to share your code.

@niclet
Copy link
Author

niclet commented Mar 22, 2019

Thanks :)
For now, since I use software implementation of SPI, I have switched to ESP32 to get 240Mhz. With my ESP8266, even boosted to 160Mhz, I had some frames drop when monitoring CLK rising and falling at the same time.
I'm waiting for my RC-E5 and SC-BIKN-E. It seems that RC-E5 can act as a temperature sensor, which means that we could give our own temperature to the MHI unit instead of using its internal sensor which is quite inefficient to my mind. I hope to improve understanding of the protocol.

@niclet
Copy link
Author

niclet commented Mar 30, 2019

I have received wired remote and interface. I can now monitor CLK, MOSI and MISO correctly.
Next step : analyse MISO temperature from wired remote.

@riov
Copy link

riov commented Jul 29, 2019

niclet, did you managed to get any additional info about the protocol now that you have wired remote and interface? Which exactly remote do you have?

@niclet
Copy link
Author

niclet commented Aug 1, 2019

riov, unfortunately, I had not enough time to work correctly on this project, but I will continue as soon as possible.
The remote I use is RC-E5 with interface SC-BIKN-E.
I got them from https://www.orionairsales.co.uk, quite expensive that's why I will work on it for sure :)

@riov
Copy link

riov commented Aug 1, 2019

niclet, unfortunately, you have bought an older wired remote control. It does not support many features like automatic fan speed, control of L/R louvers, hi-power mode and so on.
I have created a program, which allows to analyze MHI's communication protocol. If you have Saleae and need some help, you can contact me.

@niclet
Copy link
Author

niclet commented Aug 2, 2019

Yes, I have a Saleae with 8 pins (official product). Do you analyse data between MHI and interface without remote or do you have another remote control? All help is welcome :)

@riov
Copy link

riov commented Aug 2, 2019

niclet, I intercept data between the AC unit and official WiFi module.
You can send me data captures from Logic, or you can setup Logic server so that I could connect to it and download the data automatically.

@niclet
Copy link
Author

niclet commented Aug 2, 2019

Oh, OK. Do you have a link for the official WiFi module ? Seems I started in wrong direction with the wired remote.

@niclet
Copy link
Author

niclet commented Aug 2, 2019

@niclet
Copy link
Author

niclet commented Aug 2, 2019

Or http://www.mitsubishi-electric.co.nz/heatpump/i/69744/wi-fi-interface
But my MHI seems not to be supported (SRK35ZMX-S)

@riov
Copy link

riov commented Aug 2, 2019

I have this one, and it does support your AC. I am not sure if you will get much more extra insight in MHI's data protocol by purchasing it. Just as your current wired remote control, it does not support many features. The only hope is the latest wired remote control RC-EX3.

@niclet
Copy link
Author

niclet commented Aug 2, 2019

Ok. For now, without Seleae, I already get binary data blocks like this:
6c.80.04.50.00.2a.99.00.00.88.00.ff.ff.ff.ff.ff.00.00.07.86 (from AC to remote, and slightly different from remote to AC)
I already identified some parts by changing settings of the AC from remote.
But temperature (seems to be 7th byte) is not obvious to decode into real °C or °F

@riov
Copy link

riov commented Aug 3, 2019

Based on the data you have provided, I can say the following about your AC: power is off, mode: Heat, fan speed is ULo, U/D vanes swing, setpoint temp is 21C, room temp is 23C.

@niclet
Copy link
Author

niclet commented Aug 3, 2019

I extract same info from the binary data.
For the room temp, do you use (byte_7 - 61) / 4 formula ?
In this case, it gives 23C, but in some cases, the formula doesn't give exactly the temp displayed on the remote.

@niclet
Copy link
Author

niclet commented Aug 3, 2019

I think I will have to use a hair dryer to create a matching table and try to extract a formula.

@riov
Copy link

riov commented Aug 3, 2019

Yes, I use the same formula and it looks to be working great in my case. If you can capture a data packet that is giving you a wrong temp, please provide it.
I would be interested in getting longer data captures done with Saleae. There is still a lot of unknown left within this protocol.

@riov
Copy link

riov commented Aug 7, 2019

niclet, do you have any updates? Have you managed to figure out what is wrong with your temp?

@niclet
Copy link
Author

niclet commented Aug 9, 2019

I have used an hair dryer and got following data (byte 7 in hex = displayed temp = formula)
c5 = 34 = 34.00
c2 = 33 = 33.25
bf = 32 = 32.50
ba = 31 = 31.25
b4 = 30 = 29.75
b3 = 30 = 29.50
b1 = 29 = 29.00
b0 = 29 = 28.75
ae = 29 = 28.25
ad = 28 = 28.00
ab = 28 = 27.50
aa = 28 = 27.25
a9 = 27 = 27.00
a7 = 27 = 26.50
a6 = 27 = 26.25
a4 = 26 = 25.75

So formula seems to be quite good.

And while looking at the formula, I was thinking about the conversion between Celsius and Fahrenheit :
T(°C) = (T(°F) - 32) × 5/9

If we consider T(°F) = byte7 / 2, it is nearly the formula.
Unfortunately, when computing values, it is more different that current formula.

But I think it may have a link with F and C.

By the way, the wired remote can't display temperature higher than 35°C even if temperature is higher.

@niclet
Copy link
Author

niclet commented Aug 9, 2019

I will try to switch the wired remote in Fahrenheit to check values.

@niclet
Copy link
Author

niclet commented Aug 9, 2019

Byte7 could also be the direct value of the temperature sensor maybe like a resistor.

@niclet
Copy link
Author

niclet commented Aug 9, 2019

Some temperature samples with remote in Fahrenheit

c0 = 92°F
b9 = 89°F
b7 = 88°F
b6 = 88°F
b4 = 87°F
b3 = 86°F
b1 = 86°F
b0 = 85°F
ae = 84°F
ad = 84°F
ab = 83°F
aa = 82°F
a9 = 82°F
a7 = 81°F
a6 = 81°F
a4 = 80°F
a3 = 79°F
a1 = 78°F
a0 = 78°F
9f = 77°F
9d = 77°F
9c = 76°F

@riov
Copy link

riov commented Aug 9, 2019

One thing I would like to point out is that you need to let the temperature rest before taking measurements. I was capturing continuous communication with Saleae for long time periods and I have noticed that quite often indoor temp was fluctuating by 0.25 degrees multiple times within one second. What I am trying to say is that it is possible RC-E5 does not update indoor temp value immediately.

The best way to find out how exactly does RC-E5 convert byte 7 to temp would be to connect Arduino directly to it (its interface module) and make it a SPI master. That way you could feed predetermined data and see how it decodes it.

By the way, are you sure your RC-E5 displays air temperature, not its own temperature? More info.

@niclet
Copy link
Author

niclet commented Aug 9, 2019

For now, I already decode SPI myself with ESP32 and temperature change on the remote occurs really just after a change in the SPI data and remains stable for a while.
I was just thinking about sending my own data to be able to create a full mapping table between data and temperature :)
And yes, my remote is correctly setup to be a thermostat :)

But I have very few time to work on it unfortunately.

@riov
Copy link

riov commented Aug 11, 2019

Well, it looks like it is a dead end. I was hoping to find out more about this protocol than it is already known. Unfortunately, without having the latest wired remote control it is next to impossible to draw any conclusions about what is really happening apart from stating the obvious, like byte #12 is always 0xFF and byte #18 is always 0x00. I do not know how to figure out what is the meaning of those bytes and if they can hold different values.
I was thinking about ordering both RC-EX3 and compatible interface module, so that I could test them out and return within 14 days (I do not really need them). But that would be a huge hassle given that they are not sold locally.

If you find any spare time to build a prototype that allows you to send data directly to your RC-E5 please let us know. Not only it would interesting to see how exactly does room temperature map to byte # 7, but it would also be interesting to try out different values for bytes #12, #18 etc. Long data captures made with Saleae would also be helpful.

@niclet
Copy link
Author

niclet commented Aug 11, 2019

Through the wired remote, we can configure many things, like for example : use the temperature sensor of the remote by adding 3° to it. There are many parameters.
When manipulating these parameters, there is a "downloading" step to get current settings from MHI unit. And during this step, bytes 12...16 which are usually FF are modified.

IMG_8555

@riov
Copy link

riov commented Aug 11, 2019

I have only observed bytes #13-16 being other than 0xFF, byte #12 is always the same in my setup.
If you have some spare time, please run Saleae for a few minutes or so and capture what is being sent and received when each option is being changed.

@niclet
Copy link
Author

niclet commented Aug 15, 2019

I have just restarted from scratch with a clean breadboard.
MHI provides 12V power with 5V CLK/MOSI/MISO lines and ESP32 uses 3.3V input/output.
So I use voltage regulators from 12V to 5V and 3.3V to power bidirectional convertors between 5V and 3.3V input/output
Unfortunately, I can spend only few time per day on this project, but I'll do it !! :)
Here is the breadboard, not totally finished yet :)

image

@riov
Copy link

riov commented Nov 16, 2019

Well, you need to try toggling unknown bits in MOSI and see how remote reacts to that. That's not complicated given that you have already managed to modify MOSI stream before. That will safe us a lot
of time.

@niclet
Copy link
Author

niclet commented Nov 18, 2019

I have just received the RC-EX3.
No software provided for USB connection. The manual says it is available on web site, but don't know which.
I'll try to take some time for some quick test tonight :)

@riov
Copy link

riov commented Nov 18, 2019

Great news. Please try if you can set automatic fan speed, L/R louvers' position, hi-power mode.

That's very odd that you have not received a CD with software. I have looked all over the web, software is not available for download. More importantly, there is no place where you can fill out a request to provide you a download link.

@niclet
Copy link
Author

niclet commented Nov 20, 2019

A quick test for fan speed, it deals with byte 4, as already discovered.

28 (1000) = fan speed 1
29 (1001) = fan speed 2
22 (0010) = fan speed 3
2e (1110) = fan speed 4
2f (1111) = fan speed auto

Regarding HiPower,
6c/a9 80/00 04/07 53/53 2f/2e 2a/bc 9c/ff 00/00 00/00 80/80 02/04 ff/00 ff/ff ff/ff ff/ff ff/ff 07/0f 00/04 07/07 bc/7f
6c/a9 80/00 04/07 53/53 2e/2e bc/bc 9c/ff 00/00 00/00 80/80 02/04 ff/00 ff/ff ff/ff ff/ff ff/ff 07/0f 00/04 08/07 4d/7f
So, the remote requests fan speed 4 (2e) and switches temperature from (2a=21°C) to (bc=30°C)
According to doc, HiPower remains active for 15mn. So this is probably something which is controlled by the remote itself and turned off after 15mn.

More tests later :)

@loki-amorf
Copy link

loki-amorf commented Nov 20, 2019 via email

@loki-amorf
Copy link

loki-amorf commented Nov 20, 2019 via email

@riov
Copy link

riov commented Nov 20, 2019

@loki-amorf, thanks for the help. Is it compatible with the latest wired remote control (RC-EX3) and does it support all its new features? The title of that software says it is for RC-EX1.

@loki-amorf
Copy link

loki-amorf commented Nov 20, 2019 via email

@riov
Copy link

riov commented Nov 20, 2019

A quick test for fan speed, it deals with byte 4, as already discovered.

28 (1000) = fan speed 1
29 (1001) = fan speed 2
22 (0010) = fan speed 3
2e (1110) = fan speed 4
2f (1111) = fan speed auto

What is discovered up until now is this. It is the first two bits of 4th byte and the 6th bit of 9th byte. Can you please clarify? By the way, if I set fan speed to Auto with my remote control, I see no changes in CNS protocol.

What about controlling position of L/R louvers?

@niclet
Copy link
Author

niclet commented Nov 21, 2019

Quick update for tonight.
During my test yesterday, only byte 4 (bit 0-3) did change when changing fan speed. 6th bit of 9th byte didn't change. I'll test it again asap.

Regarding L/R or U/L, I don't understand. It is not proposed on the remote, and according to the manual, it means the unit doesn't support it. But the "3D Auto" setting is available on the IR remote and turn on/off a LED on the unit when activated/deactivated. I don't have the "3D Auto" on the RC-EX3 because it is part of the same settings as L/R U/L.
There might have been an issue during RC-EX3 first initialisation, when the remote detects unit capabilities.
I'll try to do some test after some kind of reset if available.

@riov
Copy link

riov commented Nov 21, 2019

I have just looked into your indoor unit's user manual (SRK35ZMX-S). It does suggest you can control L/R airflow. See the images attached.
L_R1
L_R2

@niclet
Copy link
Author

niclet commented Nov 22, 2019

Actually I can change L/R and U/D with IR remote, the unit reacts accordingly, but nothing changes on the MOSI line. This is probably why the RC-EX3 doesn't show this setting.

@riov
Copy link

riov commented Nov 22, 2019

Yes, I know that MOSI line does not change when L/R direction is set with a remote control. The same happens if you set Fan speed to Auto. However, RC-EX3 allows you to set this mode. So, I was hopping it will allow you to control L/R louvers as well (its user manual says it has such capability).

Is there anything extra you can do with RC-EX3 that you was not able with RC-E5? For example, can you select between five (not four) U/D directions. Can you enable/disable Silent mode? Is there anything else you can do?

@niclet
Copy link
Author

niclet commented Nov 23, 2019

For now, I confirm that fan speed is set on bits 0,1,2 of byte 4, nothing changes on byte 9 in my case.
bits 000 = fan speed 1
bits 001 = fan speed 2
bits 010 = fan speed 3
bits 110 = fan speed 4
bits 111 = fan speed auto

In my case, the RC-EX3 doesn't allow me to change L/R or U/D, the manual says that the availability of the setting depends on the unit. This is strange, since my unit supports it with IR remote.

Regarding HiPower and Eco, I feel that RC-EX3 only changes temperature and fan speed. Actually, it doesn't seem to really activate these modes on the unit (HiPower LED is not turned on and Run LED doesn't turn from GREEN to BLUE in ECO mode, contrary to activation of these modes with IR remote)

For now, only the IR remote gives access to all settings. And I have not found any way to turn off BEEP when using it. It might be possible with some modification inside the unit itself.

@riov
Copy link

riov commented Nov 23, 2019

What about Silent mode? It is described on page 64 in the RC-EX3 user's manual.

@niclet
Copy link
Author

niclet commented Nov 23, 2019

Silent mode is only available for external unit. Request is sent through MISO line, whose data already fluctuates all the time, I can't identify anything.
I have forced L/R with IR remote and reset RC-EX3, but after full reinitialisation, it doesn't show the L/R setting :(
The RC-EX3 seems to be quite useless according to what we already knew about the protocol

@riov
Copy link

riov commented Nov 23, 2019

In my case, the RC-EX3 doesn't allow me to change L/R or U/D.

Could you adjust U/D with RC-E5?

Request is sent through MISO line, whose data already fluctuates all the time, I can't identify anything.

Please provide data capture, I will take a look.

One more area to investigate could be error codes. For example, you could disconnect communication/signal wire from your inside unit and see how MOSI changes.
signal

@niclet
Copy link
Author

niclet commented Nov 24, 2019

RC-E5 has same behaviour as RC-EX3.

U/D is available but not L/R (mistake from my side regarding RC-EX3 when I said U/D was not available), this is what we already knew:

b3[6]
= 0 => U/D swing OFF
= 1 => U/D swing ON

b4[45]
= 00 => U/D 1
= 01 => U/D 2
= 10 => U/D 3
= 11 => U/D 4

U/D position (1-4) is still valid when swing is ON in order to get previous position back when swing is turned OFF

Regarding error codes, I don't want to modify internal connections of the unit, it could lead to unexpected behaviour and require intervention of the installer. And it won't help me to replace the IR remote (this is my own goal)

@PureDJ
Copy link

PureDJ commented Dec 10, 2019

Guys,
I'm wondering, are you using the USB on the RC-EX3? or the XY lines?
If it's the XY lines, I'm very interested, if it's the USB, I have made some logs of the data, I don't know if that's interesting

@riov
Copy link

riov commented Dec 12, 2019

If it's the XY lines, I'm very interested

What do you expect to find out from that log? What is important is CNS communication. If command is sent over the USB or XY lines, but it is not translated and sent over the CNS, how will it help us?

I have made some logs of the data, I don't know if that's interesting

Yes it is.

What software do you use to control your RC-EX3? Does it allow to control all the features that RC-EX3 offers?

@PureDJ
Copy link

PureDJ commented Dec 12, 2019

The question was a bit offtopic, but I'm working at home on my MHI A/C it has the CNS connector.
But we have also a MHI A/C without, it has only the XY lines and a RC-EX3, it's a VRF ducted system.
There is not much to find about the XY lines,
The logs I made were not done on the CNS connector, but on the connection between the RC-EX3 and the PC (via USB)
The software I use is the software Sergi (loki-amorf) provided (the links), connected the PC to the RC-EX3 and logged all data (it's just a serial to USB converter inside the RC-EX3)
And for as far as I have checked it can control the RC-EX3 completely, but I logged only the basic features.

@riov
Copy link

riov commented Dec 12, 2019

I see, please provide the logs. I doubt it will help much, but just in case.

@niclet, do you think there is anything else we can do to further investigate the protocol? Maybe you would be willing to lend me your RC-EX3 + interface module for a week or two?

@absalom-muc
Copy link

The error code is coded in DB4 (byte 7 of the MOSI frame).

btw: I created a new Github repository. There is a ESP8266 software to control the AC and the documentation of the known frame bytes.

@riov
Copy link

riov commented Dec 16, 2019

@niclet can try modifying DB4 byte and see what error message is shown on RC-EX3 for each value.

absalom-muc added a commit to absalom-muc/MHI-AC-Ctrl that referenced this issue Dec 17, 2019
Due to update from niclet in the thread rjdekker/MHI2MQTT#8 (comment)
@Meesen0743
Copy link

@PureDJ Did you have any trouble running the PC-Remote software?
I am trying to connect to a Rc-EX3 but getting Run-Time Error '9' ,
Tried new drivers and installing different VB versions but no luck

@PureDJ
Copy link

PureDJ commented Jul 26, 2020

@PureDJ Did you have any trouble running the PC-Remote software?
I am trying to connect to a Rc-EX3 but getting Run-Time Error '9' ,
Tried new drivers and installing different VB versions but no luck

Actually yes, I tried everything on Windows 10 and 7 without luck... I had an old XP machine laying arround, used that one and it worked.

@Meesen0743
Copy link

Can you possibly share your findings, don't want to take over this git though so maybe best to start your own repository. Alternatively I am starting to collect my findings here (https://github.com/Meesen0743/MHI-RC-to-MQTT)

@PeterPHanlon
Copy link

Interesting stuff. I liked the hairdryer activity. I have a large 3-phase ducted MHI aircon, and looking forward to getting somewhere with it. I downloaded the entire MHI manual.

The two boards approach by rjdekker looks pretty good. I was hoping that I emulate my hard-wired controller, and access all of the test data that it sees like the half a dozen thermistor temps etc etc.

@mcchas
Copy link

mcchas commented Feb 12, 2024

bit late to the thread.. i've been using this on my ex3 - rc-ex3-esp

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