Suggestion: Explain the produced and
# umh-support
t
Suggestion: Explain the produced and consumed data models coming in and going out of the processing function....
I was a little confused about how to manipulate the data coming in, and going out of the processing function for the protocol converter. Bloblang isn't very intuitive itself...but more confusing to me was that just using root didn't modify my historian value.... I discovered through trial and error that the variable "value" must be present and contain the values I want to store.....otherwise modifying "root" or "this", or storing it in a value called "payload" didn't seem to have any affect on the stored value.
since the data and variables coming in, and going out of the processing block are not standard to bloblang....it would be nice to know what things are coming in...that can be consumed....or manipulated...and then where they need to be placed for the proper "output" result....
This article https://umh.docs.umh.app/docs/datamodel/messages/_historian/ explains to me what the payload should look like, and that timestamp_ms is required....but I didn't see anywhere that the "payload" needs to be stored in a variable called "value". I discovered this by returning back to the default template that is in place when first creating the converter, and looking at the code.
I also see where it says that "tagname" is required.....but....Looks like we have "payloadTagName"......so is this another acceptable output variable name?
Copy code
# these variables are autogenerated from your instance location
let enterprise = "40Hero"
let site = "Delaware"
let schema = "_historian"

let tagname = "weather" # using 'weather' as tag group
let payloadTagName = match meta("mqtt_topic") {
  "ia/raw/development/ioTSensors/Temperature" => "temperature"
  "ia/raw/development/ioTSensors/Humidity" => "humidity"
  _ => "unknown"
}
let value = content().number() # Change this to content().number() if you want to parse the value as number
Now that I understand it.....the documentation next to the processing block makes more sense....and is the best resource to explain it. My big failure to understand was that I had to have "value" in the code with my manipulated value.... I tried manipulating root, this, and payload.....none of them resulted in modifying the stored value in the historian.
a way to "debug" the messages could be suggested....sort of like what node red does....you have the msg object and everything uses msg.topic and msg.payload..... and you can output this to the debug window. I'd love to see what is happening live with the message flow...the entire object with all data within....before and after processing.
j
Ohh, you are going to like our next feature after the OPC Ua browser then a lot! There will be an entire “quick test” logic for input, and processing to see what messages arrive, what their payload and what their metadata is. Also this allows you to test a flow without deploying it 🙂
t
Release date tomorrow?
j
Also, we want to rework this tag name, payloadTagName etc as it is really complicated and rename a lot of things. Check out this RFC: https://learn.umh.app/course/request-for-comment-new-protocol-converter-configuration/
No, originally planned for end of next week. OPC UA browser is tomorrow though But with all the current appearing a bugs, maybe we focus next week a little bit more on fixing them and postpone the quick test for a couple of days
@Athavan kanapuli is the lead on it all 🙂
Let me post tomorrow a screenshot of our mockups for the quick testing
t
Lol I was kidding… but hot damn
j
t
Can’t wait!
2 Views