Author |
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: April 04 2014 at 15:34 | IP Logged
|
|
|
I have to WAPs (D-link DAP-2553 wireless access points), one on each end of the property that periodically seem to slow. Rebooting them does the trick.
I can reboot them by pointing my browser to them and then logging in on their configuration page or,
I can open a telnet session to their address, login, and then tell them to "reboot". The telnet session looks something like (in a CMD window):
c:\telnet 192.168.0.xx
login:"admin"
password:"password"
WAP->"reboot"
For telenet to work, in Win7, you have to turn "telnet client" in the Windows features to "on".
Here is my question: On my PH box, I presently DON'T have "telnet client" turned on (I can do it if needed). I would like to have a way for PH to connect to my WAP and send it the reboot command. I could then either put it on a timed event, or just run the macro when needed from my GUI.
I read elsewhere on the forum, that a socket plugin could work for this. I have a fair number of the plugins up and working, but I am not sure where to start with this (if it can even be done). Ideas?
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: April 04 2014 at 15:50 | IP Logged
|
|
|
ph_run("telnet 192.168.0.51")
wait 0.5
sendkeys "login{enter}password{enter}reboot{enter}"
The above works from my telnet enabled box.
Any downside to having telnet enabled on my PH box that runs 24/7?
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 09 2014 at 19:32 | IP Logged
|
|
|
Smarty,
Im thinking you could also use the ph_sendsocketdata1 function like so:
Code:
ph_sendsocketdata1("192.168.0.51",23,3,"login\013password\01 3reboot\013") |
|
|
Dave.
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: May 28 2014 at 14:11 | IP Logged
|
|
|
Nice one Dave!
can use this one too.....silly me
|
Back to Top |
|
|