Author Topic: checking status of a webpage before running scene  (Read 176 times)

Offline ade30vera

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
checking status of a webpage before running scene
« on: June 04, 2018, 05:11:23 pm »
I am looking for some help, I think I have determined this is possible - howver, I don't have the skills to actually do it.

I host web page on a raspberry PI and I want to reboot that PI (via a smart switch) if the website times out with a "connection has timed out" response.

So basically, I am looking for some luup code to check the status of this webpage and if it times out, run the scene that reboots the PI.

Thanks for all the help!

Offline jswim788

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +49/-2
Re: checking status of a webpage before running scene
« Reply #1 on: June 04, 2018, 05:42:28 pm »
Maybe a good application for the Network Monitor Plugin: http://forum.micasaverde.com/index.php/topic,83031.0.html

That will act as a standard sensor and then you can trigger a scene based on its status.



Offline ade30vera

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: checking status of a webpage before running scene
« Reply #2 on: June 06, 2018, 01:12:42 pm »
Thanks for the advice. Quite an unorthodox way of looking at things but worked perfectly!

Contributed to Author via the donate button on plug-in - well worth it.
« Last Edit: June 06, 2018, 01:21:28 pm by ade30vera »