Skip to content

Commit

Permalink
Merge pull request #9 from waluwaz/develop
Browse files Browse the repository at this point in the history
For version 0.4 with install from github
  • Loading branch information
waluwaz authored Mar 25, 2022
2 parents 6080110 + ec58828 commit 816daa7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 28 deletions.
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
# modmon
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/91af8db9cd354643a8ef6a7117be90fb)](https://www.codacy.com/app/jackyaz/modmon?utm_source=github.com&utm_medium=referral&utm_content=jackyaz/modmon&utm_campaign=Badge_Grade)
![Shellcheck](https://github.com/jackyaz/modmon/actions/workflows/shellcheck.yml/badge.svg)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/91af8db9cd354643a8ef6a7117be90fb)](https://www.codacy.com/app/waluwaz/modmon?utm_source=github.com&utm_medium=referral&utm_content=waluwaz/modmon&utm_campaign=Badge_Grade)
![Shellcheck](https://github.com/waluwaz/modmon/actions/workflows/shellcheck.yml/badge.svg)

## v0.3.0-beta
### Updated on 2022-03-24
## v0.4.0-beta
### Updated on 2022-03-25
## About
modmon is a tool that tracks your cable modem's stats (such as signal power levels) for AsusWRT Merlin with charts for daily, weekly and monthly summaries. It was created by JackYaz. This repository has a derivative work based on modmon and customized to work with another modem, the Technicolor CGA4233 from VOO in Belgium. It doesn't have a specific name, because I'm not sure how to change the name without breaking it ;-) ; also because it probably couldn't coexist with the original modmon, and finally because I can't imagine a scenario where someone would concurrently need the original modmon and my hack.
modmon is a tool that tracks your cable modem's stats (such as signal power levels) for AsusWRT Merlin with charts for daily, weekly and monthly summaries. It was created by JackYaz.
This repository has a derivative work based on modmon and customized to work with another modem, the Technicolor CGA4233 from VOO in Belgium. It doesn't have a specific name, because I'm not sure how to change the name without breaking it ;-) ; also because it probably couldn't coexist with the original modmon, and finally because I can't imagine a scenario where someone would concurrently need the original modmon and my hack as I'm not aware anyone in Belgium (or anywhere else) would have the option to use the target modem of this and the target modem of the original modmon.

So, my work tries to support the Technicolor CGA4233 from VOO in Belgium. Compared to the version of Jack, it hammers the modem every 15 minutes. It probably needs you to update the curl command around line 815 of modmon.sh, and paste the tokens for PHP session and authentication (also in CSRF). I got them with F12 (Developer tools)/Network/Reload/Copy as curl.
So, my work tries to support the Technicolor CGA4233 from VOO in Belgium. Compared to the version of Jack, it hammers the modem every 15 minutes. It possibly needs you to update the curl command around line 815 and 1044 of modmon in /jffs/scripts, and paste the tokens for PHP session and authentication (also in CSRF). I got them with F12 (Developer tools)/Network/Reload/Copy as curl while accessing the VOO webui. (If this is completely mysterious to you, this beta software might not be a satisfying experience for you.)

modmon voo is free to use under the [GNU General Public License version 3](https://opensource.org/licenses/GPL-3.0) (GPL 3.0).

If you have yet another modem, you can also look at the branch https://github.com/waluwaz/modmon/tree/Example-of-minimum-changes-for-new-modem-support (or version 0.1 in master). It's an example of a simple dirty approach at supporting another modem, roguely sticking new metrics in the original 6 metrics of modmon.
Since version 0.2, this is customized to use its own framework of 7 metrics, in line with what's available from the VOO modem.

### Supporting development
Love the script ? Any and all donations gratefully sent to JackYaz who did 100% of the work for the original modmon, which means 99% of the work for this. For more reliability, please navigate to Jack's repo and click Paypal from his repo.
Love the script ? Any and all donations gratefully sent to JackYaz who did 100% of the work for the original modmon, which means 95% of the work for this. For more reliability, please navigate to Jack's repo and click Paypal from his repo. If you insist on supporting "me", please do send the money to your favourite charity.

## Recommended firmware versions
You must be running firmware Merlin 384.15/384.13_4 or Fork 43E5 (or later) [Asuswrt-Merlin](https://www.asuswrt-merlin.net/)

## Installation
Install the original modmon from JackYaz in version 1.1.8. See his instructions.
Replace the modmon file in /jffs/scripts with the modmon.sh from my repo. ! The name in the router must be modmon, not modmon.sh.
(NB: In the future, I might customize other files which would also need to be copied to the router. The commit dates might give you a clue.) Also update the .asp file at /jffs/addons/modmon.d
The modmon file on the router must be executable (chmod a+x).
I guess my Master branch is your best bet.
WARNING:
This addon doesn't have a community of testers. I don't have the skills of regular addon writers. Use at your own risk.
If you don't have a backup router, remember that you're risking the stability of a critical piece of your infrastructure, with mostly unsupported/untested software.
Moreover, information might be power, but the addon is unlikely to inform you of anything that you will have direct control on.
Indirectly, charts and figures might help you convincing your ISP to seriously adress issues though, if you do experience issues (e.g. excessive packet drops).

If you do have the original modmon, installing this will wipe the original modmon file in /jffs/scripts and .asp file in /jffs/addons/modmon.d. It will also add tables in the database. It will replace the original both for the commond-line interface, and in the webUI.

Alternatively, if you are feeling lucky, you could try the following, untested approach to install:
So, if you still want to install...

Using your preferred SSH client/terminal, copy and paste the following command, then press Enter:

```sh
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/waluwaz/modmon/master/modmon.sh" -o "/jffs/scripts/modmon" && chmod 0755 /jffs/scripts/modmon && /jffs/scripts/modmon install
```

And anyway, don't forget the special dance to adapt the script to an active session. See above. This modification might have to be renewed, e.g. if the modem reboots for instance.
If it doesn't work, consider adapting the script to an active session. See above. This modification might have to be renewed, e.g. if the modem reboots for instance. If it still doesn't work, you could test another add-on from JackYaz. There might be some prerequisites that I forgot to mention.

## Usage
### WebUI
modmon can be configured via the WebUI, in the Addons section.
modmon can be configured via the WebUI, in the Addons section. I recommend you use USB and not JFFS, in those settings. See the statement from RMerlin at https://github.com/RMerl/asuswrt-merlin.ng/wiki/JFFS.

### Command Line
To launch the modmon menu after installation, use:
Expand All @@ -50,7 +56,7 @@ If this does not work, you will need to use the full path:
```

## Screenshots
See Jack's repo for the flavour of the UI.
See Jack's repo for a flavour of the UI. Except that the 7 metrics here are a bit different from the 6 metrics in the original modmon, it's globally similar.

See below for a sample with this script and a modem from VOO. Notice how, at least in my street, the modem uses 16 channels, ranging from 1 to 22 (typically 1-16; or another blend with 19-22, and without 5-8). Look at the "Frequency" chart, approx. Chart Nr 4.
![](/documentation/Technicolor_CGA4233_VOO/Screenshot%202022-03-21%20at%2021-53-20%20modmon.png)
Expand All @@ -59,14 +65,9 @@ See below for a sample with this script and a modem from VOO. Notice how, at lea
You can post about any issues and problems here: [Asuswrt-Merlin AddOns on SNBForums](https://www.snbforums.com/forums/asuswrt-merlin-addons.60/?prefix_id=21)
but I don't get there often, and I probably won't be available to help.

I guess you already understood, this is not a well-rounded solution for a large audience. This is proof that it could work for me; and if your setup is similar; and you have a similar skillset, you will probably be able to get there with less effort than I did originally. Use it if you like, if you are interested in experimenting, not if you need a reliable solution.
I guess you already understood, this is not a well-rounded well-tested solution for a large audience. This is proof that it could work for me; and if your setup is similar; and you have a similar skillset, you will probably be able to get there with less effort than I did originally. Use it if you like, if you are interested in experimenting, not if you need a reliable solution.

Known issues:
The choice of timeslice (daily, weekly, monthly) should apply to all graphs.
The choice of timeslice (daily, weekly, monthly) should apply to all graphs. Because it does not, RxPwr_daily might have to display 16 lines/channels while RxCorrected_weekly would have to display 20 lines/channels. This makes the filtering from the global Rx channels selection a bit un-intuitive.
Legend is so dynamic that channel 22 in chart A may have a different colour than 22 in chart B, and different between
chart produced today, or tomorrow (because Channel 22 has suddenly appeared overnight).
Count of "graphic lines" in charts is somewhat buggy. The filtering is usually not display, even though it shoud be displayed.
!! Filtering not working on Uncorrectable, that has only 16 channels, instead of 20. This was due to an oddity in data, due to the DB having unbalanced data. Like RxPwr had all data, and Uncorrectables had less data point (less timestamps and less channels)


?? debug draw_chart
4 changes: 2 additions & 2 deletions modmon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

### Start of script variables ###
readonly SCRIPT_NAME="modmon"
readonly SCRIPT_VERSION="v0.3.0-beta"
readonly SCRIPT_VERSION="v0.4.0-beta"
SCRIPT_BRANCH="master"
SCRIPT_REPO="https://raw.githubusercontent.com/waluwaz/$SCRIPT_NAME/$SCRIPT_BRANCH"
readonly SCRIPT_DIR="/jffs/addons/$SCRIPT_NAME.d"
Expand Down Expand Up @@ -556,7 +556,7 @@ Mount_WebUI(){
mount -o bind /tmp/menuTree.js /www/require/modules/menuTree.js
fi
flock -u "$FD"
Print_Output true "Mounted $SCRIPT_NAME WebUI page as $MyPage" "$PASS"
Print_Output true "Mounted $SCRIPT_NAME WebUI page as $MyPage . Harvesting stats for a few minutes, please be patient..." "$PASS"
}

ScriptStorageLocation(){
Expand Down
Loading

0 comments on commit 816daa7

Please sign in to comment.