Originally posted by SteveW
View Post
Announcement
Collapse
No announcement yet.
Installing HS4 on Linux
Collapse
This is a sticky topic.
X
X
-
When I first got HS3 on Debian 8 running on a virtual machine running on QEMU (Linux, x86-64), I wrote a simple script to be able to reproduce the install.
I've since upgraded to Debian 11 and HS4; So I decided to review this and make sure it still works.
First, download a net install of Debian 11:
https://www.debian.org/download
Install the minimum requirements. Only select "SSH Server". Do not need to install desktop GUI and do not install a web server. The less the better, except for SSH server.
If using a Z-Wave or Zigbee USB stick, you'll also need to map it to the VM by mapping the USB device on the host to the VM. (This can be done from the virtualization GUI like virt-manager on Linux or VMWare or VirtualBox).
I started with an USB stick but then I end up installing a Z-Net because it has better range and has been solid, but cannot be used outside of HomeSeer.
So I went over the kickstart script again, updated some bits and re-tested on a new VM. HS4 starts right away.
Notes / Caveats:
- If the script doesn't finish installing everything, reboot and run it again.
- It should not break thing running it several times if this script was used to kickstart the system.
- It also installs a serial console. If using a VM, this comes very handy because when things go wrong, I can log in via serial console, like this: "virsh console homeseer" from the host or other virsh client, without using a video console.
- Things might change with Debian 12. We'll see then.
- It will install the now-current version of HomeSeer and configure it as a system service.
- to stop it from Linux, run 'systemctl stop homeseer'. 'systemctl start homeseer' for starting it again, and so on.
- Installing Mono from the official repo takes time, be patient.
This is somewhat rough. There are not a lot of checks, but it works.
Run this script inside the homeseer VM, do not run it on the virtualization host, and run this as root.
Copy this to a file called 'debian-install-homeseer.sh' (or whatever you like) and make it executable:
chmod +x debian-install-homeseer.shAttached Files
- Likes 2
Comment
-
what's the correct way to update HS4 on linux (i'm running Debian)
Current Version: 4.2.6.0
Latest Release: 4.2.7.0
i tried the Install Update... button on the Setup page, waited for the countdown, then restarted. Still on 4.2.6.0Mark
HS3 Pro 4.2.17.0
Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3| Ultra1Wire3 | RFXCOM | NetCAM | HS MyQ | BLRadar | BLDenon | Jon00 Charting | Jon00 Links
Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory
Comment
-
Your installation directory may be in a different location than mine, so modify these commands as appropriate. Mine is installed in /usr/local/HomeSeer
Navigate to the directory above ../HomeSeer (e.g /usr/local)
Get the package: sudo wget https://homeseer.com/updates4/linux_4_2_7_0.tar.gz
Extract the package into the HomeSeer directory: sudo tar -xvf /usr/local/HomeSeer/linux_4_2_7_0.tar.gz
Comment
-
Originally posted by SteveW View PostYour installation directory may be in a different location than mine, so modify these commands as appropriate. Mine is installed in /usr/local/HomeSeer
Navigate to the directory above ../HomeSeer (e.g /usr/local)
Get the package: sudo wget https://homeseer.com/updates4/linux_4_2_7_0.tar.gz
Extract the package into the HomeSeer directory: sudo tar -xvf /usr/local/HomeSeer/linux_4_2_7_0.tar.gzMark
HS3 Pro 4.2.17.0
Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3| Ultra1Wire3 | RFXCOM | NetCAM | HS MyQ | BLRadar | BLDenon | Jon00 Charting | Jon00 Links
Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory
Comment
-
Originally posted by mnsandler View Post
thanks for the info. so the Install Update button the hs Setup page doesn't work,
Comment
-
How is it possible to start the "./go" or "autostart_hs" script automatically after systemstart?
I have found two scripts, " go & autostart_hs" in the "HomeSeer" folder.
My OS is Debian 10 x64.
Have someone a possible solution or idea? It would also be great, if this Runs without any logins on the Console.
The RaspberryPi Version can do it out of the box.
Comment
-
Anyone know why I can't shutdown Homeseer from the Linux Tools Menu?
Every time I try it automatically restarts.
Here's my start/stop files:
Code:[B]homeseer.service[/B] [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=/usr/local/HomeSeer ExecStart=/usr/bin/mono HSConsole.exe --log SyslogIdentifier=HSConsole StandardOutput=null Restart=on-failure RestartSec=30 KillMode=none TimeoutStopSec=300 ExecStop=/usr/local/HomeSeer/stop_homeseer.sh [Install] WantedBy=multi-user.target [B]stop_homeseer.sh[/B] #!/bin/bash /usr/bin/curl --user root:xxxx 'http://127.0.0.1/LinuxTools' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data 'ConfirmShutdownhs=Yes' --compressed while pgrep -f mono -U homeseer > /dev/null; do sleep 2; echo Waiting for HomeSeer to stop; done
Comment
-
Originally posted by Demusman View PostAnyone know why I can't shutdown Homeseer from the Linux Tools Menu?
Every time I try it automatically restarts.
Here's my start/stop files:
...
To fix, replace the last line with:
Code:# 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 -afi $mono.'*'\(HSConsole\|HSPI_\) || break sleep $polltime done
To investigate your issue, run this command to capture syslog output, then run the shutdown from the menu.
Code:tail -f /var/log/syslog
On my HS4 test system, these syslog entries are displayed a few seconds after confirming the shutdown
Code:Feb 18 13:56:09 HS4Pro systemd[1]: homeseer.service: Succeeded. Feb 18 13:56:09 HS4Pro systemd[1]: homeseer.service: Consumed 2min 49.075s CPU time.
Comment
-
Originally posted by zwolfpack View Post
To investigate your issue, run this command to capture syslog output, then run the shutdown from the menu.
Code:tail -f /var/log/syslog
On my HS4 test system, these syslog entries are displayed a few seconds after confirming the shutdown
Code:Feb 18 13:56:09 HS4Pro systemd[1]: homeseer.service: Succeeded. Feb 18 13:56:09 HS4Pro systemd[1]: homeseer.service: Consumed 2min 49.075s CPU time.
So I moved the stop script to /usr/bin/ and changed the start script to reflect that in ExecStop, thinking it was a permission issue.
No luck there either but now I'm also getting "homeseer.service: Failed to execute command: No such file or directory"
Is that referring to the stop script??
Code:Feb 19 08:49:41 homeseer systemd[1306]: homeseer.service: Failed to execute command: No such file or directory Feb 19 08:49:41 homeseer systemd[1306]: homeseer.service: Failed at step EXEC spawning /usr/bin/stop_homeseer.sh: No such file or directory Feb 19 08:49:41 homeseer systemd[1]: homeseer.service: Control process exited, code=exited, status=203/EXEC Feb 19 08:49:41 homeseer systemd[1]: homeseer.service: Failed with result 'exit-code'. Feb 19 08:50:11 homeseer systemd[1]: homeseer.service: Scheduled restart job, restart counter is at 1. Feb 19 08:50:11 homeseer systemd[1]: Stopped HomeSeer Home Automation. Feb 19 08:50:11 homeseer systemd[1]: Started HomeSeer Home Automation.
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=/usr/local/HomeSeer ExecStart=/usr/bin/mono HSConsole.exe --log SyslogIdentifier=HSConsole StandardOutput=null Restart=on-failure RestartSec=30 KillMode=none TimeoutStopSec=300 ExecStop=/usr/bin/stop_homeseer.sh [Install] WantedBy=multi-user.target
Comment
-
You didn't need to move the script to /usr/bin, that won't make any difference.
The message
Code:homeseer.service: Failed at step EXEC spawning /usr/bin/stop_homeseer.sh: No such file or directory
Does the stop_homeseer.sh script have executable permissions set? Run
Code:chmod +x stop_homeseer.sh
Did you make changes I suggested to the stop_homeseer.sh script? What are it's current contents?
If you make changes to the homeseer.service unit file, run
Code:sudo systemctl daemon-reload
Comment
Comment