Announcement

Collapse
No announcement yet.

FACTS P1AM Example Series #1 - MQTT Call and Response

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • FACTS P1AM Example Series #1 - MQTT Call and Response

    Purpose:
    This example uses an MQTT broker to update the outputs of a P1-08TRS the inputs of a P1-08SIM. You can easily switch these out for any discrete input or output module.

    I used shiftr.io for this example. This is a free MQTT broker that provides visualisation and is great for testing. If you want to use a different broker, update the broker string to the proper URL and update any login credentials.

    Both the sending and receiving portions are included in this code, but these could be separated out into separate P1AM units or web interfaces.

    With a little bit of modification, you can turn this example into a remote monitoring or combine it with Modbus TCP and connect an aging PLC to the cloud.

    Dependencies:
    P1AM - In the library manager or or on GitHub: https://github.com/facts-engineering/P1AM
    ArduinoMqttClient - In the library manager or on GitHub: https://github.com/arduino-libraries/ArduinoMqttClient

    Products Used:
    P1AM-100
    P1AM-ETH
    P1-08SIM
    P1-08TRS

    Check out the code here:
    https://github.com/AutomationDirect/...d_Response.ino
    Last edited by FACTS_ENG_TEAM1; 03-02-2020, 01:24 PM.
Working...
X