hberntsen / mhi-ac-ctrl-esp32-c3

Control MHI Airconditioning locally using your own ESP32-C3!
9 stars 1 forks source link

Sync with latest source #3

Open HpNoTiQ56 opened 6 months ago

HpNoTiQ56 commented 6 months ago

Hi, I just bought new esp32 mini to get bluetooth proxy and I'm discovering a lot of loop error which I didn't have with d1 mini pro. Did you update your version to enable new enhance framesize and use 3D auto and other stuff? If not, do you plan it?

Thank you,

hberntsen commented 6 months ago

Hey! It was my planning to do so at some point, I've already refactored the code for newer esphome versions a while ago, I can push that next week. For the rest, I'd also like to have the newer features myself too. I expect my units to be new enough to support the bigger framesize. It is just one of my many side projects ;).

Does my current version of the code run stable on your units?

On 3 May 2024 21:37:45 CEST, HpNoTiQ @.***> wrote:

Hi, I just bought new esp32 mini to get bluetooth proxy and I'm discovering a lot of loop error which I didn't have with d1 mini pro. Did you update your version to enable new enhance framesize and use 3D auto and other stuff? If not, do you plan it?

Thank you,

-- Reply to this email directly or view it on GitHub: https://github.com/hberntsen/mhi-ac-ctrl-esp32-c3/issues/3 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

HpNoTiQ56 commented 5 months ago

Thank you for your answer : I'm using a wemos d1 mini and can't flash it with your code. First, i tried with your code but was not flashing (normal since another board layout is waited), then i tried to modify board by wemos_d1_mini and esp32dev with no success at compiling with latest esphome.

MrC0nst commented 5 months ago

Thank you for your answer : I'm using a wemos d1 mini and can't flash it with your code. First, i tried with your code but was not flashing (normal since another board layout is waited), then i tried to modify board by wemos_d1_mini and esp32dev with no success at compiling with latest esphome.

I have compiled this code for esp32 dev board with esphome 2024.5.3

https://github.com/hberntsen/mhi-ac-ctrl-esp32-c3/blob/e68566512c19821c9d168f607f340032cf7778da/esphome/my_components/MhiAcCtrl/MHI-AC-Ctrl-core.cpp#L96 You need to add

#define max(a,b)            (((a) > (b)) ? (a) : (b))
#define min(a,b)            (((a) < (b)) ? (a) : (b))
#define CLAMP(x, lower, upper) (min(upper, max(x, lower)))

and comment this lines https://github.com/hberntsen/mhi-ac-ctrl-esp32-c3/blob/e68566512c19821c9d168f607f340032cf7778da/esphome/my_components/MhiAcCtrl/mhi_ac_ctrl.h#L362 https://github.com/hberntsen/mhi-ac-ctrl-esp32-c3/blob/e68566512c19821c9d168f607f340032cf7778da/esphome/my_components/MhiAcCtrl/mhi_ac_ctrl.h#L363

And fix https://github.com/hberntsen/mhi-ac-ctrl-esp32-c3/issues/4