Announcement

Collapse
No announcement yet.

Installing HS4 on Linux

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • garyd9
    replied
    If installing on ubuntu 20.04, the ubuntu distro provided "mono" is missing /usr/lib/mono/4.5/vbc.exe. This is only needed if you want to follow the directions in the second post of this thread (changing /usr/bin/vbnc so .aspx pages can load.) Note that some plugins might need aspx pages, so making this change is worthwhile...

    Here's how to get a more current mono distro:
    Code:
    sudo apt install gnupg apt-transport-https ca-certificates
    
    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
    
    sudo apt-add-repository 'deb https://download.mono-project.com/repo/ubuntu stable-focal main'
    
    sudo apt-update
    IF you've already installed the mono packages, you'll want to run "sudo apt upgrade" to update them, otherwise you should install them with:

    Code:
    sudo apt install mono-devel mono-vbnc
    Finally, add another package (which isn't available with the ubuntu provided distro):

    Code:
    sudo apt install mono-roslyn
    At this point, you should be able to following the instructions provided in the second post of this thread to modify /usr/bin/vbnc.

    Leave a comment:


  • SteveW
    replied
    Originally posted by Jamr View Post
    Wow, I have never ran into anything soooo difficult and I have been messing with PC's since the Vic 20. I guess I am not a command line guy. I had to look up how to log into Ubuntu with root access so I could do things with the GUI.

    So many issues and confusing statements surrounding HomSeer and a pure Linux installation. Especially with their own tech support calling this kind of installation a "Custom Install" and therefore will not support their own installation instructions. Their version of Windows installation is apparently not custom.
    Even the instructions here in the first post do not include instructions on how to auto start the program on a reboot. I realize others have tried to fill the gap but how do we know if the instructions work or may cause problems with something else? Everything seems to be pieced together. I am not putting anybody down for trying but we need to come together and make something official so we all can see it and improve it if necessary. With only two versions of Linux (Debian and Ubuntu) supported, it should not be that difficult.

    I created several instruction sheets for Vera over the years and have shared them on their forums. I would love to create some beginning to end complete instructions anyone, not just a Linux enthusiast, can use to install HS on Linux and without having to look everything up on how to do each step. It is also beneficial for all to see the directions and approve, and or correct as needed. As Open source should be.

    If anyone is interested in helping me with creating these instructions, please let me know. Since I am no Linux user or a programmer this stuff is pretty difficult for me to figure out.but I am good at documenting and preparing an instruction set.
    zwolf, you seem to know a lot about this and have helped me before with Linux problems. It would be great to collaborate with you. I totally understand if you are too busy but let me know if you can.

    Just trying to help. Thanks.
    No argument from me that the instructions are incomplete, assume a lot of prior Linux knowledge/skills, and include sometimes obsolete, sometimes helpful posts from various users peanut-buttered around this forum. If you are ok running it on a Raspberry Pi 4, then simply installing the HS4 Pi image on a RP 4 is the easiest way to go -- all the steps have been done for you.

    Frankly, I suggest that if it's more than you are comfortable handling, then install HS on Windows. The application is the same, since it runs on MS .NET, and the Linux installations run the app on Mono, which is an open-source version of .NET.

    Leave a comment:


  • Jamr
    replied
    Wow, I have never ran into anything soooo difficult and I have been messing with PC's since the Vic 20. I guess I am not a command line guy. I had to look up how to log into Ubuntu with root access so I could do things with the GUI.

    So many issues and confusing statements surrounding HomSeer and a pure Linux installation. Especially with their own tech support calling this kind of installation a "Custom Install" and therefore will not support their own installation instructions. Their version of Windows installation is apparently not custom.
    Even the instructions here in the first post do not include instructions on how to auto start the program on a reboot. I realize others have tried to fill the gap but how do we know if the instructions work or may cause problems with something else? Everything seems to be pieced together. I am not putting anybody down for trying but we need to come together and make something official so we all can see it and improve it if necessary. With only two versions of Linux (Debian and Ubuntu) supported, it should not be that difficult.

    I created several instruction sheets for Vera over the years and have shared them on their forums. I would love to create some beginning to end complete instructions anyone, not just a Linux enthusiast, can use to install HS on Linux and without having to look everything up on how to do each step. It is also beneficial for all to see the directions and approve, and or correct as needed. As Open source should be.

    If anyone is interested in helping me with creating these instructions, please let me know. Since I am no Linux user or a programmer this stuff is pretty difficult for me to figure out.but I am good at documenting and preparing an instruction set.
    zwolf, you seem to know a lot about this and have helped me before with Linux problems. It would be great to collaborate with you. I totally understand if you are too busy but let me know if you can.

    Just trying to help. Thanks.

    Leave a comment:


  • zwolfpack
    replied
    Originally posted by garyd9 View Post
    Is chromium (the browser) really needed for a homeseer runing as a daemon?
    No ... its another enduring mystery why HST lists that as a requirement.

    Leave a comment:


  • garyd9
    replied
    Is chromium (the browser) really needed for a homeseer runing as a daemon? When I did a test upgrade of HS3 to HS4 on ubuntu 18.04, that machine didn't have chromium (or anything GUI) installed on it, and HS4 appeared to work just fine.

    The reason for not installing the chromium browser is to keep a LOT of x11 bloat off the system.

    A similar argument could be made for not installing ffmpeg, though there are builds of ffmpeg that aren't dependent on x11. (or you could just compile your own.)

    Edit: I just finished re-doing my HS4 linux machine (replaced the SSD drive, installed ubuntu server 20.04, removed a ton of ubuntu bloat, and then copied over my homeseer install from my previous ubuntu 18.04 machine.) I did NOT install chromium-browser and HS4 appears to work just fine.
    Last edited by garyd9; November 18, 2021, 09:18 PM. Reason: editing on results of a 'new' ubuntu 20.04 headless machine

    Leave a comment:


  • zwolfpack
    replied
    You're trying to connect securely: https://192.168.1.17
    Try instead non-secure: http://192.168.1.17

    Leave a comment:


  • Jamr
    replied
    Thanks for the help. I think I will just stick with the pi version of the HS.

    Leave a comment:


  • zwolfpack
    replied
    root gets a '#" prompt. '$' tells you you're not root.
    Assuming you have sudo rights, prefix each of those commands with 'sudo' and you should be off to the races.

    Leave a comment:


  • Jamr
    replied
    Originally posted by GeekyDaddy
    This is my installation method, then use my startup method in the previous post.
    Code:
    apt-get -y install mono-devel mono-vbnc flite chromium-browser aha ffmpeg alsa-base alsa-utils
    apt-get -y remove brltty
    wget https://homeseer.com/updates4/linux_4_1_9_0.tar.gz -O homeseer.tar.gz
    tar xvzf homeseer.tar.gz -C /opt
    I keep getting this error when entering your installation commands.

    pi@PI4HS4:~$ apt-get -y install mono-devel mono-vbnc flite chromium-browser aha ffmpeg alsa-base alsa-utils
    E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

    I am root as the $ tells me.
    Anyone know what the heck I am doing wrong?

    Leave a comment:


  • Michelo
    replied
    Hi,

    I use below "homeseer.service" for shutting down gracefully. Found elsewhere on the forum :

    Code:
    [Unit]
    Description=HomeSeer HS3 Home Automation Server
    After=network.target
    
    [Service]
    WorkingDirectory=/opt/HomeSeer
    ExecStart=/usr/bin/mono /opt/HomeSeer/HSConsole.exe --log
    ExecStop=/opt/HomeSeer/stop_homeseer.sh
    Restart=on-failure
    TimeoutStopSec=90
    
    [Install]
    WantedBy=multi-user.target
    and the "stop_homeseer.sh":

    Code:
    #!/bin/bash
    sudo /usr/bin/curl 'http://127.0.0.1/LinuxTools' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data 'ConfirmShutdownhs=Yes' --compressed
    sleep 10s
    Michel.

    Leave a comment:


  • alan_smithee
    replied
    couple of question regarding the installation:

    apt-get install mono-devel
    apt-get install mono-vbnc

    For HS3 I used
    apt-get install -y mono-vbnc
    apt-get install -y mono-xsp4 (used to run ASP.NET 4.0 applications)
    This was good enough. Isn't installing mono-devel a little bit of an overkill?

    apt-get install aha
    from the description: reads the Input from a file or stdin and writes HTML-Code to stdout.
    Where is this used? I haven't used this for HS3

    apt-get-install aplay
    from the description: command line playback and recording
    Is this used for the tts same as flite?

    Leave a comment:


  • sdkIpZUSSrtmzqaRQeJ3OdqY
    replied
    For what it's worth, I have Homeseer4 running in docker successfully.

    I'm using this image: https://hub.docker.com/r/e1ite/docker-homeseer4

    And here's my docker compose

    Code:
    version: "3"
    services:
      homeseer:
        container_name: homeseer
        image: e1ite/docker-homeseer4:latest
        restart: unless-stopped
        ports:
          - 9898:80    # remap homeseer port to 9898 since 80 is taken by Traefik reverse proxy
          - 10200:10200
          - 10300:10300
          - 10401:10401
          - 11000:11000
        devices:
          - /dev/ttyUSB0:/dev/ttyUSB0 # Zwave
          - /dev/ttyUSB1:/dev/ttyUSB1 # Zigbee
        volumes:
          - "/mnt/docker/homeseer:/HomeSeer"
          - "/etc/localtime:/etc/localtime:ro"
        networks:
          - infrastructure
    
    networks:
      infrastructure:
        external: true
    The only issues that I have run into is that if its run in host/bridge mode, it can't see certain kinds of network devices, like Sonos. However if I run it in macvlan mode so it gets its own IP, it can't access the HS store.

    Still working on that issue. Have it running in host/bridge most for right now.

    The other issue is that Homeseer's basic auth doesn't play well with reverse proxies. Trying to figure out a way to disable it or get http forward auth working. I don't believe this is an issue limited to docker though

    Leave a comment:


  • citrixmeister
    replied
    Originally posted by rjh View Post

    By default, HS4 starts listening on port 80. If you happen to have the Apache web server installed port 80 may be in use. You can edit the HS4 config file in Config/settings.ini and change the setting:

    gWbSvrPort=80

    To a different port, then restart HS4.

    You can shut down HS4 from the console by hitting enter to get a prompt and then entering: shutdown
    I do have apache installed with port 80 in use. I did edit Config/settings.ini.

    There was no line such as gWbSvrPort=80, so i added it under [Settings] then saved.

    Upon restart I still get "02:22:41:5364:[Web Server]->Web Server started on port 80".

    Please note this is also a typographic error, the command should be gWebSvrPort=##.

    Leave a comment:


  • citrixmeister
    replied
    On Ubuntu 20.04.1 LTS

    sudo apt-get install aplay
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package aplay



    Leave a comment:


  • zigmund
    replied
    Originally posted by Fellhahn View Post
    From my limited knowledge, the requirement for root when opening ports is only for "well known" ports, < 1024.

    If you set the configuration to open a high port, say 8080 or 9443, would that not allow running as a non root user?
    Yes. HS with non root user with high port works fine. never had any problems.

    Leave a comment:

Working...
X