Turn on sevice when ip returns ping

Hey, so I want my two monitors and speakers when my pc turns on. I thoungt of having a system pinging my pc every 10 seconds and when it returns the ping then it will turn on my monitors and speakers. and after it got a successful ping then it won’t run that automation untill the pc is off again.
How can I make these?

This should have exactly what you need: