It is currently April 19th, 2024, 12:14 pm

data cap monitor

Share and get help with Plugins and Addons
biojudgement
Posts: 2
Joined: May 1st, 2011, 5:13 pm

data cap monitor

Post by biojudgement »

anyone know how about going to make a data cap plugin ??? so we can monitor the download and the upload and the total some how ??
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: data cap monitor

Post by jsmorley »

The problem with this from a Rainmeter perspective is that while Rainmeter can track the amount of data your PC uploads and downloads, (no plugin is really needed, it's already there), from the standpoint of tracking how much "bandwidth" you are using with your ISP it's problematic. Rainmeter is watching the data in and out of your PC's network interface card, but since probably 95% of folks are using a router to connect to the internet, and a large majority have more than one device hooked up to the internet via the router, you are probably not going to get anything useful.

.Traffic traversing the router between any other device and your PC would be counted, when it has nothing to do with the internet or your ISP
.Traffic from any device other than your PC going out to the internet via the router would not be counted, when it in fact does impact the amount of bandwidth your ISP is tracking.

Unless you are one of the probably few folks left who has one PC, connected directly to the internet via a modem, it's just not going to be very useful information.

What you need is something that can watch the traffic in and out of the router, on the OUTSIDE of the router's DMZ, facing the ISP's interface. Unless your router or modem can be made to write to a local log file on your PC, or you can create something to talk directly to the router or modem, (and every device will be different) I don't see how this would be something Rainmeter is going to help much with.
MrSpiffdifilous
Posts: 1
Joined: September 29th, 2011, 7:39 am

Re: data cap monitor

Post by MrSpiffdifilous »

I hate to resurrect a zombie thread, but I figure it's better than starting a whole new one for a very similar topic.

I know that Rainmeter uses plugins to monitor incoming and outgoing traffic, but it also has a webparser. Could you then make a skin that would use that plugin for certain services? For instance, Comcast has a bandwidth meter on the user site. Is it possible to make a skin that can log in, and extract the information from that page?
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: data cap monitor

Post by Kaelri »

MrSpiffdifilous wrote:I know that Rainmeter uses plugins to monitor incoming and outgoing traffic, but it also has a webparser. Could you then make a skin that would use that plugin for certain services? For instance, Comcast has a bandwidth meter on the user site. Is it possible to make a skin that can log in, and extract the information from that page?
For the moment, Rainmeter can't parse pages that require cookies (as most sites with user accounts do). We're hoping to remove this limitation in the future.

In the meantime, if you can find some version of the page that doesn't require you to log in - or that lets you provide the name and password in the URL - as in "http://user:password@comcast.com," or something along those lines - then you can probably make something work. :)
User avatar
Mellin
Posts: 4
Joined: December 27th, 2012, 1:59 pm
Location: Warsaw

Re: data cap monitor

Post by Mellin »

I wrote a program in C # for my Rainmeter skin, which allows you to use WebParser plugin on the pages with cookies. If you want, you can use it:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;

namespace BiowareDownload
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static int Main()
{
string ErrorPath = @"C:\Errors.txt";

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

string SavePath = Environment.GetEnvironmentVariable("USERPROFILE") + @"\Documents\Rainmeter\Skins\Mass Effect 3 PL\Galaxy at War\"; //**

try
{
if (!Directory.Exists(SavePath)) Directory.CreateDirectory(SavePath);
}
catch (Exception ex)
{
File.WriteAllText(ErrorPath, ex.Message);
return -1;
}

SavePath = SavePath + "Mass Effect 3 N7 HQ Main.txt"; //**


WebBrowser MyBrowser = new WebBrowser();
try
{
MyBrowser.Navigate("http://social.bioware.com/n7hq"); //*

while ((MyBrowser.Document == null) || MyBrowser.IsBusy)
{
Application.DoEvents();
}

if (File.Exists(SavePath)) File.Delete(SavePath);
File.WriteAllText(SavePath, MyBrowser.DocumentText);
}
catch (Exception ex)
{
File.WriteAllText(ErrorPath, ex.Message);
MyBrowser.Dispose();
return -1;
}

MyBrowser.Dispose();

return 0;
//Application.Run(new Form1());
}
}
}
This program downloading page source file from http://social.bioware.com/n7hq * and saves it to a text file \ Documents \ Rainmeter \ Skins \ Mass Effect 3 EN \ Galaxy at War \ Mass Effect 3 N7 HQ main.txt **, which you can extract information with WebParser plugin. You just need to add the regular firing of the program to your skins and you're done! It works for me.