Skip to content

Commit

Permalink
Plugin:Speedtest v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jokob-sk committed Oct 3, 2023
1 parent 71c20e1 commit 1711cbf
Show file tree
Hide file tree
Showing 13 changed files with 854 additions and 275 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ENV USER=pi USER_ID=1000 USER_GID=1000 PORT=20211

RUN apt-get update \
&& apt-get install --no-install-recommends tini snmp ca-certificates curl libwww-perl arp-scan perl apt-utils cron sudo nginx-light php php-cgi php-fpm php-sqlite3 php-curl sqlite3 dnsutils net-tools python3 iproute2 nmap python3-pip zip systemctl usbutils traceroute -y \
&& pip3 install requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi \
&& pip3 install requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \
&& apt-get clean autoclean \
&& apt-get autoremove \
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ _PiAlert combines several network and other scanning tools 🔍 with notificatio

Setup a _kill switch ☠_ for your network via a smart plug with the available [Home Assistant](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HOME_ASSISTANT.md) integration. Implement custom automations with the [CSV device Exports 📤](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins/csv_backup), [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md), or [API endpoints](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md) features.

Extend the app if you want to create your own scanner and handle the results and notifications in PiAlert. Check available [Plugins & Instructions](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins). Looking forward to your contributions if you decide to share your work with the community ❤.
Extend the app if you want to create your own scanner and handle the results and notifications in PiAlert. Check available [Plugins & Instructions](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins).

Looking forward to your contributions if you decide to share your work with the community ❤.

| ![Main screen][main] | ![Screen 1][screen1] | ![Screen 5][screen5] |
|----------------------|----------------------| ----------------------|
Expand Down
9 changes: 5 additions & 4 deletions front/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,25 @@
| | Yes | ARPSCAN | Script | 📚[arp_scan](/front/plugins/arp_scan/) |
| | | CSVBCKP | Script | 📚[csv_backup](/front/plugins/csv_backup/) |
| Yes* | | DBCLNP | Script | 📚[db_cleanup](/front/plugins/db_cleanup/) |
| | | DDNS | Script | 📚[ddns_update](/front/plugins/ddns_update/) |
| | | DDNS | Script | 📚[ddns_update](/front/plugins/ddns_update/) |
| | Yes | DHCPLSS | Script | 📚[dhcp_leases](/front/plugins/dhcp_leases/) |
| | | DHCPSRVS | Script | 📚[dhcp_servers](/front/plugins/dhcp_servers/) |
| | Yes | INTRNT | Script | 📚[internet_ip](/front/plugins/internet_ip/) |
| Yes | | NEWDEV | Template | 📚[newdev_template](/front/plugins/newdev_template/) |
| | | PHOLUS | Script | 📚[pholus_scan](/front/plugins/pholus_scan/) |
| | | NMAP | Script | 📚[nmap_scan](/front/plugins/nmap_scan/) |
| | Yes | PIHOLE | External SQLite DB | 📚[pihole_scan](/front/plugins/pihole_scan/) |
| | | SETPWD | Script | 📚[set_password](/front/plugins/set_password/) |
| | | SNMPDSC | Script | 📚[snmp_discovery](/front/plugins/snmp_discovery/) |
| | Yes* | UNDIS | Script | 📚[undiscoverables](/front/plugins/undiscoverables/) |
| | Yes** | UNDIS | Script | 📚[undiscoverables](/front/plugins/undiscoverables/) |
| | Yes | UNFIMP | Script | 📚[unifi_import](/front/plugins/unifi_import/) |
| | | VNDRPDT | Script | 📚[vendor_update](/front/plugins/vendor_update/) |
| | | WEBMON | Script | 📚[website_monitor](/front/plugins/website_monitor/) |
| N/A | | N/A | SQL query | N/A, but the External SQLite DB plugins work similar |

> \* The Undiscoverables plugin (`UNDIS`) inserts only user-specified dummy devices.
>

> \* The database cleanup plugin (`DBCLNP`) is not _required_ but the app will become unusable after a while if not executed.
> \** The Undiscoverables plugin (`UNDIS`) inserts only user-specified dummy devices.
> [!NOTE]
> You soft-disable plugins via Settings or completely ignore plugins by placing a `ignore_plugin` file into the plugin directory. The difference is that ignored plugins don't show up anywhere in the UI (Settings, Device details, Plugins pages). The app skips ignored plugins completely. Device-detecting plugins insert values into the `CurrentScan` database table. The plugins that are not required are safe to ignore, however it makes sense to have a least some device-detecting plugins (that insert entries into the `CurrentScan` table) enabled, such as ARPSCAN or PIHOLE.
Expand Down
2 changes: 1 addition & 1 deletion front/plugins/arp_scan/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
{
"function": "RUN_SCHD",
"type": "text",
"default_value":"*/3 * * * *",
"default_value":"*/5 * * * *",
"options": [],
"localized": ["name", "description"],
"name" : [{
Expand Down
2 changes: 1 addition & 1 deletion front/plugins/ddns_update/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"function": "RUN",
"events": ["run"],
"type": "text.select",
"default_value": "schedule",
"default_value": "disabled",
"options": [
"disabled",
"once",
Expand Down
2 changes: 1 addition & 1 deletion front/plugins/internet_ip/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"description": [
{
"language_code": "en_us",
"string": "Only enabled if you select <code>schedule</code> in the <a href=\"#INTRNT_RUN\"><code>INTRNT_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
"string": "Only enabled if you select <code>schedule</code> in the <a href=\"#INTRNT_RUN\"><code>INTRNT_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes. It's recommended to use the same schedule interval for all plugins responsible for discovering new devices."
},
{
"language_code": "es_es",
Expand Down
11 changes: 11 additions & 0 deletions front/plugins/internet_speedtest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Overview

A simple plugin allowing for executing regular internet speed tests.

### Usage

- N/A

### Notes

- N/A
Loading

0 comments on commit 1711cbf

Please sign in to comment.