Announcement

Collapse
No announcement yet.

Create CRON job to reboot on ZEE

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

    Create CRON job to reboot on ZEE

    I am also experiencing some panel disconnect or plugin hang problems. I don't know that there is a problem until I tell Alexa to do something and she says "OK" but nothing happens.

    I'm not sure if it's a HAI plugin issue or a HS issue. In the meantime if I could put in place a CRON workaround to reboot the controller a couple of times a day, that might workaround it. Rebooting always seems to clear it.

    Not sure if a plugin has the capability to do a reboot but if it does I'm hoping it could get implemented faster than begging the HS folks.

    #2
    Originally posted by avpman View Post
    I am also experiencing some panel disconnect or plugin hang problems. I don't know that there is a problem until I tell Alexa to do something and she says "OK" but nothing happens.

    I'm not sure if it's a HAI plugin issue or a HS issue. In the meantime if I could put in place a CRON workaround to reboot the controller a couple of times a day, that might workaround it. Rebooting always seems to clear it.

    Not sure if a plugin has the capability to do a reboot but if it does I'm hoping it could get implemented faster than begging the HS folks.
    Are there any errors in either the HS logs or HAI logs?

    Sent from my SM-G935U using Tapatalk
    HS4Pro on a Raspberry Pi4
    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

    HSTouch Clients: 1 Android

    Comment


      #3
      You have to be careful with a warm reboot of the OS in a cron job.

      If Homeseer is running when you do this you can trash the databases.

      A cron job running a script to shut down Homeseer then doing a reboot will work better.

      While rebooting fixes your issues relating to running Homeseer; it does not fix what is causing the issue you are fixing.

      That is where as Rob mentions above to have a good look at the logs.

      Are you having any other sort of network issues (ZNet, myhomeseer dot com, update manager, et al?)

      When you connect to your panel with PCA do you see any back and forth communications text disconnects on the bottom of the PCA screen?

      Is the Zee 2 using a network cable or a wireless connection to get to your network?

      If you want to do some hardware network diagnostics ssh to a terminal session and run tail -f /var/logs/whatever log to watch hardware...
      Last edited by Pete; May 7, 2017, 04:25 PM.
      - Pete

      Auto mator
      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
      HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

      HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

      Comment


        #4
        As the others have said, best to address underlying causes of the issues. As a last resort, the Linux HS3 installs include a script in the HomeSeer root, "restart.sh" which first shuts down Homeseer process then performs a reboot. This could be invoked via cron or perhaps an event.

        Comment


          #5
          Originally posted by zwolfpack View Post
          As the others have said, best to address underlying causes of the issues. As a last resort, the Linux HS3 installs include a script in the HomeSeer root, "restart.sh" which first shuts down Homeseer process then performs a reboot. This could be invoked via cron or perhaps an event.
          Thanks, I'm fully aware of the need to get to underlying cause, rebooting and/or backing up is not my fixall. Although they may be useful for security reasons in the future. Right now I just need to put a band-aid on it while I continue to search for the underlying problem. In fact, if you read the very first sticky post in this forum it related to panel disconnects. So I'm not alone.

          BTW - all of the panel configuration is correct in the first place, or it wouldn't work at all. And I would NEVER use a wireless connection for something like this. It's plugged into the switch right next to the panel.

          If I can get a CRON job running, I can regularly collect logs, backup the system, etc. It's an overall approach. I have a Homeseer ZEE, which is essentially a PI-3 but has no flash card. If I had a regular pi, I'd just image the card once a week until the problem is solved. So I'm kink of on edge about not having an instant recovery method.

          Respectfully, and I'm sincere in my heart about this, please help me address my original question.

          Comment


            #6
            That was the intent of my suggestion - invoking the the script file /usr/local/HomeSeer/restart.sh from an event or cron should be the safest way to do what you ask.

            For an event, set it up to run at times of your choosing. For action, select "Run another program or process" and enter
            /usr/local/HomeSeer/restart.sh
            as the program to run. If that won't run, try
            /usr/bin/bash /usr/local/HomeSeer/restart.sh
            instead.
            I'm not running HS3 on Linux so can't confirm exact syntax, but one of these should work.

            To set up a cron job, an easy way to run a program once a day is to put it into the /etc/cron.daily directory. This will run at 6:25am everyday. To set this up, enter this on the Linux command line
            Code:
            sudo ln -s /usr/local/HomeSeer/restart.sh /etc/cron.daily
            To turn this off,
            Code:
            sudo rm -f /etc/cron.daily/restart.sh
            I'm a bit confused by your statement that the Zee doesn't have a flash card. If I'm not mistaken, the Zee is the same hardware as the z-net; as such the flash (SD) card is as shown in this post.

            Comment


              #7
              Upon reflection (and consultation with my morning coffee) it dawns on me that putting a reboot in the cron.daily is probably not a good idea. There are a number of administrative tasks run there that would get interrupted by the reboot. I'd recommend pursuing the event option first, and if that doesn't pan out, you can set up a cron job by adding an entry in /etc/cron.d/. You can use existing entries in that directory for guidance, or just yell.


              Sent from my iPhone using Tapatalk

              Comment


                #8
                Originally posted by zwolfpack View Post
                Upon reflection (and consultation with my morning coffee) it dawns on me that putting a reboot in the cron.daily is probably not a good idea. There are a number of administrative tasks run there that would get interrupted by the reboot. I'd recommend pursuing the event option first, and if that doesn't pan out, you can set up a cron job by adding an entry in /etc/cron.d/. You can use existing entries in that directory for guidance, or just yell.


                Sent from my iPhone using Tapatalk
                how can i setup the event to run every day at 7:05am?

                Comment


                  #9
                  nevermind i figured out my problem. the time zone was not getting set properly. i had to manually set it through the command line and rebooted. I logged into putty and ran this command
                  ln -sf /usr/share/zoneinfo/EST /etc/localtime
                  rebooted system
                  then i set the event with the "Time is" trigger
                  then i used the "run another process" action and put in this path /usr/local/HomeSeer/restart.sh
                  works perfectly

                  Comment


                    #10
                    Here utilize a hardware Rpi RTC and have a local NTP server running on firewall using GPS/PPS.
                    - Pete

                    Auto mator
                    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                    Comment

                    Working...
                    X