[{"id":"f2824476.edf178","type":"function","z":"3d5256bd71c323e3","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":440,"y":260,"wires":[["e4c366ff.f75bb8"]]},{"id":"e4c366ff.f75bb8","type":"DALI2 Devs Common","z":"3d5256bd71c323e3","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":620,"y":260,"wires":[["e070bd85.392f9"],["188284fc.67660b"]]},{"id":"4c591a86.cb56c4","type":"vertexmodbus","z":"3d5256bd71c323e3","name":"","registers":[{"r":"12","i":0}],"outputs":1,"x":260,"y":260,"wires":[["f2824476.edf178","6ca5cb6d.d943b4","e90d6091.20dfc"]]},{"id":"e1f88ee9.95e6f","type":"comment","z":"3d5256bd71c323e3","name":"Change of presence time in sensor from the BMS level","info":"","x":560,"y":140,"wires":[]},{"id":"e070bd85.392f9","type":"vertex action","z":"3d5256bd71c323e3","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":850,"y":260,"wires":[[]]},{"id":"2c2f04e1.b95f9c","type":"comment","z":"3d5256bd71c323e3","name":" Choose the register number to which the BMS sends the time for the sensor","info":"","x":370,"y":220,"wires":[]},{"id":"160801b2.d92b4e","type":"inject","z":"3d5256bd71c323e3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"","payloadType":"date","x":170,"y":320,"wires":[["cc0f532a.3acc5"]]},{"id":"cc0f532a.3acc5","type":"change","z":"3d5256bd71c323e3","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"time_sensor_room1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":320,"wires":[["6ca5cb6d.d943b4"]]},{"id":"6ca5cb6d.d943b4","type":"change","z":"3d5256bd71c323e3","name":"","rules":[{"t":"set","p":"time_sensor_room1","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":320,"wires":[["b8c7ea31.217c88"]]},{"id":"b8c7ea31.217c88","type":"modbus-write","z":"3d5256bd71c323e3","name":"","showStatusActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"511","quantity":"1","server":"25b24d23.a1da82","emptyMsgOnFail":false,"keepMsgProperties":false,"x":1260,"y":320,"wires":[[],[]]},{"id":"b8a49e1e.6a6b6","type":"comment","z":"3d5256bd71c323e3","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":510,"y":360,"wires":[]},{"id":"827e7a07.679c68","type":"comment","z":"3d5256bd71c323e3","name":"feedback for the BMS about the current time","info":"set correct register","x":1250,"y":280,"wires":[]},{"id":"e90d6091.20dfc","type":"ui_numeric","z":"3d5256bd71c323e3","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":170,"y":360,"wires":[["6ca5cb6d.d943b4"]]},{"id":"188284fc.67660b","type":"debug","z":"3d5256bd71c323e3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":870,"y":400,"wires":[]},{"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}] |