27 lines
1.1 KiB
Markdown
27 lines
1.1 KiB
Markdown
# Implementation Summary
|
|
|
|
## Requirement
|
|
For a single device when identified as unknown device, the script should toggle the device at a 1/2 Hz rate and wait for the user to enter a new Host Name.
|
|
|
|
## Changes Made
|
|
|
|
1. Modified the `process_single_device` method in `TasmotaManager.py` to:
|
|
- Check if a device identified as unknown has a toggle button
|
|
- If it does, toggle the device at 1/2 Hz rate (toggling every 2 seconds)
|
|
- Display information about the device to help the user identify it
|
|
- Prompt the user to enter a new hostname for the device
|
|
- Configure the device with the new hostname if provided
|
|
|
|
2. Created a test script `test_unknown_device_toggle.py` to verify the functionality:
|
|
- The script takes a device identifier (IP or hostname) as an argument
|
|
- It processes the device using the modified `process_single_device` method
|
|
- This allows testing the toggling functionality for a single unknown device
|
|
|
|
## Testing
|
|
|
|
To test this functionality:
|
|
```
|
|
./test_unknown_device_toggle.py <device_identifier>
|
|
```
|
|
|
|
Where `<device_identifier>` is either the IP address or hostname of the device you want to process. |