Jermuk
10/01/2024, 1:03 PMyaml
tagProcessor:
defaultProtocolSettings: opcua
customProtocolSettings: # alternative to specify more details to defaultProtocolSettings
- tagFolder: meta("opcua_tag_group")
- tagName: meta("opcua_tag_name")
- tagType: meta("opcua_tag_type")
enterprise: "enterprise-of-kings"
groupConditions:
- if: always()
groupTo:
- site: "jeremy-vm"
- if: meta("modbus_slave_id") == 10
groupTo:
- area: "daughterCompanyA"
line: "line_ABC"
- if: meta("modbus_address") == "B123"
groupTo:
- tagName: "temperature"
What are your thoughts on this all?Jermuk
10/01/2024, 1:17 PMyaml
tagProcessor:
defaultProtocolSettings: opcua
conditions:
- if: always()
groupTo:
- site: "jeremy-vm"
setTagOverride:
- tagFolder: meta("opcua_tag_group") # optional
- tagName: meta("opcua_tag_name") # optional
- tagType: meta("opcua_tag_type") #optional
- tagMetadata: # optional
- serial_number: "123"
- if: meta("modbus_slave_id") == 10
groupTo:
- area: "daughterCompanyA"
line: "line_ABC"
- if: meta("modbus_address") == "B123"
groupTo:
- tagName: "temperature"
replaceAll:
- tagFolder:
- "/[^a-zA-Z0-9_]/g": "" # remove all special characters from tagFolder
DanielH
10/01/2024, 2:36 PMyaml
tagProcessor:
protocol: opcua
setTagOverride:
- tagFolder: "opcua_tag_group" # optional
- tagName: "opcua_tag_name" # optional
- tagType: "opcua_tag_type" #optional
- tagMetadata: # optional
- serial_number: "123"
renaming:
- {
"thisIs_a_very_4234VB_long.OPCUA.stupidVendor_notMakeAnySenseName": "tempInCabinet"
"thisIs_another_very_4fa99434aB_long.OPCUA.stupidVendor_notMakeAnySenseName": "pressureInCabinet"
}
grouping:
group:
- from: * # group all
- name: *
- to: "site" # allowed is "site", "area", "line" "machine", To name if not used
- name: "jeremy-vm"
group:
- from: "modbus_slave_id"
- ifMatched: 10 # optional, if not used all matches from - from: will be used
- to: "area.line"
- name: "daughterCompanyA.line_ABC"
group:
- from: "modbus_address"
- ifMatched: "B123"
- name: "temperature"
group:
- from: "modbus_address"
- ifMatched: "A56"
- name: "temperature"
- jsonOutput: true # combines all values to a json struct
replaceAll:
- tagFolder:
- "/[^a-zA-Z0-9_]/g": "" # remove all special characters from tagFolder
Jermuk
10/02/2024, 11:55 AMDiederik
10/02/2024, 1:09 PMBrian Pribe
10/02/2024, 1:38 PMDiederik
10/02/2024, 2:16 PMDiederik
10/02/2024, 2:17 PMDiederik
10/02/2024, 2:17 PMDiederik
10/02/2024, 2:17 PMDanielH
10/02/2024, 2:20 PMDanielH
10/02/2024, 2:22 PMBrian Pribe
10/02/2024, 2:26 PMDiederik
10/02/2024, 2:38 PMDiederik
10/02/2024, 2:39 PMJermuk
10/02/2024, 3:45 PMJermuk
10/02/2024, 3:46 PMJermuk
10/02/2024, 3:47 PMJermuk
10/02/2024, 3:48 PMBrian Pribe
10/02/2024, 8:18 PMJermuk
10/08/2024, 4:43 PMJermuk
10/08/2024, 4:44 PMJermuk
10/15/2024, 2:33 PMBrian Pribe
10/15/2024, 5:41 PMJermuk
10/16/2024, 6:26 AMJermuk
10/16/2024, 8:06 AMyaml
tagProcessor:
defaultProtocolSettings: none # Basic Setting, None which requires customProtocolSettings to be set
customProtocolSettings: # Protocol Overrides
tagFolder: meta("mqtt_topic").replace_all("<topic>", "").replace_all("/", ".") # Remove the <topic> prefix from all topics, then convert all '/' characters to '.'
tagName: meta("mqtt_topic").split('/').slice(-1) # take the most right part of the topic as the tagName
tagType: string # convert everything to a json
groupTo: # Basic Grouping
enterprise: "MyEnterprise"
site: "MainSite"
renaming: # Tag Renaming
"weirdTagID3334": "temperature"
conditions: # Advanced Conditions
- if: always()
tagOverrides:
tagMetadata:
mqtt_broker: "192.168.1.1"
replaceAll: # Regex Replacements
tagFolder:
"/[^a-zA-Z0-9_\\/]/g": "" # Sanitize tag folders
tagName:
"/[^a-zA-Z0-9_]/g": "" # Sanitize tag names
advancedProcessing: # Advanced Processing (Disabled)
enabled: false
script: |
root = this
# Custom Bloblang script
DanielH
10/16/2024, 6:31 PMyaml
customProtocolSettings: # Protocol Overrides
tagFolder: "mqtt_topic"
useMeta: true # default is true i omitted
stringManipulation: "replace"
type: "all"
- "/"
- "."
tagName: meta("mqtt_topic").split('/').slice(-1) # take the most right part of the topic as the tagName
tagName: "mqtt_topic"
useMeta: true # default is true i omitted
stringManipulation: "slice"
- "-1"
tagType: string # convert everything to a json
How about something like this? i don't know if it makes any more sense or not?Jermuk
10/16/2024, 9:57 PMDanielH
10/17/2024, 8:03 PMtrentc
10/17/2024, 8:32 PMtrentc
10/17/2024, 8:33 PMtrentc
10/17/2024, 8:39 PM