echavet / MitsubishiCN105ESPHome

ESPHome firmware inspired by GeoffDavis’s esphome-mitsubishiheatpump, directly integrating the SwiCago library within its codebase.
207 stars 42 forks source link

Fan runs then unit shuts down, Fan Only doesnt work #19

Closed disruptivepatternmaterial closed 8 months ago

disruptivepatternmaterial commented 9 months ago

I have 5 units, here is one of the esphome code (below).

What happens is that I turn the fan to high when it is in heat mode and nothing happens (the fan stays the same) and then when I put the unit in fan only mode, it blows for a split second and then the unit beeps and shuts down. This happens on all 5 of the units. I will also attach logs.

In the log, I think you can see, I heat is on, I turn the fan to high (the fan does not go on) and then I switch it to Fan only and the fan comes on for a second, then the unit shuts down. This seems to work fine with the remote, so I am not sure it is the unit.

Let me know if there is some other data I can provide....because you code has made me so thrilled to dump the useless kumo adapters!

THANKS!!! lr-split.log


substitutions:
  devicename: LRSplitUnit
  hostname: lr-split-unit
  friendlyname: Living Room Split Unit
  location: Inside
  floor: 1stfloor
  room: Living Room
  i2c_bus_a_sda: GPIO38
  i2c_bus_a_scl: GPIO39
  remote_temp_sensor: sensor.living_room_average_remote_split_temp

esphome:
  name: ${hostname}
  friendly_name: ${friendlyname}  
  area: ${room}
  comment: lilygo temp lr split unit

esp32:
  board: esp32-s3-devkitc-1 #m5stack-stamps3
  framework:
    type: arduino

#<<: !include common/api.yaml
<<: !include common/ota.yaml
<<: !include common/logger.yaml
<<: !include common/web_server.yaml
<<: !include common/wifi.yaml
<<: !include common/packages.yaml
<<: !include common/mqtt.yaml
<<: !include common/time.yaml
#<<: !include common/mitsu-split-unit-stamp.yaml 
#<<: !include common/mitsu-split-unit-stamp-cn105.yaml

text_sensor:
  - !include common/sensors/wifi_text_sensors.yaml
  - !include common/sensors/location_text_sensor.yaml
  - !include common/sensors/floor_text_sensor.yaml
  - !include common/sensors/room_text_sensor.yaml

api:
  services:
    - service: set_remote_temperature
      variables:
        temperature: float
      then:
        - lambda: id(splitunit).set_remote_temperature(temperature);

    - service: use_internal_temperature
      then:
        - lambda: id(splitunit).set_remote_temperature(0);

  encryption:
    key: !secret api_key_1
  reboot_timeout: 2min

binary_sensor:
  - platform: gpio
    pin: 
      number: 0
      inverted: true
    name: Button

external_components:
  - source: github://echavet/MitsubishiCN105ESPHome
    refresh: 1h

uart:
  id: HP_UART
  baud_rate: 2400
  tx_pin: 44
  rx_pin: 43

climate:
  - platform: cn105
    name: ${friendlyname}
    id: splitunit
    update_interval: 15s
    compressor_frequency_sensor:
      name: Compressor Frequency
    vertical_vane_select:
      name: Vertical Vane Orientation
    remote_temperature_timeout: 30min  

sensor:
  - platform: homeassistant
    name: Remote Temperature
    id: room_temperature
    entity_id: ${remote_temp_sensor}
    on_value:
      then:
        - lambda: id(splitunit).set_remote_temperature((x-32.0) * 5.0/9.0);

  - !include common/sensors/wifi_sensor_db.yaml
  - !include common/sensors/wifi_sensor_percent.yaml

button:
  - platform: restart
    name: Restart
echavet commented 9 months ago

I have 5 units, here is one of the esphome code (below).

Are they connected to the same external compressor?

What happens is that I turn the fan to high when it is in heat mode and nothing happens (the fan stays the same) and then when I put the unit in fan only mode, it blows for a split second and then the unit beeps and shuts down. This happens on all 5 of the units. I will also attach logs.

Ok, all of them ??? With this same scenario or do some unit power off in other ways ? I don't know if you were expected the fan to blow HIGH when mode was HEAT and you've changed FAN mode to HIGH but as the wanted temperature (18.5°C) is bellow the room temp (20.5 °C) I think the fan does not need to blow HIGH. This must be normal. This is why it started to blow HIGH when you set it to FAN_ONLY. Don't you have the same behavior with the IR Remote Control ?

In the log, I think you can see, I heat is on, I turn the fan to high (the fan does not go on) and then I switch it to Fan only and the fan comes on for a second, then the unit shuts down. This seems to work fine with the remote, so I am not sure it is the unit.

In the logs all I see looks good. I can see all you have described including the FAN going on HIGH in HEAT mode, but I don't see anything about the final power OFF. Did you trunc the end of the logs? Or did the chip freeze so there is no more log? Because last received settings are good:

[06:53:14][D][Decoder:130]: [0x02 is settings]
[06:53:14][D][Decoder:137]: [Power : **ON**]
[06:53:14][D][Decoder:138]: [iSee  : 0]
[06:53:14][D][Decoder:139]: [Mode  : FAN]
[06:53:14][D][Decoder:146]: tempMode is true
[06:53:14][D][Decoder:151]: [Consigne °C: 18.500000]
[06:53:14][D][Decoder:154]: [Fan: 4]
[06:53:14][D][Decoder:157]: [Vane: SWING]

Let me know if there is some other data I can provide....because you code has made me so thrilled to dump the useless kumo adapters!

I would like to help you. But there is nothing in the log that shows a POWER OFF. What I can say is that the heatpump shouldn't beep when it is controlled through the ESP.

I will test this same scenario on my units and tell you more.

If you have some more logs you can put them here again.

disruptivepatternmaterial commented 9 months ago

Ill get you the right / full answers and more logs ASAP...work calls for the day here!

I can tell you I have 5 inside units on 5 separate outside units - so there should be no conflict and that I meant blink not beep :) but I will be more detailed ASAP!

echavet commented 9 months ago

I see you are using mqtt. Are you using the climate card with a reference to you unit through the MQTT integration ?

Bascht74 commented 9 months ago

I think: Try to reproduce it only with the remote of the device. If it is not possible there, than it cannot be possible with the component by design. Some things the device seems to limit. If you can change the fan to hight in fan mode there seems to be nothing wrong with setting the fan itself. The device can react differently with different operating modes.

echavet commented 9 months ago

hello @disruptivepatternmaterial, Are you using mqtt ? In this case could you test with reference to entities through esphome integration and not mqtt one ? Could you also get the last head version ? thanks

disruptivepatternmaterial commented 9 months ago

Hey I haven't had time to document this in the detail I want, but I do not use MQTT for anything. I can remove it...I am not using it for anything it is just my normal device shell and I used to use it...just haven't had time to remove it / lazy :)

So what I can tell you is that on all my of devices the fan change doesnt do anything when the device is in heat mode or cool more and when I put it in high on fan only mode the device shutdown (it blinks and the fins close and reports off). When I have a bit more time I will do a step by step walk through and share logs.

I only mentioned the remote because it was my confirmation that the device would respond. Also I remove kumo wifi from these units and when they would work...which was rare...the device would also run the fan on high when I asked it to.

disruptivepatternmaterial commented 9 months ago

Here is a log from FAN ONLY set by the remote, this works as expected.

When I go into FAN ONLY mode with your code, the unit shuts down.

Will keep trying to see why, but I am going to guess you are more familiar with these logs than I am ! HAHA

[10:21:32][D][READ:142]: FC 62 01 30 10 02 00 00 01 07 07 06 00 00 00 0C B0 00 00 00 00 8A 
[10:21:32][D][Decoder:150]: [0x02 is settings]
[10:21:32][D][Decoder:158]: [Power : ON]
[10:21:32][D][Decoder:159]: [iSee  : 0]
[10:21:32][D][Decoder:160]: [Mode  : FAN]
[10:21:32][D][Decoder:172]: [Temp °C: 24.000000]
[10:21:32][D][Decoder:175]: [Fan: 4]
[10:21:32][D][Decoder:178]: [Vane: AUTO]
[10:21:32][D][WRITE:142]: FC 42 01 30 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7A 
[10:21:33][D][READ:142]: FC 62 01 30 10 03 00 00 0A 00 00 A8 00 00 00 00 00 00 00 00 00 A8 
[10:21:33][D][Decoder:214]: [Room °C: 20.000000]
[10:21:33][D][WRITE:142]: FC 42 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 
[10:21:33][D][READ:142]: FC 62 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 57 
[10:21:33][D][Decoder:225]: [0x06 is status]
[10:21:34][D][WRITE:142]: FC 42 01 30 10 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7B 
[10:21:34][D][READ:142]: FC 62 01 30 10 02 00 00 01 07 07 06 00 00 00 0C B0 00 00 00 00 8A 
[10:21:34][D][Decoder:150]: [0x02 is settings]
[10:21:34][D][Decoder:158]: [Power : ON]
[10:21:34][D][Decoder:159]: [iSee  : 0]
[10:21:34][D][Decoder:160]: [Mode  : FAN]
[10:21:34][D][Decoder:172]: [Temp °C: 24.000000]
[10:21:34][D][Decoder:175]: [Fan: 4]
[10:21:34][D][Decoder:178]: [Vane: AUTO]
[10:21:34][D][WRITE:142]: FC 42 01 30 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7A 
[10:21:35][D][READ:142]: FC 62 01 30 10 03 00 00 0A 00 00 A8 00 00 00 00 00 00 00 00 00 A8 
[10:21:35][D][Decoder:214]: [Room °C: 20.000000]
[10:21:35][D][WRITE:142]: FC 42 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 
[10:21:35][D][READ:142]: FC 62 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 57 
[10:21:35][D][Decoder:225]: [0x06 is status]
[10:21:36][D][WRITE:142]: FC 42 01 30 10 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7B 
[10:21:36][D][READ:142]: FC 62 01 30 10 02 00 00 01 07 07 06 00 00 00 0C B0 00 00 00 00 8A 
[10:21:36][D][Decoder:150]: [0x02 is settings]
[10:21:36][D][Decoder:158]: [Power : ON]
[10:21:36][D][Decoder:159]: [iSee  : 0]
[10:21:36][D][Decoder:160]: [Mode  : FAN]
[10:21:36][D][Decoder:172]: [Temp °C: 24.000000]
[10:21:36][D][Decoder:175]: [Fan: 4]
[10:21:36][D][Decoder:178]: [Vane: AUTO]
[10:21:36][D][WRITE:142]: FC 42 01 30 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7A 
[10:21:37][D][READ:142]: FC 62 01 30 10 03 00 00 0A 00 00 A8 00 00 00 00 00 00 00 00 00 A8 
[10:21:37][D][Decoder:214]: [Room °C: 20.000000]
[10:21:37][D][WRITE:142]: FC 42 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 
[10:21:37][D][READ:142]: FC 62 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 57 
[10:21:37][D][Decoder:225]: [0x06 is status]
[10:21:38][D][WRITE:142]: FC 42 01 30 10 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7B 
[10:21:38][D][READ:142]: FC 62 01 30 10 02 00 00 01 07 07 06 00 00 00 0C B0 00 00 00 00 8A 
[10:21:38][D][Decoder:150]: [0x02 is settings]
[10:21:38][D][Decoder:158]: [Power : ON]
[10:21:38][D][Decoder:159]: [iSee  : 0]
[10:21:38][D][Decoder:160]: [Mode  : FAN]
[10:21:38][D][Decoder:172]: [Temp °C: 24.000000]
[10:21:38][D][Decoder:175]: [Fan: 4]
[10:21:38][D][Decoder:178]: [Vane: AUTO]
[10:21:38][D][WRITE:142]: FC 42 01 30 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7A 
[10:21:39][D][READ:142]: FC 62 01 30 10 03 00 00 0A 00 00 A8 00 00 00 00 00 00 00 00 00 A8 
[10:21:39][D][Decoder:214]: [Room °C: 20.000000]
[10:21:39][D][WRITE:142]: FC 42 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 
[10:21:39][D][text_sensor:064]: 'Room': Sending state 'Living Room'
[10:21:39][D][READ:142]: FC 62 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 57 
[10:21:39][D][Decoder:225]: [0x06 is status]
[10:21:40][D][WRITE:142]: FC 42 01 30 10 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7B 
[10:21:40][D][READ:142]: FC 62 01 30 10 02 00 00 01 07 07 06 00 00 00 0C B0 00 00 00 00 8A 
[10:21:40][D][Decoder:150]: [0x02 is settings]
[10:21:40][D][Decoder:158]: [Power : ON]
[10:21:40][D][Decoder:159]: [iSee  : 0]
[10:21:40][D][Decoder:160]: [Mode  : FAN]
[10:21:40][D][Decoder:172]: [Temp °C: 24.000000]
[10:21:40][D][Decoder:175]: [Fan: 4]
[10:21:40][D][Decoder:178]: [Vane: AUTO]
[10:21:40][D][WRITE:142]: FC 42 01 30 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7A 
[10:21:41][D][READ:142]: FC 62 01 30 10 03 00 00 0A 00 00 A8 00 00 00 00 00 00 00 00 00 A8 
[10:21:41][D][Decoder:214]: [Room °C: 20.000000]
[10:21:41][D][WRITE:142]: FC 42 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 
[10:21:41][D][READ:142]: FC 62 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 57 
[10:21:41][D][Decoder:225]: [0x06 is status]
[10:21:42][D][WRITE:142]: FC 42 01 30 10 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7B 
[10:21:42][D][READ:142]: FC 62 01 30 10 02 00 00 01 07 07 06 00 00 00 0C B0 00 00 00 00 8A 
[10:21:42][D][Decoder:150]: [0x02 is settings]
[10:21:42][D][Decoder:158]: [Power : ON]
[10:21:42][D][Decoder:159]: [iSee  : 0]
[10:21:42][D][Decoder:160]: [Mode  : FAN]
[10:21:42][D][Decoder:172]: [Temp °C: 24.000000]
[10:21:42][D][Decoder:175]: [Fan: 4]
[10:21:42][D][Decoder:178]: [Vane: AUTO]
[10:21:42][D][WRITE:142]: FC 42 01 30 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7A 
[10:21:43][D][READ:142]: FC 62 01 30 10 03 00 00 0A 00 00 A8 00 00 00 00 00 00 00 00 00 A8 
[10:21:43][D][Decoder:214]: [Room °C: 20.000000]
[10:21:43][D][WRITE:142]: FC 42 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 
[10:21:43][D][READ:142]: FC 62 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 57 
[10:21:43][D][Decoder:225]: [0x06 is status]
[10:21:44][D][WRITE:142]: FC 42 01 30 10 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7B 
[10:21:44][D][READ:142]: FC 62 01 30 10 02 00 00 01 07 07 06 00 00 00 0C B0 00 00 00 00 8A 
[10:21:44][D][Decoder:150]: [0x02 is settings]
[10:21:44][D][Decoder:158]: [Power : ON]
[10:21:44][D][Decoder:159]: [iSee  : 0]
[10:21:44][D][Decoder:160]: [Mode  : FAN]
[10:21:44][D][Decoder:172]: [Temp °C: 24.000000]
[10:21:44][D][Decoder:175]: [Fan: 4]
[10:21:44][D][Decoder:178]: [Vane: AUTO]
[10:21:44][D][WRITE:142]: FC 42 01 30 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7A 
[10:21:45][D][READ:142]: FC 62 01 30 10 03 00 00 0A 00 00 A8 00 00 00 00 00 00 00 00 00 A8 
[10:21:45][D][Decoder:214]: [Room °C: 20.000000]
[10:21:45][D][WRITE:142]: FC 42 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 
[10:21:45][D][READ:142]: FC 62 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 57 
[10:21:45][D][Decoder:225]: [0x06 is status]
[10:21:45][D][homeassistant.sensor:024]: 'sensor.living_room_average_remote_split_temp': Got state 68.13
[10:21:45][D][WRITE:142]: FC 41 01 30 10 07 01 17 A8 00 00 00 00 00 00 00 00 00 00 00 00 B7 
[10:21:46][D][READ:142]: FC 61 01 30 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5E 
echavet commented 9 months ago

Hi thank you for your time But there is nothing in your logs that shows the behavior you describe. Power looks ON from the second 32 to the second 46.

Perhaps you could try to increase the update interval and to setup the logs differently: I'm used to this setting:

logger:  
  hardware_uart: UART1
  level: DEBUG
  logs:
    EVT_SETS : INFO
    WIFI : INFO
    MQTT : INFO
    WRITE_SETTINGS : INFO
    SETTINGS : INFO
    STATUS : INFO
    CN105Climate: WARN
    CN105: INFO
    climate: WARN
    sensor: WARN
    chkSum : INFO
    WRITE : WARN
    READ : WARN
    Header: INFO
    Decoder : INFO
    CONTROL_WANTED_SETTINGS: DEBUG
disruptivepatternmaterial commented 9 months ago

hmm that is so odd, but I see what you are saying...I will keep trying to catch it. But I can tell you that your code does NOT say it is off. But if closes up and shutdown and the lamp blinks.

I wonder if because it is cold here (0C) it is not wanting to turn on the fan only for some reason...

I will keep poking.

echavet commented 9 months ago

I am currently testing a new version on a branch called optimistic_refactor. The method is different and might be another way to test if the problem comes from my code. Many things have changed in this version. This is not released yet because I need more tests but you could have a try on your unit. If you want to, I think you haave to do it that way to point to optimistic_refactor. But I did not test as I'm using local files...

external_components:
  - source: github://echavet/MitsubishiCN105ESPHome@optimistic_refactor

Tell me if you get some time to test, if it better with this.

disruptivepatternmaterial commented 9 months ago
[12:35:33][D][WRITE:142]: FC 42 01 30 10 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7B 
[12:35:34][D][READ:142]: FC 62 01 30 10 02 00 00 01 07 1A 06 07 00 00 83 AB 28 00 00 00 D6 
[12:35:34][D][WRITE:142]: FC 42 01 30 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7A 
[12:35:34][D][READ:142]: FC 62 01 30 10 03 00 00 0C 00 92 AC AC FE 42 00 08 20 80 00 00 7C 
[12:35:34][D][WRITE:142]: FC 42 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 
[12:35:35][D][READ:142]: FC 62 01 30 10 06 00 00 1F 00 00 00 02 84 00 00 42 00 00 00 00 70 
[12:35:35][D][WRITE:142]: FC 42 01 30 10 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 74 
[12:35:35][D][READ:142]: FC 62 01 30 10 09 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 4C 
[12:35:35][D][text_sensor:064]: 'Stage Sensor': Sending state 'STAGE 0'
[12:35:35][D][text_sensor:064]: 'Sub Mode Sensor': Sending state 'STANDBY'

Here is a hint, I think...it is cold here 40F. The Unit is in heat mode. I put it on FAN ONLY to test. It seems to be in standby, not off as I thought before. I cannot see any addition data there but maybe you notice?

disruptivepatternmaterial commented 9 months ago

OK more stuff figured out - so the unit that is doing that strange behavior is the only unit I have where 2 insides are on one outside. What I see is

If one of the indoors is in HEAT or COOL and I put the other one on FAN ONLY, it will go into STANDY BY until the first one leaves HEAT or COOL. BUT if one of them is on AUTO, it does not wait and goes to FAN ONLY and stays in NORMAL and turns on the FAN.

So this might be another + of AUTO mode, and now that I have exposed these sensors I can write an automation that when I want FAN ONLY I can flip the other unit into FAN ONLY or AUTO to make it all work!

Bascht74 commented 9 months ago

That is what I ment when I said that you should try it with the IR remote... Nice to see that you figured it out.

Could we then close this issue then?

Am So., 18. Feb. 2024 um 22:07 Uhr schrieb disruptive pattern material < @.***>:

OK more stuff figured out - so the unit that is doing that strange behavior is the only unit I have where 2 insides are on one outside. What I see is

If one of the indoors is in HEAT or COOL and I put the other one on FAN ONLY, it will go into STANDY BY until the first one leaves HEAT or COOL. BUT if one of them is on AUTO, it does not wait and goes to FAN ONLY and stays in NORMAL and turns on the FAN.

So this might be another + of AUTO mode, and now that I have exposed these sensors I can write an automation that when I want FAN ONLY I can flip the other unit into FAN ONLY or AUTO to make it all work!

— Reply to this email directly, view it on GitHub https://github.com/echavet/MitsubishiCN105ESPHome/issues/19#issuecomment-1951445198, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZTA7VXDY6RAP4VK6CN2FDYUJUPRAVCNFSM6AAAAABCW2D3ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGQ2DKMJZHA . You are receiving this because you commented.Message ID: @.***>

disruptivepatternmaterial commented 9 months ago

Well I think there is a large discussion here that really has more to do with the other issue I opened - because at the time I didnt know they were related. If you look in my fork I have done the work to expose 3 new sensors, but there are a few things left to do - like correctly expose the ACTION when in AUTO to map to the ACTIONS in HA. I have not been able to figure that out correctly in the code. Second, a way to properly report the action fan speed vs. the demanded one (if that is even possible in HA), and third and most interesting to me, is the status one where I can now see when my units stand by / defrost, etc...

Oh and then there is the idea to implement a real HEAT_COOL in the code to do a configurable span to be like AUTO... see that other item for more notes : I am just reiterating that all here for history because I'll go back to other projects and probably forget half of this!

echavet commented 9 months ago

You could also be a contributor of this repository. Your enhancements are interesting. I'm talking with Geoff Davis of a way to merge all our work. He proposes to build an esphome project... To be continued...

echavet commented 9 months ago
[12:35:33][D][WRITE:142]: FC 42 01 30 10 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7B 
[12:35:34][D][READ:142]: FC 62 01 30 10 02 00 00 01 07 1A 06 07 00 00 83 AB 28 00 00 00 D6 
[12:35:34][D][WRITE:142]: FC 42 01 30 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7A 
[12:35:34][D][READ:142]: FC 62 01 30 10 03 00 00 0C 00 92 AC AC FE 42 00 08 20 80 00 00 7C 
[12:35:34][D][WRITE:142]: FC 42 01 30 10 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 
[12:35:35][D][READ:142]: FC 62 01 30 10 06 00 00 1F 00 00 00 02 84 00 00 42 00 00 00 00 70 
[12:35:35][D][WRITE:142]: FC 42 01 30 10 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 74 
[12:35:35][D][READ:142]: FC 62 01 30 10 09 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 4C 
[12:35:35][D][text_sensor:064]: 'Stage Sensor': Sending state 'STAGE 0'
[12:35:35][D][text_sensor:064]: 'Sub Mode Sensor': Sending state 'STANDBY'

Here is a hint, I think...it is cold here 40F. The Unit is in heat mode. I put it on FAN ONLY to test. It seems to be in standby, not off as I thought before. I cannot see any addition data there but maybe you notice?

Hello Disruptive, Bascht74, I did not implement the 0x09 submodes as I believed the data packets were unknown. It would be great to merge your fork into my repo. The intention is to use our combined code as the foundation for a new GitHub organization. This organization would encompass the entirety of our work, with the support and contribution of Geoff Davis.

echavet commented 9 months ago

Hey disruptive, how did you find this info about 0x09 packets ? could you explain to me what is stage ? static const uint8_t STAGE[6] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 }; static const char* STAGE_MAP[6] = { "STAGE 0", "STAGE 1", "STAGE 2", "STAGE 3", "STAGE 4", "STAGE 5" };

more details on these sub modes: static const uint8_t SUB_MODE[4] = { 0x00, 0x02, 0x04, 0x08 }; static const char SUB_MODE_MAP[4] = { "NORMAL", "DEFROST", "PREHEAT", "STANDBY"}; and these ones ? static const uint8_t AUTO_SUB_MODE[4] = { 0x00, 0x01, 0x02, 0x03 }; static const char AUTO_SUB_MODE_MAP[4] = { "AUTO_OFF","AUTO_COOL", "AUTO_HEAT", "AUTO_LEADER"};

thanks

Bascht74 commented 9 months ago

Could you add these one as sensors? That way we could find out what they mean...

disruptivepatternmaterial commented 9 months ago

hey @echavet so, I have never been a contributor on here before, so I feel honored and at the same time not sure what that means! I will have to learn here quickly.

What I did is google a lot and read everything I could on the topic and found this: https://github.com/SwiCago/HeatPump/issues/39

It took a lot of reading and parsing. Then I wrote the code and tested it. I went outside to the outdoor unit and watched what it was doing when it went into each different mode / submode.

So I initially thought that SUBMODE was the speed of the fan on the outdoor unit. Then I realized as I tested the code with different combinations of units I realized what it really is doing - it is the real fan speed of the indoor part of the split unit.

I have 1 x 1 out door with 2 indoor, 2 x one outdoor with 1 indoor and 1 x 1 outdoor with one indoor that has hyper heat and iSee/lots of vanes. So this lets me test on a variety of combinations to see what happens. I also test on a friend's units.

This all came together when I went back and looked at the JSON from the kumo adapter (BTW I am the person who wrote the first intention to home-bridge for the kumo adapter 5 or so years ago using node-red, I took that repo private and other took it over the efforts, so I know a bit about how they work) and there are a bunch of settings that I cannot figure out if the headhunt is doing or the kumo adapter is doing....ANYWAY....

So I was really confused about the STAGE and then as I posted above I realized that the AUTO SUB MODE, SUB MODE, and STAGE work together which is probably why they are all in the same message!!

Let me do my best to try to explain what I see:

STAGE = the actual fan speed of the indoor unit, this is important because there is also a setting that tells the unit what to do when it is heating up or cooling down. In my case that setting appears to be STANDBY. Once BOTH indoor units are in the same mode / heated up (or cooled) the device will open back and the fan will come on with the STAGE the same as the FAN SPEED.

So what his lead me to understand is SUB_MODE is the standard mode of the unit, this is in the documentation too. I also see it in the KUMO JSON. It is cold here and since implementing these sensors I can see the devices go into STANBY, DEFROST, and PRHEAT 1-2 times a day, which is normal. I used to see this with the KUMO JSON too.

AND the MOST interesting is AUTO_SUB_MODE (and I know the names make no sense, but I was just doing what I could!) this is the real mode of the device when it is in the AUTO mode. While I understand your comment about it being too narrow a span +/- 2C, AUTO mode really is the device's favored mode. Why do I say that? Because if you have a setup with 1 outside unit and 2 (or more) indoor AUTO lets the system figure out how to balance the demands.

AUTO_OFF = the device is in HEAT or COOL or FAN_ONLY (or some other not-AUTO mode) AUTO_COOL = the main mode is AUTO and the unit is currently cooling AUTO_HEAT - the main mode is AUTO and the unit is currently heating AUTO_LEADER = so this one I am not 100% certain about, but in the KUMO JSON there are settings which tell the multiple units which one is the leader (it gets to decide which mode to put the outdoor unit in and the other will go into STANBY if is disagrees).

I tested this over the weekend and I saw each of these. I would remove my ESPHOME, put the KUMO back in, cycle the power and test.

I hope that helps...also you are a very methodical and impressively organized coder :) I am more of a hacker, so I hope just using your examples I managed to keep the patterns.

@Bascht74 until I understand what a collaborator does, you can look at my fork to see a version of @echavet code that has these sensors added.

The YAML looks like this:

climate:
  - platform: cn105
    name: ${friendlyname}
    id: splitunit
    update_interval: 2s
    compressor_frequency_sensor:
      name: Compressor Frequency
    vertical_vane_select:
      name: Vertical Vane Orientation
    remote_temperature_timeout: 30min  
    debounce_delay : 500ms
    stage_sensor:
      name: Stage Sensor
    sub_mode_sensor:
      name: Sub Mode Sensor
    auto_sub_mode_sensor:
      name: Auto Sub Mode Sensor

I think there is even more data here...because the KUMO JSON has a lot more info in it, like errors and other things.

disruptivepatternmaterial commented 9 months ago

https://www.rfwel.com/downloads/MRCH1.pdf scroll down, there are all these codes to change settings.

Notice 144 is the setting that seems to impact the AUTO SUB MODE. 145 is the AUTO spread in degrees

I have no idea how these are set. I am about to go away from a trip for a bit, but I guess I could put my logic analyzer on the the kumo cn105 and see what it is sending when I change these...

disruptivepatternmaterial commented 9 months ago

and https://app.gitter.im/#/room/#Mitsubishi-CN105-Protocol-Decode_community:gitter.im just read through this there looks to be a lot more we can do here...

echavet commented 9 months ago

I merged your fork yesterday!!

Le lun. 19 févr. 2024, 13:56, Bascht74 @.***> a écrit :

Could you add these one as sensors? That way we could find out what they mean...

— Reply to this email directly, view it on GitHub https://github.com/echavet/MitsubishiCN105ESPHome/issues/19#issuecomment-1952396914, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTHBDZ7NQPCOIO625V2I3YUNDYVAVCNFSM6AAAAABCW2D3ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSGM4TMOJRGQ . You are receiving this because you commented.Message ID: @.***>

echavet commented 9 months ago

@disruptivepatternmaterial you did a really good job and I am the one honored if you join my rep. As I already wrote I can't remember where, I would like... (well actually it is Geoff Davis Idea) to create a github organization with some main contributors (like you, Geoff and others like @Bascht74, @phidauex and me) to build a fully esphome integrated project. But we first have to converge our code and pool our efforts. As I initiated this big refactor in this repository I propose to stabilise all features here and to try to cover as many units kinds as possible. I can share with anybody who wants to get involved the necessary privileges to this rep. Then when we feel it, we find a good name and we do the final integration!

I've been doing a lot of refactoring lately. It would be beneficial to have some critical eyes to conduct thorough reviews and move forward confidently. I just merged your work along with the latest branch I called optimistic_refactor. I've made a pre-release, but the head of my repository currently points to this new code. This means that users directly referencing the head of this repository will be using this latest code, even though it hasn't been sufficiently tested.

Bascht74 commented 9 months ago

I will try an check these findings on the weekend. As I have 1x Outdoor and 6x Indoor maybe I can see a bit more.

As well I a Shelly Pro 3EM for my outdoor unit and I can see some spikes every day (couple of kWh!) where all devices are off. I am eger to see if the new sensors will bring some light into this behavior...

echavet commented 9 months ago

As @disruptivepatternmaterial said, the 2 setpoints also offers a better management context for the internal units sharing one same outdoor unit. This might be a good explanation for units going into standby mode.

disruptivepatternmaterial commented 9 months ago

I think I mentioned that I am leaving in a couple days for a trip. I will have to circle back here dig in more when I return. I am really curious how to set some of these other settings. I have a saleae and I plan on connecting it up with one of my kumo adapters and seeing what I can find out!

@echavet I will compile your branch (optimistic_refactor) and see what I can see!

Should I close this thread / comment / issue?

echavet commented 9 months ago

beware, branch is now merged!! but i tagged a release before the merge

phidauex commented 8 months ago

Running the new branch on my MSZ-GLxxNA indoor units now (3 units on 1 compressor). The new sensors are showing values, largely as expected.

STAGE is pretty clear, but it exposes a mismatch in the fan speed labeling.

I’ll run through the speeds on the remote as well, but it is interesting that in the climate module I don’t have access to Stage 2, though I do see the unit select it when running automatically.

echavet commented 8 months ago

Perhaps ?