I'm planing to expand it to ping the local network to see who left or came home. (We use static ip's on our phones to combat an issue with our router.)
Just use AutoRemote. :)
On Wednesday, January 23, 2013 3:30:46 PM UTC-6, Jenny Hawkins wrote:
> I have a python script running as a service in my home PC which monitors my garage doors. Anytime they change (open/closed) it sends a status update via AutoRemote. I have Tasker keep a persistent notification up which let's me see at a glance if a door is open. I can also send a ssh command to run the status script, or to open or close the door, directly from Tasker.
>
> I'm planing to expand it to ping the local network to see who left or came home. (We use static ip's on our phones to combat an issue with our router.)
I'm most interested in how you are sending SSH commands via tasker, been pulling my hair out trying to do that.
--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/cFxCJoTWVt0/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Here us one of my commands, edited of course:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "MyUse...@MyServerName.com" -i /data/PathToMyKeyFile "m:Python\Python m:\Python\FetchGarageStatus.py"
First, is just the ssh to run the socket.
The next two parts turned out to be critical. When you use a regular ssh app, you confirm a server is the one you meant to contact and put it in a known list. I completely failed to find a way to do this via command line, so those two pieces make ssh ignore the server check. This opens you to accidently talking to the wrong server and decreases security, so use at your own risk.
Next part is my login. It is the username for the destination computer and where to find it. My router has a dyndns address, otherwise, you'll need to watch your routers external IP and update your script. You'll need to pass the ssh ports through your router, and the firewall at the destination.
After the -i is the location of the key file. I keep mine buried in the data directory so that a factory reset has to wipe it. I also have a profile that wipes the file if a wrong pass code is entered twice. I keep a backup of it elsewhere for restoring. I know I generated the key pair via command line on the android, but I don't recall exactly how. It would have been a simple ssh -something, though. Your key file will need to have its permissions restricted to owner only, as I recall. Running in the terminal will help fine tube everything.
Finally, the command to run. If you cab do it at dos-prompt, you can put it here. This one just runs a Python script that checks the doors and triggers an autoremote.
For reference, my computer is Windows 7, and my android is running CyanogenMod 10.1 (android 4.2.2). I can't tell how much of this would be different on a Linux or Mac. I don't even know if ssh is available for command line in other android ROMs.
Also, when I opened up my ports to ssh, I started to get quite a lot of attempts to access my machine. They were pretty clumsy, but I set my firewall to only accept connections from IP ranges I'd seen my phone get.
Really?!
This sounds super cool. Care to share how you achieved this please?
Thanks in advance
W
--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
tasker+un...@googlegroups.com.