geoffdavis / esphome-mitsubishiheatpump

ESPHome Climate Component for Mitsubishi Heatpumps using direct serial connection
BSD 2-Clause "Simplified" License
560 stars 153 forks source link

Not able to set temperature in Home Assistant #48

Closed davidmerrique closed 2 years ago

davidmerrique commented 2 years ago

Hi, I'm having a problem with 2 of my Wemos D1 Minis.

I'm not seeing any target temperature in HA.

image

I have it working with 3 units, but 2 units aren't working.

Could this be a difference between my ESP8266?

The 3 that work perfectly are these:

IZOKEE Development Board for ESP8266 ESP-12F 4M Bytes WLAN WiFi Internet Development Board Compatible with Arduino (Pack of 3) https://smile.amazon.com/dp/B076F53B6S/ref=cm_sw_r_cp_api_glt_fabc_6EJMYZJHQGA6H46PY2SW?_encoding=UTF8&psc=1

And the 2 that aren't working are these:

WLAN WiFi Internet Development Board D1 Mini NodeMcu Lua 4M Bytes Development Module Base on ESP8266 ESP-12F for Arduino Compatible with WeMos D1 Mini (2PCS) https://smile.amazon.com/dp/B07W8ZQY62/ref=cm_sw_r_cp_api_glt_fabc_NXM7W75RCKJ4QFZ9SYWT?_encoding=UTF8&psc=1

I'm not seeing any difference between these, but maybe that's the problem?

Thanks!

geoffdavis commented 2 years ago

I'm unaware of any particular issues between one device or the other.

All I can guess is that one of them has a stronger pull-up resistor on the input lines.

Are you using a TTL level shifter to go from 3.3v on the microcontroller to 5V that the Mitsubishi uses? Or, are you using the voltage divider circuit that the upstream HeatPump library author recommends?

davidmerrique commented 2 years ago

@geoffdavis I'm just connecting directly from the CN105 to the D1. Which is working for the other 3 units.

As I read through old issues it just seems like there are problems with some D1 Minis.

I have a couple more arriving today that I'm going to try, I'll report back. You can close this issue.

Thanks!

geoffdavis commented 2 years ago

I would try the voltage divider circuit before throwing out those D1 minis. The ESP8266 really wants 3.3v and you can cook their serial pins if you give it the 5v from the Mitsubishi on those digital pins.

earwin commented 2 years ago

@davidmerrique you can try resetting your D1s once or twice (see #49) Though my setup has some resistors there I think (as Geoff suggests).

jeffborg commented 2 years ago

I have had a d1 mini in my air con for years now, But I'm just using a TTL level shifter. Only just recently switched firmware to esphome and has been flawless over these years.

geoffdavis commented 2 years ago

The reisistors set up as voltage dividers are indeed the poor man’s level shifter. The MOSFET-based level shifters are the better approach. At the 4800 bps data rate of this serial line, even the cheap ones work fine.

Glad to hear that the mystery has been solved. Note that some batches of chips may have slightly higher 3.3v logic output than others which would explain the case where some D1 minis work and others don’t. Use the voltage divider or level shifters and take the guesswork out of it.

On Thu, Dec 2, 2021 at 12:52 Jeffrey Borg @.***> wrote:

I have had a d1 mini in my air con for years now, But I'm just using a TTL level shifter. Only just recently switched firmware to esphome and has been flawless over these years.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/geoffdavis/esphome-mitsubishiheatpump/issues/48#issuecomment-984991906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDYSUA2C6CYR56AADUBQTUO7MA3ANCNFSM5GT426IQ .

jamescadd commented 2 years ago

I didn't realize a proper MOSFET level shifter was an option, and I need to add some level shifting. Any chance you could point to some that are known to work @geoffdavis ?

geoffdavis commented 2 years ago

Any of the IIC or I2C level shifters on Amazon or AliExpress will do the trick. The FETs don’t need to have high frequency switching for this application. Adafruit also has one.

This would work: KeeYees 10pcs 4 Channels IIC I2C Logic Level Converter Bi-Directional Module 3.3V to 5V Shifter for Arduino (Pack of 10) https://www.amazon.com/dp/B07LG646VS/ref=cm_sw_r_cp_api_glt_fabc_KCG7JGSXX1CN60HYA1FB

On Fri, Dec 3, 2021 at 09:23 James Cadd @.***> wrote:

I didn't realize a proper MOSFET level shifter was an option, and I need to add some level shifting. Any chance you could point to some that are known to work @geoffdavis https://github.com/geoffdavis ?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/geoffdavis/esphome-mitsubishiheatpump/issues/48#issuecomment-985695901, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDYSQHU44LUISL2JOQXI3UPD4KDANCNFSM5GT426IQ .