Why is my OpenBeken-flashed 2-gang relay not being discovered automatically in Home Assistant MQTT discovery, even though MQTT control works?
Home Assistant is rejecting the MQTT discovery message because the generated discovery topic contains spaces in the device name, making it an illegal discovery topic [#20713383] Check the HA logs for a warning like `homeassistant/switch/Wall Switch 2 gang_relay_0/config`, then remove the spaces from the device’s “Full Name” and run discovery again [#20713383][#20713461] After renaming it without spaces, the device appears in Home Assistant [#20713461] The firmware author noted that Home Assistant does not like spaces in discovery names and planned a fix to replace them with underscores automatically [#20713417][#20713499] Starting with OBK version 1.17.238, a safety check was added so HA discovery works even if spaces were entered in the names [#20723563]
AI summary based on the discussion. May contain errors.
I have flashed the device with openbeacon. The device is working and I'm able to listen and set the MQTT topics from Hass MQTT config page. The relays are responding well! But the device is not getting discovered. What am I missing?
Ah, thanks for pointing that out! I don't know why it's taking space between characters!
Received message on illegal discovery topic 'homeassistant/switch/Wall Switch 2 gang_relay_0/config'. The topic contains not allowed characters. For more information, see https://www.home-assistant.io/integrations/mqtt/#discovery-topic 9:19:31 AM – (WARNING) MQTT - message first occurred at August 28, 2023, at 5:16:52 PM and shows up 6 times
Yes, I removed the spaces from "Full Name" and clicked on the discover again. Now the device popped up on HA! I should have checked the log earlier, hehe! Thanks for the help though!
The discussion revolves around issues with MQTT discovery for an Openbeacon-flashed 2 gang relay device in Home Assistant (HA). The user successfully set up MQTT topics, but the device was not discovered due to illegal characters (spaces) in the discovery topic. After reviewing HA logs, it was identified that the spaces in the unique ID caused the problem. The user removed the spaces and successfully triggered the discovery process. A suggestion was made to implement a firmware fix to automatically replace spaces with underscores in future versions. The latest firmware version (1.17.238) includes a safety check to handle such issues. AI summary based on the discussion. May contain errors.