Hello.
New day new problem=)
I was trying to disable a widget with another widget. Thought it should not cause any problems since
i can use msg.enabled = true/false to do so.
Here is my small code:
[
{
"id": "c3be85b95be91e89",
"type": "ui_dropdown",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"label": "REMOTE:",
"tooltip": "Activates Remote-control. Unable to control Pump when OFF",
"place": "",
"group": "4368da8fe6ddbe0c",
"order": 2,
"width": 4,
"height": 1,
"passthru": true,
"multiple": false,
"options": [
{
"label": "ON",
"value": true,
"type": "bool"
},
{
"label": "OFF",
"value": false,
"type": "bool"
}
],
"payload": "",
"topic": "test",
"topicType": "msg",
"className": "",
"x": 1760,
"y": 200,
"wires": [
[
"c36f9376d47c9f21"
]
]
},
{
"id": "c36f9376d47c9f21",
"type": "change",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"rules": [
{
"t": "set",
"p": "input_remote",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2050,
"y": 200,
"wires": [
[]
]
},
{
"id": "93cdd11b59f438af",
"type": "ui_button",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "check_remote",
"group": "4368da8fe6ddbe0c",
"order": 4,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "white",
"bgcolor": "black",
"className": "",
"icon": "fa-check",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 2340,
"y": 200,
"wires": [
[
"4b9452657fcc1d6a"
]
]
},
{
"id": "4b9452657fcc1d6a",
"type": "change",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "input_remote",
"tot": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2570,
"y": 200,
"wires": [
[
"43c4af70b187801f",
"b1c5c3c3dfd094e3"
]
]
},
{
"id": "b1c5c3c3dfd094e3",
"type": "switch",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "false"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 2610,
"y": 160,
"wires": [
[
"771aa27d61f30bcb"
],
[
"771aa27d61f30bcb"
]
]
},
{
"id": "771aa27d61f30bcb",
"type": "change",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"rules": [
{
"t": "set",
"p": "enabled",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2790,
"y": 160,
"wires": [
[
"e9f6be0f1925f7fe",
"30b9a725e93c931e",
"4a40ee7daa2a4372"
]
]
},
{
"id": "e9f6be0f1925f7fe",
"type": "debug",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "debug 4",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 2800,
"y": 120,
"wires": []
},
{
"id": "30b9a725e93c931e",
"type": "ui_dropdown",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"label": "DOSING:",
"tooltip": "Starts or stops the pump",
"place": "",
"group": "4368da8fe6ddbe0c",
"order": 7,
"width": 4,
"height": 1,
"passthru": true,
"multiple": false,
"options": [
{
"label": "START",
"value": true,
"type": "bool"
},
{
"label": "STOP",
"value": false,
"type": "bool"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1760,
"y": 300,
"wires": [
[
"8889a3e77d72c897"
]
]
},
{
"id": "8889a3e77d72c897",
"type": "change",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"rules": [
{
"t": "set",
"p": "input_dosing",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2030,
"y": 300,
"wires": [
[]
]
},
{
"id": "aeac7511c51d451e",
"type": "ui_button",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "input_dosing",
"group": "4368da8fe6ddbe0c",
"order": 9,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "white",
"bgcolor": "black",
"className": "",
"icon": "fa-check",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 2330,
"y": 300,
"wires": [
[
"a41e37df0a74a3b9"
]
]
},
{
"id": "a41e37df0a74a3b9",
"type": "change",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "input_dosing",
"tot": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2570,
"y": 296.1576354679803,
"wires": [
[
"5516996888df9aaa"
]
]
},
{
"id": "4a40ee7daa2a4372",
"type": "ui_dropdown",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"label": "OPMODE:",
"tooltip": "Change operating mode",
"place": "",
"group": "4368da8fe6ddbe0c",
"order": 12,
"width": 4,
"height": 1,
"passthru": true,
"multiple": false,
"options": [
{
"label": "Manual",
"value": 0,
"type": "num"
},
{
"label": "Pulse",
"value": 1,
"type": "num"
},
{
"label": "Analog",
"value": 2,
"type": "num"
},
{
"label": "Timer",
"value": 3,
"type": "num"
},
{
"label": "Batch",
"value": 4,
"type": "num"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1770,
"y": 400,
"wires": [
[
"7b06185142a3b85f"
]
]
},
{
"id": "7b06185142a3b85f",
"type": "change",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"rules": [
{
"t": "set",
"p": "input_opmode",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2030,
"y": 400,
"wires": [
[]
]
},
{
"id": "5f6faf513b5988c0",
"type": "ui_button",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "input_opmode",
"group": "4368da8fe6ddbe0c",
"order": 14,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "white",
"bgcolor": "black",
"className": "",
"icon": "fa-check",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 2340,
"y": 400,
"wires": [
[
"84a9e19f537dd880"
]
]
},
{
"id": "84a9e19f537dd880",
"type": "change",
"z": "a9ed4fd40ab38e2f",
"g": "d0fcc95aa6ce7aec",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "input_opmode",
"tot": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2570,
"y": 400,
"wires": [
[
"0eec4e37bf483fdc"
]
]
},
{
"id": "4368da8fe6ddbe0c",
"type": "ui_group",
"name": "CONTROLPANEL",
"tab": "4ad3c40739cbf998",
"order": 2,
"disp": true,
"width": 8,
"collapse": false,
"className": ""
},
{
"id": "4ad3c40739cbf998",
"type": "ui_tab",
"name": "PUMP A",
"icon": "fa-tasks",
"order": 2,
"disabled": false,
"hidden": false
}
]
My problem: When i am feeding with the changenode the widgets that should be disbaled/enabled, i am changing the value (true, false) also, which i dont understand.
thank you