Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Rebooting an AP Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: April 04 2014 at 15:34 | IP Logged Quote smarty

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 View smarty's Profile Search for other posts by smarty
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: April 04 2014 at 15:50 | IP Logged Quote smarty

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 View smarty's Profile Search for other posts by smarty
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: April 09 2014 at 19:32 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 28 2014 at 14:11 | IP Logged Quote krommetje

Nice one Dave!

can use this one too.....silly me
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum