Teltonika RUT240 monitoring
A flow to monitor the state and connection details of a Teltonika RUT240 cellular modem/router.
On the router:
- install MQTT Broker and Publisher services on the modem.
- Configure broker Hostname= router_ip, port = 1883
in the imported flow:
- set the ip address of the MQTT server to the router ip.
[{"id":"987fbc0fdd6b724d","type":"tab","label":"Modem","disabled":false,"info":""},{"id":"e231dc4d13ba1f8d","type":"comment","z":"987fbc0fdd6b724d","name":"Example the Teltonica RUT240","info":"For this example the Teltonica RUT240 Modbus TCP Slave was used with the following settings:\nport: 502\nDevice ID: 1\nthe rest is either 0 or turned off. ","x":170,"y":60,"wires":[]},{"id":"9f731452ee650682","type":"mqtt in","z":"987fbc0fdd6b724d","name":"","topic":"router/id","qos":"0","datatype":"auto-detect","broker":"f2fa055f5e9fe8c9","nl":false,"rap":false,"inputs":0,"x":420,"y":200,"wires":[["885aac6655c0e7a5"]]},{"id":"885aac6655c0e7a5","type":"debug","z":"987fbc0fdd6b724d","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":570,"y":200,"wires":[]},{"id":"029168e00f95fbbc","type":"mqtt out","z":"987fbc0fdd6b724d","name":"","topic":"","qos":"1","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"f2fa055f5e9fe8c9","x":410,"y":140,"wires":[]},{"id":"016c2a09d359881a","type":"inject","z":"987fbc0fdd6b724d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"router/get","payload":"id","payloadType":"str","x":150,"y":140,"wires":[["029168e00f95fbbc"]]},{"id":"1374e1758c9e5622","type":"inject","z":"987fbc0fdd6b724d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":"3","topic":"router/get","payload":"uptime","payloadType":"str","x":170,"y":380,"wires":[["dd69119415feaf79"]]},{"id":"dc8fd43069f2e760","type":"inject","z":"987fbc0fdd6b724d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":"2","topic":"router/get","payload":"signal","payloadType":"str","x":170,"y":320,"wires":[["dd69119415feaf79"]]},{"id":"489e61d218958149","type":"mqtt in","z":"987fbc0fdd6b724d","name":"","topic":"router/+/+","qos":"0","datatype":"auto","broker":"f2fa055f5e9fe8c9","nl":false,"rap":false,"inputs":0,"x":140,"y":660,"wires":[["daed8897c04c6ffd","935beada7207981d"]]},{"id":"daed8897c04c6ffd","type":"debug","z":"987fbc0fdd6b724d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":290,"y":620,"wires":[]},{"id":"4aeb115713ae38aa","type":"inject","z":"987fbc0fdd6b724d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":true,"onceDelay":"7","topic":"router/get","payload":"network","payloadType":"str","x":170,"y":560,"wires":[["dd69119415feaf79"]]},{"id":"e2a6117fe75b0a16","type":"inject","z":"987fbc0fdd6b724d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":true,"onceDelay":"5","topic":"router/get","payload":"operator","payloadType":"str","x":180,"y":440,"wires":[["dd69119415feaf79"]]},{"id":"6fd0598d9c1043fe","type":"inject","z":"987fbc0fdd6b724d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":true,"onceDelay":"6","topic":"router/get","payload":"connection","payloadType":"str","x":180,"y":500,"wires":[["dd69119415feaf79"]]},{"id":"dd69119415feaf79","type":"mqtt out","z":"987fbc0fdd6b724d","name":"","topic":"","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"f2fa055f5e9fe8c9","x":410,"y":380,"wires":[]},{"id":"9f643598e2a3f01b","type":"inject","z":"987fbc0fdd6b724d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":"1","topic":"router/get","payload":"temperature","payloadType":"str","x":190,"y":260,"wires":[["dd69119415feaf79"]]},{"id":"935beada7207981d","type":"switch","z":"987fbc0fdd6b724d","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"signal","vt":"str"},{"t":"cont","v":"temperature","vt":"str"},{"t":"cont","v":"operator","vt":"str"},{"t":"cont","v":"connection","vt":"str"},{"t":"cont","v":"network","vt":"str"},{"t":"cont","v":"uptime","vt":"str"},{"t":"cont","v":"name","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":290,"y":700,"wires":[["6d05ad0ea9fc8e3b"],["fbd25409dd100fda"],["57a2048bd1e05d75"],["3a35bdbe2f26baa5"],["fe732cd1c456e1aa"],["b066d6f9be71c93d"],["9c6112aa7a52edf7"]]},{"id":"a3b942d65f3eb315","type":"ui_text","z":"987fbc0fdd6b724d","group":"8d0c204464afacaa","order":1,"width":0,"height":0,"name":"","label":"RSSI","format":"{{msg.payload}}dB","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":390,"y":920,"wires":[]},{"id":"fbd25409dd100fda","type":"range","z":"987fbc0fdd6b724d","minin":"0","maxin":"1000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"divide by 10","x":490,"y":660,"wires":[["0ac95cedd4218591"]]},{"id":"0ac95cedd4218591","type":"ui_text","z":"987fbc0fdd6b724d","group":"8d0c204464afacaa","order":4,"width":0,"height":0,"name":"","label":"Temperature","format":"{{msg.payload}}°C","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":650,"y":660,"wires":[]},{"id":"57a2048bd1e05d75","type":"ui_text","z":"987fbc0fdd6b724d","group":"8d0c204464afacaa","order":6,"width":0,"height":0,"name":"","label":"Operator","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":480,"y":700,"wires":[]},{"id":"3a35bdbe2f26baa5","type":"ui_text","z":"987fbc0fdd6b724d","group":"8d0c204464afacaa","order":7,"width":0,"height":0,"name":"","label":"Connection","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":490,"y":740,"wires":[]},{"id":"fe732cd1c456e1aa","type":"ui_text","z":"987fbc0fdd6b724d","group":"8d0c204464afacaa","order":5,"width":0,"height":0,"name":"","label":"Network","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":480,"y":780,"wires":[]},{"id":"e436f4caae8a9873","type":"ui_text","z":"987fbc0fdd6b724d","group":"8d0c204464afacaa","order":3,"width":0,"height":0,"name":"","label":"Uptime","format":"{{msg.payload}} hrs","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":640,"y":820,"wires":[]},{"id":"b066d6f9be71c93d","type":"range","z":"987fbc0fdd6b724d","minin":"0","maxin":"3600","minout":"0","maxout":"1","action":"scale","round":true,"property":"payload","name":"sec to hrs","x":480,"y":820,"wires":[["e436f4caae8a9873"]]},{"id":"6b1ccfc61a75d537","type":"change","z":"987fbc0fdd6b724d","name":"","rules":[{"t":"set","p":"RSSI","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":230,"y":920,"wires":[["a3b942d65f3eb315"]]},{"id":"98a4562251b0c829","type":"switch","z":"987fbc0fdd6b724d","name":"","property":"RSSI","propertyType":"flow","rules":[{"t":"gt","v":"-65","vt":"num"},{"t":"gt","v":"-75","vt":"num"},{"t":"gt","v":"-85","vt":"num"},{"t":"gt","v":"-95","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":5,"x":210,"y":1040,"wires":[["548df3d831a89e3f"],["dbbf581634f55952"],["fd45b69609b29381"],["3e437e8aaec67c7b"],["47fe9531e8781bd3"]]},{"id":"548df3d831a89e3f","type":"change","z":"987fbc0fdd6b724d","name":"Excellent","rules":[{"t":"set","p":"payload","pt":"msg","to":"Excellent","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":960,"wires":[["6b9a0928e477789e"]]},{"id":"dbbf581634f55952","type":"change","z":"987fbc0fdd6b724d","name":"Good","rules":[{"t":"set","p":"payload","pt":"msg","to":"Good","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":1000,"wires":[["6b9a0928e477789e"]]},{"id":"fd45b69609b29381","type":"change","z":"987fbc0fdd6b724d","name":"Fair","rules":[{"t":"set","p":"payload","pt":"msg","to":"Fair","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":1040,"wires":[["6b9a0928e477789e"]]},{"id":"3e437e8aaec67c7b","type":"change","z":"987fbc0fdd6b724d","name":"Poor","rules":[{"t":"set","p":"payload","pt":"msg","to":"Poor","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":1080,"wires":[["6b9a0928e477789e"]]},{"id":"47fe9531e8781bd3","type":"change","z":"987fbc0fdd6b724d","name":"No Signal","rules":[{"t":"set","p":"payload","pt":"msg","to":"No Signal","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":1120,"wires":[["6b9a0928e477789e"]]},{"id":"6d05ad0ea9fc8e3b","type":"link out","z":"987fbc0fdd6b724d","name":"RSSI Update","mode":"link","links":["eaeddc2bac82dd4b"],"x":435,"y":620,"wires":[]},{"id":"eaeddc2bac82dd4b","type":"link in","z":"987fbc0fdd6b724d","name":"RSSI Update","links":["6d05ad0ea9fc8e3b"],"x":95,"y":1000,"wires":[["98a4562251b0c829","6b1ccfc61a75d537"]]},{"id":"6b9a0928e477789e","type":"change","z":"987fbc0fdd6b724d","name":"","rules":[{"t":"set","p":"signalStrength","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":1040,"wires":[["61abace65c021fea"]]},{"id":"61abace65c021fea","type":"ui_text","z":"987fbc0fdd6b724d","group":"8d0c204464afacaa","order":2,"width":0,"height":0,"name":"","label":"Signal Strength","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":640,"y":1100,"wires":[]},{"id":"9c6112aa7a52edf7","type":"ui_text","z":"987fbc0fdd6b724d","group":"8d0c204464afacaa","order":5,"width":0,"height":0,"name":"","label":"Device Name","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":500,"y":860,"wires":[]},{"id":"ff6b08c75354c8ba","type":"inject","z":"987fbc0fdd6b724d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"router/get","payload":"name","payloadType":"str","x":160,"y":200,"wires":[["029168e00f95fbbc"]]},{"id":"f2fa055f5e9fe8c9","type":"mqtt-broker","name":"Router","broker":"10.10.10.1","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"8d0c204464afacaa","type":"ui_group","name":"Router","tab":"5f07df14e8764f2c","order":6,"disp":true,"width":"6","collapse":false,"className":""},{"id":"5f07df14e8764f2c","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]