OBi110 scheduled reboot

<< < (3/6) > >>

QBZappy:
infin8loop,

Hi, thanks for your reply.

At this point it is academic as I have a working solution. However it would be interesting to learn how to accomplish using web browser as not all devices can be controlled using telnet. I can confirm having Windows Scripting Host (WSH) is installed.

Typing in the url does not reboot the PBX. With your script and this url "http://192.16.240.3:8083/cgi-bin/ccgi?pageID=27", I can take to the web page were I need to press the reboot button. I think there is HTTP command to do this step.

Quote from: infin8loop on August 11, 2011, 06:08:28 pm

Otherwise, perhaps it's a slightly different URL that is POSTed when clicking a button on the page that causes a reboot.


I think this is more than likely the case. Do you know how to press the button via script?

(See attached image)

Using telnet uses a different approach. It didn't require an url. In my case to telnet into the PBX only the IP address, password and script command to "reboot" + keyboard equivalent of pressing "enter" into the terminal window was sufficient to reboot the unit.

infin8loop:
Hi QBZappy,

Ok, I follow you now.  The Shotgun School of Programming and Bartending is now in session.
My script doesn't press buttons, it POSTs a page. We need to find the page that's POSTed when you click the Submit button.  Put your mouse over the white area where the "Reboot" and "Reset to Default" radio buttons are located and right click, choose "View Page Source" (or if in a frame "This Frame" then "View Page Source").
Look for radio buttons in the source code, something like:
<input type="radio" name="somename" value="somevalue1" />Reboot
<input type="radio" name="somename" value="somevalue2" />Reset to Default
The name "somename" will be the same on both buttons since only the selected button value is sent.  Then look for the URL of the page that's sent for the Submit button.  It's probably in a FORM/ACTION statement.  If action="thatpage.htm" then the strURL for my script would be something like "http://youripaddress/thatpage.htm?somename=somevalue1".  If action already contains a ?x=y name/value pair then append the somename=somevalue1 onto it using &somename=somevalue1.   Just make sure you replace youripaddress, thatpage.htm, somename, and somevalue1 with the appropriate values.  And don't use "somevalue2" unless you want the thing reset to default!  Whatever strURL you come up with should work by just typing it into a browser window first, before trying to use it in the script.  Good Luck!  And send any cool weather south to Texas.



QBZappy:
infin8loop,

Thanks. I learn something new everyday. I will try it tonight.

We have a cool and intermittent rainy day here today. I'll try to send some good weather vibes down your way.

guyinsb:
Quote from: earthtoobi on August 05, 2011, 04:27:08 pm

if you use linux and have this module try this:

 lwp-request -C admin:<password> -e -d http://192.168.x.x/rebootgetconfig.htm


Also works with Mac OSX 10.6.8 (and probably many other versions)

neilio:
Thanks for this!

Does anyone have an idea of how long the OBI can go before needing to be rebooted? I've set mine to run at 5am every day, but was curious if the problem was so bad that more frequent rebooting is required.

Navigation

[0] Message Index

[#] Next page

[*] Previous page