Upgrading very old tplink devices results in broken installation
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 490
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 23
Description
### Prerequisites
- [x] I have read [CONTRIBUTING.md](https://github.com/EFForg/rayhunter/blob/main/CONTRIBUTING.md)
### Bug Report Details
When installing 0.10.2 on a tplink device that previously had a very old (0.3.0) installation of Rayhunter, you might see this line:
```
Config file already exists, skipping (use --reset-config to overwrite)
```
...then the device boots and there is no green or red line on the display at all. Rayhunter didn't start.
When you run `./installer util tplink-shell` and then run `cat /data/rayhunter/config.toml`, there will be `device = "tplink"` missing from it, as that is a setting introduced in later versions of Rayhunter and the config on the device is very old.
The workaround is to pass `--reset-config` to the installer:
```
./installer tplink --reset-config
```
I'm not entirely sure how to fix this issue, perhaps we should try to validate the existing config and forcibly reset it if it doesn't seem to be valid anymore. Since the workaround is so easy I'm inclined to not fix this issue at all.
Contributor guide
Research direction
Start at the installer entry point for `tplink` and its existing-config handling, then use `./installer util tplink-shell` to inspect `/data/rayhunter/config.toml` on an old installation. Compare the behavior with `--reset-config`; done means upgrading an old config no longer leaves Rayhunter stopped, or the issue is documented as intentionally requiring that workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100