Comments (7)
ok thank. I will check if it possible to add a check before load the page
from mitsubishi2mqtt.
Thanks. Ideally, the control page would load and operate correctly even if mqtt wasn't configured.
This repo really is super easy to use and fairly robust already. For folks that aren't necessarily interested in mqtt, this would be great to just control the heat pump.
from mitsubishi2mqtt.
I wish I had seen this... As a complete beginner I assumed either my soldering was wrong tx/rx won't way round, or I was about to reflash my board until I checked here.
But I agree, having it work without MQTT would be ideal.
Thanks for everything you've done to date.
from mitsubishi2mqtt.
I ran into this as well and was convinced that I botched the crimp terminals yet again.
I think what's happening is handleControl()
calls change_states(settings)
which triggers hpSettingsChanged()
and/or hpStatusChanged()
callbacks and neither of those test whether mqtt_client
is initialized before trying to publish and that must be causing the crash/reset?
Also handleControl()
should probably skip calling change_states(settings)
on GET requests.
This is just speculation after skimming though the code, haven't had a chance to try to fix the code yet.
from mitsubishi2mqtt.
Do you think it would be more efficient to initialize the mqtt client but keep it disconnected in some way, or to wrap all the various publish commands with a mqtt_client initialization check?
from mitsubishi2mqtt.
Digging in further, I'm thinking about just setting the setSettingsChangedCallback
and setStatusChangedCallback
callbacks within initMQTT
since I know both hp
and mqtt_client
will have been initialized at that point. (I'm not sure if that's bad practice, though.)
from mitsubishi2mqtt.
Ok my hypothesis about hpSettingsChanged()
/hpStatusChanged()
was wrong.
It's actually crashing in handleControl()
when accessing the heatpumpSettings
struct:
if (strcmp(settings.power, "ON") == 0) {
controlPage.replace("_POWER_ON_", "selected");
}
...
Looks like the default heatpumpSettings
is corrupt when loop()
isn't polling the heat pump - i.e. when MQTT is not configured.
The control page seems happy after changing loop()
from:
if (!captive and mqtt_config) {
// Sync HVAC UNIT
...
//MQTT failed retry to connect
...
}
else ...
to
if (!captive) {
// Sync HVAC UNIT
...
if (mqtt_config) {
//MQTT failed retry to connect
...
}
}
else ...
from mitsubishi2mqtt.
Related Issues (20)
- MQTT retry doesn't retry HOT 3
- After updating I can't setup temperature anymore HOT 8
- OTA update resets config HOT 6
- "Discovered MQTT entities with a name that is equal to the device name" (Home Assistant Warning) HOT 2
- Upgrade from 0.7.3 fails HOT 2
- Wemos d1 mini v2 HOT 2
- Custom packet max size
- Fan speed 4 issue - compressor frequency
- [FR] RSSI and HVAC status via MQTT
- Issue on initial setup
- HVAC connection stuck HOT 2
- openHAB MQTT Channel Autodiscovery not working cause name=null HOT 2
- MSZ-HR25VF - D1 Mini Clone - HA Constantly being unavailable HOT 4
- Syslog integration?
- Homeassistant mqtt Mitsubishi HOT 2
- Config allows illegal characters to be used in “Friendly name”
- some pieces of code in mitsubishi2mqtt.ino that implement delay by comparing to millis() can be improved to work better on a wrap
- Led blinking
- Connection Problem
- Stopped working all of the sudden 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 mitsubishi2mqtt.