Open Stationary-1 opened 1 day ago
Hi @Stationary-1 ,
Thanks a lot for the detailed description. This helps a lot when debugging things and reducing back and forth questions 👍
It's weird that for me the download speed shows up. Can you try one of the following?
You can run the plugin manually if you are not sure that the app.log contains the relevant section. SSH into the container and run python3 /app/front/plugins/internet_speedtest/script.py
if needed.
I'm looking for the log entry (you can search your existing log if you can find it - this is only available in the netalertx-dev branch for now - which I think you are running):
[INTRSPD] Result (down|up)
The whole log entry should look something like:
03:31:32 [INTRSPD] Result (down|up): 32.79 Mbps|19.18 Mbps
03:31:32 [Plugins] Processing file "/app/front/plugins/internet_speedtest/last_result.log"
03:31:32 [Plugins] SUCCESS, received 1 entries
03:31:32 [Plugins] sqlParam entries: [(0, 'INTRSPD', 'Speedtest', '2024-10-20 03:31:32+11:00', 'null', '2024-10-20 03:31:32', '32.79', '19.18', 'null', 'null', 'not-processed', 'null', 'null', 'null', '', '', '', '', '')]
03:31:32 [Plugins] Processing : INTRSPD
03:31:32 [Plugins] Existing objects from Plugins_Objects: 2568
03:31:32 [Plugins] Logged events from the plugin run : 1
03:31:32 [Plugins] pluginEvents count: 1
03:31:32 [Plugins] pluginObjects count: 2569
03:31:32 [Plugins] events_to_insert count: 0
03:31:32 [Plugins] history_to_insert count: 2569
03:31:32 [Plugins] objects_to_insert count: 1
03:31:32 [Plugins] objects_to_update count: 2568
I also noticed some console errors in your screenshot, can you switch to the browser console and share those?
Hope the above will give me hints what to fix.
Thanks in advance, j
These are the messages displayed in the console:
(1)
(2)
(3)
(4)
(5)
(6)
(7)
The app.log data will follow in the next message.
This is the app.log entry for the INTRSPD which I have run now manually:
11:19:38 [MAIN] Process: Wait
11:20:24 [2024-10-20 11:20:24+02:00] START Run: INTRSPD
11:20:24 [Plugins] Executing: python3 /app/front/plugins/internet_speedtest/script.py
11:20:25 [INTRSPD] In script
11:20:48 [INTRSPD] Result (down|up): 78.05 Mbps|24.45 Mbps
11:20:48 [HELPER] â ERROR not processed set_type: {'dataType': 'string', 'elements': [{'elementType': 'input', 'elementOptions': [{'cssClasses': 'col-xs-12'}], 'transformers': []}, {'elementType': 'button', 'elementOptions': [{'getStringKey': 'Gen_Generate'}, {'customParams': 'SYNC_encryption_key'}, {'onClick': 'generateApiToken(this, 30)'}, {'cssClasses': 'col-xs-12'}], 'transformers': []}]}
11:20:48 [HELPER] â ERROR not processed set_value:
11:20:48 [Plugins] SUCCESS, received 1 entries
11:20:48 [API] Updating table_appevents.json file in /front/api
11:20:48 [API] Updating table_plugins_history.json file in /front/api
11:20:48 [API] Updating table_plugins_objects.json file in /front/api
11:20:48 [2024-10-20 11:20:48+02:00] END Run: INTRSPD
11:20:53 [Plugin utils] ---------------------------------------------
The one which has run automatically this morning looks like this:
06:01:10 [Plugin utils] ---------------------------------------------
06:01:10 [Plugin utils] display_name: Internet speedtest
06:01:10 [Plugins] Executing: python3 /app/front/plugins/internet_speedtest/script.py
06:01:10 [INTRSPD] In script
06:01:31 [INTRSPD] Result (down|up): 135.74 Mbps|29.95 Mbps
06:01:32 [HELPER] â ERROR not processed set_type: {'dataType': 'string', 'elements': [{'elementType': 'input', 'elementOptions': [{'cssClasses': 'col-xs-12'}], 'transformers': []}, {'elementType': 'button', 'elementOptions': [{'getStringKey': 'Gen_Generate'}, {'customParams': 'SYNC_encryption_key'}, {'onClick': 'generateApiToken(this, 30)'}, {'cssClasses': 'col-xs-12'}], 'transformers': []}]}
06:01:32 [HELPER] â ERROR not processed set_value:
06:01:32 [Plugins] SUCCESS, received 1 entries
06:01:32 [API] Updating table_appevents.json file in /front/api
06:01:32 [API] Updating table_plugins_history.json file in /front/api
06:01:32 [API] Updating table_plugins_objects.json file in /front/api
06:01:32 [Process Scan] Exclude ignored devices
06:01:32 [Process Scan] Processing scan results
06:01:32 [Process Scan] Print Stats
06:01:32 [Scan Stats] Devices Detected.......: 21
06:01:32 [Scan Stats] New Devices............: 0
06:01:32 [Scan Stats] Down Alerts............: 0
06:01:32 [Scan Stats] New Down Alerts........: 0
06:01:32 [Scan Stats] New Connections........: 10
06:01:32 [Scan Stats] Disconnections.........: 1
06:01:32 [Scan Stats] IP Changes.............: 4
06:01:32 [Scan Stats] Scan Method Statistics:
06:01:32 INTRNT: 1
06:01:32 arp-scan: 19
06:01:32 local_MAC: 1
06:01:32 [Process Scan] Stats end
06:01:32 [Process Scan] Sessions Events (connect / disconnect)
06:01:32 [Process Scan] Creating new devices
06:01:32 [Process Scan] Updating Devices Info
06:01:32 [Process Scan] Voiding false (ghost) disconnections
06:01:32 [Process Scan] Pairing session events (connection / disconnection)
06:01:32 [Process Scan] Creating sessions snapshot
06:01:32 [Process Scan] Inserting scan results into Online_History
06:01:32 [Process Scan] Skipping repeated notifications
06:01:32 [Skip Repeated Notifications] Skip Repeated
06:01:32 [Plugin utils] ---------------------------------------------
Hi @Stationary-1 ,
Thanks a lot! I cam see that this indicates that the data is captured by the plugin:
06:01:31 [INTRSPD] Result (down|up): 135.74 Mbps|29.95 Mbps
Hummm, can you also post the app.log line where the data gets saved in the DB, something like:
03:31:32 [Plugins] sqlParam entries: [(0, 'INTRSPD', 'Speedtest', '2024-10-20 03:31:32+11:00', 'null', '2024-10-20 03:31:32', '32.79', '19.18', 'null', 'null', 'not-processed', 'null', 'null', 'null', '', '', '', '', '')]
If it's not in your log, make sure the LOG_LEVEL
is set to debug
. I want to make sure the data is passed to the SQL query correctly.
Just checking, in the Integrations -> Plugins -> Internet speed -> Events History - are the data in there or are they missing too?
Thanks in advance!
in the Integrations -> Plugins -> Internet speed -> Events History - are the data in there or are they missing too?
There the data is visible:
I also have an interesting one for you: Where the speedtest has been initiated manually, in one case both up and down is filled in the plugin objects (11:20) in another case (12:25) not. When it runs automatically, so far it only shows the upload:
I'll check the log with log_level debug and post that in the next message.
app.log with log level set to debug:
12:33:56 [2024-10-20 12:33:56+02:00] START Run: INTRSPD
12:33:56 [Plugins] Timeout: 300
12:33:56 [Plugin utils] Pre-Resolved CMD: python3/app/front/plugins/internet_speedtest/script.py
12:33:56 [Plugins] Executing: python3 /app/front/plugins/internet_speedtest/script.py
12:33:56 [Plugins] Resolved : ['python3', '/app/front/plugins/internet_speedtest/script.py']
12:33:56 [INTRSPD] In script
12:34:17 [INTRSPD] Result (down|up): 133.5 Mbps|29.69 Mbps
12:34:17 [HELPER] ⚠ ERROR not processed set_type: {'dataType': 'string', 'elements': [{'elementType': 'input', 'elementOptions': [{'cssClasses': 'col-xs-12'}], 'transformers': []}, {'elementType': 'button', 'elementOptions': [{'getStringKey': 'Gen_Generate'}, {'customParams': 'SYNC_encryption_key'}, {'onClick': 'generateApiToken(this, 30)'}, {'cssClasses': 'col-xs-12'}], 'transformers': []}]}
12:34:17 [HELPER] ⚠ ERROR not processed set_value:
12:34:17 [Plugins] Processing file "/app/front/plugins/internet_speedtest/last_result.log"
12:34:17 [Plugins] SUCCESS, received 1 entries
12:34:17 [Plugins] sqlParam entries: [(0, 'INTRSPD', 'Speedtest', '2024-10-20 12:34:17+02:00', 'null', '2024-10-20 12:34:17', '133.5', '29.69', 'null', 'null', 'not-processed', 'null', 'null', 'null', '', '', '', '', '')]
12:34:17 [Plugins] Processing : INTRSPD
12:34:17 [Plugins] Existing objects from Plugins_Objects: 7
12:34:17 [Plugins] Logged events from the plugin run : 1
12:34:17 [Plugins] pluginEvents count: 1
12:34:17 [Plugins] pluginObjects count: 8
12:34:17 [Plugins] events_to_insert count: 0
12:34:17 [Plugins] history_to_insert count: 8
12:34:17 [Plugins] objects_to_insert count: 1
12:34:17 [Plugins] objects_to_update count: 7
Thanks a lot - I think I've found the issue. I had a maximum value of 100 for the threshold for the DL/UL speed columns so if the value to be displayed went over 100, it didn't know what to do. This screenshot gave me the hint:
This should be available in the next release. It would be great if you could test this. Can you please switch to the netalertx-dev
docker image (backup everything at first), in about 15 minutes (or after the last action finishes) from now.
Make sure you refresh your browser cache - and click the 🔄 refresh button in the top right corner.
Thanks in advance, j
DSL too fast?
DSL too fast?
lol, yes
We were lucky...that speedtest ran once while my son was heavily drawing bandwidth on the guest net, that depressed the main net bandwidth... anyway the speed is poor for a 250 Mbit/s connection which we are supposed to have... I'll try your next commit as soon as available and report back.
Perfect:
Thank you very much for you effort!!!
Thanks for helping me to get to the bottom of this :)
That was in my own interest. :-) But if you have more to try, I am willing to test and supply logs.
Let's see maybe something comes up :) thanks for the help 😉
Is there an existing issue for this?
Current Behavior
Under Integrations > Plugins > Internet speedtest on the tab "Plugin Objects" only the "Upload Speed" shows up, but not the "Download Speed". This was tried and confirmed on various devices: iPad with Safari, MacBook with Safari or Firefox, Raspberry Pi5 with Chromium or Firefox.
Expected Behavior
Left to the green bar with the upload speed, a green bar with the download speed is expected.
Steps To Reproduce
1) Settings for Internet Speedtest: "schedule" "0 /6 ", Run timeout 300, Watched 0 items, Report on 0 items 2) once speedtests have run, go to Integration > Plugins > Internet speedtest, check on the tab "Plugin Objects"
This happens on both the production branch and the dev branch (I am currently using the latter built on 2024-10-19 for your recommendation given in another forum, thanks again for that!!).
From currently used DEV branch:
From previously used PRODUCTION branch:
I have seen the image you have shown me on another forum, where the green bar(s) under Download were present, but I have not been able to reproduce that, neither with cleared browser caches, reloaded pages or a freshly installed container.
app.conf
docker-compose.yml
What branch are you running?
Dev
app.log
it occurs always for me. I had to shorten the app.conf when submitting it said: maximum 65536 characters
Debug enabled