{
  "productInfo" : {
    "company" : "HighByte",
    "product" : "IntelligenceHub",
    "version" : "4.3.0",
    "build" : "2025.10.21.317",
    "stage" : "Release"
  },
  "project" : {
    "version" : 12,
    "connections" : [ {
      "name" : "Start_Hist_MQTT",
      "uri" : "mqtt://0.0.0.0:1885",
      "tags" : [ "Start_Hist_Canary", "Start_Hist_PI_AF", "Start_Hist_PI_DA", "Start_Hist_IP21" ],
      "writes" : {
        "flattenModeledValues" : false
      },
      "subscriptions" : { },
      "storeForward" : {
        "enabled" : false,
        "maxEntries" : 100,
        "waitOnFailureInterval" : {
          "duration" : 1,
          "units" : "Seconds"
        }
      },
      "settings" : {
        "connectionTimeoutSeconds" : 10,
        "keepAliveSeconds" : 60,
        "requestTimeoutMS" : 5000,
        "cleanSession" : true,
        "ssl" : false,
        "redundantBrokers" : [ ],
        "inputDiscovery" : "",
        "clientId" : "Start_Hist_MQTT",
        "maxInflight" : 1000
      }
    }, {
      "name" : "Start_Hist_PI_DA",
      "uri" : "osisoft.afsdk://{{System.Variables.Local_IP}}:45290",
      "tags" : [ "Start_Hist_PI_DA" ],
      "writes" : {
        "flattenModeledValues" : false
      },
      "subscriptions" : { },
      "storeForward" : {
        "enabled" : false,
        "maxEntries" : 100,
        "waitOnFailureInterval" : {
          "duration" : 1,
          "units" : "Seconds"
        }
      },
      "settings" : {
        "requestTimeoutMS" : 60000,
        "compression" : "NONE",
        "auth" : {
          "type" : "credentials",
          "username" : "osisoft",
          "password" : {
            "type" : "Reference",
            "value" : "PI_User_Password"
          }
        },
        "connectTimeoutSeconds" : 5,
        "password" : {
          "type" : "Encrypted",
          "value" : {
            "keyId" : "Pd0g08wqAOrlvCQyMEHkBg==",
            "iv" : "Sdy1/pvD+EsTyNAYD0hnEQ==",
            "ciphertext" : "noh9vh5msr1bcyB8Eb81k2IY1iOu7IJkSnNaoGlqeAouyV4WfObQgJMiTgOavflT"
          }
        }
      }
    } ],
    "inputs" : [ {
      "name" : "Start_Hist_PI_DA_Current_Values_Pumps",
      "connection" : "Start_Hist_PI_DA",
      "type" : "osisoft.afsdk",
      "qualifier" : {
        "type" : "point",
        "options" : {
          "get" : "currentValue",
          "includeMetaData" : false,
          "includeChildren" : true,
          "useReference" : false,
          "points" : [ "{{this.pointNameFlow}}", "{{this.pointNameStatus}}" ],
          "query" : "",
          "index" : false,
          "indexWindow" : ""
        }
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      },
      "parameters" : {
        "type" : "inline",
        "model" : {
          "name" : "params",
          "tags" : [ ],
          "attributes" : [ {
            "attributeType" : "Internal",
            "name" : "pointNameFlow",
            "nullable" : false,
            "required" : false,
            "array" : false,
            "defaultValue" : "OSIDemo_Line 1.Inlet Pump.Flow Rate.71d17760-99ae-5bcc-3123-3ca8750adb04",
            "internalType" : "String"
          }, {
            "attributeType" : "Internal",
            "name" : "pointNameStatus",
            "nullable" : false,
            "required" : false,
            "array" : false,
            "defaultValue" : "OSIDemo_Line 1.Inlet Pump.Status.794e1058-b3b2-54ff-0364-8e5b16aaee56",
            "internalType" : "String"
          } ]
        }
      }
    }, {
      "name" : "Start_Hist_PI_DA_Metadata_Pump_Flow_Status",
      "connection" : "Start_Hist_PI_DA",
      "type" : "osisoft.afsdk",
      "qualifier" : {
        "type" : "pointbrowse",
        "options" : {
          "get" : "currentValue",
          "includeMetaData" : true,
          "includeChildren" : true,
          "query" : "OSIDemo_Line*p.Flow* OR OSIDemo_Line*p.Status*",
          "index" : false,
          "indexWindow" : ""
        }
      },
      "cacheLifetime" : {
        "enabled" : false,
        "interval" : {
          "duration" : 1,
          "units" : "Days"
        }
      },
      "template" : {
        "type" : "Off"
      },
      "parameters" : {
        "type" : "EmptyParameters"
      }
    }, {
      "name" : "Start_Hist_PI_DA_Points_Pump_Flow_Status",
      "connection" : "Start_Hist_PI_DA",
      "type" : "osisoft.afsdk",
      "qualifier" : {
        "type" : "pointbrowse",
        "options" : {
          "get" : "currentValue",
          "includeMetaData" : false,
          "includeChildren" : true,
          "query" : "OSIDemo_Line*p.Flow* OR OSIDemo_Line*p.Status*",
          "index" : false,
          "indexWindow" : ""
        }
      },
      "cacheLifetime" : {
        "enabled" : true,
        "interval" : {
          "duration" : 1,
          "units" : "Days"
        }
      },
      "template" : {
        "type" : "Off"
      },
      "parameters" : {
        "type" : "EmptyParameters"
      }
    }, {
      "name" : "Start_Hist_PI_DA_Time_Span_Values_Pumps",
      "connection" : "Start_Hist_PI_DA",
      "type" : "osisoft.afsdk",
      "qualifier" : {
        "type" : "point",
        "options" : {
          "get" : "rawValues",
          "includeMetaData" : true,
          "includeChildren" : true,
          "useReference" : true,
          "points" : [ ],
          "query" : "",
          "index" : false,
          "indexWindow" : "",
          "boundaryType" : "inside",
          "endTime" : "{{this.end}}",
          "startTime" : "{{this.start}}",
          "reference" : "{{Connection.Start_Hist_PI_DA.Start_Hist_PI_DA_Points_Pump_Flow_Status}}"
        }
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      },
      "parameters" : {
        "type" : "inline",
        "model" : {
          "name" : "params",
          "tags" : [ ],
          "attributes" : [ {
            "attributeType" : "Internal",
            "name" : "start",
            "nullable" : false,
            "required" : false,
            "array" : false,
            "defaultValue" : "2025-07-09T00:00:00.0000000Z",
            "internalType" : "String"
          }, {
            "attributeType" : "Internal",
            "name" : "end",
            "nullable" : false,
            "required" : false,
            "array" : false,
            "defaultValue" : "2025-07-09T00:01:00.0000000Z",
            "internalType" : "String"
          } ]
        }
      }
    }, {
      "name" : "Start_Hist_PI_DA_Value_Changes_Pumps",
      "connection" : "Start_Hist_PI_DA",
      "type" : "osisoft.afsdk",
      "qualifier" : {
        "type" : "pointdatapipe",
        "options" : {
          "get" : "rawValues",
          "includeMetaData" : true,
          "includeChildren" : true,
          "useReference" : true,
          "points" : [ ],
          "query" : "",
          "index" : false,
          "indexWindow" : "",
          "boundaryType" : "inside",
          "endTime" : "{{this.end}}",
          "startTime" : "{{this.start}}",
          "subscriptionId" : "Start_Hist_PI_DA_Value_Changes_Pumps_8-21",
          "reference" : "{{Connection.Start_Hist_PI_DA.Start_Hist_PI_DA_Points_Pump_Flow_Status}}"
        }
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      },
      "parameters" : {
        "type" : "EmptyParameters"
      }
    } ],
    "outputs" : [ ],
    "modeling" : {
      "models" : [ {
        "name" : "Start_Hist_Value_Changes",
        "groupAs" : "/Start_Hist_Read_Value_Changes",
        "tags" : [ "Start_Hist_PI_DA" ],
        "attributes" : [ {
          "attributeType" : "Internal",
          "name" : "tagID",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        }, {
          "attributeType" : "Internal",
          "name" : "valueNumeric",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        }, {
          "attributeType" : "Internal",
          "name" : "valueOther",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        }, {
          "attributeType" : "Internal",
          "name" : "time",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        }, {
          "attributeType" : "Internal",
          "name" : "transaction",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        }, {
          "attributeType" : "Internal",
          "name" : "source",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        } ]
      } ],
      "instances" : [ ]
    },
    "conditions" : [ ],
    "functions" : [ ],
    "tags" : [ {
      "name" : "Start_Hist_PI_DA"
    } ],
    "pipelines" : [ {
      "name" : "Start_Hist_PI_DA_Value_Changes_Pumps",
      "groupAs" : "/Start_Hist_Read_Value_Changes",
      "tags" : [ "Start_Hist_PI_DA" ],
      "inputStages" : [ "Read" ],
      "stages" : [ {
        "name" : "Read",
        "display" : {
          "position" : {
            "x" : 240,
            "y" : 0
          }
        },
        "config" : {
          "type" : ".ReadConfig",
          "failureOutputs" : [ ],
          "reference" : {
            "type" : "Input",
            "name" : "Start_Hist_PI_DA_Value_Changes_Pumps",
            "path" : "",
            "params" : { },
            "connectionName" : "Start_Hist_PI_DA"
          }
        },
        "outputs" : [ "Breakup_Object" ]
      }, {
        "name" : "Breakup_Object",
        "display" : {
          "position" : {
            "x" : 690,
            "y" : 0
          }
        },
        "config" : {
          "type" : ".BreakupConfig",
          "breakupType" : "object",
          "depth" : 1
        },
        "outputs" : [ "Breakup_Array" ]
      }, {
        "name" : "Breakup_Array",
        "display" : {
          "position" : {
            "x" : 1140,
            "y" : 0
          }
        },
        "config" : {
          "type" : ".BreakupConfig",
          "breakupType" : "array",
          "depth" : 1
        },
        "outputs" : [ "Model" ]
      }, {
        "name" : "Model",
        "display" : {
          "position" : {
            "x" : 1590,
            "y" : 0
          }
        },
        "config" : {
          "type" : ".ModelConfig",
          "model" : "Start_Hist_Value_Changes",
          "objectName" : "",
          "initExpression" : "",
          "attributes" : [ {
            "name" : "tagID",
            "expression" : {
              "type" : "JavaScript",
              "expression" : "return event.value.pointID;"
            }
          }, {
            "name" : "valueNumeric",
            "expression" : {
              "type" : "JavaScript",
              "expression" : "// checks if event.value.value is not not a number (is a number), not null, not blank and is finite number (not +Infinity, or -Infinity).   If true, cast event.value.value to a number.  If false, set to null.\r\nif (!isNaN(event.value.value) && event.value.value !==null && event.value.value !== \"\" && isFinite(event.value.value))\r\n{\r\n\treturn Number(event.value.value);\r\n}\r\nelse\r\n{\r\n\treturn null;\r\n}"
            }
          }, {
            "name" : "valueOther",
            "expression" : {
              "type" : "JavaScript",
              "expression" : "// checks if event.value.value is not not a number (is a number), not null, not blank and is finite number (not +Infinity, or -Infinity).   If true, set to null.  If false, set to event.value.value.\r\nif (!isNaN(event.value.value) && event.value.value !==null && event.value.value !== \"\" && isFinite(event.value.value))\r\n{\r\n\treturn null;\r\n}\r\nelse\r\n{\r\n\treturn (event.value.value);\r\n}"
            }
          }, {
            "name" : "time",
            "expression" : {
              "type" : "JavaScript",
              "expression" : "var extendedDateStr = event.value.time;\r\n// Truncate to 3 digits of milliseconds to make it a standard ISO string\r\nvar trimmedDateStr = extendedDateStr.replace(/(\\.\\d{3})\\d*Z$/, '$1Z');\r\n// Convert to Date object\r\nvar date = new Date(trimmedDateStr);\r\n// Convert back to standard ISO string (e.g., \"2025-07-09T21:21:35.000Z\")\r\nvar standardISOString = date.toISOString();\r\nreturn standardISOString;"
            }
          }, {
            "name" : "transaction",
            "expression" : {
              "type" : "JavaScript",
              "expression" : "return event.metadata.breakupName;"
            }
          }, {
            "name" : "source",
            "expression" : {
              "type" : "JavaScript",
              "expression" : "return \"PI_DA\""
            }
          } ]
        },
        "outputs" : [ "To_MQTT" ]
      }, {
        "name" : "To_MQTT",
        "display" : {
          "position" : {
            "x" : 2040,
            "y" : 0
          }
        },
        "config" : {
          "type" : ".DynamicWriteConfig",
          "failureOutputs" : [ ],
          "connectionReference" : "{{Connection.Start_Hist_MQTT}}",
          "qualifier" : {
            "topic" : "{{event.value.source}}/{{event.value.tagID}}",
            "qos" : 0,
            "namedRoot" : false,
            "retained" : false,
            "breakupArrays" : false,
            "filterList" : [ "_name", "_model", "_timestamp" ],
            "type" : "Tag"
          },
          "qualifierExpression" : "",
          "writeReturn" : "ignore"
        },
        "outputs" : [ ]
      } ],
      "trackActivity" : false,
      "triggers" : [ {
        "name" : "Polled_Trigger",
        "display" : {
          "position" : {
            "x" : -450,
            "y" : 0
          }
        },
        "config" : {
          "type" : ".TriggerPolled",
          "enabled" : false,
          "interval" : {
            "duration" : 15,
            "units" : "Seconds"
          }
        }
      } ],
      "errorHandler" : {
        "type" : "default"
      }
    } ],
    "namespace" : [ ]
  },
  "network" : {
    "groups" : [ ],
    "hubs" : [ ]
  }
}