Echo & Alexa Forums

Execute a routine automatically when WIFI is connected?

0 Members and 1 Guest are viewing this topic.

Dshow

Execute a routine automatically when WIFI is connected?
« on: August 11, 2020, 07:38:36 pm »
Hi,
I have an Alexa that controls several smart devices in my home.  One of the devices is a main water shutoff valve.  Whenever the power goes out, when the power comes back on, the water valve shuts off as a safety feature.  Under a normal power outage, this is a PITA.  It never fails that when the power comes back on, someone uses the restroom or gets a drink and there is no water...

Anyway, I was wondering if when Alexa reconnects to the WIFI, is there a way to have it execute a routine that would turn that valve on?

Thanks!

(At first I though it could execute a routine at power up but there would be no WIFI at that point...  So it would have to be after WIFI is connected.)

Offline jwlv

  • *
  • 1472
Re: Execute a routine automatically when WIFI is connected?
« Reply #1 on: August 11, 2020, 11:25:44 pm »
Doesn't that kind of defeat the purpose of that safety feature?

Since the valve is WiFi controlled, I assume you can turn it on manually. To do it automatically maybe write a script to check the internet connection (ping, DNS lookup, or something easy), and if that passes then execute another script/program to turn on the valve. This doesn't have anything to do with Alexa so you wouldn't even need to find a way for Alexa to do this.

Dshow

Re: Execute a routine automatically when WIFI is connected?
« Reply #2 on: August 12, 2020, 11:37:47 am »
Thanks for replying...

I was thinking a safety feature in that if there is a catastrophic event and your house was gone...  You wouldn't want the water spraying everywhere when (if?) the power came back on...  (I guess if this happens, this would be the least of your worries...   :) )

This happens so infrequently, I "won't fix it if it ain't broke..."

I am curious about the comment "this doesn't have anything to do with Alexa..."  If Alexa isn't issuing the command to turn the water back on again, what would issue that command?  That would be the only item on the network capable of issuing the command.

Thanks again-

Offline jwlv

  • *
  • 1472
Re: Execute a routine automatically when WIFI is connected?
« Reply #3 on: August 12, 2020, 04:42:18 pm »
I was thinking in terms of using a mini PC (or Raspberry Pi) to do all of that. I suppose Alexa can do it all too, with a combination of IFTTT, custom skills, routines, etc.

jvk of md

Re: Execute a routine automatically when WIFI is connected?
« Reply #4 on: August 15, 2020, 06:37:02 am »
I have a water shut off too but it doesn't close because of wi-fi loss, it just won't work.  Doesn't make sense that it's a safety feature, mine only closes if a water leak is sensed from one of my 6 sending units.  Most of my stuff sends me a notification if there's no wifi signal and is offline. 

Hi,
I have an Alexa that controls several smart devices in my home.  One of the devices is a main water shutoff valve.  Whenever the power goes out, when the power comes back on, the water valve shuts off as a safety feature.  Under a normal power outage, this is a PITA.  It never fails that when the power comes back on, someone uses the restroom or gets a drink and there is no water...

Anyway, I was wondering if when Alexa reconnects to the WIFI, is there a way to have it execute a routine that would turn that valve on?

Thanks!

(At first I though it could execute a routine at power up but there would be no WIFI at that point...  So it would have to be after WIFI is connected.)