Announcement

Collapse
No announcement yet.

Help with HS4 in Docker on a Synology NAS

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

    Help with HS4 in Docker on a Synology NAS

    I have a synology NAS and am new to Docker. I'm hoping someone can help me.

    I have downloaded @e1ite 's image and have been able to get it running within Docker on my Synology NAS.

    However, I am not sure how to access it now. When I click the link that was generated on the Synology desktop, it shows me an overview of the container itself. When I try to access it via the NAS IP and the assigned local port (for example 192.168.1.5:32797 - because 32797 was assigned to port 80) I get an error message stating "This page isn't working."

    What have I missed? How can i best troubleshoot this?

    I appreciate your help!

    Ed

    #2
    You could start from scratch with this image I updated this morning (not tested though). I find using macvlan and assigning an IP to your container works better (don't have to worry about ports). Here's how to do it.

    Ssh into your DiskStation
    Code:
    ssh -p SSH-PORT admin@SYNO-IP
    Then
    Code:
    sudo -i
    Then run the following substituting your subnet and gateway IP with yours. Assuming your router IP is 192.168.1.1 within the 192.168.1.0 subnet. This will allow creation of a Docker container with its own IP within your subnet.

    Code:
    docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eth0 pub_net
    Get the latests image by doing this:
    Code:
    docker pull fastfreddi/ubuntu-baseimage-homeseer:latest
    Then run this command, while substituting the ip for the address that you wish your Docker Container to have within your subnet (I put in 192.168.1.6, you may have to adjust router setting to reserve this IP). The device=/dev/ttyACM0:/dev/ttyACM0 is what my z-wave show up as, make sure your device show up as this or adjust as needed. You can add what ever other USB device you might be using that you hope to make visible to the container.

    Code:
    docker run -d \
    --net=pub_net --ip=192.168.1.6 \
    --device=/dev/ttyACM0:/dev/ttyACM0 \
    --name=Syno-HomeSeer --restart unless-stopped \
    -v /etc/localtime:/etc/localtime:ro \
    fastfreddi/ubuntu-baseimage-homeseer:latest
    The docker run command is only used to create the container. Do not use docker run again after. After that you want to use docker start Syno-HomeSeer or docker stop Syno-HomeSeer.

    I think I remembered everything!


    To access and change things within the container:

    Code:
    docker exec -it Syno-HomeSeer /bin/bash

    To update the HomeSeer version, ssh into Synology and run (with sudo or root)(just substitute 4_1_10_0 with the version you want:
    (this assumes the file format from HomeSeer is still https://homeseer.com/updates4/linux_4_1_9_0.tar.gz)

    Code:
    sudo docker exec -i Syno-HomeSeer bash upgrade 4_1_10_0
    Then open Task Scheduler in Synology GUI.

    Create a triggered task called: HomeSeer Start
    Select user “root”
    Choose event: Boot-up
    Then in task settings, type: docker start Syno-HomeSeer

    Create a triggered task called: HomeSeer Stop
    Select user “root”
    Choose event: Shutdown
    Then in task settings, type: docker stop Syno-HomeSeer

    Enable both tasks and save settings.

    To access the web interface the first time, type in your browser you IP with /register.html to get things going:

    Code:
    http://192.168.1.6/register.html

    Comment


      #3
      Ok I've tested the image, seems to work, however there's an issue with HomeSeer not shutting down properly with the container. I will troubleshoot and correct the issue.

      Comment


        #4
        Ok, I've made some changes to the Docker image to deal with proper shutdown of HomeSeer both from within the container and with the docker stop command. The instructions above have been updated with a different docker run command to ensure proper supervisor function in the container.

        Comment


          #5
          Originally posted by FastFreddi View Post
          Ok, I've made some changes to the Docker image to deal with proper shutdown of HomeSeer both from within the container and with the docker stop command. The instructions above have been updated with a different docker run command to ensure proper supervisor function in the container.
          WOW! Thanks so much for all of your work on this. Amazing! I will give this a shot as soon as I can and let you know how I do. I may have a few questions along the way as I am just learning, so please bear with me. Thanks again!

          Ed

          Comment


            #6
            No problem. If you want to wait, there's one more change to implement to facilitate updates to HomeSeer.

            Comment


              #7
              Originally posted by FastFreddi View Post
              No problem. If you want to wait, there's one more change to implement to facilitate updates to HomeSeer.
              where do I find your image? and what would teh difference be in using your image vs. e1ite 's? Thanks again!

              ***Never mind! I just saw the Pull command!***
              But what what would the difference be in using your image vs. e1ite 's? Thanks again!

              Comment


                #8
                I suspect the guys working on e1ite put more work in it than me. I originally created this image specifically for Synology 4 years ago, at the time had to use a custom version of Docker which was impractical. The biggest difference between both images that I can see is that mine use Ubuntu Base Image which uses Runit as the supervisor process. e1ite uses a Mono base image with S6 overlay as the supervisor process. Ultimately both should use about the same amount of ressources. Mine gracefully shuts down HomeSeer, whereas e1ites does not. You could run the e1ite image with macvlan described above if you wanted. The macvlan way is better than using the net=host or specifying individual ports as it provides the container with its own IP on your network.

                Comment


                  #9
                  Ok just building new image now with upgrade script built-in. I'll edit post #2 with instructions.

                  Comment


                    #10
                    Originally posted by FastFreddi View Post
                    Ok just building new image now with upgrade script built-in. I'll edit post #2 with instructions.
                    Thanks a lot FastFreddi - your tag is very appropriate - you are fast!

                    Ed

                    Comment


                      #11
                      Very happy to have found this thread and that it's as fresh as can be. I was running HS3 on Synology for a number of years and decided it was time to move to HS4 in order to gain support for Hue natively. I have a couple tweaks to do still and will report back once I have any relevant notes.

                      I did want to extend my thanks to FastFreddi for the contribution in this space. HS on Docker is super light weight and works like a charm for HS3 and HS4. I don't see the need to run on Windows as I do not have a need for the additional features gained with HS running on Windows. The only down side is if you every have a need to contact support, it's a bit of a barrier to gain traction when you are not on physical.

                      Comment

                      Working...
                      X