Created
February 17, 2022 21:23
-
-
Save urbanskimichal/07999f413c28c391f0cefbe6d331452b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Periodically send Toggle command to s26 wifi plug (Tasmota / Sonoff). | |
# The first argument is an IP address of the plug. | |
# Command is based on Tasmota documentation. | |
IP=$1 | |
echo "s26 plug test" | |
echo "IP: $IP" | |
for i in {0..50} | |
do | |
echo | |
date | |
echo "Request #$i:" | |
curl -w '\nResponse time: %{time_total}s\n' "http://$IP/cm?cmnd=Power%20Toggle" | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment