Announcement

Collapse
No announcement yet.

How check if system is ON (server ON)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How check if system is ON (server ON)

    I configured a HS4 server (windows) to my sister.
    I need to check if it is working or stopped.

    I created an event (on my sister's HS4) triggered every 5 minutes. The event simple is an immediate command like:

    Code:
    &hs.geturl("https://connected2.homeseer.com","/JSON?request=controldevicebylabel&ref=1111&label=On&user=MY_MYHOMESEER_USER&pass=MY_MYHOESEER_PASSWORD",True,80)
    This turn on a virtual device on my HS4 system (not in the same network!). On my HS4 system I have two events: the first turn off the virtual device if change to on, the second event check if the virtual device still OFF for more than 7 minutes, send me an email to alert me that my sister's HS4 system could be down.

    This work well but I have to share my myhomeseer user and password into the command.

    On my HS4 system I created a specific user and password for that, created a dynamic dns (the router port is opened).
    If I am out of my network I can control my HS4 system:
    Code:
    http://chris-home-automation.duckdns.org
    It works but I need to insert user and password.

    But if I use this immediate command (from my sister's HS4):
    Code:
    &hs.geturl("http://chris-home-automation.duckdns.org","/JSON?request=controldevicebylabel&ref=1111&label=On&user=SPECIFIC_USER&pass=SPECIFIC_USER_PASSWORD",True,80)
    This not work.

    What I'd like to do is a ping every 5 minutes from my sister's HS4 to my HS4 system.

    Some Idea to have something like a whatcdog in order to check if an remote HS4 system is working?

    #2
    You say "This not work", what did happen? If you enter the URL manually in a browser what is returned?

    The examples you pasted shows port 80 open inbound to your HS3 server, I'm not sure I would do that without other protective actions.

    Comment


      #3
      Originally posted by mterry63 View Post
      You say "This not work", what did happen? If you enter the URL manually in a browser what is returned?

      The examples you pasted shows port 80 open inbound to your HS3 server, I'm not sure I would do that without other protective actions.
      If I enter URL manually appear the popup for user and password (but I pas directly the user and pw in the URL...)

      About the port 80, yes, it is not a good solution. I'm working on other port.

      Comment


        #4
        Most browsers won't accept user and password in the URL any longer due to security. Did you enter them in the popup? If so, what happened?

        Comment


          #5
          This is a bit off-topic, but a more secure (and perhaps a bit less reliable) way to accomplish this is with emails sent/processed by the HS systems. You don't need to open any ports to the world.

          I have two HS servers that monitor one another with a series of events as follows:

          Server1
          Event1:
          Recurring trigger sends email to Server2 every 10 minutes with keywords in email subject

          Server2
          Event1:
          IF email is received from specific sender with keywords in email subject
          THEN set VirtualDevice to "online"

          Event2:
          IF VirtualDevice has been "online" for exactly 15 minutes
          THEN send notification "Server2 did not respond for 15 minutes"

          How long to wait before sending notification, how often, etc., is up to you. I have a additional event that, after 30 minutes, sets VirtualDevice to status "offline" and send a 2nd notification. A final event uses EasyTrigger to send a "back online" notification when the value was "offline" and becomes "online".

          Note that VirtualDevice needs to have "Do not update device last change time
          if device value does not change" unchecked.

          I also have this set up the other way so that Sever2 is also monitoring Server1.

          -Wade

          Comment


            #6
            Another secure option could be to share a folder on drop-box and get your sisters HS4, save a text file containing the current date/time to that folder every xx minutes.

            You can also read that file on your HS system and check the date. Can be done with a couple of simple scripts.
            Jon

            Comment


              #7
              Tanks for the interesting tips!
              I was quite ready to bother an ESP8266 or ESP32: HS system send to ESP a mqtt message every xx minutes. If no message received for xx minutes ESP send an email to me.
              Email or Dropbox solutions are more interesting ed not require additional hardware.

              Thank you so much!

              Comment


                #8
                Who says old dogs don't have useful tricks
                HS4 Pro on Shuttle NC10U, Win10; Z-NET
                Number of Devices: 449
                Number of Events: 210

                Plug-Ins: Arduino, BLLock, DirecTv, EasyTrigger, Honeywell WiFi Thermostat, MeiHarmonyHub, PHLocation2, Pushover 3P, UltraM1G3, WeatherXML, Worx Landroid, Z-Wave

                External applications: Homebridge-homeseer, Geofency, EgiGeoZone.

                Comment


                  #9
                  I think this can be done much more simple.

                  On the machine make a batchfile containing
                  shutdown /a
                  shutdown /r /f /t 300

                  (Remark: /t 300 is in seconds. Choose whatever time you need)

                  Make an event in HS to run this batchfile every 4 minutes and 30 seconds (250 secons)

                  So when HS stops the event won't run and the machine will autmatically reboot in 5 minutes max.
                  - Bram

                  Send from my Commodore VIC-20

                  Ashai_Rey____________________________________________________________ ________________
                  HS3 Pro 3.0.0.534
                  PIugins: ZMC audio | ZMC VR | ZMC IR | ZMC NDS | RFXcom | AZ scripts | Jon00 Scripts | BLBackup | FritzBox | Z-Wave | mcsMQTT | AK Ikea

                  Comment


                    #10
                    Originally posted by AshaiRey View Post
                    I think this can be done much more simple.

                    On the machine make a batchfile containing
                    shutdown /a
                    shutdown /r /f /t 300

                    (Remark: /t 300 is in seconds. Choose whatever time you need)

                    Make an event in HS to run this batchfile every 4 minutes and 30 seconds (250 secons)

                    So when HS stops the event won't run and the machine will autmatically reboot in 5 minutes max.
                    You may of misread the first post. He is trying to monitor his sisters HS4 install at another location and inform if it stops responding.
                    Jon

                    Comment


                      #11
                      Hi, Jon00,

                      What riggered me was this
                      Some Idea to have something like a whatcdog in order to check if an remote HS4 system is working?
                      My proposed solution will work as a watchdog for HS. Only to fullfill the notifying part he can add een send email event in the HS Start script.

                      And because of this I was assuming that he would like to get HS started again when it stops working.
                      I configured a HS4 server (windows) to my sister.
                      I need to check if it is working or stopped.
                      But i am not saying it will be the best solution but it's just another option to get HS back on line unattended at a remote location
                      - Bram

                      Send from my Commodore VIC-20

                      Ashai_Rey____________________________________________________________ ________________
                      HS3 Pro 3.0.0.534
                      PIugins: ZMC audio | ZMC VR | ZMC IR | ZMC NDS | RFXcom | AZ scripts | Jon00 Scripts | BLBackup | FritzBox | Z-Wave | mcsMQTT | AK Ikea

                      Comment

                      Working...
                      X