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

MQTT / Home Assistant - Illegal discovery topic ESP32-Cam Watermeter #2750

Closed
iridium2001 opened this issue Dec 19, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@iridium2001
Copy link

iridium2001 commented Dec 19, 2023

The Problem

I find constantly these messages (below) in my home assistant log.
Running 15.3 updated via ota from 15.1.
In the AI-on-the-edge UI I configured wifi hostname and mqtt main topic both to "watermeter".
MQTT seems to use the correct messages to HA also (so it works generally), but I don't find, why still these messages seem to be send on top. Seems there is a default main topic somewhere/somehow stored.
AI-on-the-edge logs state that is only sends mqtt messages like: "Published topic: watermeter/main/rate_per_time_unit".
Reconfigured MQTT in both Ai-on-the-edge and HA already several times, but problem stays the same.
I noted that aside of the mysterious main topic, the mqtt messages all end with "/config".
Technically, HA seems to complain about the space character in the main topic, but the question is, where are these messages coming from?

Version

15.3

Logfile

Logger: homeassistant.components.mqtt.discovery
Source: components/mqtt/discovery.py:154
Integration: MQTT (documentation, issues)
First occurred: 09:44:28 (17 occurrences)
Last logged: 09:44:29

Received message on illegal discovery topic 'homeassistant/sensor/ESP32-Cam Watermeter/rate_per_time_unit/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Received message on illegal discovery topic 'homeassistant/sensor/ESP32-Cam Watermeter/rate_per_digitalization_round/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Received message on illegal discovery topic 'homeassistant/sensor/ESP32-Cam Watermeter/timestamp/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Received message on illegal discovery topic 'homeassistant/sensor/ESP32-Cam Watermeter/json/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Received message on illegal discovery topic 'homeassistant/binary_sensor/ESP32-Cam Watermeter/problem/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic




[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [CNN] getReadout#PointerEvalHybridNew()= 5
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [CNN] getReadout#result= 590
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [POSTPROC] handleAllowNegativeRate for device: main
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [POSTPROC] Neg: value=590.281000, preValue=590.282000, preToll=590.280000
[0d00h26m08s] 2023-12-19T09:49:35 <INF> [POSTPROC] main: Raw: 590.281, Value: 590.282, Status: no error
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [FLOWCTRL] Status: Sending MQTT (09:49:35)
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [MQTT IF] Published topic: watermeter/status, content: Sending MQTT (msg_id=117)
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [MQTT SERVER] Publishing System MQTT topics...
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [MQTT IF] Published topic: watermeter/connection, content: connected (msg_id=118)
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [MQTT IF] Published topic: watermeter/uptime, content: 1568 (msg_id=119)
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [MQTT IF] Published topic: watermeter/freeMem, content: 820355 (msg_id=120)
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [MQTT IF] Published topic: watermeter/wifiRSSI, content: -50 (msg_id=121)
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [MQTT IF] Published topic: watermeter/CPUtemp, content: 52 (msg_id=122)
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [MQTT SERVER] Successfully published all System MQTT topics
[0d00h26m08s] 2023-12-19T09:49:35 <DBG> [MQTT SERVER] Int. Heap Usage before publishing System Topics: 89139, after: 89059, delta: 80, lowest free: 77627

Expected Behavior

No warnings / errors in Home Assistant.
Only the correct mqtt messages should be send.

Screenshots

No response

Additional Context

No response

@iridium2001 iridium2001 added the bug Something isn't working label Dec 19, 2023
@iridium2001 iridium2001 changed the title MQTT / Home Assistant Illegal discovery topic ESP-32-Cam Watermeter MQTT / Home Assistant - Illegal discovery topic ESP32-Cam Watermeter Dec 19, 2023
@Slider0007
Copy link
Collaborator

Received message on illegal discovery topic 'homeassistant/sensor/ESP32-Cam Watermeter/rate_per_

I assume it's related to the space in device name ESP32-Cam Watermeter. Rename your device and use a name without any spaces.

@iridium2001
Copy link
Author

thanks for your reply, @Slider0007!

As mentioned, the hostname is already set to "watermeter" and the mqtt main topic as well. Or is there any other place where I could change the device name?

Of note, the messages home assistant is complaining about, seem not to be the messages that ai-on-the-edge is sending during the normal operation. But I find them after every restart of home assistant and/or ai-on-the-edge.

@iridium2001
Copy link
Author

Finally had the idea that the behaviour could be caused by mosqitto rather than by ai-on-the-edge. And actually this was the case:
https://github.com/sleevezipper/hass-workstation-service/issues/96#issue-952135346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants