When I add a Brazilian accent to a letter on configure names, for example Full Name: Luz - Salão de Festas and try to discover at MQTT the firmware not send, if I take out the accent and leave Salao de Festa, it appears on MQTT. At Tasmota it works for example with space and ~ç´` etc
So, if you have this character in name, and do HASS discovery, can you use HA MQTT "listen" tool to see what's published, so we can investigate? Or is there no message at all?
Maybe it breaks because I can't have special char there?
Code: C / C++
Log in, to see the code
Added after 1 [minutes]:
SO it would mean:
- we already can have special chars in quotes ids list for HA
- but we can't use them (obviously) in internal entity names, so i need to prune them
Added after 11 [minutes]:
I probably could patch STR_ReplaceWhiteSpacesWithUnderscore to prune those characters
Added after 16 [minutes]:
Like this:
and then rename command to "sanitize"
Added after 10 [minutes]:
@tadeu1@divadiow can you check?
https://github.com/openshwprojects/OpenBK7231T_App/pull/1934 Set full name:
Salão de Festas
Set single pin with relay.
Expected behaviour:
- uniq_id for HA will have special chars stripped, so it will work , it will turn into Sal_o_de_Festas_relay_1
- the ids string for HA (the one I expect to be human-readable) will have this string as is
I am not sure whether we need to escape this char futher
So, it's okay now? Is it ready to merge? I see short name got corrected, but short name is used for MQTT, I don't think there is a way around it. Long name is for display, I think.
First of all, if you want to measure power of Wi-Fi module, you need to turn off the LEDs in the firmware first.
Then, make sure you use PowerSave 1 feature of OBK. It's a great feature that can prolong the life of many devices. I really recommend it. Check this topic to see what happens if you overload Tuya power supply (or sometimes it happens just on its own, those devices are cheap):
https://www.elektroda.com/rtvforum/topic3898805.html
The issue concerns the inability of MQTT firmware to transmit device names containing Brazilian accented characters when configured under "Configure Names." For example, a name like "Luz - Salão de Festas" does not appear in MQTT discovery, whereas removing accents ("Salao de Festa") allows proper transmission. It is noted that Tasmota firmware supports accented characters, spaces, and special symbols such as ~, ç, ´, and `. A response suggests that the current MQTT implementation may only support ASCII characters (single-byte), implying that accented characters, which are typically multi-byte, are not handled correctly. Summary generated by the language model.