Announcement

Collapse
No announcement yet.

Restart HomeTroller Pi

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

    Restart HomeTroller Pi

    Is there a way to restart my HomeTroller Pi with an event or in settings so it restarts once a day or once a week? In HS3 there was a restart plug-in but it doesn't seem to work with HS4 on the HomeTroller Pi. My HomeTroller Pi becomes locked up after a few days to a week, everything stops working. This is at a second home so I just can't restart it. It has to be restarted it every time I arrive.



    #2
    Couple of ways you could accomplish this:If the Linux OS on the Pi is locking up, the first two options might not work so having the smart plug that you can control out-of-band might be the belt/suspenders approach. I have my HomeTroller Pi (amongst other equipment) connected to a web power switch (Web Power Switch! - 15 Day Free Trial! - Ships Overnight - From $149! (digital-loggers.com)​) that I've written scripts on that can automatically power cycle equipment when it determines something is not responding.

    Comment


      #3
      I guess using a Tuya plug on the cloud would work just fine. I was hoping I could just add a plug-in and do it with an event.

      Thanks

      Comment


        #4
        Originally posted by stinggray View Post
        I guess using a Tuya plug on the cloud would work just fine. I was hoping I could just add a plug-in and do it with an event.

        Thanks
        jon00 has a little executable, that I use regularly, called "jon00RestartHS3.exe" that you could download then run with an event however you want. This is for HS3 but I assume he has one for HS4???

        Comment


          #5
          Originally posted by BobSpen View Post

          jon00 has a little executable, that I use regularly, called "jon00RestartHS3.exe" that you could download then run with an event however you want. This is for HS3 but I assume he has one for HS4???
          I don't think it will run under Linux, Windows only. Here is an event using restart.sh, a shell built in to the Pi.

          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

          Comment


            #6
            Originally posted by randy View Post
            Here[/URL][/B] is an event using restart.sh, a shell built in to the Pi.
            The problem with that shell script is that all it does, is wait 20 seconds and then reboot the OS.

            Code:
            #!/bin/bash
            
            
            counter=20
            while [ $counter -gt 0 ]
            do
             sleep 1
             counter=$(($counter - 1))
            done
            
            # now restart system
            reboot​
            Not very sophisticated, but if HS is hung, it's a moot point. At least it should try to shutdown HS first...

            Comment

            Working...
            X