Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


dazz1

95 posts

Master Geek


#113368 15-Jan-2013 11:26
Send private message

Hello

I have a remote webcam system that uploads images to an ftp server via the Telecom Xt network.  The webcam system consists of a PC running Ubuntu server.  It connects using an MF636 modem.

I want the webcam system to be able to get access to the Telecom usage meter to control the number of image uploads and stay within my monthly data cap.

I have no problem monitoring data to/from the telecom network as measured by the webcam box.  I run vnstat on the box.  I understand that at least some of the data packets going to/from the network are not measured by Telecom.  If so, this means that reading traffic flow to/from the network with vnstat will overstate the data usage compared to the Telecom usage meter.

The on-line Telecom usage meter webpage is OK for human viewing but would be difficult for a machine to read and understand.

Is there a facility to allow machine readible access to the Telecom usage meter??

Dazz

Create new topic
plambrechtsen
1948 posts

Uber Geek
Inactive user


  #745000 15-Jan-2013 12:31
Send private message

There is no public API, but other online use the mobile version of the mobile usage meter at http://m.telecom.co.nz/yt and that gives an easier html page to extract out the data you need.

 
 
 

Shop MyHeritage and uncover your origins and find new relatives with a simple DNA test. (affiliate link).
dazz1

95 posts

Master Geek


  #750091 24-Jan-2013 11:51
Send private message

Hi

I want to develop a script that will search the webpage for the traffic info. I want to do that on a PC with wired connection to the internet rather than the wireless and headless box.

I can log-on to the page above from my wired PC. I believe the log-on password screen is not shown when the PC connection is via a T-stick modem.

Is the web page showing traffic I see on my PC by logging-in the same as the webpage I would see on a mobile device with the modem?


BarTender
3530 posts

Uber Geek

ID Verified
Trusted
Lifetime subscriber

  #750114 24-Jan-2013 12:39
Send private message

A bit of Googling around will give you what you are looking for (hint google for "wget amdistauth")

wget --no-check-certificate --save-cookies=cookie.txt --keep-session-cookies --post-data "IDToken1=027xxxxxxx&IDToken2=**YourPassword**" "https://login.telecom.co.nz/amdistauth/UI/Login?realm=/TelecomDevices&goto=http%3A%2F%2Fm.telecom.co.nz%2Fyt" -q -O - | grep "remaining data" | awk "{print $1}"

That will work when you're not coming in over 3G.. Otherwise you can just go to m.telecom.co.nz/yt and pick it up directly as over 3G you don't need to login.

To logout use:

wget --no-check-certificate --load-cookies=cookie.txt "http://m.telecom.co.nz/logout" -O -

Otherwise you run into issues where if you have established more than 5 sessions you can't login.




and




dazz1

95 posts

Master Geek


  #750821 25-Jan-2013 15:37
Send private message

Hi
Thanks.
There is no way I would have found those key words by myself for a Google search.

Dazz

dazz1

95 posts

Master Geek


  #866884 26-Jul-2013 22:59
Send private message

Hi

wget works for accessing the telecom usage page but Iam writing in perl and I want to use the module
LWP::Simple to so the same thing.   LWP provides a reliable return status (undef) if the web page request fails.

The problem is that LWP doesn't return the page. 
I have read that Apparently this can happen if the site owner is only willing to provide accessto browsers, and has configured the site to return an error forunrecognized user-agent strings.

Has anyone else successfully used LWP from the mobile network?

Create new topic





News and reviews »

Prodigi Technology Services Announces Strategic Acquisition of Conex
Posted 4-Dec-2023 09:33


Samsung Announces Galaxy AI
Posted 28-Nov-2023 14:48


Epson Launches EH-LS650 Ultra Short Throw Smart Streaming Laser Projector
Posted 28-Nov-2023 14:38


Fitbit Charge 6 Review 
Posted 27-Nov-2023 16:21


Cisco Launches New Research Highlighting Gap in Preparedness for AI
Posted 23-Nov-2023 15:50


Seagate Takes Block Storage System to New Heights Reaching 2.5 PB
Posted 23-Nov-2023 15:45


Seagate Nytro 4350 NVMe SSD Delivers Consistent Application Performance and High QoS to Data Centers
Posted 23-Nov-2023 15:38


Amazon Fire TV Stick 4k Max (2nd Generation) Review
Posted 14-Nov-2023 16:17


Over half of New Zealand adults surveyed concerned about AI shopping scams
Posted 3-Nov-2023 10:42


Super Mario Bros. Wonder Launches on Nintendo Switch
Posted 24-Oct-2023 10:56


Google Releases Nest WiFi Pro in New Zealand
Posted 24-Oct-2023 10:18


Amazon Introduces All-New Echo Pop in New Zealand
Posted 23-Oct-2023 19:49


HyperX Unveils Their First Webcam and Audio Mixer Plus
Posted 20-Oct-2023 11:47


Seagate Introduces Exos 24TB Hard Drives for Hyperscalers and Enterprise Data Centres
Posted 20-Oct-2023 11:43


Dyson Zone Noise-Cancelling Headphones Comes to New Zealand
Posted 20-Oct-2023 11:33









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.







MyHeritage