Hi, new user here. Just want to ask if its possible for tago io to connect with external mqtt brokers? From the guides I have gone through its only showing devices connected to the tago’s own broker
Hello,
What you want to do is to collect data from a 3rd party broker, right?
As you mentioned, TagoIO offers a broker and all the support for you to connect to it’s broker.
In order to connect to an external broker, there is no native support available. You won’t be using Devices to connect to the a 3rd broker.
To achieve that, you want to use analysis. Analysis is a Javascript code that you can upload to TagoIO. By using the @tago-io/builder, you are able to use any library you want within your analysis.
That includes libraries such as MQTT.js and others.
In your analysis, what you want to do is to write up a code using the MQTT library to connect to your broker. Notice that analysis can run up to 14 minutes only. Then you need to trigger the analysis again somehow by using Actions or calling up the analysis from inside your own analysis, with commands such as “account.analysis.run(ANALYSIS_ID)”
When subscribing to the topics and receiving data, you can then do any operation you prefer, such as storing the data to your device.
If you need further help, let us know!