Posted: Thu Aug 25, 2016 5:33 Post subject: Problem loading yamon usage page on OpenWRT
Hi Al,
Thanks once again for the Yamon Concept. I did not receive any reply from anyone so hope you can help me out here. Here is my original post again:
I am having problem loading the YAMon3 usage webpage on my OpenWRT router. My setup is as under:
1) TP-Link TL-MR3220 running OpenWRT Barrier Breaker 14.07
2) ext4 4GB formatted partition on 8GB USB drive with mount /opt
3) YAMon3 downloaded and installed in /opt/YAMon3.
4) I see hourly data files being updated in /opt/YAMon3/data.
5) In OpenWRT, the server document root is /www and not /tmp/www, so changed the same in config.file.
6) Added following symlinks in /www:
ln -s /opt/YAMon3/www/css css
ln -s /opt/YAMon3/www/iamges images
ln -s /opt/YAMon3/data data
ln -s /opt/YAMon3/www/yamon3.html yamon3.html
7) js folder created in /www and live_data3.js file present in the folder. But config3.js not present and so copied it from /tmp/www/js to /www/js.
Error:
Going to: http://192.168.1.1/yamon3.html yields Forbidden: You do not have permission to access /yamon3.html on this server.
How to access report from browser.
Is there some permission settings in the file/router that need to be set?
Do I need to add some symlink to a path?
I will verify the same and reply back to you.
I think the /user is for DD-WRT. I am using OpenWRT where the server document root is /www and not /tmp/www.
I just what to says thanks, for developing this great app for DDWRT. I'm currently using it on my R7000 (with KongAC build 30465) home network and it has been working great.
Now it's time for me to Donate.
Keep up the great work! _________________ Home Network on Telus 1Gb PureFibre - 10GbE Copper Backbone
2x R7800 - Gateway & WiFi & 3xWireGuard - DDWRT r53562 Std k4.9
Off Site 1
R7000 - Gateway & WiFi & WireGuard - DDWRT r54517 Std
E3000 - Station Bridge - DDWRT r49626 Mega K4.4
Off Site 2
R7000 - Gateway & WiFi - DDWRT r54517 Std
E2000 - Wired ISP IPTV PVR Blocker - DDWRT r35531
I just what to says thanks, for developing this great app for DDWRT. I'm currently using it on my R7000 (with KongAC build 30465) home network and it has been working great.
Now it's time for me to Donate.
Keep up the great work!
Evangelos - Thanks for the kind words. I'm pleased to hear that YAMon is useful to you. Please let me know if you want any feature improvements!
And thank you (and everyone else who's contributed in the past) for your generous donations! They go a long way towards offsetting my costs for this little project (webhosting, test routers, etc.)
For anyone else who is collecting donations on their sites, I recently changed to the new (to me at least) `paypal.me` links in YAMon - e.g., https://www.paypal.me/YAMon/. It is a much simpler setup than their previous form-based format.
LBNL (and opefully this is not too mercenary but) an alternative to donating is clicking one of the ads at http://usage-monitoring.com
I changed the day number in the config.file from 19 to 20. In the settings tab it still shows 19. I have shutdown and restarted the script a couple of times. I have also selected the reset settings button on the settings page - how do I reread the config.file to reflect the change. _________________ Cohasset(Near Chico), CA
Buffalo WZR-600Dhp
DD-WRT v24SP2-MULTI (11/04/12) std
(SVN revision 20180)
I changed the day number in the config.file from 19 to 20. In the settings tab it still shows 19. I have shutdown and restarted the script a couple of times. I have also selected the reset settings button on the settings page - how do I reread the config.file to reflect the change.
That's one thing I've asked myself about being able to change the day as my ISP floats me by a day sometimes but to do what you after. Gotta clear the browser cache for the router site. In my case 192.168.1.1... or you can try ctrl+f5 which probably wont work.
Why some of that data is locally stored and supersedes the files is beyond me. _________________
Greetings Al! (and also any Tomato users out there)
I recently converted to Tomato (after verifying that I could still use YAMon, since I can't live without it anymore). Upon installing I noticed that the support doesn't seem to be 100% there yet, and I've also seen a few other users asking, so I spent some time figuring out what is wrong. Hopefully this will be useful to other Tomato users, and hopefully to Al for adding full support.
Here are the issues I ran into under Tomato (using dd-wrt as the firmware choice in the settings, for now):
1) Different locations for _dnsmask_conf and _dnsmask_leases (config.file settings):
_dnsmasq_conf="/tmp/etc/dnsmasq.conf"
_dnsmasq_leases="/tmp/var/lib/misc/dnsmasq.leases"
2) Different location for www files (config.file setting):
_wwwPath="/www/ext/"
3) Issues with the getDeviceName() logic within the yamon script (which only affects the device name detection when adding new devices to users.js). I found that the "Asuswrt" logic (firmware "2") in that function seemed to do the trick as long as I changed the nvram setting to "dhcpd_static=" in this line:
local nvr=$(nvram show 2>&1 | grep -i "dhcpd_static=")
Also the _dnsmasq_conf logic in that section was only able to retrieve the machine ip in my case rather than the machine name (but perhaps that is expected or common, since that name seems to be optional)
4) A bit of struggle about where to put the startup/shutdown scripts. Initially I used the USB "before mounting" script, but found that it would fail because the time wasn't set yet on the router, and it actually couldn't be set yet since the WAN isn't up at that point. Eventually I moved my startup script (which contains YAMon3/startup.sh) to the Administration scripts for "WAN Up" which solved that issue. I left the YAMon3/shutdown.sh command in the USB "Run before unmounting" section because it seemed to me like the most logical place. For reference, those two script settings are stored in nvram as "script_wanup" and "script_usbumount".
With those changes, and as far as I can tell after very limited testing, everything is working well.
Thanks for these tips, I am running Tomato 1.28.0000 MIPSR2-138 K26AC USB AIO-64K on an Asus RT-AC66U, got a few errors during the install of yamon3 but kept going, it didn't work at first so came to the forum hoping for some luck. I found this post and it helped a lot, the tweaks to the config.file finally displayed the website but the odd thing is there's no data at all. I can see a few devices added to the users.js file and I think I see data being captured in the hourly_data.js file but the site shows nothing.
I have yamon3 running on two other routers flashed with DD-WRT, those are working, so I can probably just re-flash this router as well and move on but now I am curious why it's not working in Tomato so any help would be appreciated, thanks.
I found this post and it helped a lot, the tweaks to the config.file finally displayed the website but the odd thing is there's no data at all. I can see a few devices added to the users.js file and I think I see data being captured in the hourly_data.js file but the site shows nothing.
Check the hourly file and/or the log file to see what if anything is getting added to those file. If nothing of significance is being added to the hourly file set _loglevel=0 (or -1) in config.file, let it run for a while and then send it to questions@usage-monitoring.com. If all of the devices have zero traffic, check your DNS settings.
If the hourly file is being populated and your are getting nothing in the reports then take a look at the JS console (activated by typing <ctrl>+<shift>+`J` (in Firefox and Chrome).
Look in particular for an error message that includes yamon3.0.js or util3.0.js... once again, send info to questions@usage-monitoring.com.
I changed the day number in the config.file from 19 to 20. In the settings tab it still shows 19. I have shutdown and restarted the script a couple of times. I have also selected the reset settings button on the settings page - how do I reread the config.file to reflect the change.
That's one thing I've asked myself about being able to change the day as my ISP floats me by a day sometimes but to do what you after. Gotta clear the browser cache for the router site. In my case 192.168.1.1... or you can try ctrl+f5 which probably wont work.
Why some of that data is locally stored and supersedes the files is beyond me.
Why is the ISP reset date changing?!? If you've changed ISP's and the date moves that is understandable. I cannot fathom why it would change otherwise. Can you explain?
YAMon was not really designed to work with a frequently moving reset date... that may take some work.
Back to the question at hand: why does the JS load the reset date from the LocalStorage variable rather than the config.js?
That was a bug and I've fixed it. Give it another try (but you'll likely need to force a refresh by typing <ctrl>+F5
yamon3.0.js:109 Uncaught ReferenceError: resetdates is not defined _________________ Cohasset(Near Chico), CA
Buffalo WZR-600Dhp
DD-WRT v24SP2-MULTI (11/04/12) std
(SVN revision 20180)
That fixed it, thank you. And my isp day changed, as well. _________________ Cohasset(Near Chico), CA
Buffalo WZR-600Dhp
DD-WRT v24SP2-MULTI (11/04/12) std
(SVN revision 20180)
Joined: 06 Aug 2016 Posts: 9 Location: Mississauga, Ontario, Canada
Posted: Mon Aug 29, 2016 0:12 Post subject:
Hi all.. newbie here
I am trying to install Yamon3 on /jffs on my EA6300v1 (DD-WRT v3.0-r30432 std (08/16/16)). I have formatted a 16GB USB as ext4, volume label is jffs so it gets mounted to /jffs automatically.. do I still need to enable jffs2 support via the Administration tab? Is it also required if I want to use ipkg even if the USB gets mounted to /jffs automatically?
I am trying to install Yamon3 on /jffs on my EA6300v1 (DD-WRT v3.0-r30432 std (08/16/16)). I have formatted a 16GB USB as ext4, volume label is jffs so it gets mounted to /jffs automatically.. do I still need to enable jffs2 support via the Administration tab? Is it also required if I want to use ipkg even if the USB gets mounted to /jffs automatically?
You'll be better off splitting the usb with a jffs and a opt volume. _________________ Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php