BrainicHQ / tado-assistant

Enhance your Tado experience with this free, user-friendly auto-assist tool, now featuring multi-account support! Ideal for both tech-savvy and non-technical users, it offers advanced home state monitoring, smart adjustments, and open window detection. Independently developed and not affiliated with Tado GmbH.
GNU General Public License v3.0
21 stars 3 forks source link

System timezone #3

Closed s1lviu closed 9 months ago

s1lviu commented 9 months ago
          Just one idea. It would be awesome if the timezone could be adjusted. I guess the default is UTC because it is 1 hour back for me. I tried the TZ env variable but it does not work.

Originally posted by @saschabrockel in https://github.com/BrainicHQ/tado-assistant/issues/2#issuecomment-1871719409

s1lviu commented 9 months ago

@saschabrockel, the script should use the system timezone. Can you double-check if your environment has the right timezone set for that? Thanks!

saschabrockel commented 9 months ago

@s1lviu Hmm my system time is correct. I'm using NTP to set timezone and time. Fri Dec 29 14:48:37 CET 2023

s1lviu commented 9 months ago

Do you have any specific Docker settings then?

saschabrockel commented 9 months ago

Not that I would know. I'm using it on my UNRAID server.

s1lviu commented 9 months ago

Ok. As Docker uses by default UTC timezone, you can run the script with the TZ parameter:

docker run -d --name tado-assistant \
        -e TZ='Europe/Berlin' \  
        -e NUM_ACCOUNTS=2 \
        -e TADO_USERNAME_1='your_username_1' \
        -e TADO_PASSWORD_1='your_password_1' \
        -e CHECKING_INTERVAL_1=15 \
        -e ENABLE_LOG_1=true \
        -e LOG_FILE_1=<LOG_FILE_PATH_1> \
        -e MAX_OPEN_WINDOW_DURATION_1= \
        -e TADO_USERNAME_2='your_username_2' \
        -e TADO_PASSWORD_2='your_password_2' \
        -e CHECKING_INTERVAL_2=15 \
        -e ENABLE_LOG_2=true \
        -e LOG_FILE_2=<LOG_FILE_PATH_2> \
        -e MAX_OPEN_WINDOW_DURATION_2= \
        brainic/tado-assistant
saschabrockel commented 9 months ago

Does it work for you? I tried it with TZ like I said in the beginning but nothing changed.

docker run
  -d
  --name='tado-assistant'
  --net='unraid'
  -e TZ="Europe/Berlin"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="UNRAID-Server"
  -e HOST_CONTAINERNAME="tado-assistant"
  -e 'NUM_ACCOUNTS'='1'
  -e 'TADO_USERNAME_1'='xyz'
  -e 'TADO_PASSWORD_1'='xyz'
  -e 'CHECKING_INTERVAL_1'='15'
  -e 'ENABLE_LOG_1'='true'
  -e 'LOG_FILE_1'=''
  -e 'MAX_OPEN_WINDOW_DURATION_1'=''
  -e 'TZ'='Europe/Berlin'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://play-lh.googleusercontent.com/NEKYb6DhXZQy5rFNjWQHrArQWvYRa3xM8MZHIhqbqwiu7wOkr60feA6gaAFwQ5wZtec' 'brainic/tado-assistant'
71cb23bf5f3033dac8af007fc757c59618f8acd96d5f10fe0a2189f31c3a6ab1
s1lviu commented 9 months ago

For me, it was working without TZ, but I have updated the docker image and now TZ should work fine.

saschabrockel commented 9 months ago

Yes! It works now.