Comments (24)
Hi, no not yet and no active plans. Since I discovered shelly plus which have esp32 and I can flash with esphome I do not really need them yet...
from mhi-ac-ctrl-esphome.
I'm also tracking Bluetooth advertisements on both ESPs (for temperature), the one with 8 temperature sensors attached to it sometimes generates frame errors:
The other one with just one sensor a lot less (0 since last boot). I did not investigate the cause of them. Given that we receive a new frame every 40ms the error rate is quite low :). I'm planning to report the Bluetooth temperature to the AC as reference temp.
The trick with Hardware SPI on my ESP32-C3 was to generate a CS signal on the ESP itself, and loop it back to the hardware SPI CS pin. Otherwise It would never receive a frame. The ESP docs say that it should be able to operate without CS signal but I could not get that to work at all.
I've dumped my code at https://github.com/hberntsen/mhi-ac-ctrl-esp32-c3 :)
from mhi-ac-ctrl-esphome.
@thehaxxa
Can anyone comment on the long term stability, I am considering using a ESP32 as it's a lot better option in most contexts in 2023.
I have ESP32s and and 8266 running in my units. None of them had any issues until now.
from mhi-ac-ctrl-esphome.
Some more info:
from mhi-ac-ctrl-esphome.
First thing that comes to mind is that you should check the pins. The pin layout is different, and you may need to change some around in the core library's h and/or c files. Also, I think you can remove the CPU frequency option as it may be invalid for ESP32.
from mhi-ac-ctrl-esphome.
I think, that the pin layout is pretty equal. The other tip I will try somewhere next weeks.
And about the other, I hope someone can confirm/deny that some programmatic changes are needed (not yaml, but the others: core library's h and/or c files).
from mhi-ac-ctrl-esphome.
If you can't even get it to boot/join your WiFi, something is probably trying to do something that is not possible or causes an error on the ESP32. You might be able to hook-up the ESP32 to the serial monitor built-into the Arduino desktop app to debug a bit what error is triggered.
from mhi-ac-ctrl-esphome.
PS: Pins are definitely different. Please see https://github.com/ginkage/MHI-AC-Ctrl-ESPHome/blob/master/MHI-AC-Ctrl-core.h#L33. They determine which pins to use for SPI communication. The ESP32 does not have specific purpose default pins (like the 8266 has) for SPI, you will have to tell it what to do on each pin.
If we look at the pinout for the one you have there, the edits should be something like this inside MHI-AC-Ctrl-core.h to get the SPI working;
#define SCK_PIN 18
#define MOSI_PIN 23
#define MISO_PIN 19
Also, connect the ESP32 based variant entirely at your own risk. ;-) No guarantees given.
EDIT: Updated pins. Was looking wrong as ESP32 has two rows of pins. Please see below image for pinout reference used.
Note that it is not possible to mix both ESP8266 and ESP32 devices if you edit the core library pins. They are not pin-compatible. We may need to open a feature request to be able to set the pinout from library/core initialisation. Or simply copy the library files and include the correct variants into your projects.
from mhi-ac-ctrl-esphome.
I think from now on ESP32 is the only viable option and most future proof. Lower power and better wifi and BLE.
I really would appreciate support for this 😀
from mhi-ac-ctrl-esphome.
If you can test it out with above pinout and it works, the maintainer of the library could consider the possibility of setting the pins in such a way that it remains drop-in compatible with this project.
from mhi-ac-ctrl-esphome.
Have you tested it out yet with above config? I also got intrigued by the possibilities of using an ESP32 instead of an 8266 and eventually extending the module in the AC with (for example) a PM2.5/PM10 sensor. So I've also ordered some ESP32 Mini's now.
from mhi-ac-ctrl-esphome.
Can you please elaborate on "how to submit" a feature request? Still would like to have ESP32's in my aircos...
from mhi-ac-ctrl-esphome.
Little update for everybody else who might want to try to use an ESP32 D1 Mini.
I got it running by changing the pin definitions in MHI-AC-Ctrl-core.h as pointed out by @synegic.
#define SCK_PIN 18
#define MOSI_PIN 23
#define MISO_PIN 19
My config in ESPHome looks like this:
esphome:
name: some-name
platform: ESP32
board: esp32dev
platformio_options:
# Run CPU at 160Mhz to fix mhi_ac_ctrl_core.loop error: -2
board_build.f_cpu: 160000000L
includes:
- mhi_ac_ctrl.h
- MHI-AC-Ctrl-core.h
- MHI-AC-Ctrl-core.cpp
Everything else is unchanged.
When the ESP32 is only connected via USB to my PC I get the same error as in #29.
But as soon as I plug it into my indoor unit I can control my air conditioner via ESPHome/Home Assistant.
Hope this helps.
from mhi-ac-ctrl-esphome.
Hi all, I also like to help with this (as I would really like to use WPA3 WiFi features only available on ESP32), but to enlarge the success factor, I am wondering where you guys but your ESP32 boards, and what version?
I am thinking on buying 5 pieces at once (to have some spare and for fiddling around).
I only have 2 TTGO devices left, which do not suffice for the MHI interface.
Any tips for decent price versus normal shipping times in Europe are greatly appreciated.
I did find for example:
amazon
I just want to buy the proper board so I can focus on the MHI side of things.
from mhi-ac-ctrl-esphome.
Last time I bought an ESP it was from TinyTronics. I bought this one:
https://www.tinytronics.nl/shop/nl/development-boards/microcontroller-boards/met-wi-fi/wemos-c3-mini-esp32-c3
Mind you this is not a D1 but C3 variant with the RiscV processor architecture and I'm not sure if it does WPA3. They have other variants too.
I also order from HobbyElectronica:
https://www.hobbyelectronica.nl/product-categorie/wemos/boards-wemos/
I don't know too much about the success factor thought. I think the D1 mini V3 is pretty okay but heard people who order from sketchy sources getting bad clones with mixed results.
from mhi-ac-ctrl-esphome.
I've got an Ai-Thinker ESP-C3-32S-Kit board. I'm rewriting the code to use hardware SPI on the IDF platform, which works fine :). So harware-wise that's possible
from mhi-ac-ctrl-esphome.
That's nice!
I also got an ESP32 C3 13U 2MB board a while ago . It was cheap but it does not have a wifi antenna on the board (you need an antenna with a wire) so keep that in mind. Also the small flash size is a pain but I got my project running on it with OTA capability but I'm pretty sure the MHI project is way too big for this board so...
from mhi-ac-ctrl-esphome.
I've got an Ai-Thinker ESP-C3-32S-Kit board. I'm rewriting the code to use hardware SPI on the IDF platform, which works fine :). So harware-wise that's possible
Did you had any success with this?
Are still using esphome with this modified code?
from mhi-ac-ctrl-esphome.
Yes, I've got two running in my home right now, works great. I'm not on full feature parity with this repo yet but works fine so far. I'm looking at the developments in absalom-muc/MHI-AC-Ctrl#77 to implement those as well.
@glsf91 are you interested? My code needs some cleaning but I can upload whatever I already have if that helps
from mhi-ac-ctrl-esphome.
@hberntsen
Yes, I'm interested. If you can upload your code somewhere (github?) that would be nice.
I already used an esp32 with MHI-AC-Ctrl code (not esphome) but experience too much mhi_ac_ctrl_core.loop errors. I managed to make a better but I'm not satisfied yet. Have also to take a look again.
So I was interested if IDF and hw SPI was doing a lot better.
from mhi-ac-ctrl-esphome.
A lot of work to change this. I'm not familiar with IDF, so takes some time to try to understand your code.
I also want tracking Bluetooth advertisements.
The trick with Hardware SPI on my ESP32-C3 was to generate a CS signal on the ESP itself, and loop it back to the hardware SPI CS pin. Otherwise It would never receive a frame. The ESP docs say that it should be able to operate without CS signal but I could not get that to work at all.
Strange that the other project you referring to (homekit) is not using a CS.
from mhi-ac-ctrl-esphome.
Strange that the other project you referring to (homekit) is not using a CS.
Indeed, though that project is targeting the ESP32, not the C3 variant.
from mhi-ac-ctrl-esphome.
I have an ESP32 (D1 mini ESP32 clone). So this means it maybe could work without CS and therefore I can use the mhi-ac-ctrl PCB.
I will give it a try later. First trying some other stuff.
from mhi-ac-ctrl-esphome.
Little update for everybody else who might want to try to use an ESP32 D1 Mini.
Can anyone comment on the long term stability, I am considering using a ESP32 as it's a lot better option in most contexts in 2023.
Did you encounter any issues? Apart from setting the pin definitions and CPU frequency, did everything else simply 'work'?
from mhi-ac-ctrl-esphome.
Related Issues (20)
- MHI-AC-Ctrl working MQTT communication with SRK 63 ZR, but MHI-AC-Ctrl-ESPHome does not show any communication HOT 2
- Component <unknown> took a long time for an operation HOT 13
- Added 3D auto and vanes L/R support HOT 1
- It is getting much warmer then setpoint HOT 11
- Using a Honeywell T6 for the room temperature HOT 1
- Bluetooth temp sensor HOT 8
- AC working with MHI-AC-Ctrl but not with MHI-AC-Ctrl-ESPHome HOT 6
- [mhi_ac_ctrl:139]: mhi_ac_ctrl_core.loop error: -2: Problem and solution HOT 18
- Power is in W not A HOT 3
- How to flash for a newbie HOT 3
- Add RobertJansen1 as contributor HOT 2
- `energy_used` sensor cannot be used in HA Energy Dashboard
- Error new files - error on frame_size HOT 1
- [Feature Request] Hi-Power / Eco modes HOT 1
- Total energy usage sensor does not update HOT 7
- board_build.f_cpu: 160000000L still getting [W][mhi_ac_ctrl:141]: mhi_ac_ctrl_core.loop error: -4 -3 -1 HOT 2
- Proof of concept - Low temperature heating without modifying MHI-AC-Ctrl using only the internal temperature sensor HOT 2
- Dashes are not supported in IDs, please use underscores instead. HOT 1
- mhi_ac_ctrl_core.loop error: -3 on newly flashed Wemos D1 Mini HOT 3
- Problem with yaml insertion in V2.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mhi-ac-ctrl-esphome.