github DustyArmstrong/homeassistant-desktop 1.7.2

4 hours ago

Features

This is an update with a series of fixes and tweaks primarily intended to address window display issues on Windows. There are no new features yet, however some changes have been made that will (positively) affect functionality. Despite the lack of new features, the changes are still quite extensive.

Linux

Added new menu item for window positioning (with X11 back end, Wayland will not move the window, it will always center), users can choose from top/bottom left and top/bottom right depending on preference. This is used as a fallback if the tray position cannot be calculated (bounds reported as 0, 0). Tested as far as able, please report if bounds somehow still extend off-screen.

Bug Fixes & Tweaks

All Builds

A major change to the window display logic has been implemented as a result of #44 and #48. Most of the original logic was carried over from 1.5.X and was no longer fit-for-purpose following Electron window bounds/position calculations introduced beyond v41. This was particularly problematic on Windows where it was compounded by the OS-level window management, causing both size and positional drift on each showWindow() event, if the window even displayed at all. The application now respects configured values rather than relying on programmatic calculations, which themselves relied on a mix of physical/logical pixel detections, made significantly worse when using a fractional display factor (e.g. 1.25, 1.5). Overall, a complex issue to resolve.

Additional checks have been added to validate the window bounds and placement. Window is now limited to stay within the screen bounds (max 0.8x display), with an additional hard ceiling and floor. Configured values that do not fall within these bounds are now clamped. Also added mild guard against corrupt values (e.g. negative weirdness). Re-configured minimum width (420 > 300) to help with edge placement for people who prefer thinner windows (single stack cards). Application should now be DPI aware and detect logical bounds to ensure window is placed within the available screen space.

Following review of #40, a new command line switch has been added to the application launch that caps the available disk cache at 100MB. While it has not been reported that this is a regular issue, this seemed like a sensible "middle ground" to ensure things are kept within sane limits. A review of my own cache usage found it to be less than 50MB across my various systems, so 100MB should be ample.

"Hover to show" has been removed. Following review and as a result of the implemented window fixes, this seemed more trouble than it's worth (primarily the overlapping and excessive mouse detection events), and it isn't that common for tray applications to provide this feature. The application is now shown either through a click of the tray icon (mouse would be over the icon anyway), or via the selected keyboard shortcut.

Scale and DPI options have been removed as they no longer appear to do anything - the application should scale and adjust automatically (which was part of the problem for #44 and #48).

Moved frameless window into Appearance menu item.

The websocket token refresh should no longer produce file errors in the log file, this was being caused by a race condition where the error page was being shown while the window was still being created following token expiry. Made minor adjustments to networking flows and error handling.

Windows

As above, the issue with "frameless" windows is now resolved. The window position (when not detached) should always hug the side closest to the edge of the display, wherever the tray is located. Additional logic is implemented for Windows specifically to better determine logical tray bounds. For alternative placements not anchored to the tray, please use "detached mode".

Linux

Modified the package build to skip asar usage in the hopes this helps with FUSE unreliable and inconsistent AppImage mount and cleanup issues with /tmp/.homeBLAH present on some distributions, referenced in #47 . Testing found no noticeable performance hit, so it seems like a pretty reasonable tradeoff if it helps avoid "file not found" errors with FUSE. Tested on Arch Linux ARM with GNOME + Wayland (X11 flags set).

The upgrade in Electron version should also fix some tray icon issues, verified on Wayland (X11 flags set and unset - both work now).

Other

  • Migrated repository to bun from npm to make use of minimumReleaseAge for dependency safety
  • Refactored window.js to split out window creation from the window listeners for easier reading and maintenance
  • Modified logging to include window location, removed other logs, added others
  • Added a series of guards and some debouncing for window resize and move events to reduce overlap and event deluge
  • Additional specific logic for Linux and Windows
  • Updated dependencies

Note

Please note that the Windows builds for ARM don't appear to work currently, however the x86 version seems to run just fine on ARM systems.

Test Results

Platform Architecture Desktop Env Tray Icon Window Display Index Load Window Movements Window Resize Overall
Windows x86 Windows ✅ ✅ ✅ ✅ ✅ ✅
Windows ARM Windows ✅ ✅ ✅ ✅ ✅ ✅
MacOS ARM MacOS ✅ ✅ ✅ ✅ ✅ ✅
Fedora Linux ARM XFCE ✅ ✅ ✅ ✅ ✅ ✅
Arch Linux ARM GNOME ✅ ✅ ✅ X11: ✅ Wayland:❌ ✅ ✅
Arch Linux x86 KDE ✅ ✅ ✅ X11: ✅ Wayland:❌ ✅ ✅

Tips

Window positioning on Wayland remains an issue, please consider using X11 flags if the central window is annoying (I'll keep trying to work on it with each release!), or try a 3rd party window positioning tool designed for use with Wayland. I am more than happy to take recommendations on how to improve Wayland support if I am missing something.

It is recommended to use a desktop file to run Home Assistant Desktop (see README for examples).

Release Hashes

Filename SHA256 Hash
Home Assistant Desktop-v1.7.2-linux-aarch64.pacman f5db0b6da13917dc01bc303775514e4f0157638a27b79aa622ac5e4d0bfc9069
Home Assistant Desktop-v1.7.2-linux-aarch64.rpm 98c39384369d9a80cae63627350b83d2fa657cd2bc0ec8b8430d5656a1f4348b
Home Assistant Desktop-v1.7.2-linux-amd64.deb 5396957f5c60b7b54d585c5befa95c663877a2e2249a2ffec1d7cd222798c249
Home Assistant Desktop-v1.7.2-linux-arm64.AppImage 28fc29fb1a65a7bd3be297b7bcc7731b832ad0849cfe9a9c6617916a915d563c
Home Assistant Desktop-v1.7.2-linux-arm64.deb 24972d0271c25d58b9abd74e55a081cce2a0061ed9291dfff208de81dc221105
Home Assistant Desktop-v1.7.2-linux-x64.pacman 4168d99c999b04768d09bbce65b5408f7cafe66b42aefcb236011daa884cb63d
Home Assistant Desktop-v1.7.2-linux-x86_64.AppImage 2c2441e554d37c00162c38fdc4e0ea46b44e133944e5c2492a0d20eb5019ad39
Home Assistant Desktop-v1.7.2-linux-x86_64.rpm c458ba0eef505099ea1b973516773e85a19f0a33564da492e549e4d0c6e82b43
Home Assistant Desktop-v1.7.2-mac-arm64.dmg aa188e7120f75b0d50cb93a754d0f3605187093b73bca18cfb194106e202dcb2
Home Assistant Desktop-v1.7.2-mac-x64.dmg 7e1fe85b9ea32d0f7deee2ce449a8a5994e15490dba3b3e58217c951283cf387
Home Assistant Desktop-v1.7.2-win-x64.exe 19362d3d49aa716de2351dff26ce377241192c46385bba6ada32f5d4886ce770

What's Changed

Full Changelog: 1.7.1...1.7.2

Don't miss a new homeassistant-desktop release

NewReleases is sending notifications on new releases.