Closed wutu closed 8 years ago
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
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.
superfast, thx.
Is it possible to specify a private MQTT server?
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!
Okay I found a way to do this, its going to be limited to Linux systems for now.
Okay, sorry, I have a "secure" MQTT now (https://github.com/schollz/find/commit/d34af10964bf48619d6fd674ebee676ca1ecf9a8). 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 Did you have any comments on allowing users to specify the mqtt server?
@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.
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).
Okay, that you can do. Here are the instructions. Right now its only setup for mosquitto. Let me know if you have problems.
Great software, you plan to support MQTT? It would certainly facilitated the integration with multiple systems.