Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: gt94sss2 on March 11, 2018, 01:32:49 PM

Title: Accessing DSLStats remotely
Post by: gt94sss2 on March 11, 2018, 01:32:49 PM
Running DSLStats v6.1.3 on a Raspberry Pi behind a Zyxel 8924

I have enabled the webserver within DSLStats but could someone tell me what I need to configure (on the router?) to be able to view this data from another location/network and (if poss) what settings I might need to change to allow me to VNC into the Pi when not on the local network?
Title: Re: Accessing DSLStats remotely
Post by: skyeci on March 11, 2018, 02:02:46 PM
nor sure if the zyxel offers any vpn options? you would need dynamic dns too if not on a static ip.

I have setup my Opnsense router behind my 8800 in bridge mode. Then my Opnsense router runs open vpn and dynamic dns service so I have a hostname resolving to my ip. I can access my network from my phone and then login to my stats pc. works well. It also works at my mum's but she a pi3 and can access it with no problem.

Asus routers will provide open vpn and work with dynamic dns. No doubt there are others but I have also had this working on my Asus rt-ac88u
Title: Re: Accessing DSLStats remotely
Post by: jelv on March 11, 2018, 02:13:29 PM
VPN? Surely it is just forwarding what ever ports the web server and VNC are on. I'm sure the ZyXEL will do that.
Title: Re: Accessing DSLStats remotely
Post by: broadstairs on March 11, 2018, 02:58:39 PM
You can port forward the port(s) you want on the 8924. I did not have a lot of luck with my dynamic dns on that but No-IP provide a small utility to keep it updated, my 3925 worked OK as does the D6220 for ddns.

Stuart
Title: Re: Accessing DSLStats remotely
Post by: Westie on March 11, 2018, 03:18:39 PM
I believe that if you sign up for a RealVNC account (free), you will be able to remotely access the Pi without needing to change anything on the router. I haven't tried it myself, but I'm sure details are available on their website.
Title: Re: Accessing DSLStats remotely
Post by: broadstairs on March 11, 2018, 05:14:07 PM
I port forward to TightVNC on my PC which runs my weather station, using that which is free it is easy to password protect both the connection and the server which makes life difficult for hackers.

Stuart
Title: Re: Accessing DSLStats remotely
Post by: gt94sss2 on March 12, 2018, 01:56:43 AM
All, thanks for the replies and suggestions. I haven't had to port forward anything for years, and even then, it was rare.. hence the question of what to do, especially as I don't want to reboot the modem atm (its currently in the process of reducing SNRM)

I do have a No-IP DDNS address and previously had problems using it with the 8924 but Zyxel have fixed that now.

Special thanks to Westie, I was running an old version of RealVNC and hadn't known about the new account functionality which seems to do the job and will also be useful when I am called on to do tech support for family - plus I finally got email alerts working in DSLStats.. :)

 


Title: Re: Accessing DSLStats remotely
Post by: tiffy on March 14, 2018, 02:25:44 PM
I believe that if you sign up for a RealVNC account (free), you will be able to remotely access the Pi without needing to change anything on the router. I haven't tried it myself, but I'm sure details are available on their website.

Thanks to Westie for the prompt on RealVNC cloud usage:

While still mourning the loss of MDWS I have been investigating other options to keep any eye on my son's & daughter's VDSL2 lines remotely having invested in replacement (stat's friendly) routers and RPi Zero W's for both last year, my own line not being such a problem as monitored locally by an old RPi Mk.1B all now running Eric's latest DSLStats V.6.3.

As Westie suggested, set up a free RealVNC account and was surprised just how easy it was to set up the 3 RPi's for remote, cloud access, I still run Raspbian Jessie on the RPi's and VNC Server is fully integrated by default into this system, was already operational for LAN/WiFi local access to manage the respective Pi's, software/program updates etc. when required on the old DSLStats/MDWS set up.
Local access to each RPi is now available either by LAN/WiFi or cloud, an option to still permit local access as well as cloud access is available during the set up procedure, I chose both.

Obviously a poor substitute for MDWS with it's superb data recording, trending and archiving facilities but in my case a partial solution and justification to keep the two remote RPi's operational running DSLStats and will enable me to keep an eye on the families lines performance, with Eric's recent changes to the recording page time scale options on DSLStats Rev.6.3, records archiving space can now be greatly reduced and is easier managed.

Again, many thanks to Eric (Roseway) for so promptly engineering the changes (to date) to DSLStats post MDWS.

Edit:
No changes to any of the routers configurations were required.
Local router as per footer, remote routers, Billion 8800NL r1 and r2.     
Title: Re: Accessing DSLStats remotely
Post by: Westie on March 14, 2018, 03:31:26 PM
...plus I finally got email alerts working in DSLStats.. :)
I'm really struggling with that. I have tried several options: a gmail account, an iCloud account, and a personal domain account, either as originator or recipient of the email (using a different account for sending and receiving), but I cannot seem to get even the test email to work.

I must be doing something dumb, or missing some simple but vital step, but I have no idea what!  :no: I'm running DSLstats experimental v6.3 on a RPi Zero W, and everything else seems to be OK. If anyone else has successfully invoked email alerts on a similar setup I'd welcome a bit of guidance!
Title: Re: Accessing DSLStats remotely
Post by: tiffy on March 14, 2018, 04:02:19 PM
@Westie:
You have likely seen this thread:
http://forum.kitz.co.uk/index.php/topic,15882.60.html
I found the installation of "libssl-dev" was essential to get e-mail elerts working on RPi's.

However, even with "libssl-dev" installed the only e-mail address that would work for me was my native Plusnet address, neither g-mail or live.co.uk addresses would work.

"j0hn" has answered a very recent post regarding DSLStats e-mail elerts using g-mail, something has to be changed on g-mail configuration, can't currently fine the post, he may pop up and advise.

Edit:
I'am still running Raspbian Jessie, never upgraded to "Stretch", don't know if that's relevant.
Title: Re: Accessing DSLStats remotely
Post by: skyeci on March 14, 2018, 04:16:36 PM
you need to "allow less secure apps on the google/gmail side". My pi3 works via gmail no probs..

dsl stats settings on mine is
smtp.gmail.com 
ssl  port 465

Title: Re: Accessing DSLStats remotely
Post by: Westie on March 14, 2018, 07:21:10 PM
Thanks for the input guys...

I installed libssl-dev, but still couldn't get anything to work.

Then I found the missing simple but vital step: I had omitted to tick the box "Send event log alerts"!  :wall: :wall: :paperbag:

It's working fine now! :)
Title: Re: Accessing DSLStats remotely
Post by: gt94sss2 on March 14, 2018, 11:33:59 PM
I'm really struggling with that.

I also spent ages trying to get it to work with gmail before giving up and finding success with the btinternet's smtp server.

I had "allow less secure apps on the google/gmail side" but never installed libssl-dev so perhaps that is where I went wrong


Title: Re: Accessing DSLStats remotely
Post by: tickmike on March 17, 2018, 03:45:13 PM
Quote from: gt94sss2 link=topic=21194
I also spent ages trying to get it to work with gmail before giving up and finding success with the btinternet's smtp server.

Gmail smtp needs port 587 with STARTTLS enabled .
Title: Re: Accessing DSLStats remotely
Post by: Deathstar on March 19, 2018, 03:51:01 PM
Following on from Kitz Thread http://forum.kitz.co.uk/index.php/topic,21237.0.html (http://forum.kitz.co.uk/index.php/topic,21237.0.html) on creating a new custom interface for monitoring of the stats. I've set up port forwarding to allow me to view from outside my network.
All working a treat, however I have a question about security...

Is there anyway to password protect access, as essentially I have a port sat open that has a window into my pi, and potentially network.
Or as I am using the Pi, its inherently safe?

Thoughts?
Title: Re: Accessing DSLStats remotely
Post by: Westie on March 19, 2018, 04:53:40 PM
Current versions of Raspbian include RealVNC Server, which allows remote (secure) access to the Pi. I only use it from within the LAN, but I believe it can also be done over the Internet. Check out their website for details.
Title: Re: Accessing DSLStats remotely
Post by: Deathstar on March 19, 2018, 05:30:10 PM
Current versions of Raspbian include RealVNC Server, which allows remote (secure) access to the Pi. I only use it from within the LAN, but I believe it can also be done over the Internet. Check out their website for details.

That maybe a better idea than using the Webserver for remote viewing.

EDIT - Now using that method. REMOTE VNC.
Title: Re: Accessing DSLStats remotely
Post by: jelv on March 19, 2018, 06:10:45 PM
Why not just password protect it? Loads of pages on t'internet on how to do that such as https://css-tricks.com/easily-password-protect-a-website-or-subdirectory/
Title: Re: Accessing DSLStats remotely
Post by: tiffy on March 19, 2018, 09:12:14 PM
Current versions of Raspbian include RealVNC Server, which allows remote (secure) access to the Pi. I only use it from within the LAN, but I believe it can also be done over the Internet. Check out their website for details.

Are you sure that Raspbian Stretch (the latest version) has RealVNC Server installed by default, I did a trial run on Stretch on a stand alone RPi 3B, all be it as an upgrade from Jessie, found that the  VNC enable option was "greyed out", think I remember reading somewhere just after Stretch release that it did not have RealVNC Server installed by default, I could be wrong !

I'am still running Jessie on my currently active RPi's, VNC Server is certainly installed by default there.

See earlier in this thread ref. my experience with RealVNC over the cloud, have found this really usefull looking after the two remote RPi Zero W's I manage, can even install DSLStats program revisions remotely as well as monitoring the line stat's., certainly a good compromise in my case after the demise of MDWS.
Title: Re: Accessing DSLStats remotely
Post by: Westie on March 19, 2018, 10:50:06 PM
I have two RPi Zero W devices, both running Stretch headlessly and accessed by VNC.

I seem to remember reading somewhere (was it the RealVNC website?), that VNC server is included in the distro but has to be enabled. On my devices it's a radio button under Preferences>Raspberry Pi Configuration>Interfaces on the desktop GUI.
Title: Re: Accessing DSLStats remotely
Post by: tiffy on March 20, 2018, 12:59:26 PM
I have two RPi Zero W devices, both running Stretch headlessly and accessed by VNC.

I seem to remember reading somewhere (was it the RealVNC website?), that VNC server is included in the distro but has to be enabled. On my devices it's a radio button under Preferences>Raspberry Pi Configuration>Interfaces on the desktop GUI.

Thanks for the update, I stand corrected.
My only experience with Stretch to date is performing an upgrade from Jessie on a RPi 3B, in that case the VNC option radio button in Configuration>Interfaces was definately "greyed out", probably would not have been the case with a full clean install even though VNC server was active on the old Jessie revision !

I have a new RPi 3B+ in the post on which I intend to run Stretch so will be in a better position to further educate myself with respect to VNC Server default presence, have absolutely no doubt you will be proved correct, would be a backward step not to include VNC in a later operating system.
Title: Re: Accessing DSLStats remotely
Post by: Westie on March 20, 2018, 01:53:45 PM
I have a new RPi 3B+ in the post on which I intend to run Stretch

If you intend to run DSLstats on it I would be interested to know how you get on.

Since I installed the latest version of DSLstats and enabled the webserver, the RPi Zero W CPU is running at 100% for a significant proportion of the time, so response can be a bit sluggish. Ideally I should like to put the data store on a USB pen drive, but I'm not convinced the RPi could cope.

The 3B+ sounds like an ideal replacement if the router USB can handle the extra current load, but it's a significant investment (relative to a Zero W) and I need to save up some pennies first!
Title: Re: Accessing DSLStats remotely
Post by: tiffy on March 20, 2018, 04:54:23 PM
@Westie:
Yes, I liked the look of the spec's of the new RPi 3B+ so ordered one up to have a play, thought the cost was quite reasonable with no increase from the existing RPi 3B, should be here tomorrow, will report how it performs by comparison to the RPi 3B I am currently running, the old RPi Mk 1B was painfully slow when trying to get kitz's webserver interface working.

To be honest and with absolutely no disrespect to kitz and roseway who have put so much time and effort into the webserver interface, I probably won't be using the browser interface and will likely revert back to my old RPi Mk 1B which is adequate for running DSLStats, it always managed to maintain a 100% upload record on MDWS, unless I'am missing something, the browser interface doesn't currently produce anything more than records to the page time scale chosen in DSLStats with history beyond that point lost.
The extended graph page time scale options Eric has now incorporated into DSLStats will likely be my prefered option with respect to historical data storage.

Historical data file storage to USB pen drive would be an option, don't see why the RPi Zero W could not handle this, worth a try.

I recently invested in a 1000 VA UPS unit so run my local RPi from that via normal, plug top PSU, my two remote RPi Zero W's are powered from their respective routers USB sockets.
However, if you are worried about, wish to monitor USB current consumption (and voltage) of your RPi's or anything else, see this very cheap little device which works really well, I bought one on Amazon some time ago (just to make up an order for free P&P) use it often and have identified a number of suspect, cheap USB plug top phone chargers to date.

https://www.amazon.co.uk/Muker-J7-MultiMeter-Compatible-QC2-0-QC3-0/dp/B01D9IFJGO?th=1

Number of models available with enhanced features, I have the cheapest unit which fulfils all my requirements.

Title: Re: Accessing DSLStats remotely
Post by: Deathstar on March 20, 2018, 06:02:28 PM
The average load on mine since enabling the Webserver is 10%, with a peak of 25% during sampling.
Pi 3B.
Title: Re: Accessing DSLStats remotely
Post by: Westie on March 20, 2018, 10:26:58 PM
@tiffy:
Thanks for the info on the USB meter: I may get one of those little beauties! :)

I too have come to the conclusion that I'll stick with the 'vanilla' DSLstats, and not use the webserver facility. The webserver is good, particularly with kitz' interface, but the RPi ZeroW is just not up to the task of running it. The Pi has 'locked up' a couple of times recently, and since it's only happened since I started running the webserver, I suspect that's the cause.

Edit: I have just stopped the webserver, and the CPU load is at 100% for only short periods now whilst sampling and updating graphs/snapshots.

I may try later with a RPi 3B+, or possibly see what other methods might be developed.  :fingers:
Title: Re: Accessing DSLStats remotely
Post by: Zico on March 21, 2018, 06:47:11 PM
Received my Pi3B+ starter kit today.

Absolutely no idea what I am doing with it (first time Pi) but bought it with the intention to get DSLstats running on it.

I found an old guide to setting up DSLstats on Pi here somewhere but is there a more current guide?

Picked up my Pi from ModMyPi and it's running the current Raspbian 4.9 Stretch.
Title: Re: Accessing DSLStats remotely
Post by: tiffy on March 22, 2018, 12:20:34 PM
@Zico:

If you follow this thread should answer all your questions:
http://forum.kitz.co.uk/index.php/topic,20672.0.html

As you will see in the thread, I had a long struggle to get the "auto-booting" of DSLStats working, this was finally resolved with the help of some of the very knowledgable forum members.
This feature is still worth having to maintain historical records in the event of a power outage but to my mind not just as important now since the sad demise of MDWS.

I note you have bought the full starter kit so will have a mouse, keyboard & display interface available, essential for the initial setup, you can then migrate to running the RPi headless using RealVNC if you so wish retaining the KB, mouse & VDU interface for future use with current or other PI's should the need arise.

The RPi 3B+ will be more than adequate to run DSLStats and the kitz webserver interface if you so wish, a much less powerful model such as the RPi Zero W will suffice if you are running DSLStats alone, I'am still running DSLStats on an old RPi Mk.1B, even lower spec. than the RPi Zero W.

I'am still waiting for a new RPi 3B+ in the post so don't have any personal experience with that model beyond the RPi 3B, probably will be using this for more demanding applications other than router stat's monitoring unless someone comes up with a more comprehensive, local replacement for MDWS in the future.

Good luck with the setup, there's plenty of help on the forum if you get stuck.

Title: Re: Accessing DSLStats remotely
Post by: Westie on March 22, 2018, 03:10:49 PM
@Zico, a few tips:

1. On the Pi, under Preferences>Raspberry Pi Configuration>System, set "Network at Boot" to "Wait for network". If you don't, DSLstats may start before the network is available and therefore fail to connect to the modem.

2. When you unzip the file downloaded from dslstats.me.uk rename the folder to "dslstats" without the version numbers, otherwise the autostart (see below) may not work.

3. Follow roseway's advice (repeated below & modified for current context):
Open your text editor and create a file called dslstats.desktop as below. Save it in /home/pi/.config/autostart/

Contents of dslstats.desktop:

Code: [Select]
[Desktop Entry]
Version=1.0
Type=Application
Name=DSLstats
Exec=/home/pi/dslstats/dslstats

Save this file, then reboot the RPi.

4. Don't forget to set DSLstats to "Autostart recording on program start" (under Configuration>Misc). I didn't do this to begin with, and it took a while to figure out why the program was running, but there were no stats!  :blush:

Hope this helps.
Title: Re: Accessing DSLStats remotely
Post by: Zico on March 22, 2018, 07:51:12 PM
Thanks for the info. I'll give it a try tomorrow/Saturday!
Title: Re: Accessing DSLStats remotely
Post by: tiffy on March 24, 2018, 05:53:05 PM
If you intend to run DSLstats on it I would be interested to know how you get on.

Since I installed the latest version of DSLstats and enabled the webserver, the RPi Zero W CPU is running at 100% for a significant proportion of the time, so response can be a bit sluggish. Ideally I should like to put the data store on a USB pen drive, but I'm not convinced the RPi could cope.

The 3B+ sounds like an ideal replacement if the router USB can handle the extra current load, but it's a significant investment (relative to a Zero W) and I need to save up some pennies first!

Finally received the RPi 3B+ this morning, set up on Raspbian Stretch running DSLStats and the kitz webserver interface on Chromium browser.
As would be expected, by direct comparison to the RPi 3B, everything loads and runs faster with the CPU activity recovering in a shorter time after sampling activity.

For reference, carried out comparative power consumption tests with the RPi 3B using this:
https://www.amazon.co.uk/Muker-J7-MultiMeter-Compatible-QC2-0-QC3-0/dp/B01D9IFJGO?th=1
with suitable adaptors running from a 2 amp, plug top PSU.
Ran both RPi's headless (to avoid mouse & KB loading) with Wi-Fi connection to router.
Ran RealVNC Terminal, DSLStats and the kitz webserver interface to Chromium browser for the tests.

Results:
RPi 3B, program idle, average current, approx. 220 ma.
RPi 3B, program sampling, peak current, approx. 330 ma.

RPi 3B+, program idle, average current, approx. 370 ma.
RPi 3B+, program sampling, peak current, approx. 460 ma.

Ensured that the USB supply voltage remained at or above 5 V. during the testing.
Obviously, difficult to accurately read a transient current on a digital display, sufficient to say in response to the question by Westie that the RPi 3B+ would be very near the 500 ma. current supply limit when powered from a router USB port and probably best separately powered.
Title: Re: Accessing DSLStats remotely
Post by: Westie on March 24, 2018, 06:29:26 PM
Thanks for that, tiffy.

If (when) I get a RPi 3B+, I'll make sure to get the proper power supply too.  :)
Title: Re: Accessing DSLStats remotely
Post by: Zico on March 30, 2018, 06:01:22 PM
Well I'm almost sorted with my Pi and DSLstats.

Thanks for the help with the setup. It's automatically starting up and recording so that's one thing ticked off the list.

Finally got logged in via VNC after a hiccup with the default username/password being case sensitive (guide I had looked at had said 'Pi' so ended up getting the 'too many security failures' message.  Do people recommend changing the default Pi password?

Last, but not least, now I appear to have it up and running and can VNC into it, can I simply just pull the HDMI cable and carry out without doing anything else?
Title: Re: Accessing DSLStats remotely
Post by: Deathstar on March 30, 2018, 06:06:19 PM
Yes, mine is sat behind the router without the HDMI connected.
Only the PSU is plugged in. Using WiFi so no ethernet either.
Title: Re: Accessing DSLStats remotely
Post by: Zico on March 30, 2018, 06:20:27 PM
HDMI unplugged and it's sat beneath my TV in case I need to hook it up to the HDMI again (no HDMI connections on my monitors).

Just spotted on the other thread that there is a new version of DSLstats but I think I will wait for now until I mess around updating it :D
Title: Re: Accessing DSLStats remotely
Post by: tiffy on March 30, 2018, 09:34:44 PM
Congratulations Zico, well done.

As Deathstar has said, if you are using a WiFi link then the only connection required now in "headless" mode is PSU, as reported earlier in this thread, would not advise powering the RPi 3B+ from the modem USB socket as the power consumption is over 500 ma. at times, best to maintain a separate PSU for this RPi model.

Regarding DSLStats program revision updates, very easily done maintaining the "headless" connection mode, just download the new revision on your RPi, un-zip, halt DSLStats, modify auto-start file (and desktop shortcut if applicable) to new program path and instigate a RPi re-boot, your personal settings will be retained as configuration files are stored in a different location to the main program files.
Disconnect VNC session then re-connect after the RPi re-boots, should now be running the new DSLStats program revision.
I find I can even do this remotely on the 2 RPi Zero W's I look after running DSLStats at different locations.

If you wish to connect to your RPi across your LAN from a desktop or laptop PC at file level, I find that FileZilla Client (free use program) is very easy to use for file transfer or any other house keeping operations such as periodically archiving stat's history files to NAS / PC, other utilities are available.
Title: Re: Accessing DSLStats remotely
Post by: Zico on March 31, 2018, 12:58:00 AM
Thanks for additional info Tiffy.

Running my Pi with the official PSU and connected via lan cable (it's sat next to the router) as this is the easiest option for me.

I'll probably wait for a bigger update of DSLstats before I change anything for the time being.

CPU usage on the 3B+ is minimal as far as I can see. I've only set DSLstats to same images once every 24hr's at 23:59 with sampling every 60 seconds.
Title: Re: Accessing DSLStats remotely
Post by: tiffy on March 31, 2018, 12:49:07 PM
@Zico:
Yes, dedicated PSU is the way to go.

LAN connection is fine, you will get the benefit of the new enchansed "almost G.Byte" speed with the RPi 3B+ if your router port supports that, would be surprised if you notice much difference running DSLStats to be honest.
I use a LAN connection on my old RPi 1B as it doesn't directly support Wi-Fi but use Wi-Fi connections on my 2 remote RPi Zero W's just for convenience even though they are mounted directly on their respective routers.
Remember, you also have the option of using a 5 G.Hz band Wi-Fi connection with your RPi 3B+ (new feature) if your router supports this.

There is a DSLStats program update currently pending, see Eric's post's on the v.6.3.4 forum thread so probably wise to wait until that is rolled out at least.
Eric has been very busy with requested changes to DSLStats since the demise of MDWS and program revisions are very frequent at present.   
Title: Re: Accessing DSLStats remotely
Post by: roseway on March 31, 2018, 01:57:32 PM
Quote
There is a DSLStats program update currently pending

That's right. I'll be uploading it shortly, and hopefully it will be the basis of the next full release.