Skip to content

Commit

Permalink
fix: speedtest.net tests failing when bundled (#21)
Browse files Browse the repository at this point in the history
* hack: prevent workers from failing when webpacked

* chore: clearer action / variable language

* chore: version up, update changelog
  • Loading branch information
bryce-seifert authored Sep 2, 2024
1 parent b8b19c5 commit a5f7dce
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 7 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# companion-module-generic-speedtest

See [HELP.md](/companion/HELP.md) and [LICENSE](./LICENSE)

## Changelog

### v1.0.4

- Fix
- Speedtest.net test not working when bundled with Companion

### v1.0.3

- Fix
- Update code dependency

### v1.0.2

**Note: as of this version, you must now run the test using the "Run Test" action. It will not run automatically on module start to allow you specify a service before running, and prevent any crashes if a test fails**

- Fix
- Cloudflare upload result not showing properly

### v1.0.1

- New
- Additional presets added
- Fix
- Show default variable values while speed test is running

### v1.0.0

- Initial release
2 changes: 1 addition & 1 deletion actions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function getActions() {
return {
runSpeedtest: {
name: 'Run Speedtest',
name: 'Run Test',
options: [],
callback: () => {
this.runTest()
Expand Down
8 changes: 8 additions & 0 deletions build-config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
externals: [
{
// TODO: This is not good for number of files on disk, but is easy to implement
'@bryce-seifert/universal-speedtest': 'commonjs @bryce-seifert/universal-speedtest',
},
],
}
7 changes: 3 additions & 4 deletions companion/HELP.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
## Generic Speedtest

This module will allow you to conduct an internet speedtest from popular services Cloudflare or Speedtest.net
This module will allow you to conduct an internet speed test from popular services Cloudflare or Speedtest.net

### Configuration

- Select your preferred service in the module configuration

_Note: In our testing, Cloudflare performs much faster than Speedtest.net_
- Use the "Run Test" action to run a speed test. Until you run a test using the action, results will not be shown. When you run a new test, all previous results will be cleared until the new test results are received

### Available actions

- Run Speedtest
- Run Test

### Available feedbacks

Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SpeedtestInstance extends InstanceBase {
this.initPresets()
this.testComplete = false
this.setVariableValues({
test_status: 'Stopped',
test_status: 'Not Yet Run',
download_speed: '-',
upload_speed: '-',
ping: '-',
Expand Down
2 changes: 1 addition & 1 deletion variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function getVariables() {
{ variableId: 'server_city', name: 'Test server city' },
{ variableId: 'server_distance', name: 'Test server distance (km)' },
{ variableId: 'client_public_ip', name: 'Public IP address of the host machine' },
{ variableId: 'test_status', name: 'Current status of the speedtest' },
{ variableId: 'test_status', name: 'Current status of the speed test' },
]
return variables
}

0 comments on commit a5f7dce

Please sign in to comment.