jshank / bwalink

Automate your Balboa Spa! A docker container with socat and ccutrer/balboa_worldwide_app that supports a remote serial to IP device or host running ser2net, socat or ESPEasy serial server
30 stars 6 forks source link

Add docker native timezone support #2

Closed jshank closed 2 years ago

jshank commented 2 years ago

From @squirtbrnr I noticed is the app/docker container is setting my hot tub time to 6 hours ahead of my actual time. I am in CST which is UTC-5 currently. I try to reset the time from the local panel and it immediately resets to the time set by the app. This most likely has to do with how/where I am running the container.

I run the docker container on a Synology NAS running DSM 6.2.4-25556 Update 2 (latest DSM 6 at the time of this post). Synology does not have the path "/etc/timezone" so the volume mount command -v /etc/timezone:/etc/timezone:ro fails and the container will not start. Instead I can set an environment variable with my timezone like this -e TZ=America/Chicago. My full docker run command is:

sudo docker run --rm --name=bwalink --restart no -v /volume1/docker/bwalink/balboa_worldwide_app-1.3.0:/usr/local/bundle/gems/balboa_worldwide_app-1.3.0 -v /etc/localtime:/etc/localtime:ro -e TZ=America/Chicago -e MQTT_URI=mqtt://balboa:balboa@192.168.1.95:1883 -e BRIDGE_IP=192.168.1.50 -e LOG_LEVEL=DEBUG ghcr.io/jshank/bwalink:latest
jshank commented 2 years ago

Native timezone support has been added to BWALink 2021.12.

@squirtbrnr please test and confirm this addresses the Synology timezone issue.

squirtbrnr commented 2 years ago

This fixes the hot tub control panel time being off by +6 hours. However the docker container log is spammed with time difference and correcting messages. It almost looks like because the hot tub is not reporting back the time, the app/container thinks the time never changes (see the increasing difference in time). bwalink.csv

jshank commented 2 years ago

I think we're at a compatibility issue between ccutrer/balboa_worldwide_app and your MXBP20. The protocols are close but not quite compatible. I've done everything I can in the docker container and the Home Assistant MQTT discovery code but I'd suggest opening an issue upstream and provide the debugs you did here. Cody et al may be able to enhance balboa_worldwide_app to support the Maax, Coleman Spas Control Protocol.