1.1 KiB
1.1 KiB
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
-
Modified the
process_single_devicemethod inTasmotaManager.pyto:- 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
-
Created a test script
test_unknown_device_toggle.pyto verify the functionality:- The script takes a device identifier (IP or hostname) as an argument
- It processes the device using the modified
process_single_devicemethod - 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.