Network
-
I am looking for a command-utility that will tell me if a particular device is connected to the home network. (TV and Home Theatre in particular). These devices are not responding to a Ping, so that does not help. NMap does not find them either (not sure why), even with its most intense scan. Fing finds them OK, but only seems to be available in with a GUI, and I need to be able to capture the response in Tasker. They do also appear on my routers' "Attached Devices" pages. Note that my programming skills have deteriorated significantly over recent months due to my brain injury, so I am unable to write anything from scratch (Its taken me 5 days to even set up tasker to a point that would have taken me 2 hours a couple of years ago). If anyone is able to help, it would be very much appreciated.
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.
-
I am looking for a command-utility that will tell me if a particular device is connected to the home network. (TV and Home Theatre in particular). These devices are not responding to a Ping, so that does not help. NMap does not find them either (not sure why), even with its most intense scan. Fing finds them OK, but only seems to be available in with a GUI, and I need to be able to capture the response in Tasker. They do also appear on my routers' "Attached Devices" pages. Note that my programming skills have deteriorated significantly over recent months due to my brain injury, so I am unable to write anything from scratch (Its taken me 5 days to even set up tasker to a point that would have taken me 2 hours a couple of years ago). If anyone is able to help, it would be very much appreciated.
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.
Midi_Mick wrote:
I am looking for a command-utility...
For Android?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Thanks Richard - I'll take a look at that one when I wake up in the morning, and let you know how it goes.
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.
-
Midi_Mick wrote:
I am looking for a command-utility...
For Android?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
Yes, for Android. The device I am using is a slightly older (but not too old) phone, which I have rooted and loaded Tasker and a Terminal Emulator on. It makes the thing like a cut-down Linux (which Android is based on, anyway). Tasker will happily run a Shell command, and capture both the stdout and stderr streams for me.
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.
-
Yes, for Android. The device I am using is a slightly older (but not too old) phone, which I have rooted and loaded Tasker and a Terminal Emulator on. It makes the thing like a cut-down Linux (which Android is based on, anyway). Tasker will happily run a Shell command, and capture both the stdout and stderr streams for me.
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.
Midi_Mick wrote:
...and loaded Tasker
This is the Tasker app that I use, but for completely different reasons. Is there another one out there?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Midi_Mick wrote:
...and loaded Tasker
This is the Tasker app that I use, but for completely different reasons. Is there another one out there?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
That's the one - it can be an incredibly powerful tool, particularly when given superuser privileges. When creating an action, take a look at the "Code" option, and you will see "Shell Command". I also have a plugin for it (RM Plugin - designed primarily to control the RM series of IR blasters) that has a built-in mini server that will execute tasks when it receives a URL. That means I can utilise IFTTT to control just about anything. But it does not solve my problem - the IR remotes for the TV and the Home Theatre is just a power toggle, not separate On and Off. So I need to know if the device is already on or not so that when I say "Turn on the TV", it doesn't just send the signal and actually turn it off. Detecting its existence (or not) on the network will answer that question, so Tasker can decide whether or not to send the IR signal.
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.
-
That's the one - it can be an incredibly powerful tool, particularly when given superuser privileges. When creating an action, take a look at the "Code" option, and you will see "Shell Command". I also have a plugin for it (RM Plugin - designed primarily to control the RM series of IR blasters) that has a built-in mini server that will execute tasks when it receives a URL. That means I can utilise IFTTT to control just about anything. But it does not solve my problem - the IR remotes for the TV and the Home Theatre is just a power toggle, not separate On and Off. So I need to know if the device is already on or not so that when I say "Turn on the TV", it doesn't just send the signal and actually turn it off. Detecting its existence (or not) on the network will answer that question, so Tasker can decide whether or not to send the IR signal.
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.
Midi_Mick wrote:
That's the one...
Have you considered asking here on how to capture the output of a shell command?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Midi_Mick wrote:
That's the one...
Have you considered asking here on how to capture the output of a shell command?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
I can already do that - what I need is the command that will get the info for me.
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.
As you previously indicated PING would not work, how about TRACERT?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
As you previously indicated PING would not work, how about TRACERT?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
That was a good suggestion. TRACERT is Windows, but a bit of research gave me traceroute, which is the Linux equivalent. I needed BusyBox on the android device to get that command, and it works fine for the TV. However, for the Home Theatre, it finds it whether it is turned on or not. Very close, but note quite time for the cigar yet. I have a support request in with Fing - that seems to be the only program that is giving me the right answers - to see if there is any way of capturing its output. They do have an API available, and its not expensive - but I am concerned I no longer have the skills to use it to write the utility.
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.
-
No - not android. :( It looks like it might have to be the Fing API and write one. Wish me luck. I hope I still have that much skill (not confident though).
Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.