I habe just tried to do your exmple "isLightOn" , but i think there is an issue, when i Deploy the the setState Node i get an the errror on the debug Window:
"TypeError: Cannot create property 'isLightON' on number '0'"
"No shared state for: undefined"
NodeRed v1.2.9 running in a DockerContainer on Synology
Here is my Flow:
[
{
"id": "f8d5c8be.fe32e8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "195a36e.ebbbec9",
"type": "set-shared-state",
"z": "f8d5c8be.fe32e8",
"state": "e1c960.0c56a6a",
"name": "isLightON",
"triggerOnInit": true,
"provideOutput": false,
"outputs": 0,
"x": 360,
"y": 140,
"wires": []
},
{
"id": "506f9353.0e98ac",
"type": "inject",
"z": "f8d5c8be.fe32e8",
"name": "On",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 130,
"y": 100,
"wires": [
[
"195a36e.ebbbec9"
]
]
},
{
"id": "ae107400.26c5e",
"type": "inject",
"z": "f8d5c8be.fe32e8",
"name": "Off",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 130,
"y": 180,
"wires": [
[
"195a36e.ebbbec9"
]
]
},
{
"id": "e1c960.0c56a6a",
"type": "shared-state",
"name": "isLightON",
"lbl": "",
"tags": "",
"historyCount": "2",
"dataType": "bool",
"boolType": "bool",
"boolStrTrue": "",
"boolStrFalse": "",
"precision": "",
"numMin": "",
"numMax": "",
"unit": ""
}
]
Maybe somone can help me.
I habe just tried to do your exmple "isLightOn" , but i think there is an issue, when i Deploy the the setState Node i get an the errror on the debug Window:
"TypeError: Cannot create property 'isLightON' on number '0'"
"No shared state for: undefined"
NodeRed v1.2.9 running in a DockerContainer on Synology
Here is my Flow:
[
{
"id": "f8d5c8be.fe32e8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "195a36e.ebbbec9",
"type": "set-shared-state",
"z": "f8d5c8be.fe32e8",
"state": "e1c960.0c56a6a",
"name": "isLightON",
"triggerOnInit": true,
"provideOutput": false,
"outputs": 0,
"x": 360,
"y": 140,
"wires": []
},
{
"id": "506f9353.0e98ac",
"type": "inject",
"z": "f8d5c8be.fe32e8",
"name": "On",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 130,
"y": 100,
"wires": [
[
"195a36e.ebbbec9"
]
]
},
{
"id": "ae107400.26c5e",
"type": "inject",
"z": "f8d5c8be.fe32e8",
"name": "Off",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 130,
"y": 180,
"wires": [
[
"195a36e.ebbbec9"
]
]
},
{
"id": "e1c960.0c56a6a",
"type": "shared-state",
"name": "isLightON",
"lbl": "",
"tags": "",
"historyCount": "2",
"dataType": "bool",
"boolType": "bool",
"boolStrTrue": "",
"boolStrFalse": "",
"precision": "",
"numMin": "",
"numMax": "",
"unit": ""
}
]
Maybe somone can help me.