So, the current Blynk build starts a netty endpoint for MQTT on port 8440, but I could not find any documentation on how to use this?
I can publish to that broker with mosquitto_pub on any topic, but can’t subscribe on # topic with mosquitto_sub, getting a connection lost error after a few seconds…
Hello. No docs right now. MQTT was done as the demo for one of our clients and never get developed further. Now I have a bit more time. I’ll try to release some documentation on usage soon.
Ok, thanks, good to know.
I’m trying to figure out from source code and debugging… I’ll try&document what I find.
Actually I think it would be useful to have Blynk as a MQTT client to a separate broker too, would be more flexible IMHO, although I understand it’s a different paradigm than what you had in mind to begin with.
publish userid is the blynk user and password one of the device tokens
Need to publish on topic named ‘hardware’
payload is the Blynk message, which is then passed onto the Logic processing.
The message is made of pinTypepinNumbervalue separated by space char
Also found a slight bug which is that connecting on MQTT without usid or pw throws an internal NPE which hangs the MQTT connection until timeout, instead of gracefully aborting.