Announcement

Collapse
No announcement yet.

Startup Script for Zee S2 running on a RPI2B

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

    Startup Script for Zee S2 running on a RPI2B

    I think my startup script in init.d is broken. My guess it is improperly formatted, and prevents ssh, webmin, ntp and maybe other things from properly starting at boot.

    Would someone mind posting their stock startup script (or else point me to where it is provided by HomeSeer on their website - I sure couldn't find it) from a Zee S2 that is running on a Raspberrypi 2B?

    #2
    This is the init.d folder on a ZeeS2, but is a Rpi3:



    running comand ls -lt /etc/init.d
    total 300
    -rwxr-xr-x 1 root root 6748 May 24 2016 udev
    -rwxr-xr-x 1 root root 1202 May 6 2016 raspi-config
    -rwxr-xr-x 1 root root 4077 Jan 13 2016 ssh
    -rwxr-xr-x 1 root root 731 Jan 5 2016 sudo
    -rwxr-xr-x 1 root root 2796 Dec 14 2015 rsyslog
    -rwxr-xr-x 1 root root 461 Nov 16 2015 udev-finish
    -rwxr-xr-x 1 root root 10077 Oct 24 2015 apache2
    -rwxr-xr-x 1 root root 2512 Sep 20 2015 rpcbind
    -rwxr-xr-x 1 root root 3049 Sep 5 2015 cron
    -rwxr-xr-x 1 root root 2813 Jul 21 2015 dbus
    -rwxr-xr-x 1 root root 2401 Apr 13 2015 avahi-daemon
    -rwxr-xr-x 1 root root 1860 Apr 9 2015 dhcpcd
    -rwxr-xr-x 1 root root 1276 Apr 6 2015 bootlogs
    -rwxr-xr-x 1 root root 1248 Apr 6 2015 bootmisc.sh
    -rwxr-xr-x 1 root root 3807 Apr 6 2015 checkfs.sh
    -rwxr-xr-x 1 root root 1072 Apr 6 2015 checkroot-bootclean.sh
    -rwxr-xr-x 1 root root 9290 Apr 6 2015 checkroot.sh
    -rwxr-xr-x 1 root root 1336 Apr 6 2015 halt
    -rwxr-xr-x 1 root root 1423 Apr 6 2015 hostname.sh
    -rwxr-xr-x 1 root root 1300 Apr 6 2015 killprocs
    -rwxr-xr-x 1 root root 995 Apr 6 2015 motd
    -rwxr-xr-x 1 root root 677 Apr 6 2015 mountall-bootclean.sh
    -rwxr-xr-x 1 root root 2138 Apr 6 2015 mountall.sh
    -rwxr-xr-x 1 root root 1461 Apr 6 2015 mountdevsubfs.sh
    -rwxr-xr-x 1 root root 1564 Apr 6 2015 mountkernfs.sh
    -rwxr-xr-x 1 root root 685 Apr 6 2015 mountnfs-bootclean.sh
    -rwxr-xr-x 1 root root 2456 Apr 6 2015 mountnfs.sh
    -rwxr-xr-x 1 root root 6228 Apr 6 2015 rc
    -rwxr-xr-x 1 root root 820 Apr 6 2015 rc.local
    -rwxr-xr-x 1 root root 117 Apr 6 2015 rcS
    -rw-r--r-- 1 root root 2427 Apr 6 2015 README
    -rwxr-xr-x 1 root root 661 Apr 6 2015 reboot
    -rwxr-xr-x 1 root root 1042 Apr 6 2015 rmnologin
    -rwxr-xr-x 1 root root 3207 Apr 6 2015 sendsigs
    -rwxr-xr-x 1 root root 597 Apr 6 2015 single
    -rw-r--r-- 1 root root 1087 Apr 6 2015 skeleton
    -rwxr-xr-x 1 root root 2737 Apr 6 2015 umountfs
    -rwxr-xr-x 1 root root 2202 Apr 6 2015 umountnfs.sh
    -rwxr-xr-x 1 root root 1129 Apr 6 2015 umountroot
    -rwxr-xr-x 1 root root 3111 Apr 6 2015 urandom
    -rwxr-xr-x 1 root root 3916 Mar 29 2015 hwclock.sh
    -rwxr-xr-x 1 root root 1192 Mar 6 2015 procps
    -rwxr-xr-x 1 root root 10704 Mar 5 2015 hdparm
    -rwxr-xr-x 1 root root 4760 Dec 14 2014 networking
    -rwxr-xr-x 1 root root 1345 Nov 17 2014 plymouth
    -rwxr-xr-x 1 root root 752 Nov 17 2014 plymouth-log
    -rwxr-xr-x 1 root root 8189 Oct 25 2014 kbd
    -rwxr-xr-x 1 root root 1990 Sep 23 2014 kmod
    -rwxr-xr-x 1 root root 824 Sep 5 2014 fake-hwclock
    -rwxr-xr-x 1 root root 1322 Aug 24 2014 binfmt-support
    -rwxr-xr-x 1 root root 2948 Aug 18 2014 bluetooth
    -rwxr-xr-x 1 root root 2944 Aug 17 2014 lighttpd
    -rwxr-xr-x 1 root root 5658 Aug 12 2014 nfs-common
    -rwxr-xr-x 1 root root 4355 Jul 10 2014 rsync
    -rwxr-xr-x 1 root root 5340 Oct 18 2013 alsa-utils
    -rwxr-xr-x 1 root root 2198 Oct 1 2013 dphys-swapfile
    -rwxr-xr-x 1 root root 2666 Sep 25 2013 x11-common
    -rwxr-xr-x 1 root root 1591 Sep 30 2012 keyboard-setup
    -rwxr-xr-x 1 root root 1379 Dec 8 2011 console-setup
    -rwxr-xr-x 1 root root 2610 Jul 25 2011 lightdm
    -rwxr-xr-x 1 root root 3169 May 10 2011 triggerhappy
    -rwxr-xr-x 1 root root 1814 Dec 26 2009 ntp
    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
      Woah, how do you start Homeseer?

      Comment


        #4
        the /usr/local/HomeSeer/go script is the main startup script for HS.
        Here's what it looks like:


        homeseer@RPi2 /etc/init.d $ cat /usr/local/HomeSeer/go
        export LANG=en_US.UTF-8
        sudo mono HSConsole.exe --log
        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


          #5
          Masonjr I have a similar script named go which will launch the Homeseer 3 service if I type ./go in my working /Downloads/HomeSeer on my Raspberry Pi 3. For the life of me I cannot get the HS3 service to launch on boot. I've followed links from ARA, aptalca, Posterboy and Jon and still cannot get it to work.

          As your setup seems very similar would you have any suggestions what else I might try.

          Comment


            #6
            Originally posted by concordseer View Post
            Masonjr I have a similar script named go which will launch the Homeseer 3 service if I type ./go in my working /Downloads/HomeSeer on my Raspberry Pi 3. For the life of me I cannot get the HS3 service to launch on boot. I've followed links from ARA, aptalca, Posterboy and Jon and still cannot get it to work.

            As your setup seems very similar would you have any suggestions what else I might try.
            Check your /etc/rc.local - mine looks like this:

            Code:
            homeseer@RPi2 /etc $ cat rc.local
            #!/bin/sh -e
            #
            # rc.local
            #
            # This script is executed at the end of each multiuser runlevel.
            # Make sure that the script will "exit 0" on success or any other
            # value on error.
            #
            # In order to enable or disable this script just change the execution
            # bits.
            #
            # By default this script does nothing.
            
            sudo /usr/local/HomeSeer/autostart_hs &
            printf "HomeSeer is starting...\n"
            
            # Print the IP address
            #_IP=$(hostname -I) || true
            #if [ "$_IP" ]; then
            #  printf "My IP address is %s\n" "$_IP"
            #fi
            
            sudo /etc/init.d/lighttpd start
            sudo /usr/local/HomeSeer/register_with_find.sh
            exit 0
            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


              #7
              Quite similar Masonjr.

              In my case the working directory is Downloads/HomeSeer. If I run sudo Downloads/HomeSeer/autostart_hs & from the command line the service runs fine but when I include this line in the /etc/rc.local nothing is launched when I boot the RPI.

              I'm really puzzled as to what I am doing wrong here.

              Comment


                #8
                Check to make sure that homeseer user (primary admin) is in the sudoer group.

                grep -Po '^sudo.+:\K.*$' /etc/group

                and do this:

                sudo chmod 755 -R Home/user/Downloads/HomeSeer
                - 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


                  #9
                  Originally posted by concordseer View Post
                  Quite similar Masonjr.

                  In my case the working directory is Downloads/HomeSeer. If I run sudo Downloads/HomeSeer/autostart_hs & from the command line the service runs fine but when I include this line in the /etc/rc.local nothing is launched when I boot the RPI.

                  I'm really puzzled as to what I am doing wrong here.
                  Pathnames in rc.local must be absolute. These always start with the '/' character.
                  In /etc/rc.local, instead of
                  sudo Downloads/HomeSeer/autostart_hs &
                  try
                  /Downloads/HomeSeer/autostart_hs &

                  (assuming /Downloads/HomeSeer is the full pathname where that file resides).
                  The 'sudo' is extraneous in rc.local, since that script is already running with superuser priviledge.

                  Comment


                    #10
                    Guessing your home directory is your username directory so it would be:

                    /home/username/Downloads/HomeSeer

                    Lowercase home, uppercase Downloads

                    IE: for example here on my laptop it would look like this:

                    /home/pete/Downloads/HomeSeer/
                    - 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