geoffdavis / esphome-mitsubishiheatpump

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

Current Temperature: nan°C #71

Open k0nkiShell opened 2 years ago

k0nkiShell commented 2 years ago

Hello

First of all thanks for your work :)

I have managed to make it work in a duct machine, everything works except that the temperature of the room comes out as "Current Temperature: nan°C"

imagen

Do you know if there is any way to solve this and take the value of the machine???

In Home assistant I don't get the temperature of the room either.

I've tried with the service in home assistant, but I can't get anything, I'm sure I'm doing something wrong....

api: services:

This is the climate I use:

climate:

Thank you very much :)

danolson1 commented 10 months ago

If a reboot is needed maybe that's due to some code on the setup() function that needs a reboot to run. Just a guess.

-Dan

On Wed, Jan 3, 2024, 11:51 AM Pavel Veider @.***> wrote:

Hi guys! A couple of days ago i built and installed my esp module, too. I experienced a strange phenomenon, though: each time i make OTA upgrade of FW it seems that esp doesn’t communicate with A/C after finished upgrade (i get no temp readings)l BUT…if i manually reboot esp again (i have reboot button programmed) all starts to work and it works perfectly afterwards. Did anyone had such a problem? What could be the cause?

Reagarding UART communication: esp modules with built-in UART-to-USB chip can be nasty… some of these chips tend to hold tx or rx level up or down when not in use, so no communication via uart is possible with other devices. So, for this purpose it’s best to use a module without usb, say, esp01. It’s cheap, ultrasmall and it works. Or, as someone above did: cut traces from esp to uart chip.

Finally, regarding level converter: i didn’t use it, but it works. Original schematic doesn’t use it also. So, i wonder…is it needed or not? Esp module’s data say pins are 5v tolerant, so we can’t destroy esp, while sending 3.3V is already enough for AC to see this voltage as active 1… any thoughts?

— Reply to this email directly, view it on GitHub https://github.com/geoffdavis/esphome-mitsubishiheatpump/issues/71#issuecomment-1875671899, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK4ACHPY7XQ7NJQUV5B42TYMWEBTAVCNFSM6AAAAAAQ4HMUZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZVGY3TCOBZHE . You are receiving this because you commented.Message ID: @.***>

Protoncek commented 10 months ago

I agree, but, on the other hand…isn’t a reboot made immediately after succesfull OTA? It smells as that reboot isn’t exactly as clean as it should be… it makes me think if anything similar as “forced second reboot” after ota update is possible to program into yaml…

elreydetodo commented 10 months ago

@Protoncek there are some ESP32 pins that change the boot mode if they are pulled high or low during boot. I wonder if there might be a problem with that, or possibly the receiving of data during the reboot is putting it into an odd state. Does it happen predictably after all updates, or only sometimes?

Protoncek commented 10 months ago

That’s …possible, but not likely… board is ESP01 (so it’s 8266), and after each OTA update sensors like IP, MAC, wifi signal are always there, it’s just AC part that’s offline until i do a second reboot. So, esp is fully booted and functional. I have pull-up resistors on tx and rx signals, like on original schematic.

Protoncek commented 10 months ago

Interesting… today i updated my HA (to 2024.1) and after HA restarted (after finished update) it happened same thing: temperature unavailable. After esp restart all is ok again… so it’s something between HA and module communication… ? But only for climate…? (As said, other sensors always work and did work today, too).

echavet commented 10 months ago

For information: on 3 heat pumps on which I installed ESP8266, one of them couldn't get connected whereas it was just the same settings of the two others. I've changed the cables, swapped the chips... No way to make the 3rd one work. So I tried to use a 3.3v regulator. The reason is a long story. The result is that it works now. Here is the module I'm using: AZDelivery 3 x AMS1117 Module... https://www.amazon.fr/dp/B07CPXVDDN?ref=ppx_pop_mob_ap_share

echavet commented 10 months ago

One thing is sure: adding a regulator between the heat pump 5v and the chip vin makes the connection far more reliable.

I tested it on a heat pump that has been refusing to communicate on the UART until I installed one.

On 2 other heat pumps on which all seemed to work well, I've noticed some packet loss. No more loss with the regulator.

Check this one's: AZDelivery 3 x AMS1117 Module d'alimentation 3.3V Compatible avec Raspberry Pi incluant Un EBook! https://amzn.eu/d/0AJG871

Le jeu. 4 janv. 2024, 09:29, Pavel Veider @.***> a écrit :

Interesting… today i updated my HA (to 2024.1) and after that it happened same thing: temperature unavailable. After esp restart all is ok again… so it’s something between HA and module communication… ? But only for climate…? (As said, other sensors always work and did work today, too).

— Reply to this email directly, view it on GitHub https://github.com/geoffdavis/esphome-mitsubishiheatpump/issues/71#issuecomment-1876698067, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTHBAOYVUZVQRRZOVAFGDYMZSANAVCNFSM6AAAAAAQ4HMUZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZWGY4TQMBWG4 . You are receiving this because you were mentioned.Message ID: @.***>

Protoncek commented 10 months ago

Hm… which esp module did you use? I mean - does esp even survives 5V power supply? I know i destroyed esp module before just because i connected to 5V power supply, so i thought it’s mandatory (and i do have it). If anything, i’d more suspect lack of level converter…?

danolson1 commented 10 months ago

Yeah, most of the modules have a built-in voltage regulator that takes 5v in and converts it to 3.3v for the chip. So Eric, if you're using a separate voltage regulator to supply 3.3v directly to the chip, it seems like you might just be bypassing the built-in voltage regulator. Maybe the built-in voltage regulator on your board is damaged?

This setup should work fine, but I think it's unnecessary for most people.

-Dan

On Sat, Jan 6, 2024 at 2:25 AM Pavel Veider @.***> wrote:

Hm… which esp module did you use? I mean - does esp even survives 5V power supply? I know i destroyed esp module before just because i connected to 5V power supply, so i thought it’s mandatory (and i do have it).

— Reply to this email directly, view it on GitHub https://github.com/geoffdavis/esphome-mitsubishiheatpump/issues/71#issuecomment-1879581601, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK4ACGTDASI4OLJON4SML3YND36PAVCNFSM6AAAAAAQ4HMUZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZGU4DCNRQGE . You are receiving this because you commented.Message ID: @.***>

echavet commented 10 months ago

No it's not a pb of internal regulator being damaged. I've checked with other esp units that were working on my heatpump, I've changed cn105 cable with cables which were tested ok too. No way to make it work on a friend of mine's heatpump. Until I used an external regulator. I've checked again an again. With external regulator OK, without NaN and no way to get connected to the UART.

danolson1 commented 10 months ago

There are a lot of possible explanations, but all of them would require an oscilloscope to diagnose.

Since you seem to have a working configuration, if you post a schematic diagram of the electrical connections, a photo of the wiring, and the ESPHome yaml file, other people should be able to use that information to replicate your setup. Once we have a collection of these working examples, most people should be able to find at least one that will work for them, based on local parts availability and their type of heat pump.

-Dan

On Sat, Jan 13, 2024 at 4:13 PM Eric Chavet @.***> wrote:

No it's not a pb of internal regulator being damaged. I've checked with other esp units that were working on my heatpump, I've changed cn105 cable with cables which were tested ok too. No way to make it work on a friend of mine's heatpump. Until I used an external regulator. I've checked again an again. With external regulator OK, without NaN and no way to get connected to the UART.

— Reply to this email directly, view it on GitHub https://github.com/geoffdavis/esphome-mitsubishiheatpump/issues/71#issuecomment-1890770238, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK4ACFPUXK3OYSXPXS3PPTYOL2GBAVCNFSM6AAAAAAQ4HMUZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQG43TAMRTHA . You are receiving this because you commented.Message ID: @.***>