Installing Debian 10 on the Hometroller (well, just about any hardware really)
Please NOTE: There are many possible variations to these instructions, but this is what has worked for me. My initial adventure took me about 4 days to get through in solving a variety of problems. I hope to spare you the pain of doing that.
There are many people more knowledgeable about linux than I am and I welcome any feedback or recommendation from them!
Assumptions:
I am assuming that you are either:
A) Upgrading from an older version of Debian on the Hometroller
B) Trying to prepare a system run HS4
C) Installing a larger disk in your hometroller
For A or B, you should get a backup of your system! Do not forget to do this!
To backup, run:
This will backup the entire HomeSeer installation. I am assuming you have used the default location of /usr/local/HomeSeer for the installation of the HS4 software.
Once you have this, get it off the system! These directions completely wipe the box clean and nothing is preserved!
I used winscp to copy the file to my local PC and save it there.
My install/update was for one of the original hometrollers sold by HomeSeer. The 'SEL' on the end meant Secure Edition Linux.
Please NOTE: I do not recommend that you install the SEL extensions for Linux at this time. I have used them before and unless you have experience debugging them, they will shutdown your system. I hope to look further into that at a later time when I have several days to invest in fixing things as they happen!
I have not done this process on any system other than the HomeTroller offerred by HomeSeer, but knowing a bit a about unix/Linix, I would expect them to work for most systems. This does not take into account any other software installed on the system! Anything outside Homeseer is your responsability!
0) If you have not done so, BACKUP and SAVE your existing HomeSeer setup as discussed above!
1) Get the source DVD. I used:
debian-10.5.0-i386-DVD-1.iso
From https://cdimage.debian.org/debian-cd.../i386/iso-dvd/.
2) The use something to burn this onto a USB drive. I used Win32DiskImager. There are LOTS of options out there for this.
3) Insert the USB drive into the system.
4) Reboot the system into firmware. Check that the SATA interface is running in AHCI mode and not IDE.
5) Check the bootlist. Make the USB the first boot device. And set it for the legacy boot as well.
6) Save your changes and reboot.
7) Install Debian:
My main choice here was to use the whole disk as a single file system and install it with LVM. LVM makes recovery of the structures, if needed, much easier.
I also chose not to use a network mirror.
I created my homeseer user ID here and set the password. Write it down along with the root password!
8) During the installation, I got a clear message that grub failed to load.
9) Select 'Continue with no bootloader installed' and finish the install.
10) Reboot again from the USB. Then select "Advanced Options". Then select "Graphical rescue mode".
11) Your root file system will depend on whether you installed LVM or not. I happen to have installed LVM for some ease of management and recoverability reasons. The device I use for my root file system is:
12) Then select "Execute a shell in /dev/mapper/homeseer--vg-root". You should have a shell prompt now.
I personally NEVER saw the option to reinstall the GRUB boot loader in recovery mode.
13) Generate the basic grub config file:
14) Install grub:
The directions on fixing grub mainly came from https://www.debian.wayoflinux.com/in...reinstall-grub. Follow the details on the CLI tab please.
15) Take out the usb drive and you should boot from the disk. Reboot!
16) Login as homeseer and use the password you set for it.
17) At this point, you have a lot of work still to do! First, use "su -" to get root access:
Enter your homeseer password.
18) Edit /etc/group and add homeseer to the sudo group. It should look like this:
NN will be a number. This is just the group ID. The main thing is 'sudo' is te group name and 'homeseer' is a member of the group.
Save the file, exit root's shell, logout and login again as homeseer.
19) As homeseer, run:
You should be promped for your password and then have a root access bash shell. The prompt should be similar to:
20) Suspend power savings! This system should NEVER suspend! Run:
The output should look like:
Created symlink /etc/systemd/system/sleep.target → /dev/null.
Created symlink /etc/systemd/system/suspend.target → /dev/null.
Created symlink /etc/systemd/system/hibernate.target → /dev/null.
Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.
21) Fix the installation sources! If you don't do this, you will not be able to load software.
Edit /etc/apt/sources.list to read:
It is very important that you have the cdrom (really your usb drive here) Commented out!
22) Go to the mono website and add it to your reposotories:
Follow the directions for linux/debian and look for debian 10.
23) Install mono-devel:
This should prompt you (Y/n) to install mono and everything it requires. Say Y.
24) Install the Visual Basic extension for mono:
Without this, HomeSeer will fail to run and complain about missing Visual Basic methods.
25) Install avahi-daemon for chromecast support:
26) Install unzip utilities:
27) Configure linux to work WITHOUT a display plugged in! Otherwise, it will hang when you attempt to boot it:
Edit /etc/default/grub and uncomment:
Save the file and update to grub bootloader:
I found I did not need to run grub-date like /etc/default/grub says, but I did need to run grub-mkconfig and grub-install for things to work correctly.
28) Copy the back you made before we started to the new system. Put it in /.
29) Restore the backup:
The files will be listed as they are restored.
29) Update!
30) ADD startup file for homeseer.
Create /etc/systemd/system/hs4.service to have:
31) Make it executable:
32) Create the shutdown file /usr/local/HomeSeer/hsstop.sh to have:
33) Make it executable!
This was taken from https://forums.homeseer.com/forum/hs...ce-not-working
34) Enable the hs4 service:
At this point, you should see 1 or more mono processes running:
My ouptut is:
You are basically done now. Please connect to your new HS4 environment from a web browser and setup your license information.
Please NOTE: There are many possible variations to these instructions, but this is what has worked for me. My initial adventure took me about 4 days to get through in solving a variety of problems. I hope to spare you the pain of doing that.
There are many people more knowledgeable about linux than I am and I welcome any feedback or recommendation from them!
Assumptions:
I am assuming that you are either:
A) Upgrading from an older version of Debian on the Hometroller
B) Trying to prepare a system run HS4
C) Installing a larger disk in your hometroller
For A or B, you should get a backup of your system! Do not forget to do this!
To backup, run:
Code:
tar -cvf /tmp/HomeSeer.tar /usr/local/HomeSeer /var/www
Once you have this, get it off the system! These directions completely wipe the box clean and nothing is preserved!
I used winscp to copy the file to my local PC and save it there.
My install/update was for one of the original hometrollers sold by HomeSeer. The 'SEL' on the end meant Secure Edition Linux.
Please NOTE: I do not recommend that you install the SEL extensions for Linux at this time. I have used them before and unless you have experience debugging them, they will shutdown your system. I hope to look further into that at a later time when I have several days to invest in fixing things as they happen!
I have not done this process on any system other than the HomeTroller offerred by HomeSeer, but knowing a bit a about unix/Linix, I would expect them to work for most systems. This does not take into account any other software installed on the system! Anything outside Homeseer is your responsability!
0) If you have not done so, BACKUP and SAVE your existing HomeSeer setup as discussed above!
1) Get the source DVD. I used:
debian-10.5.0-i386-DVD-1.iso
From https://cdimage.debian.org/debian-cd.../i386/iso-dvd/.
2) The use something to burn this onto a USB drive. I used Win32DiskImager. There are LOTS of options out there for this.
3) Insert the USB drive into the system.
4) Reboot the system into firmware. Check that the SATA interface is running in AHCI mode and not IDE.
5) Check the bootlist. Make the USB the first boot device. And set it for the legacy boot as well.
6) Save your changes and reboot.
7) Install Debian:
My main choice here was to use the whole disk as a single file system and install it with LVM. LVM makes recovery of the structures, if needed, much easier.
I also chose not to use a network mirror.
I created my homeseer user ID here and set the password. Write it down along with the root password!
8) During the installation, I got a clear message that grub failed to load.
9) Select 'Continue with no bootloader installed' and finish the install.
10) Reboot again from the USB. Then select "Advanced Options". Then select "Graphical rescue mode".
11) Your root file system will depend on whether you installed LVM or not. I happen to have installed LVM for some ease of management and recoverability reasons. The device I use for my root file system is:
Code:
/dev/mapper/homeseer--vg-root
I personally NEVER saw the option to reinstall the GRUB boot loader in recovery mode.
13) Generate the basic grub config file:
Code:
grub-mkconfig -o /boot/grub/grub.cfg
Code:
grub-install /dev/sda
15) Take out the usb drive and you should boot from the disk. Reboot!
16) Login as homeseer and use the password you set for it.
17) At this point, you have a lot of work still to do! First, use "su -" to get root access:
Code:
su -
18) Edit /etc/group and add homeseer to the sudo group. It should look like this:
Code:
sudo:x:NN:homeseer
Save the file, exit root's shell, logout and login again as homeseer.
19) As homeseer, run:
Code:
sudo bash
Code:
root@homeseer:/home/homeseer#
Code:
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Created symlink /etc/systemd/system/sleep.target → /dev/null.
Created symlink /etc/systemd/system/suspend.target → /dev/null.
Created symlink /etc/systemd/system/hibernate.target → /dev/null.
Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.
21) Fix the installation sources! If you don't do this, you will not be able to load software.
Edit /etc/apt/sources.list to read:
Code:
# deb cdrom:[Debian GNU/Linux 10.5.0 _Buster_ - Official i386 DVD Binary-1 20200801-13:12]/ buster contrib main deb http://deb.debian.org/debian buster main contrib deb-src http://deb.debian.org/debian buster main contrib deb http://security.debian.org/debian-security buster/updates main contrib deb-src http://security.debian.org/debian-security buster/updates main contrib # buster-updates, previously known as 'volatile' # A network mirror was not selected during install. The following entries # are provided as examples, but you should amend them as appropriate # for your mirror of choice. # # deb http://deb.debian.org/debian/ buster-updates main contrib # deb-src http://deb.debian.org/debian/ buster-updates main contrib
22) Go to the mono website and add it to your reposotories:
Code:
https://www.mono-project.com/download/stable/#download-lin
23) Install mono-devel:
Code:
apt install mono-devel
24) Install the Visual Basic extension for mono:
Code:
apt install mono-vbnc
25) Install avahi-daemon for chromecast support:
Code:
apt install avahi-daemon
Code:
apt install unzip
Edit /etc/default/grub and uncomment:
Code:
#GRUB_TERMINAL_OUTPUT=console
Code:
grub-mkconfig -o /boot/grub2/grub.cfg grub-install /dev/sda
28) Copy the back you made before we started to the new system. Put it in /.
29) Restore the backup:
Code:
cd / tar -xvf HomeSeer.tar
29) Update!
Code:
cd / wget https://homeseer.com/hometroller/sel/RecoverySEL.tar tar -xvf RecoverySEL.tar tar -f RecoverySEL.tar
Create /etc/systemd/system/hs4.service to have:
Code:
[Unit] Description=HomeSeer Home Automation Documentation=https://homeseer.com/support-home/ After=network-online.target remote-fs.target time-sync.target Before=multi-user.target [Service] WorkingDirectory=/opt/HomeSeer ExecStart=/usr/bin/mono HSConsole.exe --log SyslogIdentifier=HomeSeer HSx StandardOutput=null Restart=on-failure RestartSec=30 KillMode=none TimeoutStopSec=300 ExecStop=/opt/HomeSeer/hsstop.sh [Install] WantedBy=multi-user.target
Code:
chmod a+x /etc/systemd/system/hs4.service
Code:
#!/bin/bash # hsstop.sh - stop the HS application # supports: systemd service shutdown # import login credentials used to login to web server # these are ignored if password not required inifile=$(dirname $0)/Config/$(basename $0 .sh).ini login= test -r $inifile && . $inifile # extract web server port from settings.ini hsroot=$(dirname $0) # where this script lives webport=$(awk -F= '\ { gsub("\015", "") # remove CR character if ($1 == "gWebSvrPort") print $2 } ' $hsroot/Config/settings.ini) # send application shutdown command for i in $(seq 1 5) do curl -f -s -o /dev/null ${login:+-u} $login --data 'ConfirmShutdownhs=Yes' " http://localhost:$webport/LinuxTools" rc=$? test $rc -eq 0 && break sleep 2 done killmain() { test -n "$MAINPID" && kill -0 $MAINPID && kill $MAINPID } trap killmain EXIT # if curl cmd unsuccessful, terminate main process test $rc -ne 0 && killmain # wait until all HomeSeer mono processes terminate, with timeout maxwait=300 polltime=5 mono=$(which mono) || exit for (( t=0; t<$maxwait; t+=$polltime )) do pgrep -af $mono.'*'\(HSConsole\|HomeSeer\) || break sleep $polltime done
Code:
chmod a+x /usr/local/HomeSeer/hsstop.sh
34) Enable the hs4 service:
Code:
systemctl daemon-reload systemctl enable myservice.service systemctl start myservice.service
At this point, you should see 1 or more mono processes running:
Code:
ps -ef | grep mono
Code:
root 24271 1 2 Aug09 ? 03:49:22 /usr/bin/mono HSConsole.exe --log root 24319 24271 2 Aug09 ? 02:56:02 /usr/bin/mono /usr/local/HomeSeer/HSPI_Insteon.exe root 24352 24271 5 Aug09 ? 07:22:53 /usr/bin/mono /usr/local/HomeSeer/HSPI_Ecobee.exe root 24361 24271 0 Aug09 ? 00:35:54 /usr/bin/mono /usr/local/HomeSeer/HSPI_SDJHealth.exe
Comment