-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any plans to expose sensors which report MQTT and Heat Pump Connection Status? #24
Comments
Hi, @jamessimpson007. This project already has integration with home assistant and mqtt |
Hi, sorry perhaps I wasn’t clear. Yes I’ve got all the MQTT sensors and controls in HA which all work brilliantly. I was wondering if it was possible to have extra sensors which report
Unless I’m being dumb and missing something obvious I can’t find any way of doing this. That would be the icing on the cake! Thanks |
Hi, Thanks for the kind words, to be clear I had a good amount of help from kind people like @limkinZero, so it's not just my work! I think it should be possible to add some sensors for the state of the ESP32 (hp connection and WiFi strength). I think MQTT connection seems maybe not as useful, as we can only report it if MQTT is working already and it doesn't really have any partially working states. I'll take a look when I get some time! Thanks, |
On my ESP32-DEVKIT1 everythinh look great, only MQTT Connection is not stable. |
@piplica are you still facing MQTT stability issues ? |
Hi, it was 2 days conected ion my HP, and I was facing the issue the whole time. Thanks |
It's difficult to say, as it's not clear why the connection quality is not good in your case. When you go to the web view for ecodan-ha-local and "Reload WiFi SSIDs" on the configuration page, what sort of signal strength is is reporting for the ESP32? What sort of machine are you using for the MQTT server? I had lots of problems with connection dropouts with a Raspberry Pi on WiFi which went away after I used ethernet for the RPi network connection. |
Hi, in most cases WiFi, and Web interface is available, but Not Mqtt. |
*we can only report it if MQTT is working already*
We can report a lost MQTT connection by using "MQTT Will message"
…On Wed, Mar 13, 2024 at 4:07 PM piplica ***@***.***> wrote:
Hi, in most cases WiFi, and Web interface is available, but Not Mqtt.
—
Reply to this email directly, view it on GitHub
<#24 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKTKX6PNR4KSE3PDMXJ4BLYYBMRJAVCNFSM6AAAAABEDBYASWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJUGQ4DSOBQHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi, I just created a pull request #32 with some diagnostic sensors. |
I'll try to add some more detailed error information to the logging as well for MQTT issues so the reason for any disconnection is now obvious. |
Although my set up is generally working brilliantly, the MQTT sensors do intermittently go unavailable a few times every day. It seems to just last a few minutes and then they come back online again. I’m not sure whether it’s a wifi reception issue or something else. There seem to be plenty of bars next to the WiFi section in the configuration page. It has been causing some issues with some of my HA automations but I have set up some (hopefully) temporary trigger template sensors to ignore the unknown/unavailable states when it happens. I’m no MQTT expert, but could the retain flag be used here for the sensors (not controllers) which might help? I think it used to be possible to do within HA but that caused issues so now can only be done by the publisher? |
Speculative change for MQTT update problems described in issue #24. Logic is changed to try to re-establish connection inside a sensor publish if we detect it's been lost.
I pushed an update which should hopefully make things a bit less noisy if the MQTT connection is lost for some reason. Each individual sensor publish will now attempt to reconnect 3 times before giving up, instead of the current behaviour where it will wait 30s for the next update tick before trying to recover the connection. I'm still not sure why the MQTT is flaky for some people, but it should now print messages like:
when we fail to publish a sensor update, if people can let me know how it's failing that might help identify the cause. Thanks, |
Thanks for that. I’ve updated as described and from the configuration pages all seems well (MQTT connected and green) and sensors all work normally although it’s too early to see if unavailable episodes continue. However, I’ve been looking in the Mosquitto logs and I’m getting loads of refused / broken pipe messages, despite there being nothing worrying in the logs of the "Ecodan Home Assistant Bridge”. 2024-03-16 15:47:43: Connecting bridge heatpump (192.168.0.25:1883) I’ve done a load of troubleshooting including checking user/pass credentials, trying different user name, changing IP address, checking router settings, re-installing Mosquitto, is anyone else experiencing similar issues? |
Connection refused means that mosquitto is trying to open out a connection to somewhere else (which seems to exist), but that whatever it is isn't listening for MQTT protocol messages. Is 192.168.0.25 the IP address assigned to your ESP32? Do these attempts to connection out from mosquitto line up with some automation tying to change some heatpump settings? |
Im unable to test it until end of March. |
Thanks again Richard. You’re right, I hadn’t twigged that it was the other way around. Problem solved! Appreciated. |
And was was the solution? |
yup, I had a bridge set up from an old configuration I had forgotten about, called something similar, which was trying to open a connection from Mosquitto. Richard's post jogged my memory as I had assumed that the error messages meant that his python script was trying to connect with Mosquitto, rather than something else trying to do it the other way around! |
Old ecodan configuration? |
Juste testit localy, thats my output.
|
I think this issue can be closed. There are some diagnostic sensors. |
A massive thanks to you Richard Broker for creating this amazing project. Hilarious that one man can create such a polished interface that works beautifully, whereas an enormous multinational corporation fails miserably to provide any sort of decent control.
Do you have any plans to expose sensors which report the MQTT and Heat Pump Connection status in HA - much like that reported on the browser-based interface? Wi-Fi signal strength would also be very useful?
Thanks, James
The text was updated successfully, but these errors were encountered: