PowerShell/Scripts/simulate-presence.ps1

18 lines
402 B
PowerShell
Raw Normal View History

2020-11-30 16:28:56 +01:00
#!/snap/bin/powershell
2020-12-29 15:14:21 +01:00
<#
.SYNTAX ./simulate-presence.ps1 [<IP-address>]
.DESCRIPTION simulates the human presence against burglars
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
2020-11-30 16:28:56 +01:00
2020-12-29 15:14:21 +01:00
param([string]IPaddress)
2020-11-30 16:28:56 +01:00
2020-12-29 15:14:21 +01:00
for ([int]$i = 0; $i -lt 1000; $i++) {
./switch-shelly1 $IPaddress on 0
sleep 60
./switch-shelly1 $IPaddress off 0
sleep 10
2020-11-30 16:28:56 +01:00
}
exit 0