Selasa, 21 Februari 2023

modbus to telegram


 


[{"id":"36e36aae.e8b2b6","type":"modbus-read","z":"ab7b4939.3fe1c8","name":"SIMONE 1-16","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"1","dataType":"HoldingRegister","adr":"0","quantity":"16","rate":"500","rateUnit":"ms","delayOnStart":false,"startDelayTime":"","server":"5c3514b5.bfc0ec","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":110,"y":220,"wires":[["b06814eb.267de8"],[]]},{"id":"94da68de.b5ea68","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":180,"wires":[["ce0255e.a60bfa8"]]},{"id":"ce0255e.a60bfa8","type":"function","z":"ab7b4939.3fe1c8","name":"DI1","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI1 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":180,"wires":[["84677639.3687c8"]]},{"id":"84677639.3687c8","type":"telegram sender","z":"ab7b4939.3fe1c8","name":"SIMONE","bot":"d9fee841.88f6e8","haserroroutput":false,"outputs":1,"x":960,"y":380,"wires":[[]]},{"id":"b06814eb.267de8","type":"Input Split","z":"ab7b4939.3fe1c8","name":"","inputProps":["payload.0","payload.1","payload.2","payload.3","payload.4","payload.5","payload.6","payload.7","payload.8","payload.9","payload.10","payload.11","payload.12","payload.13","payload.14","payload.15"],"outputs":16,"x":300,"y":300,"wires":[["94da68de.b5ea68"],["5d55410d.40d53"],["16ca90ea.bea01f"],["127192ff.4ffc7d"],["10344f9.f5923b"],["b2b6349d.c32198"],["8a391ede.cac81"],["bb040a77.0ade08"],["61196ba.0714294"],["15c73a55.33f906"],["94df7e99.a36c8"],["83732533.7498f8"],["b7acbeb1.29eb4"],["d04c8ca0.3c7a7"],["b58d5f28.06db1"],["83515df5.b5067"]]},{"id":"406d8d48.3e83e4","type":"function","z":"ab7b4939.3fe1c8","name":"DI2","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI2 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":220,"wires":[["84677639.3687c8"]]},{"id":"5d55410d.40d53","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":220,"wires":[["406d8d48.3e83e4"]]},{"id":"127192ff.4ffc7d","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":300,"wires":[["70518647.d9ee18"]]},{"id":"70518647.d9ee18","type":"function","z":"ab7b4939.3fe1c8","name":"DI4","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI4 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":300,"wires":[["84677639.3687c8"]]},{"id":"16ca90ea.bea01f","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":260,"wires":[["8c864dd.9dba0b"]]},{"id":"8c864dd.9dba0b","type":"function","z":"ab7b4939.3fe1c8","name":"DI3","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI3 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":260,"wires":[["84677639.3687c8"]]},{"id":"10344f9.f5923b","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":340,"wires":[["cedc2e85.706e3"]]},{"id":"cedc2e85.706e3","type":"function","z":"ab7b4939.3fe1c8","name":"DI5","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI5 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":340,"wires":[["84677639.3687c8"]]},{"id":"32d08ffa.ec342","type":"function","z":"ab7b4939.3fe1c8","name":"DI6","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI6 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":380,"wires":[["84677639.3687c8"]]},{"id":"b2b6349d.c32198","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":380,"wires":[["32d08ffa.ec342"]]},{"id":"bb040a77.0ade08","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":460,"wires":[["5e17e6af.eda178"]]},{"id":"5e17e6af.eda178","type":"function","z":"ab7b4939.3fe1c8","name":"DI8","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI8 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":460,"wires":[["84677639.3687c8"]]},{"id":"8a391ede.cac81","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":420,"wires":[["95c7bc84.3c95c"]]},{"id":"95c7bc84.3c95c","type":"function","z":"ab7b4939.3fe1c8","name":"DI7","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI7 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":420,"wires":[["84677639.3687c8"]]},{"id":"61196ba.0714294","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":500,"wires":[["302bd1f3.a540be"]]},{"id":"302bd1f3.a540be","type":"function","z":"ab7b4939.3fe1c8","name":"DI9","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI9 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":500,"wires":[["84677639.3687c8"]]},{"id":"fc81474.d4c83b8","type":"function","z":"ab7b4939.3fe1c8","name":"DI10","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI10 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":540,"wires":[["84677639.3687c8"]]},{"id":"15c73a55.33f906","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":540,"wires":[["fc81474.d4c83b8"]]},{"id":"83732533.7498f8","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":620,"wires":[["5b30119b.ad5af"]]},{"id":"5b30119b.ad5af","type":"function","z":"ab7b4939.3fe1c8","name":"DI12","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI12 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":620,"wires":[["84677639.3687c8"]]},{"id":"94df7e99.a36c8","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":580,"wires":[["9e20b0a4.01503"]]},{"id":"9e20b0a4.01503","type":"function","z":"ab7b4939.3fe1c8","name":"DI11","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI11 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":580,"wires":[["84677639.3687c8"]]},{"id":"b7acbeb1.29eb4","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":660,"wires":[["29cb6947.034d36"]]},{"id":"29cb6947.034d36","type":"function","z":"ab7b4939.3fe1c8","name":"DI13","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI13 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":660,"wires":[["84677639.3687c8"]]},{"id":"a981c670.233b78","type":"function","z":"ab7b4939.3fe1c8","name":"DI14","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI14 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":700,"wires":[["84677639.3687c8"]]},{"id":"d04c8ca0.3c7a7","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":700,"wires":[["a981c670.233b78"]]},{"id":"83515df5.b5067","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":780,"wires":[["a50225ec.9ab7f8"]]},{"id":"a50225ec.9ab7f8","type":"function","z":"ab7b4939.3fe1c8","name":"DI16","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI16 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":780,"wires":[["84677639.3687c8"]]},{"id":"b58d5f28.06db1","type":"rbe","z":"ab7b4939.3fe1c8","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":570,"y":740,"wires":[["dd4183b.a90118"]]},{"id":"dd4183b.a90118","type":"function","z":"ab7b4939.3fe1c8","name":"DI15","func":"var cb = Number(msg.payload)\nvar d = new Date();\nvar t = new Date();\nvar date = d.toLocaleDateString();\nvar time = t.toLocaleTimeString();\nvar a;\n\nif(cb>0)\n{\n   \n    msg.payload = {}\n    msg.payload.chatId = -580326211\n    msg.payload.type = \"message\";\n    msg.payload.content = \"DI15 ON \" + time + \" \" + date;\n  \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":740,"wires":[["84677639.3687c8"]]},{"id":"5c3514b5.bfc0ec","type":"modbus-client","d":true,"name":"SIMONE","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.4.10","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":"d9fee841.88f6e8","type":"telegram bot","botname":"simornodered_bot","usernames":"","chatids":"","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","botpath":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false,"credentials":{"token":""}}]

Tidak ada komentar:

Posting Komentar

Frekwensi LoRa yang legal di Indonesia

 menurut kepmen 2024-05 standar teknis perangkat LPWAN berikut frekwensi LoRa : link KEPMEN: download