ochoadavid / Snap-MQTT

Snap (https://snap.berkeley.edu/) to MQTT bridge.
2 stars 0 forks source link

Snap! mqtt blocks #1

Open mikep345678 opened 5 years ago

mikep345678 commented 5 years ago

Heya, David,

Thank you for this script! It is currently running as a one-way bridge between Snap! and my mqtt broker (I have a slightly customized version of this script and a mosquitto broker running on an AWS free-tier Debian instance... : )

But, I need to be able to publish and subscribe within Snap (I need Snap to be able to receive mqtt messages), and struggled to find a way to achieve that within this script. Started going in several directions (a client->topic subscription dictionary seemed the most promising), but nothing was really doable and scalable.

So, it came to pass that I was able to cobble together enough Javascript to make mqtt blocks for Snap. I've posted about them here on the Snap! forum. I'm not sure it's quite appropriate to file this as an "issue" on your project, but-- your work was the foundation and inspiration, and I'm not seeing any other way to contact you... : )

Thank you, Mike

ochoadavid commented 5 years ago

Mike:

¡Great! ¡Thanks for sharing!!

In some point I imagined that it should be possible to make it work directly in Javascript, but in the moment seem easier to simply use python (as the language I know better), and because the client I was using was already in this language.

I have some ideas to make it work for subscribe to a topic but I haven't find time to work in it.

Please feel free to contact me to ochoadavid at gmail.com.

Thanks again, David Ochoa