Skip to content
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

Pylontech not included in HomeAssistant MQTT Autodiscovery #633

Closed
meisterlampe opened this issue Feb 2, 2024 · 5 comments
Closed

Pylontech not included in HomeAssistant MQTT Autodiscovery #633

meisterlampe opened this issue Feb 2, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@meisterlampe
Copy link

What happened?

My Pylontech-Battery is not discovered automatically within Home-Assistant.
I checked with MQTT-Explorer and can see the current battery-values published to the topic solar/battery. But the Home-Assistant-Autodiscovery-Information expected in the topic homeassistant/sensor/dtu_battery_0001 is missing.

To Reproduce Bug

The bug appears on a fresh openDTU-onBattery-System with MQTT and Pylontech-Battery configured

Expected Behavior

If Home Assistant MQTT Auto Discovery is enabled. A topic homeassistant/sensor/dtu_battery_0001 should be created, that contains the information needed by Home Assistant.

Install Method

Self-Compiled

What git-hash/version of OpenDTU?

2024.01.26

Relevant log/trace output

No response

Anything else?

I'm not that into C++, but I checked the class MqttHandlePylontechHass and for me it seems, that it is never called anywhere.
So I just added it to the main.cpp and Auto-Discovery startet working again. ( development...meisterlampe:OpenDTU-OnBattery:addMqttHandlePylontechHassToMain ).

The name of the class MqttHandlePylontechHass indicates, that simply adding it to main.cpp is not intended. I guess it is not compatible with the other interface options or is this class used for all interfaces?

@meisterlampe meisterlampe added the bug Something isn't working label Feb 2, 2024
@madmartin
Copy link

I propose a "git bisect" to find the commit that broke that feature.

@NikGro
Copy link

NikGro commented Feb 7, 2024

I can confirm the issue as well as the fix proposed by @meisterlampe

@schlimmchen
Copy link
Member

That is the correct way of fixing it and I stumbled upon this independently and did the same fix in #640.

@meisterlampe
Copy link
Author

meisterlampe commented Feb 10, 2024

I tested the new version 2024.02.09 and can confirm, that the bug is fixed. Thanks a lot! 👍

Copy link

github-actions bot commented Apr 4, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants