Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT support #82

Closed
wutu opened this issue Apr 28, 2016 · 11 comments
Closed

MQTT support #82

wutu opened this issue Apr 28, 2016 · 11 comments

Comments

@wutu
Copy link

wutu commented Apr 28, 2016

Great software, you plan to support MQTT? It would certainly facilitated the integration with multiple systems.

@schollz
Copy link
Owner

schollz commented Apr 28, 2016

Yes, I think this would be a great addition. I don't know much about it. I'll open this up as a feature request for others to help with!

Seems like there are some Golang packages to get started with: https://github.com/yosssi/gmq

schollz added a commit that referenced this issue Apr 29, 2016
@schollz
Copy link
Owner

schollz commented Apr 29, 2016

Okay, it was a lot easier then I thought! I added it already. Its live.

The messages are passed through /find/GROUPNAME/USERNAME at tcp://ml.internalpositioning.com:1883.

You can connect by using this Golang MQTT client by building and then using

 ./gochat-mqtt -name="spectator" -room="GROUPNAME" -server="tcp://ml.internalpositioning.com:1883"

Whenever a /track comes through, it will go to the MQTT messaging, if mqtt is enabled.

@schollz schollz closed this as completed Apr 29, 2016
@schollz schollz added this to the 3.0 milestone Apr 29, 2016
@wutu
Copy link
Author

wutu commented Apr 29, 2016

superfast, thx.

@tavalin
Copy link

tavalin commented Apr 29, 2016

Is it possible to specify a private MQTT server?

@schollz schollz reopened this Apr 30, 2016
@schollz
Copy link
Owner

schollz commented Apr 30, 2016

I've now realized that MQTT is in no way private by default lol. I'm taking it offline for now.

I think a "okay" solution will be to allow users to specifically request a MQTT connection, at which I will add their Group to a ACL file that allows access. Of course, still anyone can access this if they have the Group name, but this is the general scheme of how FIND currently works (security through obfuscation). The main thing here is that I need to disallow the wildcard rooms so that people can't spectate all the transactions...

I'm open to other suggestions too!

@schollz
Copy link
Owner

schollz commented Apr 30, 2016

Okay I found a way to do this, its going to be limited to Linux systems for now.

@schollz
Copy link
Owner

schollz commented Apr 30, 2016

Okay, sorry, I have a "secure" MQTT now (d34af10). Basically you have to subscribe to have MQTT access, and then you can authenticate yourself in the MQTT channel so others can't snoop.

Read this to get started and let me know if you have questions!

@schollz schollz closed this as completed Apr 30, 2016
@tavalin
Copy link

tavalin commented Apr 30, 2016

@schollz Did you have any comments on allowing users to specify the mqtt server?

@schollz
Copy link
Owner

schollz commented Apr 30, 2016

@tavalin Do you mean, allowing users to specify a different mqtt server that you can listen to the locations determined from FIND? I.e. having FIND forward the messages to a different MQTT server? This doesn't exist, but I can add it if you need that.

Right now, the only way to have a different MQTT endpoint is to host your own FIND server and your own mosquitto daemon as the MQTT endpoint.

@tavalin
Copy link

tavalin commented Apr 30, 2016

Yes. As I'm running my own Find server I'd also like Find to forward the location info to my own MQTT server too (rather than have my data in the cloud).

@schollz
Copy link
Owner

schollz commented Apr 30, 2016

Okay, that you can do. Here are the instructions. Right now its only setup for mosquitto. Let me know if you have problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants