Versions Compared

Key

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

...

Once your device is successfully publishing data to Azure, the next step is to subscribe to commands sent from Azure to the field devices connected to the RediGate. Details on the JSON structure that the RediGate expects to receive can be found in the JSON-RBE MQTT Payload Format document. The steps below outline how to write data to an integer tag under a virtual field unit:

    Copy and paste the "VirtualRW Unit 4" field unit from Elecsys-AzureIoT-Demo into your configuration
    Image Removed
  1. Upload configuration to your RediGate
  2. Open the Microsoft "Device Explorer Twin" software, and perform the following steps:
    1. Select the "Messages To Device Tab"
    2. Select your device from the "Device ID" dropdown, and copy the following text into the "Message" field:   {"d": {"IntValue": 150}}
    3. Enter "device" for the "Key" field and "VirtualRW_" for the "Value" field (make sure to include the underscore character _ after the VirtualRW).
    4. Click "Send" to send the command to the IoT Hub, which the RediGate will subscribe to and send out to the "IntValue" tag under VirtualRW RTU
  3. Confirm that the data was written to the RediGate by logging in to the RediGate with Putty and accessing MQTT Client Diagnostic screen (Option 3 → 17). Here you should see a value in the "Last Recv Topic" that looks similar to the screenshot below: 
  4. The value that you published should be saved in the Internal Channel 15 → Virtual RTU 4 → RTDB → Register 30001. See Accessing RTDB Data Dump for info on viewing RTDB values in the RediGate

...