Is there someone who can help me with my Smart Nora Milights flow? After a power failure my domoticz crashed and I had to set up everything from scratch.
Unfortanely my milights Smart Nora backup flow doenst work flawless anymore, but I can't figure out whats wrong with it. Made it with help from this forum years ago, but have little knowlidge of it. When I imported the code is said that it missed "collor convert" and "unknown filter". I installed a random collor convert and filter, but it didn't do the trick..
This is the current flow:
Code: Select all
[
{
"id": "a90588570df2ce6e",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "9f691da22339b44a",
"type": "mqtt in",
"z": "a90588570df2ce6e",
"name": "",
"topic": "domoticz/out",
"qos": "0",
"datatype": "auto",
"broker": "d7976075.dda4c",
"nl": false,
"rap": false,
"inputs": 0,
"x": 90,
"y": 660,
"wires": [
[
"5081b6c0f1f64f2b"
]
]
},
{
"id": "ada3a3f0df96846a",
"type": "mqtt out",
"z": "a90588570df2ce6e",
"name": "",
"topic": "domoticz/in",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "d7976075.dda4c",
"x": 2210,
"y": 760,
"wires": []
},
{
"id": "5081b6c0f1f64f2b",
"type": "json",
"z": "a90588570df2ce6e",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 50,
"y": 920,
"wires": [
[
"aeb318db0a286609"
]
]
},
{
"id": "0712c25bc78c8068",
"type": "function",
"z": "a90588570df2ce6e",
"name": "Function In ",
"func": "msg.topic = msg.payload[0].idx;\nif (msg.payload[0].nvalue !== 0)\n{\n msg.payload = {\n on : true,\n brightness : msg.payload[0].Level,\n color : {\n spectrumHsv : {\n hue : msg.payload[1].red,\n saturation : msg.payload[1].green/100,\n value : msg.payload[1].blue/100\n }\n }\n }\n}\nelse if (msg.payload[0].nvalue === 0)\n{\n msg.payload = {\n on : false,\n brightness : msg.payload[0].Level,\n color : {\n spectrumHsv : {\n hue : msg.payload[1].red,\n saturation : msg.payload[1].green/100,\n value : msg.payload[1].blue/100\n }\n }\n }\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 670,
"y": 920,
"wires": [
[
"c559ae07ebeeb624"
]
]
},
{
"id": "c559ae07ebeeb624",
"type": "switch",
"z": "a90588570df2ce6e",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "12",
"vt": "str"
},
{
"t": "eq",
"v": "107",
"vt": "str"
},
{
"t": "eq",
"v": "101",
"vt": "str"
},
{
"t": "eq",
"v": "108",
"vt": "str"
},
{
"t": "eq",
"v": "109",
"vt": "str"
},
{
"t": "eq",
"v": "110",
"vt": "str"
},
{
"t": "eq",
"v": "111",
"vt": "str"
},
{
"t": "eq",
"v": "112",
"vt": "str"
},
{
"t": "eq",
"v": "113",
"vt": "str"
},
{
"t": "eq",
"v": "114",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "116",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 61,
"x": 810,
"y": 920,
"wires": [
[],
[],
[],
[],
[],
[],
[
"932771eca52006c0"
],
[
"de9bf9f9936d7939"
],
[
"165e700bd98d2430"
],
[
"2aa1e360d4991058"
],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[
"2fb2759834f49731"
]
]
},
{
"id": "b01bfb7f07c50ca2",
"type": "function",
"z": "a90588570df2ce6e",
"name": "Function Out",
"func": "var idx = parseInt(msg.topic);\nif ( msg.payload[0].on === true )\n{\n msg.payload = {\n \"command\" : \"setcolbrightnessvalue\",\n \"idx\" : idx,\n \"color\" : {\"m\":3,\"t\":0,\"r\":msg.payload[1].red,\"g\":msg.payload[1].green,\"b\":msg.payload[1].blue,\"cw\":0,\"ww\":0},\n \"brightness\": msg.payload[0].brightness\n };\n}\nelse if ( msg.payload[0].on === false )\n{\n msg.payload = {\n \"command\": \"switchlight\",\n \"idx\": idx,\n \"switchcmd\": \"Off\"\n \n };\n}\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1830,
"y": 920,
"wires": [
[
"8cc07ca9e40ad070"
]
]
},
{
"id": "8cc07ca9e40ad070",
"type": "json",
"z": "a90588570df2ce6e",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 2010,
"y": 920,
"wires": [
[
"4dd24ef23bafb55e",
"ada3a3f0df96846a"
]
]
},
{
"id": "4dd24ef23bafb55e",
"type": "debug",
"z": "a90588570df2ce6e",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 2250,
"y": 920,
"wires": []
},
{
"id": "9584f97848116731",
"type": "function",
"z": "a90588570df2ce6e",
"name": "Create RGB Array",
"func": "msg.payload = {\n red : msg.payload.Color.r,\n green : msg.payload.Color.g,\n blue : msg.payload.Color.b\n};\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 1020,
"wires": [
[
"dfc03a474d37d973"
]
]
},
{
"id": "1a9d1f17d476f9d0",
"type": "join",
"z": "a90588570df2ce6e",
"name": "",
"mode": "custom",
"build": "array",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 510,
"y": 880,
"wires": [
[
"0712c25bc78c8068"
]
]
},
{
"id": "9116143358511338",
"type": "function",
"z": "a90588570df2ce6e",
"name": "Create HSV Array",
"func": "msg.payload = {\n hue : msg.payload.color.spectrumHsv.hue,\n saturation : msg.payload.color.spectrumHsv.saturation,\n value : msg.payload.color.spectrumHsv.value,\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1390,
"y": 640,
"wires": [
[
"279f5710248640a4"
]
]
},
{
"id": "1ae6426a776ea421",
"type": "join",
"z": "a90588570df2ce6e",
"name": "",
"mode": "custom",
"build": "array",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1650,
"y": 920,
"wires": [
[
"b01bfb7f07c50ca2"
]
]
},
{
"id": "932771eca52006c0",
"type": "noraf-light",
"z": "a90588570df2ce6e",
"devicename": "Plafondlamp",
"lightcolor": true,
"brightnesscontrol": true,
"commandonlycolor": false,
"turnonwhenbrightnesschanges": true,
"passthru": false,
"errorifstateunchaged": false,
"statepayload": true,
"brightnessoverride": "",
"roomhint": "Woonkamer",
"name": "Plafondlamp",
"colortype": "hsv",
"nora": "6cb1be71.0539f",
"topic": "7",
"onvalue": "true",
"onvalueType": "bool",
"offvalue": "false",
"offvalueType": "bool",
"temperaturemin": "2700",
"temperaturemax": "5500",
"twofactorpin": "",
"filter": false,
"x": 1010,
"y": 800,
"wires": [
[
"9116143358511338",
"1ae6426a776ea421"
]
]
},
{
"id": "165e700bd98d2430",
"type": "noraf-light",
"z": "a90588570df2ce6e",
"devicename": "Keukenlamp",
"lightcolor": true,
"brightnesscontrol": true,
"commandonlycolor": false,
"turnonwhenbrightnesschanges": true,
"passthru": false,
"errorifstateunchaged": false,
"statepayload": true,
"brightnessoverride": "",
"roomhint": "Woonkamer",
"name": "Keukenlamp",
"colortype": "hsv",
"nora": "6cb1be71.0539f",
"topic": "9",
"onvalue": "true",
"onvalueType": "bool",
"offvalue": "false",
"offvalueType": "bool",
"temperaturemin": "2700",
"temperaturemax": "5500",
"twofactorpin": "",
"filter": false,
"x": 1010,
"y": 620,
"wires": [
[
"9116143358511338",
"1ae6426a776ea421"
]
]
},
{
"id": "de9bf9f9936d7939",
"type": "noraf-light",
"z": "a90588570df2ce6e",
"devicename": "Eettafellamp",
"lightcolor": true,
"brightnesscontrol": true,
"commandonlycolor": false,
"turnonwhenbrightnesschanges": true,
"passthru": false,
"statepayload": true,
"brightnessoverride": "",
"roomhint": "Woonkamer",
"name": "Eettafellamp",
"colortype": "hsv",
"nora": "6cb1be71.0539f",
"topic": "8",
"onvalue": "true",
"onvalueType": "bool",
"offvalue": "false",
"offvalueType": "bool",
"temperaturemin": "2700",
"temperaturemax": "5500",
"x": 1010,
"y": 700,
"wires": [
[
"9116143358511338",
"1ae6426a776ea421"
]
]
},
{
"id": "2aa1e360d4991058",
"type": "noraf-light",
"z": "a90588570df2ce6e",
"devicename": "Slaapkamerlamp",
"lightcolor": true,
"brightnesscontrol": true,
"commandonlycolor": false,
"turnonwhenbrightnesschanges": true,
"passthru": false,
"statepayload": true,
"brightnessoverride": "",
"roomhint": "Slaapkamer",
"name": "Slaapkamerlamp",
"colortype": "hsv",
"nora": "6cb1be71.0539f",
"topic": "10",
"onvalue": "true",
"onvalueType": "bool",
"offvalue": "false",
"offvalueType": "bool",
"temperaturemin": "2700",
"temperaturemax": "5500",
"x": 1080,
"y": 960,
"wires": [
[
"9116143358511338",
"1ae6426a776ea421"
]
]
},
{
"id": "2fb2759834f49731",
"type": "noraf-light",
"z": "a90588570df2ce6e",
"devicename": "Werkkamerlamp",
"lightcolor": true,
"brightnesscontrol": true,
"commandonlycolor": false,
"turnonwhenbrightnesschanges": true,
"passthru": false,
"statepayload": true,
"brightnessoverride": "",
"roomhint": "Slaapkamer",
"name": "Werkkamerlamp",
"colortype": "hsv",
"nora": "6cb1be71.0539f",
"topic": "61",
"onvalue": "true",
"onvalueType": "bool",
"offvalue": "false",
"offvalueType": "bool",
"temperaturemin": "2700",
"temperaturemax": "5500",
"x": 1070,
"y": 900,
"wires": [
[
"9116143358511338",
"1ae6426a776ea421"
]
]
},
{
"id": "dfc03a474d37d973",
"type": "color-convert",
"z": "a90588570df2ce6e",
"input": "rgb",
"output": "hsv",
"outputType": "object",
"scaleInput": false,
"x": 490,
"y": 1020,
"wires": [
[
"1a9d1f17d476f9d0"
]
]
},
{
"id": "279f5710248640a4",
"type": "color-convert",
"z": "a90588570df2ce6e",
"input": "hsv",
"output": "rgb",
"outputType": "object",
"scaleInput": true,
"x": 1330,
"y": 1060,
"wires": [
[
"1ae6426a776ea421"
]
]
},
{
"id": "aeb318db0a286609",
"type": "filter",
"z": "a90588570df2ce6e",
"name": "Filter Dimmer",
"property": "payload.switchType",
"propertyType": "msg",
"asArray": false,
"itemProperty": "",
"itemPropertyType": "item",
"rules": [
{
"t": "eq",
"v": "Dimmer",
"vt": "str",
"output": 1
}
],
"checkall": "true",
"outputs": 1,
"x": 240,
"y": 920,
"wires": [
[
"9584f97848116731",
"1a9d1f17d476f9d0"
]
]
},
{
"id": "d7976075.dda4c",
"type": "mqtt-broker",
"name": "Domoticz Master",
"broker": "localhost",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "6cb1be71.0539f",
"type": "noraf-config",
"name": "Smartnora",
"group": "",
"twofactor": "off",
"twofactorpin": "",
"localexecution": true,
"structure": "Thuis",
"storeStateInContext": false,
"disableValidationErrors": false,
"sendDeviceNameAndLocation": false
}
]
2024-06-15 09:51:32.042 Error: MQTT Gateway: Invalid/Unhandled data received! (Topic: domoticz/in, Message: [{"red":255,"green":255,"blue":255},{"red":255,"green":255,"blue":255}])
2024-06-15 09:51:37.565 Error: MQTT Gateway: Invalid/Unhandled data received! (Topic: domoticz/in, Message: [{"red":255,"green":255,"blue":255},{"red":255,"green":255,"blue":255}])
2024-06-15 09:52:30.762 Error: MQTT Gateway: Error sending switch command!
2024-06-15 09:52:32.305 Error: MQTT Gateway: Invalid/Unhandled data received! (Topic: domoticz/in, Message: [{"red":255,"green":255,"blue":255},{"red":255,"green":255,"blue":255}])