Waboodoo / HTTP-Shortcuts

Android app to create home screen shortcuts that trigger arbitrary HTTP requests
https://http-shortcuts.rmy.ch
MIT License
1.17k stars 113 forks source link

MQTT issue #309

Closed bananenfisch closed 2 years ago

bananenfisch commented 2 years ago

Hello,

thanks for the MQTT support - it's great!

For some reason (i didn't figure out why), the 2nd optional parameter do not work:

sendMQTTMessages("tcp://broker:port", [{"topic": "light/power", "payload": "toggle"}]); // connecting works, but no message published (broker without user/pwd)

sendMQTTMessages("tcp://broker:port", null, [{"topic": "light/power", "payload": "toggle"}]); // works!

And there is a typo in the mqtt-snippet: "{\"topic\": \"\", \"payload\": \"\"},\n]};\n", Should be: "{\"topic\": \"\", \"payload\": \"\"},\n]);\n", https://github.com/Waboodoo/HTTP-Shortcuts/blob/a3f95e4e070a068a54c12a6e440c8c2baf471a3e/HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/editor/scripting/codesnippets/usecases/GenerateCodeSnippetItemsUseCase.kt#L425

Thanks! Markus

Waboodoo commented 2 years ago

Thanks for the bug report. I fixed the issue and the typo now. It will be included in the next release.