Versions Compared

Key

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

Here's the format and conditions when importing tank monitor readings:


Pre-Requisite Setup Before Importing
Expand
titlePrerequisite Pre-Requisite Setup Before Importing
Expand
titleSetup Tank Monitor Interface

The following should be setup/ready before the import:

1.

Go

 Go to System Manager, select Company Configuration menu. This will open the Company Configuration screen.

2. Navigate to Tank Management, Tank Monitor tab, click Interface Type.

3. Select Anova Gaslog.

4. Enter the details provided by customer, then click Save

  • Default
= True
  • - set to to true
  • API
URL = https://auwweb.gaslogtelemetry.com/api/v1/
  • Vendor Name = woodford.irely
  • Customer Name = WoodfordOilCo
  • API_KEY = 0B3B0F8DCA374CC0A9BC03804DFA09
  • Password = BBA@2n56
  • Image Removed
  • Expand
    • URL - URL used for sending credentials and getting tank information
    • Vendor Name - vendor username
    • Customer Name - customer name
    • API_KEY - vendor's unique key
    • Password - vendor password

    Image Added

    Expand
    titleUsing Postman to Retrieve Tank Records

    Note: The Postman is used to check the data synced from API server to i21 Tank Management. This is used for testing purposes only and does not require to be installed in customer server.


    Postman Credentials and Getting the Access Token to Retrieve Tank Information

    1. Download and install Postman.

    2. Open Postman, click "+" buttonGET New Request will be added on your tab.

    Image Added

    3. On New Request tab, change the selection on dropdown menu to POST.

    4. Enter the request URL

    Image Added

    5. On New Request tab, navigate to Body tab. Select x-www-form-urlencoded, then enter the following details:

    KEYVALUE
    grant_typepassword
    usernamevendor name set in Company Configuration > TM > Tank Monitor tab
    passwordpassword set in Company Configuration > TM > Tank Monitor tab
    client_idcustomer name set in Company Configuration > TM > Tank Monitor tab
    client_secretAPI Key set in Company Configuration > TM > Tank Monitor tab


    6. Click Send button. Response will be generated. 

    Image Added

    Note: access_token change every send.


    Retrieve the List of All Tanks

    1. Click "+" button. GET New Request will be added on your tab.

    Image Added

    2. Enter the request URL

    3. Navigate to Authorization tab then select Bearer Token.

    Image Added

    4. Copy the generated access_token from previous step response.

    Image Added

    5. Enter it in the Token field, then click Send button.

    Image Added

    6. Click Save Response > Save to a file

    Image Added

     7. Select path to save file, then click Save button. File will be saved as response.json.

    Note: lastReportedDate change every day.
    Details in generated response will be used in Clock reading, Customer creation, Device creation, and Consumption Site


    Expand
    titleCreate Customer with Consumption Site, Create and Add the Devices to the Site, and Add Clock Reading
    title

    The following should be setup/ready before the import:

    1. Customer with Consumption Site - customer should have an existing consumption site. Customer Number is used as the

    JSON

    mapping for customerAccount.

    Image Removed

    Image Added

    2. Devices - consumption site should have an attached devices. Device Tank Monitor Serial # (serialNumber) and

    device

    Device Tank Serial # (

    deviceId

    customerTank) are paired with customer number where the combination is used as mapping for import. 

    Image Removed

    Image Added

    3. Clock Reading - a reading date entry should also exists in Clock Reading as this is being mapped as lastReportedDate.

    Image Removed

    Image Added

    The date should also not exist in Events tab of the Consumption Site.

    Image Removed

    Image Added


    Expand
    titleJSON Mapping
    FieldExamplei21 FieldNotes
    deviceId618000Not Used


    serialNumber7534188TM > Site > Device > Tank Monitor Serial #

    Matching Hierarchy #1, this is the first to check.

    • Device Type = Tank Monitor
    • Device Serial # matches to file
    • Device Linked to a Site

    If no match then try Matching Hierarchy #2.

    customerAccount

    12430655

    TM > Site > Customer

    Matching Hierarchy #2

    • Site with Customer # that Matches API > customerAccount
    • Device Linked to Site
    • Device Type = Tank
    • Device Serial # matches API > customerTank

    If no match then give errors that no match was found.

    customerNameJohn ClutterNot Used
    customerTank1361978TM > Site > Device > Tank Serial #Part of Matching Hierarchy #2 see customerAccount
    tankSize500NAShould already be setup on TM Site > Tank Device
    addressHoward StreetNot Used
    townCowenNot Used
    stateWVNot Used
    postcode26206Not Used
    latitude38.4132843TM > Site > LatitudeUsed to Update TM Site if there is no existing value
    longitude-80.5601714TM > Site > LongitudeUsed to Update TM Site if there is no existing value
    lastReportedDate08/23/2021 06:39:00TM > Site > Reading Event > Event DateWill ignore adding duplicate readings
    lastReportedLevel66

    TM > Site > Estimated % Left

    TM > Site > Estimated Gallons Left


    Use Estimated % Left x TM Site > Total Capacity to get Estimated Gallons Left

    lastDeliveryDate03/04/2021 14:52:00Not Used
    tankTypeHorizontal TankNot Used
    dailyUsage0.0Not Used

    Sample JSON with 2 records:

    [
        {
            "deviceId""618000",
            "serialNumber""7534188",
            "customerAccount""12430655",
            "customerName""John Clutter",
            "customerTank""1361978",
            "tankSize""500",
            "address""Howard Street",
            "town""Cowen",
            "state""WV",
            "postcode""26206",
            "latitude""38.4132843",
            "longitude""-80.5601714",
            "lastReportedDate""10/04/2021 06:39:00",
            "lastReportedLevel""65",
            "lastDeliveryDate""03/04/2021 14:52:00",
            "tankType""Horizontal Tank",
            "dailyUsage"0.028571
        },
        {
            "deviceId""618001",
            "serialNumber""7542459",
            "customerAccount""63150005",
            "customerName""RDR Energy Resources Inc.",
            "customerTank""Concrete Plant",
            "tankSize""2005",
            "address""411 Sycamore Street",
            "town""Clarksburg",
            "state""WV",
            "postcode""26301",
            "latitude""39.2861121",
            "longitude""-80.3520409",
            "lastReportedDate""10/03/2021 15:37:00",
            "lastReportedLevel""54",
            "lastDeliveryDate""10/01/2021 15:00:00",
            "tankType""Diesel",
            "dailyUsage"13.54483
        }

    ]


    1. On the Menu panel, click the Tank Monitor menu. This will open the Import Tank Monitor Readings screen. Default format is Anova Gaslog.

    Image Added

    2. Click Import toolbar button. The message below will display indicating that the importing is in progress.

    Image Added

    3. Once the import is completed, a message will display based on the import status.

    • When Import is successful, this message below will display.

    Image Added

    • Show records imported successfully in Logs. Detail includes: Record 1 (ESN, Customer Number, Site ID, Date and Status)

    Image Added

    • On Consumption Site's Details tab, Estimated Gallons Left will update.

    Image Added

    • On Consumption Site's Events tab, Devices Installed and Tank Monitor Reading will reflect.

    Image Added


    • When Import is not fully successful, this message below will display.

    Image Added

    • Log screen will display. This includes successful and unsuccessful imports.

    Image Added

    • When Import is NOT successful

    Image Added

    • Log screen will display.
      • Unsuccessful Imports will display:
        • ESN - serial number
        • Date - date of import
        • Status - Reason why it failed 
      • Failed Reasons includes:
        • No customer site
        • Device not found
        • No clock reading