This branch contains the original dashboard based on Google's now defunct Fusion Tables. Please see the work in progress for the new dashboard here
The following will describe the method used and explain how to setup and use this utility to get a dashboard to view the modem status of an LTE modem installed on a device/system that has ModemManager.
With little customization, it can be adopted to work without ModemManger if you have another way of getting access to the modem via AT commands. (This will not be explained as it is not the focus of this utility)
The utlity is also geared towards a system running OpenWrt/LEDE with LuCI - however it is optional.
The design was focus on not storing data on the device but on cloud storage and not having special utilities locally to graph the data. It utilizes Google Fusion tables to store data and Google Visualization to provide the graphs.
The other focus on the design was to use the fewest number of pieces (files) on the system. Apart from the 3rd party utility used to interact with Google Fusion tables, there are only three files required:
- getModemData.sh - this queries the modem via ModemManager's mmcli utility to get modem data and insert into your Google Fusion table
- stopModemData.sh - this is optional. It is used for LuCI custom command to stop the collection of modem data.
- ms.html - this is used to provide the dashboard. It queries the Google Fusion table and graphs the data. This file can actually be hosted on any system.
- If using ModemManager, start it in Debug mode
- Have Bash shell installed
- The first thing you'll want to do is get your Google Fusion table created. If you are not familiar with this, please refer to this video for reference.
- Create a schema with these columns:
- All columns except DATE are of:
- DATE column is:
-
Make the table accessible for reading without having to use OAuth by Sharing it with
Anyone who has the link can view
rights. -
Note down your Table ID.
- Now, we need a utlity to populate the Fusion Table we get from the modem. To do so, we'll use this utility. We only need to get the ftapi folder. Infomation on how to setup the credential and other access can be found in it's README.html file (which you'll want to view in a browser after downloading).
- You'll want to also incorporate this PR.
- Place the ftapi folder and all its content in
/root/
- Simply place the
getModemData.sh
file in/root/ftapi/
- Make it executable (if required) by issuing
chmod +x /root/ftapi/getModemData.sh
- Open
getModemData.sh
and replace<YOUR_TABLEID>
with the Table ID of your table noted down in Step 4 of the first setup section. - OPTIONAL - If you want to run this everytime your system starts, put the following line in
/etc/rc.local
just beforeexit 0
/root/ftapi/getModemData.sh &
- Place the file
ms.html
into/www/
- If required, give the file these permission
chmod 644 /www/ms.html
- Open
/www/ms.html
and replace (around line 14)<YOUR_TABLEID>
with the Table ID of your table noted down in Step 4 of the first setup section.
- First, you'll need to put
stopModemData.sh
into/root/ftapi/
(Can be placed in another location if so desired) - Make it executable (if required) by issuing
chmod +x /root/ftapi/stopModemData.sh
- Go to LuCI Custom Commands section of the modem UI, and enter these:
- To Start:
- To Stop:
- Press
RUN
on the Start script
The dashboard can be viewed at https://<modem hostname, dns, ip>/ms.html
- Google does have API limits that may come into play. I believe they are 25,000 per day and 200 every 100 seconds.
- Display current band
- Mobile friendly/responsive UI
- Prune table