Ubidots Community

How to connect Ubidots Broker to the Automation Direct Do-More BRX PLC

Hello!
I was wondering if anyone has any experience connecting Ubidots to Automation Directs BRX line of of PLCs though MQTT? I’ve been trying to connect them together for almost a month to very little successes

May you please post the reference of the PLC that you are using to reach into their docs to give you additional hints to connect your device with Ubidots?

I will be attentive

Here is the link to the store page:
https://www.automationdirect.com/adc/shopping/catalog/programmable_controllers/do-more_series_(brx,h2,t1h)plcs(micro_modular-a-stackable)/brx_series_plcs(stackable_micro_brick)/10_point_micro_plc_units(bx_10-z-10e)/bx-dm1e-10ed13-d

and here is the link for the user manual https://cdn.automationdirect.com/static/manuals/brxuserm/brxuserm.pdf

Thank you so much!

From this document, page 13-60, you should setup your device as follows:

Server Name: industrial.api.ubidots.com
Server Port: 1883
Username: Your Ubidots Token
Password: Your Ubidots Token
Enable will : Disabled
Topic: /v2.0/devices/{DEVICE_LABEL}/
Payload: {"VARIABLE-LABEL": {"value":VALUE, "timestamp": TIMESTAMP, "context":{"KEY":VALUE}}}
Retain Topic: Disabled

I am not sure how to create dynamically your payload with data coming from your PLC registers, and did not find anything related in the docs. For the sake of this answer, you should build a topic that should look like as follows:

{"temperature": {"value":10, "context": {"day": "sunny"}}}

I suggest you create a fixed example payload like the one above to test the connection with the Ubidots broker and then ask to the BRX support how to retrieve data from the PLC connected sensors into a custom MQTT payload.

I hope this helps you

I finally got a minute to try this.
According to the the MQTTPUB command in the software, it says that the information is being sent to Ubidots Successfully, but the device is not appearing on Ubidots.

Hi @ALucas,

Two things that would help us help you:

  1. Can you please take a screenshot of the MQTT client configuration and paste it here to make sure it is correct. Please avoid sharing your token in the username and password fields.
  2. Can you tell us your account username?

Last but not least, if the fields were filled as advised bu Jose and no Device was creating in your account, then the issue must be in the configuration or in the payload being sent to Ubidots from the device.
Let us know the above information so we can better troubleshoot and help you get that PLC connected to Ubidots.

Best,

–David

We were able to figure out the major issue we ran into. Th Username and Password both had to be the Ubidots token. Form there it was a formatting issue. We were just trying to send raw data as just numbers, so we needed to convert it to a JSON format and it worked like a charm!

Hello @ALucas

It would be highly appreciated if you could share your settings and how you build your JSON within the PLC with us here, just so other users in the future experiencing the same issue as you can find a helpful post to follow and guide themselves through connecting their PLCs to Ubidots.

Best,

–David