This flow in NORA workys perfectly, but now with SMART NORA, not working.
Code: Select all
[{"id":"39c679f3.99d346","type":"tab","label":"Domoticz","disabled":false,"info":""},{"id":"9cef8a5.7f381f8","type":"mqtt in","z":"39c679f3.99d346","name":"","topic":"domoticz/out","qos":"2","datatype":"auto","broker":"64322ca9.5df834","x":110,"y":580,"wires":[["c74c488c.3742b8"]]},{"id":"c74c488c.3742b8","type":"json","z":"39c679f3.99d346","name":"","property":"payload","action":"","pretty":false,"x":290,"y":580,"wires":[["d098fd8.9fc4e","84b0120d.d97318"]]},{"id":"d098fd8.9fc4e","type":"switch","z":"39c679f3.99d346","name":"","property":"payload.switchType","propertyType":"msg","rules":[{"t":"cont","v":"On/Off","vt":"str"},{"t":"eq","v":"Dimmer","vt":"str"},{"t":"eq","v":"Persianes","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":490,"y":540,"wires":[[],["84b0120d.d97318"],[]]},{"id":"4c805e11.f9da4","type":"json","z":"39c679f3.99d346","name":"","property":"payload","action":"","pretty":false,"x":2179,"y":774,"wires":[["adb63fab.2f959"]]},{"id":"adb63fab.2f959","type":"mqtt out","z":"39c679f3.99d346","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"64322ca9.5df834","x":2330,"y":774,"wires":[]},{"id":"8920ce15.4176d","type":"switch","z":"39c679f3.99d346","name":"Dimmers","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"422","vt":"str"},{"t":"eq","v":"531","vt":"str"},{"t":"eq","v":"522","vt":"str"},{"t":"eq","v":"290","vt":"str"},{"t":"eq","v":"550","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":980,"y":680,"wires":[["61a498c.eb18f68"],["aeafc941.19819"],["7ff11cd5.d38204"],["307bde23.8fb6a2"],["475f4c5b.78f71c"]]},{"id":"237101ae.789a1e","type":"function","z":"39c679f3.99d346","name":"Function out Dimmer","func":"var idx = parseInt(msg.topic)\nvar brightness = msg.payload\nif ( msg.payload === 0 )\n{\nmsg.payload = { \"command\": \"switchlight\", \"idx\": idx, \"switchcmd\": \"Off\" };\nreturn [msg, null]\n}\nelse\n{\nmsg.payload = { \"command\": \"switchlight\", \"idx\": idx, \"switchcmd\": \"Set Level\", \"level\": brightness };\nreturn [null, msg]\n}\n\n\n","outputs":2,"noerr":0,"x":1760,"y":680,"wires":[["4c805e11.f9da4"],["4c805e11.f9da4"]]},{"id":"84b0120d.d97318","type":"function","z":"39c679f3.99d346","name":"Function Dimmer","func":"msg.topic = msg.payload.idx\nvar brightness = msg.payload.svalue1\nif (msg.payload.nvalue === 1)\n{\n msg.payload = 100\n}\nelse if (msg.payload.nvalue === 0)\n{\n msg.payload = 0\n}\nelse if (msg.payload.nvalue === 2)\n{\n msg.payload = brightness\n}\n return msg;\n\n","outputs":1,"noerr":0,"x":750,"y":680,"wires":[["8920ce15.4176d"]]},{"id":"61a498c.eb18f68","type":"noraf-light","z":"39c679f3.99d346","devicename":"Led comedor","lightcolor":false,"brightnesscontrol":true,"commandonlycolor":false,"turnonwhenbrightnesschanges":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"Menajdor","name":"Led Menjador","colortype":"hsv","nora":"b6e77b09.7cead8","topic":"422","onvalue":"true","onvalueType":"bool","offvalue":"false","offvalueType":"bool","temperaturemin":"2700","temperaturemax":"5500","x":1280,"y":560,"wires":[["237101ae.789a1e"]]},{"id":"aeafc941.19819","type":"noraf-light","z":"39c679f3.99d346","devicename":"Persiana Niños","lightcolor":false,"brightnesscontrol":true,"commandonlycolor":false,"turnonwhenbrightnesschanges":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"Persianes","name":"Persiana nens","colortype":"hsv","nora":"b6e77b09.7cead8","topic":"531","onvalue":"true","onvalueType":"bool","offvalue":"false","offvalueType":"bool","temperaturemin":"2700","temperaturemax":"5500","x":1280,"y":620,"wires":[["237101ae.789a1e"]]},{"id":"7ff11cd5.d38204","type":"noraf-light","z":"39c679f3.99d346","devicename":"Persiana Parking","lightcolor":false,"brightnesscontrol":true,"commandonlycolor":false,"turnonwhenbrightnesschanges":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"Persianes","name":"Persiana parking","colortype":"hsv","nora":"b6e77b09.7cead8","topic":"522","onvalue":"true","onvalueType":"bool","offvalue":"false","offvalueType":"bool","temperaturemin":"2700","temperaturemax":"5500","x":1290,"y":680,"wires":[["237101ae.789a1e"]]},{"id":"307bde23.8fb6a2","type":"noraf-light","z":"39c679f3.99d346","devicename":"Persiana Sexual","lightcolor":false,"brightnesscontrol":true,"commandonlycolor":false,"turnonwhenbrightnesschanges":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"Persianes","name":"Persiana pares","colortype":"hsv","nora":"b6e77b09.7cead8","topic":"290","onvalue":"true","onvalueType":"bool","offvalue":"false","offvalueType":"bool","temperaturemin":"2700","temperaturemax":"5500","x":1280,"y":740,"wires":[["237101ae.789a1e"]]},{"id":"475f4c5b.78f71c","type":"noraf-light","z":"39c679f3.99d346","devicename":"Persiana Habitación pequeña","lightcolor":false,"brightnesscontrol":true,"commandonlycolor":false,"turnonwhenbrightnesschanges":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"Persianes","name":"Persiana hab armaris","colortype":"hsv","nora":"b6e77b09.7cead8","topic":"550","onvalue":"true","onvalueType":"bool","offvalue":"false","offvalueType":"bool","temperaturemin":"2700","temperaturemax":"5500","x":1300,"y":800,"wires":[["237101ae.789a1e"]]},{"id":"64322ca9.5df834","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"b6e77b09.7cead8","type":"noraf-config","z":"","name":"nora config","group":"Casa","twofactor":"off","twofactorpin":"","localexecution":true,"structure":"Smart Home Delfí "}]