Announcement

Collapse
No announcement yet.

reboot Z-Net via a script (or otehr method)

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

    reboot Z-Net via a script (or otehr method)

    I case my Z-Net runs into problems, I had a event which rebooted my Z-Net via a script. It has not run for months, as there never was a problem since upgrading to .190, but recently I had problems with my ISP, and my Z-Net stayed red. So I run the script, but it does not reboot. SO I guess the command does not work any more ? Is there any other way ? (I used to use a LightwaveRF on/off module to be able to power cycle, but I need that somewhere else)


    This is the script I used to run (I checked the IP is correct):


    Code:
    Dim IP as String = "192.168.1.113"
    Dim URLStr as String = ""
    Dim ReplyStr as String = ""
    
    Sub Main(parm as object)
    
    URLStr = "http://" & IP & "/Main/Reboot.php"
    
    ReplyStr = hs.urlaction(URLStr,"GET","","")
    
    End Sub

    #2
    Originally posted by mikee123 View Post
    I case my Z-Net runs into problems, I had a event which rebooted my Z-Net via a script. It has not run for months, as there never was a problem since upgrading to .190, but recently I had problems with my ISP, and my Z-Net stayed red. So I run the script, but it does not reboot. SO I guess the command does not work any more ? Is there any other way ? (I used to use a LightwaveRF on/off module to be able to power cycle, but I need that somewhere else)


    This is the script I used to run (I checked the IP is correct):


    Code:
    Dim IP as String = "192.168.1.113"
    Dim URLStr as String = ""
    Dim ReplyStr as String = ""
    
    Sub Main(parm as object)
    
    URLStr = "http://" & IP & "/Main/Reboot.php"
    
    ReplyStr = hs.urlaction(URLStr,"GET","","")
    
    End Sub
    The script I use is slightly different (the port number, ByVal and "parms" is plural) and it still works
    Code:
    Dim IP As String = "192.168.2.11:80"
    Dim URLStr As String = ""
    Dim ReplyStr As String = ""
    Sub Main(ByVal Parms As Object)
    
    'Z-Net-Primary: this will reboot Z-Net Primary
    
    URLStr = "http://" & IP & "/Main/Reboot.php"
    
    ReplyStr = hs.urlaction(URLStr,"GET","","")
    
    End Sub
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Strange. Maybe it was just a glitch. Just tried again and it worked. I changed the parm to parms and added ByVal just in case.

      Comment

      Working...
      X