Rechenwerk classic S3
Last updated
Last updated
{
"ruleChain": {
"additionalInfo": {
"description": ""
},
"name": "Decoder TCH Heat Meter 37",
"type": "CORE",
"firstRuleNodeId": null,
"root": false,
"debugMode": false,
"configuration": null,
"externalId": null
},
"metadata": {
"firstNodeIndex": 5,
"nodes": [
{
"additionalInfo": {
"layoutX": 942,
"layoutY": 61
},
"type": "org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode",
"name": "Save Client Attributes",
"debugMode": false,
"configuration": {
"scope": "CLIENT_SCOPE"
},
"externalId": null
},
{
"additionalInfo": {
"layoutX": 612,
"layoutY": 149
},
"type": "org.thingsboard.rule.engine.filter.TbMsgTypeSwitchNode",
"name": "Message Type Switch",
"debugMode": false,
"configuration": {
"version": 0
},
"externalId": null
},
{
"additionalInfo": {
"layoutX": 942,
"layoutY": 223
},
"type": "org.thingsboard.rule.engine.action.TbLogNode",
"name": "Log RPC from Device",
"debugMode": false,
"configuration": {
"jsScript": "return '\\nIncoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);"
},
"externalId": null
},
{
"additionalInfo": {
"layoutX": 941,
"layoutY": 284
},
"type": "org.thingsboard.rule.engine.action.TbLogNode",
"name": "Log Other",
"debugMode": false,
"configuration": {
"jsScript": "return '\\nIncoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);"
},
"externalId": null
},
{
"additionalInfo": {
"layoutX": 940,
"layoutY": 347
},
"type": "org.thingsboard.rule.engine.rpc.TbSendRPCRequestNode",
"name": "RPC Call Request",
"debugMode": false,
"configuration": {
"timeoutInSeconds": 60
},
"externalId": null
},
{
"additionalInfo": {
"description": "",
"layoutX": 327,
"layoutY": 147
},
"type": "org.thingsboard.rule.engine.profile.TbDeviceProfileNode",
"name": "Device Profile Node",
"debugMode": false,
"configuration": {
"persistAlarmRulesState": false,
"fetchAlarmRulesStateOnStart": false
},
"externalId": null
},
{
"additionalInfo": {
"description": "",
"layoutX": 949,
"layoutY": 139,
"ruleChainNodeId": "rule-chain-node-11"
},
"type": "org.thingsboard.rule.engine.flow.TbRuleChainInputNode",
"name": "Plausibilisierung",
"debugMode": false,
"configuration": {
"ruleChainId": "05f2c8f0-9340-11ec-a5ff-1dc5aa501c93"
},
"externalId": null
},
{
"additionalInfo": {
"description": "",
"layoutX": 948,
"layoutY": 440
},
"type": "org.thingsboard.rule.engine.action.TbCreateAlarmNode",
"name": "Not Active",
"debugMode": false,
"configuration": {
"scriptLang": "TBEL",
"alarmDetailsBuildJs": "var details = {};\nif (metadata.prevAlarmDetails) {\n details = JSON.parse(metadata.prevAlarmDetails);\n //remove prevAlarmDetails from metadata\n delete metadata.prevAlarmDetails;\n //now metadata is the same as it comes IN this rule node\n}\n\n\nreturn details;",
"alarmDetailsBuildTbel": "var details = {};\nif (metadata.prevAlarmDetails != null) {\n details = JSON.parse(metadata.prevAlarmDetails);\n //remove prevAlarmDetails from metadata\n metadata.remove('prevAlarmDetails');\n //now metadata is the same as it comes IN this rule node\n}\n\n\nreturn details;",
"useMessageAlarmData": false,
"overwriteAlarmDetails": false,
"alarmType": "Inactive",
"severity": "CRITICAL",
"propagate": true,
"relationTypes": [],
"propagateToOwner": false,
"propagateToOwnerHierarchy": false,
"propagateToTenant": false,
"dynamicSeverity": false
},
"externalId": null
},
{
"additionalInfo": {
"description": "",
"layoutX": 950,
"layoutY": 498
},
"type": "org.thingsboard.rule.engine.action.TbClearAlarmNode",
"name": "Active",
"debugMode": false,
"configuration": {
"scriptLang": "TBEL",
"alarmDetailsBuildJs": "var details = {};\nif (metadata.prevAlarmDetails) {\n details = JSON.parse(metadata.prevAlarmDetails);\n //remove prevAlarmDetails from metadata\n delete metadata.prevAlarmDetails;\n //now metadata is the same as it comes IN this rule node\n}\n\n\nreturn details;",
"alarmDetailsBuildTbel": "var details = {};\nif (metadata.prevAlarmDetails != null) {\n details = JSON.parse(metadata.prevAlarmDetails);\n //remove prevAlarmDetails from metadata\n metadata.remove('prevAlarmDetails');\n //now metadata is the same as it comes IN this rule node\n}\n\n\nreturn details;",
"alarmType": "Inactive"
},
"externalId": null
},
{
"additionalInfo": {
"description": "",
"layoutX": 1270,
"layoutY": 442
},
"type": "org.thingsboard.rule.engine.transform.TbTransformMsgNode",
"name": "To Active Telemetry",
"debugMode": false,
"configuration": {
"jsScript": "var msg = {};\nmsg.activityState = false;\nreturn {msg: msg, metadata: metadata, msgType: \"POST_TELEMETRY_REQUEST\"};"
},
"externalId": null
},
{
"additionalInfo": {
"description": "",
"layoutX": 1271,
"layoutY": 496
},
"type": "org.thingsboard.rule.engine.transform.TbTransformMsgNode",
"name": "To Active Telemetry",
"debugMode": false,
"configuration": {
"jsScript": "var msg = {};\nmsg.activityState = true;\nreturn {msg: msg, metadata: metadata, msgType: \"POST_TELEMETRY_REQUEST\"};"
},
"externalId": null
},
{
"additionalInfo": {
"description": null,
"layoutX": 1543,
"layoutY": 466
},
"type": "org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode",
"name": "Save Timeseries",
"debugMode": false,
"configuration": {
"defaultTTL": 2592000,
"skipLatestPersistence": null,
"useServerTs": null
},
"externalId": null
}
],
"connections": [
{
"fromIndex": 1,
"toIndex": 0,
"type": "Post attributes"
},
{
"fromIndex": 1,
"toIndex": 2,
"type": "RPC Request from Device"
},
{
"fromIndex": 1,
"toIndex": 3,
"type": "Other"
},
{
"fromIndex": 1,
"toIndex": 4,
"type": "RPC Request to Device"
},
{
"fromIndex": 1,
"toIndex": 6,
"type": "Post telemetry"
},
{
"fromIndex": 1,
"toIndex": 7,
"type": "Inactivity Event"
},
{
"fromIndex": 1,
"toIndex": 8,
"type": "Activity Event"
},
{
"fromIndex": 5,
"toIndex": 1,
"type": "Success"
},
{
"fromIndex": 7,
"toIndex": 9,
"type": "Created"
},
{
"fromIndex": 8,
"toIndex": 10,
"type": "Cleared"
},
{
"fromIndex": 9,
"toIndex": 11,
"type": "Success"
},
{
"fromIndex": 10,
"toIndex": 11,
"type": "Success"
}
],
"ruleChainConnections": null
}
}