Closed Blueforcer closed 1 year ago
Hi @Blueforcer,
Please provide the source code.
Hi @dawidchyrzynski
there is nothing wich could change my payload i think
Output is
you can find the complete sourcecode here: https://github.com/Blueforcer/SmartPusher/blob/c8526b3a6932edda5b40b5a14447f0397fd892fd/src/MqttManager.cpp#L90
The onMessage
callback function is designed to handle both external and internal messages that are processed by the library. However, if the message topic does not meet your requirements, it should be ignored. Therefore, it is important to implement the necessary checks to filter out irrelevant messages. It's expected behaviour. See the documentation: https://dawidchyrzynski.github.io/arduino-home-assistant/documents/api/core/ha-mqtt.html
@dawidchyrzynski
I already filter my topics.
While the topic is correct the payload is still messed up. It contains my external message (green box) AND some internal data (Red)
The length of the payload is also correct. i will now try to cut the payload according to the lenght
@Blueforcer That's due to an invalid conversion of uint8_t to String. The payload buffer doesn't contain a null terminator.
besides HA i use the libs MQTT cleint also for other things. if i receive a message, there is always some ha config in the payload. in following example i only send "hallo"
hallo1097bd33921c/BTN8/config���␄�B���>5E��;w��EY�f��R␑�␎6�&��␛�R�W��ԙb���p�ė�I␗�␎&l*�����J꣨:mb␝���W␝:l�^A���␗]۪�S�{�[�����h␇�ە���s␜�␗�␆{|����~��␚�␡2l␚H�^��*'␑�m���␘�Fӟ;>��,��␅�Lg2̹@�>���7�j���mrG�q_��^ A�␎=^�0�t��GUjIxV��T
i cannot find my error:)