Closed mitsumaui closed 2 years ago
Done some debugging with this. It seems that the topic/payload has some characters which are not being stripped when split into the payload variable: https://github.com/yp87/leaf2mqtt/blob/c7643adcd72f0e120149235e781895123391d7e8/src/mqtt_client_wrapper.dart#L103
If you change it to the below it shows the correct payload value:
payloadWithTopic.substring(payloadWithTopic.indexOf(message.topic) + message.topic.length+2)
Not sure what other impact this might have, or if it's a manifest of either the DART MQTT client, or my MQTT broker (VerneMQ).
Hello!
Thank you for reporting the issue. I updated the code to use the solution from your fork.
Regards
Hey!
First of all - thanks for taking this to the next Level! I have actually forked your code and published a container on GHCR, along with a helm chart if you are interested in maintaining a published version.
I seem to be struggling to get any update commands to work. Whilst MQTT messages are being published at the set interval, none of the update commands result in further logging or new values being published.
From Home-Assistant
Finest logging from leaf2mqtt
I've not developed with Dart before so I'm still trying to make sense of what's happening. Given that the wrapper receives the published topic / payload, it seems to not be triggering the update routine - so I wonder if there is some conversion / case issue?
Let me know if there is any further information you need!