Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. A RediGate 100 or 400 series device with internet connectivity
  2. Completion of the Getting Started Guide for your respective RediGate device (RediGate 100 Series or RediGate 400 Series)
  3. IBM Watson IoT account (https://discover-iot.eu-gb.mybluemix.net/?cm_mc_uid=32480403355614666233527&cm_mc_sid_50200000=1467207726#/try/)
  4. Ability to ping the internet Internet (using DNS, so an address like google.com) from your RediGate

...

  1. Using ACE, Open the default config configuration you used in the "Getting Started Guide".
  2. Download and open Elecsys-IBM-Demo.xml from the http://partner.elecsyscorp.com site within the same ACE window.
  3. In your default configconfiguration, enable the DNS Client object by setting its Enabled checkbox.


  4. Disable Virtual Unit 3 by clearing its Enabled checkbox.
    Image RemovedCopy and paste the following objects from the Elecsys-IBM-Demo.xml config into your default configImage Added

  5. Copy and paste the following objects from the Elecsys-IBM-Demo.xml config into your default configuration. 
    1. TLS Tunnels  (paste under Networks).
      Image Modified

    2. FieldUnitInternalMast2 (paste under NullCircuit)
      Image Modified

    3. VirtualRW Unit 4 (paste under NullCircuit)
      Image Modified

    4. Data Simulator (paste under Internal Channel 15)
      Image Modified


    5. MQTT_Client (paste under Clients)
      Image Modified


    Include Page
    Renaming Nodes
    Renaming Nodes


  6. Copy Table data from the Elecsys-IBM-Demo.xml Internal Channel 15 → Scan Table into your RediGate Configuration (in Internal Channel, open Scan Table, right-click and select Paste, over-write data). 
     

     



    Info
    titleScan Table Info

    The "Scan Period" object tells the RediGate which RTU (Unit 2, labeled as FieldUnitInternalMast2) to run at an interval (Scan Period) which is set to every 30 seconds. This is how frequently the data will be published to Watson IoT.

    Warning: Data charges may result from excessive usage of Watson IoT service and/or cellular data plan.



  7. Update your MQClient3_1 → Client ID to match the parameters in your IBM account, as described below.
    Image RemovedImage Added

    1. Client ID: g:orgid:gatewaytype:gatewayid

      In this example, the orgid
     is ix9os6
    1.  is 5bl949gatewaytype is 
    12oe, gatewayid is
    1. RG1.
      The gatewayid can be hard-coded, or use  ${SERIAL}  as a variable that
    queries
    1. substitutes for the RediGate
    hardware for its
    1. serial number (
    48678
    1. 40170-
    0001
    1. 0118, in this
    case)
    Image RemovedPassword: Authentication Token that was created when you made your device
    Image Removed
    1. example), or use  ${GATEWAY}  to substitute for the Unit Name in the System object.

      In the Watson IoT platform, you have to add a device with a gatewayid for the Device ID (serial number, unit name, etc.) that matches what will be published from the RediGate.
      Image Added

    2. Password: For the MQTT password, use the "Authentication Token" credentials created for your "Device" in Watson IoT.
      Image Added

  8. Under the "TLS Tunnels" object, update the STUNNEL Parameters to point to your IBM IoT app
    Image Removed.

    The Connect To address should be:   orgid.messaging.internetofthings.ibmcloud.com:8883

    Image Added

  9.  Edit the JSON_RBE → Topic Rules object so that the table entries comply with the rules that IBM expects for your gateway type, device type, etc. See IBM Watson IoT Use Case Notes for more information about acceptable topic architectures
    Image Removed.
    The following is given as an example in this configuration (change  gatewaytype  to match the Device created in your IoT Platform):

    GATEWAY PUBLISH topic:      iot-2/type/gatewaytype/id/${SERIAL}/evt/STAT/fmt/json
    GATEWAY SUBSCRIPTION topic: iot-2/type/gatewaytype/id/${SERIAL}/cmd/SYS/fmt/json
    DEVICE PUBLISH topic:       iot-2/type/DEV/id/${SERIAL}_${DEV}/evt/RBE/fmt/json

    DEVICE SUBSCRIPTION topic:  iot-2/type/DEV/id/${SERIAL}_${DEV}/cmd/CMD/fmt/json

    Image Added

    NOTE: use one or the other graphic, not both.
    Image Added

  10. Upload configuration to the RediGate

  11. If you kept the topic structure from the demo configurationIn the Devices section of Watson IoT, you should a gateway with a "Device ID" that matches the serial number of your RediGate, and two devices connected to the gateway named "(your serial number)_SimData" and "(your serial number)_VirtualRW":
    Image Removed
    Image Added

  12. Click on the Gateway name to see the connection status.
    Image Added
    Image Added
  13. Data should be being sent from the SimData RTU every 30 seconds:
    Image RemovedImage Added

    Info
    titleConnection Not Establishing

    It may take up to 5 minutes after uploading the configuration to the Redigate for the connection to IBM to be established, especially over a cellular connection.

Example 2: Publishing Modbus RTU Data to Watson IoT

...

  1. Completion of "Example 1" above
  2. Completion of the "Field Device Quick Start" corresponding to the field device you are trying to connect to. In this particular example, we will be connecting to an Open Modbus TCP device, but you should be able to connect to any of the field devices on our protocol list.

...

  1. Confirm that you can ping the Modbus device using its built-in ping utility (See Ping Utility for more info)
  2. Open the configuration you used in the "Field Device Quick Start" in the same ACE window as your Watson IoT configuration that is producing the simulated data
  3. Copy and paste the "Master Channel" object from the ModbusTCP configuration into your Watson IoT configuration

    1. Note the "Instance" of the MasterChannel0 object – in this example it is '0', which is will what we reference when we add a record to our Watson IoT "Poll Table".


  4. Save and upload configuration to the RediGate
  5. If you followed the "Device Publish" topic structure in the "Publishing Simulated Data to Watson IoT" example above, you should see a new device named (your serial number)_(your unit name), which will be publishing data as it changes based on your channel scan rate: