esp-haier icon indicating copy to clipboard operation
esp-haier copied to clipboard

device without entity

Open euhkah opened this issue 3 years ago • 22 comments

Hello, I have the device, but not the entity in ESPHome v1.19.2... (I never tried with a previous version) The logs return the correct information, without errors

[08:32:19][D][Haier:372]: POLL: 255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 [08:32:19][D][Haier:411]: Readed message ALBA: 255 255 42 64 0 0 0 0 0 2 109 1 8 0 3 0 2 0 0 0 0 0 48 0 86 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 110 240 30 [08:32:19][D][climate:377]: 'Haier' - Sending state: [08:32:19][D][climate:380]: Mode: OFF [08:32:19][D][climate:397]: Swing Mode: OFF [08:32:19][D][climate:400]: Current Temperature: 24.00°C [08:32:19][D][climate:406]: Target Temperature: 24.00°C

but impossible to display the information in lovelace, and modify them

euhkah avatar Jun 22 '21 06:06 euhkah

Okay ! the entity appears! (I changed the entity area, and it works!)

I can change the temperature setpoint value, everything doesn't seem to be working yet. In the logs (see previous message), the current temperature is displayed correctly. But lovelace shows 50 degrees and setpoint at 16, when it's at 24 (I can change). "offset" problem ? Sans titre

(I tried with the 2 versions of haier.h/haierv2.h)

euhkah avatar Jun 22 '21 09:06 euhkah

Hello @euhkah,

Please clarify how did you manage to change the entity area, if the entity doesn't appear anywhere, either on Lovelace screen or on the entities list. I have the same problem here as you did. I have no clue how to retrieve any haier AC sensor values/states to display them in HA dashboard. But I see them recurrently changing in ESPHome logs while pressing buttons on my haier AC remote control. (ESPHome version: 2021.8.2)

Shouldn't have I mqtt sever connection (at least IP, user, password, or whatever..) defined somewhere to read my haier device? If so, then where to define them? In my_haier.yaml edited in ESPHome UI? In haierv2.h edited in the external tool?

Can you guide me, please?

Krzysztonek avatar Sep 04 '21 12:09 Krzysztonek

Hi, sorry, I've been out several months now.

I guess you installed the ESPHome integration, right? (Configuration->Integrations -> ESPHome) image

Can you see your entity listed there? If not, clicking on 3 dots (system options), do you have checked the checkbox? So Home Assistant automatically add the entities when dicovered? image

On ESPHome tab how do you see your device? Is it green or red? image

There is not much else of configuration there...

@Krzysztonek there is no need of mqtt connection as it is an integration, everything should be prepared...

Let me know the details and let's hope I can help you with that.

albetaCOM avatar Sep 04 '21 15:09 albetaCOM

Thank you so much, @albetaCOM for your kind advice. I should be shame, because I was seeking some support from GitHub Community but simply I had totally wrong ESPHome integration defined in my HA. I was not aware that ESPHome should not be only installed on HA server, but also should be configured for each ESP8266 device separately. It was my pitiful human error. However, this is my first experience with ESP and also my first contribution to the GitHub Community. The first pancake is always spoiled! ;)

obraz obraz

So, all 3 Haier Tundra devices work perfectly under ESP8266. The only issue is on Haier Flexis Plus device, visible on the bottom-right of the below screen (AC Salon). This AC is recognizable by HA but not controllable from the dashboard:

obraz Seems Haier Flexis needs different software installed on ESP8266, I have to dive more deeply to find the solution. obraz

Thank you again for your priceless time and for your willingness to help!

Krzysztonek avatar Sep 04 '21 19:09 Krzysztonek

Hi @Krzysztonek you are very welcome!

Indeed it seems the 3rd haier has another protocol. If you want to play a little bit with it, you can start by changing the temperature with your remote control and look at the logs to see which byte has changed on the logs (array of byte that appears after Readed message ALBA: and then go on like this until you have all functionality bytes identified.

Once you have that we'll have the knowledge to decode the status, we'll have still missing the knowledge to control the AC (if it is different aswell) for that we would need to sniff the communication between your original wifi dongle and the AC unit with docklight for example.

But first things first, I would start up by trying to decode the status as you don't have to change the setup, just change the setpoint with the remote control and capture the logs.

Let me know if you try it and if I can help you with any of that.

albetaCOM avatar Sep 06 '21 06:09 albetaCOM

Hi @albetaCOM :) I just did the homework you've requested. Here are the results of changing the setpoint of my Haier Flexis Plus, using remote control: obraz Based on the above table I'm assuming, that the temperature setpoint is being stored on byte #35. The checksum is on byte #36. I was changing the setpoint from 30 to 16 while byte #34 was being changed from 14 to 0. I also noticed that byte #15 displays one of two values: 47 or 48. This is unclear to me what might be a trigger for changing this byte... Or maybe byte #15 doesn't matter at this stage, who knows ;)

Please let me know what next steps have to be done?

BTW: You became a father... Truly Congrats!

Krzysztonek avatar Sep 06 '21 19:09 Krzysztonek

Good morning @Krzysztonek, nice work!

It seems byte 15 is the current temperature (multiplied by 2).

I created a HaierFlexisPlus.h file so you can try with this one, but we still have to decode all the other parameters such as:

  • MODE
  • Horizontal swing status
  • Vertical swing status
  • Quiet mode status
  • Purify mode status
  • ...

Let me know if with this new file at least the current temp and the setpoint are suportted in Haier Flexis Plus.

albetaCOM avatar Sep 07 '21 06:09 albetaCOM

A Very Good Evening, @albetaCOM :)

  • First: I'd love to thank you so much for your extraordinary support! It really matters much to me, since I'm not a programming expert.
  • Second: I compiled the firmware with HaierFlexisPlus.h file and... it works! It really works! Please see the below screen:

image image

  • Third: I did the next homework, however, there is plenty of data at this time, since we're talking about various working modes of a not quite simple device, which is Haier Flexis Plus. I managed to go through all modes: FAN, COOL, HEAT, DRY, HEALTH, ECO SENSOR, AUTO. Here are the results gathered in one file with various states described by the various values of the steering bytes.

I don't even dare to ask for your support again to properly decode all data. First, please let me know how should I prepare those data to be more readable and useful for your convenience. I will do whatever you need but please let me know your expectations on this matter. I know you're a very busy father. Please take your time, no hurry :) Every day we are closer and closer to the final shape of the *.h file, anyway.

Krzysztonek avatar Sep 07 '21 21:09 Krzysztonek

Hi @Krzysztonek, FYI: I cannot open file with the link you've provided (404)

RomanDidenko avatar Sep 08 '21 05:09 RomanDidenko

@Krzysztonek me neither

albetaCOM avatar Sep 08 '21 06:09 albetaCOM

Hi @albetaCOM :) I just did the homework you've requested. Here are the results of changing the setpoint of my Haier Flexis Plus, using remote control: obraz Based on the above table I'm assuming, that the temperature setpoint is being stored on byte #35. The checksum is on byte #36. I was changing the setpoint from 30 to 16 while byte #34 was being changed from 14 to 0. I also noticed that byte #15 displays one of two values: 47 or 48. This is unclear to me what might be a trigger for changing this byte... Or maybe byte #15 doesn't matter at this stage, who knows ;)

Please let me know what next steps have to be done?

BTW: You became a father... Truly Congrats!

@Krzysztonek not a father, a mother, and for the 3rd time!! :)

albetaCOM avatar Sep 08 '21 06:09 albetaCOM

Deeply sorry, Guys!

It was my bad. Unintentionally I set this file as private. Already changed to public. To get the file please, try this link. Now it should work I believe.

@albetaCOM , I don't know why I assumed you are not a woman... Shame on, me. Apologize! 🌹

Krzysztonek avatar Sep 08 '21 08:09 Krzysztonek

Deeply sorry, Guys!

It was my bad. Unintentionally I set this file as private. Already changed to public. To get the file please, try this link. Now it should work I believe.

@albetaCOM , I don't know why I assumed you are not a woman... Shame on, me. Apologize! 🌹

@Krzysztonek , Could you put the data on an excel where each row is the new functionality, something like this image

Like this I guess it would be much easier to keep track of the byte changes...

albetaCOM avatar Sep 08 '21 16:09 albetaCOM

@Krzysztonek , Could you put the data on an excel where each row is the new functionality, something like this image

Like this I guess it would be much easier to keep track of the byte changes...

@albetaCOM

I've just uploaded Haier Flexis Plus Commands file. Would you be so kind to check if this is what may help?

Krzysztonek avatar Sep 08 '21 18:09 Krzysztonek

Hi @Krzysztonek I've been busy...

Yes it is perfect. I will analyze it when I have time. In parallel you can also try to decode it yourself checking the bytes that change..

I'll come back to you as soon as I have something.

albetaCOM avatar Sep 11 '21 13:09 albetaCOM

Dear @albetaCOM, How are you? How is your newly born child? I tried to decode those magical bytes and I even did some observations when comparing their values before and after a particular command has been triggered on the Haier remote.

FIRST: Unfortunately, this is not a matter of a single byte changing its value, since I observed that from 2 to even 7 bytes change their values at the same time, when executing one single command. This is what I discovered:


FAN mode ON (low):

  • Status byte 5: 0x8 --> 0x0
  • Status byte 29: 0x10 --> 0x11
  • Status byte 36: 0xB8 --> 0xB9

FAN mode ON (medium):

  • Status byte 5: 0x8 --> 0x0
  • Status byte 25: 0x2 --> 0x1
  • Status byte 36: 0xB9 --> 0xB8

FAN mode ON (high):

  • Status byte 5: 0x8 --> 0x0
  • Status byte 25: 0x1 --> 0x0
  • Status byte 36: 0xB8 --> 0xB7

HEAT mode ON (with FAN low, SWING off):

  • Status byte 5: 0x9 --> 0x0
  • Status byte 13: 0x15 --> 0x11
  • Status byte 23: 0x3 --> 0x2
  • Status byte 25: 0x0 --> 0x3
  • Status byte 27: 0x1 --> 0x0
  • Status byte 35: 0x8 --> 0x9
  • Status byte 36: 0xB7 --> 0xB5

HEAT mode ON (with FAN turbo):

  • Status byte 5: 0x9 --> 0x0
  • Status byte 25: 0x3 --> 0x0
  • Status byte 31: 0x0 --> 0x2
  • Status byte 36: 0xB4 --> 0xB3

HEAT mode ON (with FAN auto):

  • Status byte 5: 0x9 --> 0x0
  • Status byte 25: 0x0 --> 0x3
  • Status byte 31: 0x2 --> 0x0
  • Status byte 36: 0xA4 --> 0xA5
  • Status byte 5: 0x9 --> 0x0
  • Status byte 13: 0x15 --> 0x11
  • Status byte 23: 0x1 --> 0x2
  • Status byte 25: 0x1 --> 0x3
  • Status byte 29: 0x1 --> 0x11
  • Status byte 36: 0xA3 --> 0xB2

DRY mode ON:

  • Status byte 5: 0x6 --> 0x0
  • Status byte 13: 0x12 --> 0x16
  • Status byte 23: 0x2 --> 0x4
  • Status byte 25: 0x3 --> 0x1
  • Status byte 27: 0x0 --> 0x2
  • Status byte 29: 0x11 --> 0x1
  • Status byte 35: 0x9 --> 0x6
  • Status byte 36: 0xB3 --> 0xA6
  • Status byte 5: 0x6 --> 0x0
  • Status byte 15: 0x31 --> 0x30
  • Status byte 36: 0xA6 --> 0xA5

ECO mode ON:

  • Status byte 5: 0x9 --> 0x0
  • Status byte 28: 0x0 --> 0x10
  • Status byte 36: 0xB9 --> 0xC9

SWING vertical - position UP:

  • Status byte 5: 0x8 --> 0x0

SWING vertical - position MEDIUM-UP:

  • Status byte 5: 0x8 --> 0x0

SWING vertical - position MEDIUM:

  • Status byte 5: 0x8 --> 0x0
  • Status byte 13: 0x16 --> 0x15
  • Status byte 29: 0x1 --> 0x11
  • Status byte 36: 0xA7 --> 0xB6

SWING vertical - position MEDIUM-DOWN:

  • Status byte 5: 0x8 --> 0x0

SWING vertical - position AUTO:

  • Status byte 5: 0x8 --> 0x0
  • Status byte 27: 0x0 --> 0x1
  • Status byte 36: 0xB6 --> 0xB7

SWING horizontal - position LEFT:

  • Status byte 5: 0x8 --> 0x0

SWING horizontal - position LEFT-CENTER:

  • Status byte 5: 0x8 --> 0x0

SWING horizontal - position CENTER:

  • Status byte 5: 0x8 --> 0x0
  • Status byte 27: 0x3 --> 0x1
  • Status byte 36: 0xB9 --> 0xB7

SWING horizontal - position RIGHT-CENTER:

  • Status byte 5: 0x8 --> 0x0

SWING horizontal - position RIGHT:

  • Status byte 5: 0x8 --> 0x0

SWING horizontal - position AUTO:

  • Status byte 5: 0x8 --> 0x0
  • Status byte 27: 0x1 --> 0x3
  • Status byte 36: 0xB7 --> 0xB9

COOL mode:

  • Status byte 5: 0x9 --> 0x0
  • Status byte 23: 0x3 --> 0x1
  • Status byte 25: 0x2 --> 0x1
  • Status byte 35: 0x8 --> 0x9
  • Status byte 36: 0xA9 --> 0xA7
  • Status byte 5: 0x9 --> 0x0
  • Status byte 15: 0x35 --> 0x31
  • Status byte 36: 0xA7 --> 0xA3

ECO 1 mode ON:

  • Status byte 5: 0x9 --> 0x0
  • Status byte 28: 0x0 --> 0x10
  • Status byte 36: 0xB9 --> 0xC9

ECO 2 mode ON:

  • Status byte 5: 0x9 --> 0x0
  • Status byte 15: 0x32 --> 0x31
  • Status byte 36: 0xCA --> 0xC9

HEALTH mode ON:

  • Status byte 5: 0x9 --> 0x0
  • Status byte 29: 0x11 --> 0x19
  • Status byte 36: 0xB9 --> 0xC1

SMART mode ON:

  • Status byte 5: 0x8 --> 0x0
  • Status byte 23: 0x4 --> 0x0
  • Status byte 25: 0x1 --> 0x3
  • Status byte 27: 0x2 --> 0x0
  • Status byte 29: 0x19 --> 0x11
  • Status byte 35: 0x9 --> 0x8
  • Status byte 36: 0xC2 --> 0xB5

QUIET mode ON:

  • Status byte 5: 0x9 --> 0x0
  • Status byte 31: 0x0 --> 0x4
  • Status byte 36: 0xBE --> 0xC2

Switch OFF the device:

  • Status byte 5: 0x9 --> 0x0
  • Status byte 15: 0x31 --> 0x30
  • Status byte 29: 0x19 --> 0x18
  • Status byte 31: 0x4 --> 0x0
  • Status byte 36: 0xC2 --> 0xBC
  • Status byte 5: 0x9 --> 0x0
  • Status byte 15: 0x30 --> 0x31
  • Status byte 36: 0xBC --> 0xBD

So, one single command may change several bytes at once.

SECOND: I'm not a programmer, having no clue how to use that information and how to convert it into the FlexisHaier.h code.

I'm fully aware that it might be tricky, but maybe you would be able to find some spare time to help me or at least give me some hints on how to move things forward, please? ❤️

Krzysztonek avatar Oct 22 '21 19:10 Krzysztonek

Dear @albetaCOM , Any news from you, please? I'm stuck...

Krzysztonek avatar Dec 30 '21 08:12 Krzysztonek

Hello, I just saw that I never replied, I can give you my config file, without promising you that it works, but it works for me (I haven't done the last update). Haierv2.zip config.txt

I hope this will help you !

euhkah avatar Dec 30 '21 09:12 euhkah

Hi, @euhkah Does this .h file support Haier Flexis Plus model or is it generic, suitable for less demanding Haier models?

Krzysztonek avatar Dec 30 '21 09:12 Krzysztonek

I have a Haier Geos

euhkah avatar Dec 30 '21 10:12 euhkah

Hi @Krzysztonek,

I just commited a change on HierFlexisPlus.h file to be able to update and set purify status correctly.

Can you try it?

The following commands I am guessing are not working properly, right?

  • AC MODE
  • Horizontal swing status
  • Vertical swing status
  • Quiet mode status
  • Purify mode status

To know if we have to work on the status decoding or/and the control decoding:

  • If you change the commands via the remote are they properly shown in HA?
  • If you change the commands via HA are they properly set on the AC unit?

Thanks and sorry for the delay, it's been a very busy year!!

...

albetaCOM avatar Dec 30 '21 11:12 albetaCOM

Hi @albetaCOM ,

Thank you for your response :) Unfortunately, after uploading a new firmware.bin (compiled with this updated HaierFlexisPlus.h file), I'm not able to run my Flexis Plus AC. The Flexis Plus AC card looks as follows:

obraz

As you can see, there is no switch-on button visible/available. While clicking any other visible button (heat/cool/dry/fan/auto), the device also doesn't react. It applies to my Haier Flexis Plus device only.

On the other hand, all my Haier Tundra devices (with Haierv2.h file compiled) work perfectly. To compare both AC models, please, see the below card for Haier Tundra:

obraz

@albetaCOM , have I done anything wrong? Or maybe this version of HaierFlexisPlus.h file doesn't support my model? What do you want me to do to have this device integrated with HA?

Krzysztonek avatar Jan 07 '22 13:01 Krzysztonek