A while back I asked for help with pinging devices and determining their status.
It worked.
This is part of the flow.
But now the Modem is being marked as OFF-LINE, when it isn't.
The "gateway" is the mode, and the "uplink" is that the ADSL part is working.
This sends back that the modem is offline.
I'm at a loss to what is going on, as I am sure it used to work.
ping 192.168.0.254
PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
64 bytes from
192.168.0.254: icmp_seq=1 ttl=64 time=0.592 ms
64 bytes from
192.168.0.254: icmp_seq=2 ttl=64 time=0.633 ms
^C
--- 192.168.0.254 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1031ms
rtt min/avg/max/mdev = 0.592/0.612/0.633/0.032 ms
So the PING does work.
[{"id":"68960bfe.f514ac","type":"inject","z":"2d44537.f26082c","name":"Scan for machine status","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":"","x":170,"y":390,"wires":[["427f0a88.bfbc3c"]]},{"id":"427f0a88.bfbc3c","type":"function","z":"2d44537.f26082c","name":"check list","func":"var checks = [\n {'topic':'Gateway', 'addr': \"192.168.0.254\"},\n {'topic':'UpLink', 'addr': \"144.130.209.209\"},\n {'topic':'Network', 'addr': \"192.168.1.14\"},\n];\n\nfor ( var i in checks ) {\n node.send({\n \"topic\" : checks[i].topic,\n \"host\" : checks[i].addr,\n });\n}","outputs":1,"noerr":0,"x":380,"y":390,"wires":[["da22d100.d67a98"]]},{"id":"da22d100.d67a98","type":"adv ping","z":"2d44537.f26082c","name":"","host":"","x":548.2222595214844,"y":390.3333435058594,"wires":[["4aaeb766.08ffd8"]]},{"id":"4aaeb766.08ffd8","type":"function","z":"2d44537.f26082c","name":"msg","func":"if (msg.payload===false){\n //if its false the its off-line\n msg.payload=msg.topic+\" Off-line\";\n}else{\n //If its not false then it must be true / on-line\n msg.payload=msg.topic+\" On-line\";\n} \nreturn msg;\n\n","outputs":1,"noerr":0,"x":260,"y":500,"wires":[["d1ffc44f.4ef1c","f02a8396.875f88"]]},{"id":"f02a8396.875f88","type":"debug","z":"2d44537.f26082c","name":"Topic","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"topic","x":430,"y":500,"wires":[]},{"id":"d1ffc44f.4ef1c","type":"debug","z":"2d44537.f26082c","name":"Message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":440,"y":534,"wires":[]}]