Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Below you have a database of typical programs ready to import during commissioning. Read instructions on how to import programs into your project here.

Info

Remember that after importing the program from the list of programs below, you must configure it for your installation. 

...

Triggering a relay in case of an emergency lighting error (or any other error in Vertex)

...

Code Block
languagejson
[{"id":"9ae218da.bbccb8","type":"tab","label":"12a420af.b4680f"Flow 2","disabled":false,"info":""},{"id":"e2bee68.0ae2e18","type":"modbus-read","z":"9db796be9ae218da.584748bbccb8","name":"","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegisterInputRegister","adr":"14","quantity":"1","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"dcc5d19af03d0f71.7e9fc84697","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":230170,"y":980440,"wires":[["be6a311e783e490c.28484d96fd8","7097c13228b15f9b.45952e8bfd"],[]]},{"id":"be6a311e783e490c.28484d96fd8","type":"debug","z":"9db796be9ae218da.584748bbccb8","name":"Modbus","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530420,"y":860320,"wires":[]},{"id":"7097c13228b15f9b.45952e8bfd","type":"function","z":"9db796be9ae218da.584748bbccb8","name":"emergency_lighting_error_info","func":"varmsg.payload=msg.payload[0]\nvar count = msg.payload.toString(2);\nvar leng = count.length;\nvar zeros =[];\n\nfor(var i = 0; i <(16-leng); i++)\n{\nzeros = zeros+ '\"0'\"\n}\ncount=zeros+count;\n\nmsg.payload =count.slice(7, 8)\n//msg.payload =count\nmsg.payload=parseInt(msg.payload)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590510,"y":1060440,"wires":[["827c759e28a2b91.9cf1a8bb01a46","c980359d769b5cb9.0a7ab8c9dff4"]]},{"id":"827c759e28a2b91.9cf1a8bb01a46","type":"switch","z":"9db796be9ae218da.584748bbccb8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":970890,"y":1060460,"wires":[["b6f311ef9d8c11d3.7fe6c9d2dc"],["76f04307e5ce2a1d.d7d5bccc5788"]]},{"id":"c980359d769b5cb9.0a7ab8c9dff4","type":"debug","z":"9db796be9ae218da.584748bbccb8","name":"Funksjon","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":970900,"y":880280,"wires":[]},{"id":"b6f311ef9d8c11d3.7fe6c9d2dc","type":"vertex action","z":"9db796be9ae218da.584748bbccb8","name":"","typeButton":"single","bPayload":{"action":"maxlevel","group":"0327ffd20adbd58c2cf40fa8b12b9304"null,"param":null,"priority":"254"},"bState":"","defaultpriority":true,"x":13701150,"y":1020440,"wires":[[]]},{"id":"76f04307e5ce2a1d.d7d5bccc5788","type":"vertex action","z":"9db796be9ae218da.584748bbccb8","name":"","typeButton":"single","bPayload":{"action":"off","group":"04ec2e3614f8fa2e462bdda74dbed824"null,"param":null,"priority":"254"},"bState":"","defaultpriority":true,"x":13701150,"y":1080480,"wires":[[]]},{"id":"1ba1b336.b3ed7d","type":"comment","z":"9db796be9ae218da.584748bbccb8","name":"Configure the modbus server","info":"","x":240160,"y":900360,"wires":[]},{"id":"c68f378c.62ad08","type":"comment","z":"9db796be9ae218da.584748bbccb8","name":"View the message sent by Modbus read node","info":"","x":610490,"y":820280,"wires":[]},{"id":"6f701154.b575f","type":"comment","z":"9db796be9ae218da.584748bbccb8","name":"View the message sent by the function node","info":"","x":1070970,"y":840240,"wires":[]},{"id":"92964a63.82cb38","type":"comment","z":"9db796be9ae218da.584748bbccb8","name":"Select the group that contains a DALI-2 relay","info":"","x":14501250,"y":960400,"wires":[]},{"id":"74d212e.14f5eec","type":"comment","z":"9db796be9ae218da.584748bbccb8","name":"Check the modbus register responsible for emergency lighting","info":"","x":620540,"y":1000400,"wires":[]},{"id":"38310201.1e26ce","type":"comment","z":"9db796be9ae218da.584748bbccb8","name":"1 - error detected, 0 - no error","info":"","x":980900,"y":1000420,"wires":[]},{"id":"113950d6.8cc43f","type":"comment","z":"9db796be9ae218da.584748bbccb8","name":"Don't use the 2nd output","info":"","x":230150,"y":940400,"wires":[]},{"id":"dcc5d19af03d0f71.7e9fc84697","type":"modbus-client","name":"IP_Vertexa","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"10.40.6.155","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":false,"reconnectTimeout":2000,"parallelUnitIdsAllowed":false}]

Read the status of PIR sensor

...

Code Block
languagejson
[{"id":"7305feba.a3043","type":"comment","z":"2ed3ef3.caf791","name":"Direct Value -> Set color temperature","info":"","x":940,"y":100,"wires":[]},{"id":"99fbbae.cd2f248","type":"vertex action","z":"2ed3ef3.caf791","name":"","typeButton":"directv","bPayload":{"action":"setcolortemperature","group":"56a55811a7f83ee9fb99df54c9a02a9a","param":0,"priority":"254"},"bState":"","defaultpriority":true,"x":930,"y":140,"wires":[["58fa590d.b08408"]]},{"id":"d6a2accf.97166","type":"vertexmodbus","z":"2ed3ef3.caf791","name":"","registers":[{"r":"111","i":0}],"outputs":1,"x":200,"y":140,"wires":[["22d37b33.a6c5d4"]]},{"id":"93beef5c.47b5b","type":"vertex filterByVertex","z":"2ed3ef3.caf791","selectedVertex":"10.0.6.70","x":580,"y":140,"wires":[["99fbbae.cd2f248"]]},{"id":"4dbf790f.0dd238","type":"comment","z":"2ed3ef3.caf791","name":"Select appropriate MODBUS register (+1) ","info":"","x":200,"y":100,"wires":[]},{"id":"58fa590d.b08408","type":"vertex cluster","z":"2ed3ef3.caf791","rate":90,"x":1160,"y":140,"wires":[]},{"id":"9782a673.debec8","type":"comment","z":"2ed3ef3.caf791","name":"When multiple Vertexes, select the desired one","info":"","x":580,"y":100,"wires":[]},{"id":"22d37b33.a6c5d4","type":"function","z":"2ed3ef3.caf791","name":"","func":"var temp = msg.payload;\nif(temp <= 6500 && temp >= 2700)\n{\n    msg.payload = temp;\n    return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":140,"wires":[["93beef5c.47b5b"]]},{"id":"667f0609.f20a08","type":"inject","z":"2ed3ef3.caf791","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3000","payloadType":"str","x":120,"y":220,"wires":[["22d37b33.a6c5d4"]]},{"id":"3e61e426.520a8c","type":"comment","z":"2ed3ef3.caf791","name":"CT 2700-6500","info":"","x":670,"y":40,"wires":[]}]

Change the sensor time from the BMS level

...

Code Block
[{"id":"f2824476.edf178","type":"function","z":"ced2cf4c.14073","name":"Time from BMS ","func":"msg.payload = {\"t1\":{\"0\":msg.payload}}  // 0 - this is the instance number,\n//if there are more PIR sensors, add another instance.\n//Example: { \"payload\" : {\"t1\":{\"0\":msg.payload, \"5\":msg.payload}} \n//We change the time of the sensor to the one sent from the BMS to 0 and 5 instances.\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":380,"wires":[["e4c366ff.f75bb8"]]},{"id":"e4c366ff.f75bb8","type":"DALI2 Devs Common","z":"ced2cf4c.14073","name":"Osram_sesor","outputs":2,"uid":"007DB9D807DD3F90C2","devStatus":2,"devSettings":[{"InstanceType":3,"isDisabled":false,"dali2t1":"10","dali2t2":"40","evenFilters":3,"instanceType":3},{"InstanceType":4,"isDisabled":false,"evenFilters":0,"instanceType":4}],"savedSettings":[{"instanceType":3,"isDisabled":false,"dali2t1":"10","dali2t2":"40","evenFilters":3,"InstanceType":3},{"instanceType":4,"isDisabled":false,"evenFilters":0,"InstanceType":4}],"x":960,"y":380,"wires":[["e070bd85.392f9"],["188284fc.67660b"]]},{"id":"4c591a86.cb56c4","type":"vertexmodbus","z":"ced2cf4c.14073","name":"","registers":[{"r":"12","i":0}],"outputs":1,"x":600,"y":380,"wires":[["f2824476.edf178","6ca5cb6d.d943b4","e90d6091.20dfc"]]},{"id":"e1f88ee9.95e6f","type":"comment","z":"ced2cf4c.14073","name":"Change of  presence time in sensor from the BMS level","info":"","x":900,"y":260,"wires":[]},{"id":"e070bd85.392f9","type":"vertex action","z":"ced2cf4c.14073","name":"","typeButton":"motionsensor","bPayload":{"PRESENCE":{"action":"setbrightness","group":"0025c4a4bdbe5876f53e1ab5e61f32ea","param":"100","priority":"255"},"TRANSITION":{"action":"setbrightness","group":"0025c4a4bdbe5876f53e1ab5e61f32ea","param":"50","priority":"0"},"NOPRESENCE":{"action":"setbrightness","group":"0025c4a4bdbe5876f53e1ab5e61f32ea","param":"0","priority":"254"}},"bState":"","defaultpriority":true,"x":1190,"y":380,"wires":[[]]},{"id":"2c2f04e1.b95f9c","type":"comment","z":"ced2cf4c.14073","name":" Choose the  register number to which the BMS sends the time for the sensor","info":"","x":710,"y":340,"wires":[]},{"id":"160801b2.d92b4e","type":"inject","z":"ced2cf4c.14073","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"","payloadType":"date","x":510,"y":440,"wires":[["cc0f532a.3acc5"]]},{"id":"6ca5cb6d.d943b4","type":"change","z":"ced2cf4c.14073","name":"","rules":[{"t":"set","p":"time_sensor_room1","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":440,"wires":[["b8c7ea31.217c88"]]},{"id":"b8c7ea31.217c88","type":"modbus-write","z":"ced2cf4c.14073","name":"","showStatusActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"511","quantity":"1","server":"25b24d23.a1da82","emptyMsgOnFail":false,"keepMsgProperties":false,"x":1600,"y":440,"wires":[[],[]]},{"id":"b8a49e1e.6a6b6","type":"comment","z":"ced2cf4c.14073","name":"Change the name of the condition to a different one for each room","info":"Change the name of the condition to a different one for each room","x":850,"y":480,"wires":[]},{"id":"827e7a07.679c68","type":"comment","z":"ced2cf4c.14073","name":"feedback for the BMS about the current time","info":"set correct register","x":1590,"y":400,"wires":[]},{"id":"e90d6091.20dfc","type":"ui_numeric","z":"ced2cf4c.14073","name":"","label":" Hold time in second","tooltip":"","group":"754ee25b.5d0e7c","order":0,"width":0,"height":0,"wrap":false,"passthru":false,"topic":"topic","topicType":"msg","format":"{{value}}","min":"60","max":"2540","step":"30","x":510,"y":480,"wires":[["6ca5cb6d.d943b4"]]},{"id":"188284fc.67660b","type":"debug","z":"ced2cf4c.14073","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1210,"y":520,"wires":[]},{"id":"cc0f532a.3acc5","type":"change","z":"ced2cf4c.14073","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"time_sensor_room1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":440,"wires":[["6ca5cb6d.d943b4","f2824476.edf178","e90d6091.20dfc"]]},{"id":"25b24d23.a1da82","type":"modbus-client","name":"","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"10.0.6.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true},{"id":"754ee25b.5d0e7c","type":"ui_group","name":"Sensor hold time","tab":"3f4554e9.27d8fc","order":1,"disp":true,"width":"6","collapse":false},{"id":"3f4554e9.27d8fc","type":"ui_tab","name":"hold tim","icon":"dashboard","disabled":false,"hidden":false}]