Re: Honeywell Lyric Thermostat
Posted: Saturday 27 January 2024 11:35
I found out today, after it failed for the first time after a long period, that the the NGINX config would only resolve the dns of api.honeywell.com one time, so it was pointing to a fixed ip address of a server that didn't work anymore. After some research I think the solution is to make these changes in the config of the reverse proxy to force the dns request each time:
jvdz wrote: ↑Friday 08 December 2023 14:52Code: Select all
server { include /etc/nginx/proxy_params; listen 443 ssl; keepalive_timeout 70; server_name api.honeywell.com; ## added this to force dns resolution -> https://forum.nginx.org/read.php?2,215830,215832#msg-215832 set $backend "api.honeywell.com"; ssl on; ssl_certificate /etc/ssl/letsencrypt/SSLcertificate.crt; ssl_certificate_key /etc/ssl/letsencrypt/SSLprivatekey.key; access_log /var/log/nginx/honeywell.access.log; error_log /var/log/nginx/honeywell.error.log; resolver 8.8.8.8 valid=10s; location / { proxy_set_header Host api.honeywell.com; ## Changed this to force dns resolution -> https://forum.nginx.org/read.php?2,215830,215832#msg-215832 # proxy_pass https://api.honeywell.com; proxy_pass https://$backend; sub_filter '"expires_in":"1799"' '"expires_in":"699"'; sub_filter 'Invalid' 'foutje'; sub_filter_types *; } }