trentc
02/14/2025, 8:16 PMtrentc
02/14/2025, 8:22 PMtrentc
02/14/2025, 8:23 PM# these variables are autogenerated from your instance location
let enterprise = "MACH-Controls-LLC"
let site = "Dallas"
let area = "Booth-18"
let schema = "_local"
# Get MQTT Topic, replacing spaces in topic with _
let topic = meta("mqtt_topic").replace_all(" ", "_")
# Set the tagname to be from the 4th level
# Excluding the last 2 levels.
# Including any levels between, but joining them with '.'
# By default the last level is not included in the 'slice" function.
let tagname = $topic.split("/").slice(4,-1).join(".")
# Set the payloadTagName to be the last level of the topic
let payloadTagName = $topic.split("/").index(-1)
value = content()trentc
02/14/2025, 8:24 PM{
"Production": "{\"timestamp_ms\":1739564659054,\"schema\":\"production\",\"ProdState\":1,\"TotalParts\":6824,\"RejectParts\":370}",
"timestamp_ms": 1739564659374
}trentc
02/14/2025, 8:50 PMDiederik
02/15/2025, 1:16 PMtrentc
02/15/2025, 1:56 PMJermuk
02/15/2025, 7:33 PMJermuk
02/15/2025, 7:33 PMJermuk
02/15/2025, 7:33 PMJermuk
02/15/2025, 7:33 PMtrentc
02/16/2025, 11:58 PMtrentc
02/17/2025, 12:00 AMJermuk
02/17/2025, 7:59 AM