Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FYI I created a HS4 beta fork #20

Open
scyto opened this issue Apr 6, 2020 · 9 comments
Open

FYI I created a HS4 beta fork #20

scyto opened this issue Apr 6, 2020 · 9 comments

Comments

@scyto
Copy link

scyto commented Apr 6, 2020

Not sure if anyone else created a fork for this purpose?

If you would like to pull this to a beta repository and tag let me know if there is anything you want me to do. I may play with using buildx to do a multiarch tag / build too.

https://hub.docker.com/repository/docker/scyto/docker-homeseer4beta
https://github.com/scyto/docker-homeseer

@Fellhahn
Copy link

scyto I can't see an issues section on your own fork to ask this question. How likely do think it is you'll continue to support the HS4 fork?

Is it possible to update the HS4 application within the container sing some kind of docker exec command?

@scyto
Copy link
Author

scyto commented Jun 11, 2020

Not sure why you cant file a bug on the fork, will look.

I just reminded myself of the code, the version of HS used is set by a default env var thanks to who ever converted to S6 I think?

When you do docker run command just use the version you want with an env var parameter on the command line to override the default version.

I can update the image default later this week and re-push to docker hub.

I hadn’t progressed the fork as I didn’t know any one was using my image, lol. :-)

@scyto
Copy link
Author

scyto commented Jun 11, 2020

@Fellhahn ok github and dockerhub updated, build logs look good but i haven't had chance to spin it up and test, can you give it a quick run?

Also enabled issues on my fork - no idea why it was disabled, maybe its because it is a fork.

This reminds me i need to see what architectures S6 works on and see if i can do multiplatform build.... depends if HS has architecture dependent binaries in it....

Once HS4 goes GA I will add vars to choose HS3 or HS4 and propose the changes as upstream change.

@Fellhahn
Copy link

Awesome, thanks for such a fast response.

Stopped the HS4 container, removed, pulled the image again and re-ran 'docker-compose up'. Confirmed it downloaded HS 4.0.7.0 and starts without any noticeable issues.

A note for others, set your restart policy to "unless-stopped" instead of "always". Otherwise the container seems to restart when you perform the shutdown from within the HS UI?

And yes that version ENV variable works a treat. Added:

  • HOMESEER_VERSION=4_0_6_0

Under the environment: section of the compose file, re-upped and the container started with version 4.0.6.0.

Seeing how it downloads the homeseer installer at first run, adding a HS3/HS4 ENV veriable seems a nice clean solution. Makes it possible for users to pin to a certain build version as well.

While I'm yet to actually move my z-wave interface over, I'm pretty darn happy with this so far, so big thanks.

@scyto
Copy link
Author

scyto commented Jun 13, 2020

You are welcome, I am still running an ISY-994i as my primary controller because I have mix of Insteon and zwave. I have it on my list to seriously take another look at HS. I stopped a few weeks ago because of bugs affecting some plugins. I am hoping the new version fixed them.

Since I last posted I finally got around to looking at compose and stack files, docker run in a script is just as effective, lol. Been messing with portainer and swarm mode. Very interesting.

@danielbrunt57
Copy link

Hey, I have a question...
Does HS gracefully shutdown from a docker stop or a docker restart?

@dotchance
Copy link

dotchance commented Nov 28, 2020 via email

@danielbrunt57
Copy link

danielbrunt57 commented Nov 29, 2020

Is it possible to use a systemd service inside the container and if so, would docker stop execute systemctl stop HS4?

[Unit]
Description=HomeSeer HS4 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=HomeSeer HS4
StandardOutput=null
Restart=on-failure
RestartSec=30
KillMode=none
TimeoutStopSec=300
ExecStop=/usr/local/HomeSeer/hsstop.sh

[Install]
WantedBy=multi-user.target

@danielbrunt57
Copy link

danielbrunt57 commented Nov 29, 2020

It looks like docker-homeseer4/rootfs/etc/services.d/homeseer/finish runs

#!/usr/bin/with-contenv sh

[ "$TERMINATE_ON_ERROR" = "1" ] && s6-svscanctl -t /var/run/s6/services

Could this somehow execute /usr/local/HomeSeer/hsstop.sh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants