Comments (8)
The lack of responsiveness is likely due to the polling loop only running once every two seconds. You might get it to be more responsive by fiddling with the value for poll_interval - decrease that from the default of 2000 milliseconds to 1000 and see if it works any better. In your lambda, declare it like auto my_heat_pump = new HeatPump(&Serial, 1000);
in your lambda.
(Code that implements is here)
A possibly better solution would be to convert to callbacks but I was unable to get those to work during my development, and just wanted to get this thing out the door.
from esphome-mitsubishiheatpump.
As for the different fan modes, @DeltaAngle nailed it on the head.
I'd love to get the custom modes like gysmo's implementation, but I haven't figured out how to override the ESPHome definitions. There seems to be a lot of work that would have to happen in the ESPHome code base in order to provide custom fan levels, as the conversation between ESPHome and HomeAssistant is pretty heavily locked down. There may be a way to make it work akin to how the FastLED component lets you declare "lamba modes", but that's likely a whole lot of development work.
from esphome-mitsubishiheatpump.
@jascdk I did some experiments with the refresh interval, and found that:
- 1000ms is an improvement
- 500 ms didn't yield much in the way of responsiveness
Watching the logs, it appears that the heat pump doesn't report a changed state until the fan vanes open. In particular, if the unit is off, and you turn it on, the HeatPump won't report the change over it's serial port until the slats open up. This can take up to 10 seconds.
So that's one mode of slowness.
The other sluggish part is the temperature changes. I have a feeling that getting the callbacks working is going to help that. Right now, the code sends an update to Home Assistant every polling loop. My theory is that the constant stream of state changes is too much for HomeAssistant, either in the core (not likely) or in the web front end components. By converting to callbacks, update messages would only be sent to home assistant IF something changed. I'll see if I can get that functionality working.
from esphome-mitsubishiheatpump.
Release 1.1.0 addresses the responsiveness issue.
I got callbacks to work (turns out that my initialization fixes had fixed all of the crashes I was seeing with the callbacks), and increased the polling interval from 2 seconds to 500 ms. The web interface is much snappier, and your temperature graphs shouldn't be as large now due to it only including data points when things change rather than every update.
Please try it out and let me know if you see any problems in a new ticket.
Thanks!
from esphome-mitsubishiheatpump.
This is taken from the code at Gysmos repo:
Here is some examples of the states of the fan and vane:
if (strcmp(settings.fan, "AUTO") == 0) {
700 controlPage.replace("FAN_A", "selected");
701 }
702 else if (strcmp(settings.fan, "QUIET") == 0) {
703 controlPage.replace("FAN_Q", "selected");
704 }
705 else if (strcmp(settings.fan, "1") == 0) {
706 controlPage.replace("FAN_1", "selected");
707 }
708 else if (strcmp(settings.fan, "2") == 0) {
709 controlPage.replace("FAN_2", "selected");
710 }
711 else if (strcmp(settings.fan, "3") == 0) {
712 controlPage.replace("FAN_3", "selected");
713 }
714 else if (strcmp(settings.fan, "4") == 0) {
715 controlPage.replace("FAN_4", "selected");
716 }
717
718 controlPage.replace("VANE_V", settings.vane);
719 if (strcmp(settings.vane, "AUTO") == 0) {
720 controlPage.replace("VANE_A", "selected");
721 }
722 else if (strcmp(settings.vane, "1") == 0) {
723 controlPage.replace("VANE_1", "selected");
724 }
725 else if (strcmp(settings.vane, "2") == 0) {
726 controlPage.replace("VANE_2", "selected");
727 }
728 else if (strcmp(settings.vane, "3") == 0) {
729 controlPage.replace("VANE_3", "selected");
730 }
731 else if (strcmp(settings.vane, "4") == 0) {
732 controlPage.replace("VANE_4", "selected");
733 }
734 else if (strcmp(settings.vane, "5") == 0) {
735 controlPage.replace("VANE_5", "selected");
736 }
737 else if (strcmp(settings.vane, "SWING") == 0) {
738 controlPage.replace("VANE_S", "selected");
739 }
740
741 controlPage.replace("WIDEVANE_V", settings.wideVane);
742 if (strcmp(settings.wideVane, "<<") == 0) {
743 controlPage.replace("WVANE_1", "selected");
744 }
745 else if (strcmp(settings.wideVane, "<") == 0) {
746 controlPage.replace("WVANE_2", "selected");
747 }
748 else if (strcmp(settings.wideVane, "|") == 0) {
749 controlPage.replace("WVANE_3", "selected");
750 }
751 else if (strcmp(settings.wideVane, ">") == 0) {
752 controlPage.replace("WVANE_4", "selected");
753 }
754 else if (strcmp(settings.wideVane, ">>") == 0) {
755 controlPage.replace("WVANE_5", "selected");
756 }
757 else if (strcmp(settings.wideVane, "SWING") == 0) {
758 controlPage.replace("WVANE_S", "selected");
759 }
from esphome-mitsubishiheatpump.
The fan and swing modes in Geoff's code are based on the supported functions in the ESPHome Dev branch. You can see these documented here, https://next.esphome.io/components/climate/index.html. ESPHome would need to be updated to support the numerical fan speed, vane swing, and wide vane swing settings.
from esphome-mitsubishiheatpump.
@DeltaAngle Ahhh thanks - that makes sense;)
Any thoughts on the responsiveness?
from esphome-mitsubishiheatpump.
Release 1.1.0 addresses the responsiveness issue.
I got callbacks to work (turns out that my initialization fixes had fixed all of the crashes I was seeing with the callbacks), and increased the polling interval from 2 seconds to 500 ms. The web interface is much snappier, and your temperature graphs shouldn't be as large now due to it only including data points when things change rather than every update.
Please try it out and let me know if you see any problems in a new ticket.
Thanks!
Hi Geoff:)
That did make an hell of a difference instead of the old one:) Nice that you got it working out! If I have other issues I will get back to you. I have put this repo on my watch list, so I can keep up with eventually other updates! Nice work Geoff!!!!
from esphome-mitsubishiheatpump.
Related Issues (20)
- how to set control over fan speed from web server? HOT 2
- My device works sometimes but, after shows IDLE. HOT 4
- External sensor types and temperature deltas HOT 1
- Using the ESPHome Uart component
- Turning on climate doesnโt remember last state
- Compile error: src/esphome/components/mitsubishi_heatpump/espmhp.cpp:454:46: error: comparison between distinct pointer types 'HardwareSerial*' and 'HWCDC*' lacks a cast HOT 2
- NTXUKS Model not communicating
- ESPHome 2024.4 compilation errors HOT 5
- Fan Modes in HA MSZ-RW25 HOT 1
- Provide a sensor for set fanspeed?
- Does the project support Mitsubishi Electric MSZ-HR35 HOT 3
- External temperature from HomeAssistant not stable HOT 1
- Component esphome.coroutine is marked FAILED HOT 9
- esphome 2024.6.0 changed the definition of HARDWARE_UART_TO_SERIAL HOT 26
- Error E4
- Compilation error using 2.5.0 & 2024.6.4 HOT 9
- Compile errors with new ESPHOME versions HOT 1
- Air Handler no longer reporting temperature HOT 2
- fan speed support in web interface
- ESP32 not starting 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 esphome-mitsubishiheatpump.