Skip to content

Fix for UGOS not updating sensors without active Web GUI or App

Choose a tag to compare

@Tom-Bom-badil Tom-Bom-badil released this 01 Sep 21:03
· 189 commits to main since this release
37d2ceb

πŸ‘‰ For end users (please read!!!)

This Update will fix the problem that UGOS/HA isn't updating some of it's API end points when there is no active session through UGOS Web GUI or UGOS app.

❗ A code pull / re-deployment of the UGREEN API Token Proxy container on your NAS is highly recommended (takes ~2 minutes).
❗ Only updating the Home Assistant integration will work, but you won’t benefit from this fix without redeploying the container.

Beta testers (@rexprojects, @Sineiko, @Danoro821973):
Thank you, your help is much appreciated! πŸ™Œ
Make sure you switch your Docker Compose back from :develop to :main before pulling.


πŸ‘‰ For developers / internal changes

Docker container

  • Add ws_keepalive.py implementing a persistent WebSocket connection to UGOS
  • Add PyYAML to requirements
  • Install tzdata; limit Playwright dependencies to Chromium
  • Add TZ (timezone) to the environment so logs use local time
  • Add LOG_LEVEL (e.g., info, debug) to the environment
  • Harmonize logging across the container
  • Implement new /credentials endpoint as the single source of truth
  • Add comments to all files for better readability

HA integration

  • Add _push_credentials_to_proxy in api.py to periodically send credentials (and token, if present) to the proxy for the WebSocket keep-alive