I’ve generated a simple plugin that periodically reads the ADSL/WAN data from my Billion BiPAC 7800N router and puts them into variables. I’m using this (along with dataMine) to monitor my internet traffic, and the SNR and link speeds (I live in the country and have a rubish network connection!).
I have a Netgear ADSL router which I can see via intel’s device spy has a few variable listed for things like external IP address, data, packets sent/received etc.
So before I look to create my own plugin, i had a go at installing yours just to see if anything would line up ‘out of the box’, but alas so far nothing appears.
As I’m still very new to this, I was also wondering if you (or anyone else) were considering making (or maybe even consider helping me create) a more ‘Generic’ release?’ of your plugin?
Looking at Device Spy or using My Devices iPhone app. I can see the following devices and services.
Also, looking at the Ping type plug ins and yours, I really think there could be a good generic match up here to have a device that shows both your Internet usage but also live external connectivity, e.g. Via the ADSL’s source IP being checked against a variable etc.
Yes - it’s just a bash of the web page. I looked at upnp with a view to making it generic, but couldn’t get it to work (and to be fair, I probably didn’t spend a load of time working on it, but my upnp sniffer didn’t seem to work with the Billion router). The other option is SNMP, but unfortunately Vera doesn’t support that. Either upnp, or SNMP would potentially be suitable for a generic plugin.
With the Internet and network connectivity now such an important thing nowadays it would be nice to have a virtual representation of my router/device.
Would I be right in saying that you can only make a plugin for one device XML , as I had 3 come up (see my post from the 18th Sept) when I used Device Spy for me ADSL router, there was an InternetGatewayDevice1’ a ‘WanCommonInterfaceConfig’ and a WanConnectionDevice1’
Do I have to pick one, on can i create a single plugin that makes use of all 3 devices and associated services ?
Just looked at your code… I can see a few issues around the assumption of user name / password being admin / admin (could we create variables for this) but the real kicker is my adslstatus page is different from yours… (See Attachment)
If you would like to share the source I am happy to have a go at forking your plugin or if you are up to some mods to your code then that would also be great
It’s certainly easy to add configurable user/password - that’s simple… Making the plugin more universal could be easy (maybe!). The plugin as it’s currently written is effectively table driven in that there’s a configuration list of strings to search for, and variables to set, so this could pretty simply be changed to allow for different router configurations. The Billion router has the stats that I wanted on two separate pages (adslstatus.html and adslstatics.html)- these are hard coded, but with a little more throught, the plugin might be able to be made more universal…
The plugin simply searches for strings in the HTML, and then grabs the number, so it’s simple, and honestly a little dumb (but it works and seems reliable). There are probably better ways out there to do this, but I couldn’t get the UPnP working, so settled for the quick option.
I’m happy to post the source if you wanted to play with it…
[quote=“Chris, post:8, topic:171961”]I’m happy to post the source if you wanted to play with it…
Cheers
Chris[/quote]
That would be great, I would like to play around with some coding and this would be a good place to start… Want to github it or just zip and up and attach it here?