joshuar-go-hass-agent/CHANGELOG.md

109 KiB

Changelog

10.2.1 (2024-09-15)

Bug Fixes

  • linux: 🐛 correct power state tracking (5bb5a4d)
  • linux: 🐛 correct units of cpufreq sensors (21e7104)
  • linux: 🐛 make sure power controls pass required argument to D-Bus method call (c44cd2c)

Performance Improvements

  • agent: 🏗️ restructure preferences and hass client usage (f6b0833)
  • linux: adapt prometheus trick for grabbing hwmon file data (7b498bc)

10.2.0 (2024-09-12)

Features

  • hass: add validation of sensor requests (3e2c560)
  • preferences: add support for setting MQTT preferences via the command-line (b49d0db)

Bug Fixes

  • agent: 🐛 correct check on MQTT enabled for resetting agent (8d57930)
  • agent: 🐛 re-add profiling webui support (83e7c59)
  • cli: 🐛 retain --terminal cli flag for "headless" mode (e1f6f84)
  • cli: 🙈 ensure text files are included (be5c04f)
  • container: 🐛 Alpine container fixes (8317b8b)
  • dbusx: 🐛 introspect a method before calling to santize arguments (9bbf0d9)
  • device: 🐛 more robust fetching of device values (0be5b5f)
  • hass: 🐛 actually retrieve and return response errors from HA (f15d77e)
  • hass: 🐛 not all sensors with a device type have units (8d208b4)
  • hass: 🔇 normal websocket closure should not warn (gws pkg update change) (f1ce02d)
  • linux: 🐛 display at least some name if no display name was set for sensor (96bd6a2)
  • linux: 🐛 don't return nil slice, return slice with len 0 (1704d33)
  • linux: 🐛 ensure rate sensors have an initial value (of zero) for validation (a3096d0)
  • linux: 🐛 filter some uninteresting mountpoints from being disk usage sensors (6ea66d7)
  • linux: 🐛 handle missing stats (295a893)
  • linux: 🐛 only add values to context that are present/available (27d49fc)
  • linux: don't run problems worker if ABRT problems are not available in D-Bus (fecb599)
  • linux/hwmon: 🐛 fix naming of alarm sensors (ee78240)
  • logging: improve logging setup (a3e05bb)
  • upgrade: 🐛 don't report an error if there is no need to upgrade (ca3ba6e)
  • upgrade: 🐛 handle encountering nil when loading preferences (52c2d64)

Performance Improvements

  • agent: handle signals with a context (a719b92)
  • agent: improve protections against nil pointer exceptions (303dc58)
  • commands: improve protections against nil pointer exceptions (be98b17)
  • linux: 🔥 remove unnecessary custom logger from mem worker (2588436)
  • linux: ♻️ store and fetch more values to/from context (772fd56)
  • linux: improve disk IO sensors (6ef8dfb)
  • linux: improve protections against nil pointer exceptions (2793806)
  • linux: try to avoid dynamic sensor ID generation (1013711)
  • linux/hwmon: rework hwmon sensors (0164429)
  • linux/hwmon: simplify sensor collection (d145cab)
  • scripts: improve protections against nil pointer exceptions (191b7c0)

10.1.1 (2024-09-01)

Bug Fixes

  • linux: 🐛 don't include mounts where stats cannot be retrieved for disk usage sensors (82534c8)

10.1.0 (2024-08-27)

Features

  • linux: ♻️ rework memory usage sensors (0930a5c)
  • linux: add support for alternative system partition mounts in cpu sensors (55e6c78)
  • linux: improve cpufreq and introduce per core cpu usage sensors (412fef1)
  • linux: support ability to specify alternative mount points for system mounts via environment variables (133142b)

Bug Fixes

  • linux: 🐛 ensure disk io stats are correct (80f9a80)
  • linux: 🐛 ensure stats file is closed properly (8c97527)
  • linux: 🐛 fix bootime value after recent changes (fa977eb)
  • linux: 🐛 usage count values should be ints not strings (af01217)
  • linux: 🔇 don't report problems fetching hardware sensors at default log level (d271fee)
  • linux: ♻️ rework time, io and cpu sensors (01593c7)

Performance Improvements

  • linux: ♻️ improve disk usage sensors (712309c)
  • linux: fetch load averages internally (067e2ca)
  • linux: increase interval between polling for CPU frequency measurements (c44eeea)
  • linux: optimise disk io sensors (2124a77)

10.0.1 (2024-08-21)

Bug Fixes

  • agent,hass: 🐛 fix registration flow after hass client refactoring (5e4a9ba)
  • hass: 🐛 pass required request type to NewRequest (ec0a7e8)
  • linux: 🐛 ensure D-Bus command topic is unique (d403dbb)
  • linux: 🐛 make sure MQTT topics are unique for power and session controls (e77b927)
  • linux: 🔇 reduce log spam if a mountpoint usage cannot be retrieved (f4aea29)

Performance Improvements

  • agent,hass: refactor sensor processing (c7c3ff3)

10.0.0 (2024-08-17)

⚠ BREAKING CHANGES

  • agent: the device representing Go Hass Agent in Home Assistant has been renamed from the generic "Go Hass Agent" to the hostname of the device running Go Hass Agent.
  • prefs: The default app id has changed, which changes the path to the agent configuration. As such, the agent will need to be re-registered with Home Assistant.
  • major internal update
  • MQTT preferences have been renamed in the config file. They now sit under their own heading. Existing MQTT preferences are not migrated to the new settings.

Features

  • add an upgrade command to help with upgrading after major release (d244aa9)
  • agent: add support for number controls with custom MQTT commands (09d44c4)
  • agent: use a nicer name for the app "ID" that is exposed by Fyne to the desktop environment (87d9ae4)
  • agent: rename the MQTT device (da65683)
  • dbusx: add support for watching on arg namespace (22bc528)
  • linux: add basic webcam view/control (2c30336)
  • linux: add CPU frequency sensors (6b7b91f)
  • linux: add sensor tracking media status of any MPRIS compatibile player on the system (5915521)
  • linux: better screen/session controls (17759e2)
  • linux: improve active/running apps sensor code (2971035)
  • linux: increase polling (frequency) of cpu usage (%) sensor updates (8d4c9da)
  • preferences: 🔊 improve messages shown when preferences are not valid (cf4dd0a)

Bug Fixes

  • agent: 🐛 censure app id is set correctly in agent (c126d45)
  • agent: 🐛 correct mock name so go generate doesn't crash (e7ac7fb)
  • agent: 🐛 don't exit MQTT runner if MQTT commands cannot be set up (2417c4c)
  • agent: 🐛 don't run MQTT workers if there are no workers (bcc7636)
  • agent: 🐛 get HA config needs rest API URL (a549d39)
  • agent: 🐛 support passing registration parameters via command-line when running in graphical mode (4e35159)
  • agent: 🐛 sync sensor disabled state between registry and Home Assistant (cc8d89c)
  • agent: 🔊 write a log message when agent is registered (1cc6168)
  • agent: 🔇 fix logging when no MQTT commands are defined (718b0b0)
  • linux: 🐛 only provide power controls that are available on the device (540559d)
  • logging: 🐛 (again again) fix create directory for logfile (b73faff)
  • logging: 🐛 (again) create directory for log file if not exists (e60a7f0)
  • logging: 🐛 handle a non-existent directory for the log file (auto-create if necessary) (03eb8e4)
  • logging: 🔊 don't crash if we can't write to the log file (f92cf2f)
  • logging: 🔊 fix log file path and level details (1bf85ea)
  • scripts: 🐛 don't return an open channel that will never close if there are no scripts (d17d4e7)
  • ui: 🐛 re-add default server to list of servers when registering agent (c9cfd9c)

Performance Improvements

  • agent: 🔥 remove unnecessary goroutines and waitgroups (0f01468)

Code Refactoring

  • improved MQTT functionality (766fcce)
  • major internal update (61926f6)
  • prefs: change default app id (6125a45)

9.6.0 (2024-07-27)

Features

  • 🔊 improve logging output (5f12810)
  • agent: 🔊 improve agent logging (a35fcb2)
  • linux: D-Bus overhaul (2cf7dd4)

Bug Fixes

  • agent: 🐛 actually save agent preferences and show better dialogs for success/fail (dfd1c47)
  • agent: 🐛 make sure cron scheduler is stopped gracefully (d631411)
  • hass: 🔊 make request body more readable (bf1f6c4)
  • linux: 🔊 correct worker type in error message (5a62443)

Performance Improvements

  • improve ability to stop and start sensor workers (ad045c6)

Reverts

  • go: go back to previous go generate incantation (2495017)

9.5.2 (2024-07-07)

Bug Fixes

  • agent: 🐛 don't hang on register command if already registered (37e29cc)
  • agent: 🐛 ensure preferences are set in context after registration is completed (96bf97f)
  • agent: 🐛 make sure agent quits if registration process is cancelled (e5acc53)
  • hass: 🐛 don't add State/Device classes or Sensor Type values to responses if they are not set (022c80f)
  • linux: 🐛 handle quoted and unquoted values in /etc/os-release correctly (bdf4fce)
  • mage: 🐛 correct invocation for ldflags for fyne-cross (4ff7801)

Performance Improvements

  • ♻️ improve Home Assistant API request handling (36aee1c)
  • preferences rewrite (c15f486)
  • hass: ♻️ rework request logic (2031c88)

9.5.1 (2024-07-02)

Bug Fixes

  • linux: 🐛 don't try to create controls if they are unavailable (f2fafbc)
  • scripts: 🐛 improve error and argument handling (a37f20c)

Performance Improvements

  • agent: 🔥 remove unneeded and complicated koanf usage (b0740e8)

9.5.0 (2024-06-27)

Features

  • agent: support "switch" type custom MQTT commands (26f3272)
  • container: support cross-compilation for container images (37489ec)

Bug Fixes

  • hass: 🐛 ensure sensor attributes are correctly marshaled (ec6fe29)
  • pass correct arch to apt-get (e536162)

9.4.0 (2024-06-17)

Features

  • add a framework for allowing sensor workers to be start/stopped (988626a)
  • agent: add framework for running user-defined commands via MQTT buttons/switches (61ff2af)
  • agent: support ignore URLs registration option on command-line (17927ed)

Bug Fixes

  • 🐛 make log-level argument an enum (abee169)
  • 🐛 pass a context to worker creation functions (aeca410)
  • agent: 🎨 mqtt commands clean-up (56c55d2)
  • agent: 🐛 don't bail on registration if no preferences file was found but default preferences were returned (74b52f1)
  • agent: 🐛 ensure sensor workers can remain running when running headless (4fd534b)
  • agent: 🐛 hide worker failure log message behind debug logging as such failures are non-critical (3c4a4c5)
  • hass: 💬 show a more informative error message when registration inputs validation fails (57876e4)
  • linux: don't provide a location sensor when not running on a laptop device (acac8d7)
  • preferences: 🐛 correctly detect default preferences as not a fatal error (3297099)
  • translations: 🎨 ensure translator uses appropriate language (c0cd489)

9.3.0 (2024-06-01)

Features

  • ui: use a new icon and clean up text in UI (01bd2f3)

Bug Fixes

  • linux: 🐛 actually report correct distribution, distribution and kernel version as sensors (6db5082)
  • ui: 🐛 embed correct icon (6f9f412)

9.2.0 (2024-05-23)

Features

  • dbusx: 🎨 improved new WatchBus function with more support for native D-Bus match types (6066daa)
  • linux: add desktop session idle sensor (1bd5d08)
  • linux: migrate to different pulseaudio library (e5c576c)

Bug Fixes

  • agent: ⬆️ update go-hass-anything to fix authentication issues with MQTT (51d5f54)
  • dbusx: 🐛 better protection against nil pointer exception in bus connection from context retrieval (8ddf562)
  • linux: 🐛 request correct idleTime property (312179f)
  • linux: 🔥 remove spew (d454883)
  • linux: 🏷️ add idle sensor type (36c8319)
  • ui: 💄 Fyne -> Fyne Settings (42b8c76)

Performance Improvements

  • dbusx: support checking if multiple properties/signals have changed in a single watch (473a1ba)
  • linux: all power sensors using D-Bus use new dbusx.WatchBus function (03ab63e)
  • linux: complete migration of battery sensor code to dbusx.WatchBus (0055e56)
  • linux: rework battery sensor to use new dbusx.WatchBus function (77b172a)
  • linux: rework desktop preferences sensors to use dbusx.WatchBus function (46f6aaa)
  • linux: rework laptop sensors to use dbusx.WatchBus (942d089)
  • linux: rework network sensors to use new dbusx.WatchBus function (485a1e6)
  • linux: rework wifi properties sensors to use dbusx.WatchBus function (d5189ce)
  • linux: use new D-Bus watch method for location updates (a441579)
  • linux: use new D-Bus watch method for power state updates (dabed9f)
  • linux: user session tracking sensor use new dbusx.WatchBus function (4b7adc2)

9.1.1 (2024-05-18)

Bug Fixes

  • agent: 🚑 fix unavailable location sensor causing crashes (a9a54ac)

9.1.0 (2024-05-18)

Features

  • agent: 🏗️ start creating the framework for more efficient sensor updates (2b98a89)
  • agent: initial migration from cobra to kong (e93f733)
  • dbusx: new function for simpler watch creation (91cd040)
  • linux: detect machine chassis type (c5ac91a)
  • linux: new improved laptop sensors for lid closed state, docked state and external power connected state (c6ca2b6)

Bug Fixes

  • agent: 🐛 enable more profiling options (0717f92)
  • agent: 🐛 ensure a default app ID is set when not specified (e5c7265)
  • agent: 🐛 ensure log level is set appropriately on start (a00c742)
  • agent: 🐛 if no GUI detected, default to running headless (and show a warning) (6f9469d)
  • agent: 🐛 if we cannot fetch the Home Assistant config, don't display its details on about window (2241450)
  • agent: 🐛 return nil if cannot fetch Home Assistant config (e731aa2)
  • agent: 💄 merge the preferences submenu back into the main menu of the tray icon (097c35e)
  • agent: better handling of sensor channels (f3724df)
  • container: 🐛 use correct run command in container (2f42ee8)
  • container: better container defaults (and docs updates to match) (e9a3cb7)
  • hass: 🐛 catch potential nil panic from error condition and handle appropriately (a7a6dec)
  • linux: 🐛 avoid sending on closed channel (cbf95fc)
  • linux: 🐛 better problematic battery handling to avoid nil panics (cda8403)
  • linux: 🐛 detect and warn on unrecognised wifi properties (6e12013)
  • linux: 🐛 keep device id constant for MQTT (fcea433)
  • linux: 🐛 power profile sensor should work again (73f71d2)
  • linux: 🐛 shutdown connection state monitor gracefully (db2d165)
  • linux: 🐛 source distro information from /etc/os-release for registration (a8d76c6)
  • linux: 🔥 remove deprecated channel close (ab277af)
  • linux: 🔥 remove unreleased idle sensor updater (28d23e3)
  • linux: 🔒 as per recommendations, don't use the actual device id, generate a random one (5d69005)
  • linux: detect if we have a lid, don't bother monitoring if we don't (61c64b6)
  • linux: gracefully close pulseaudio connection on shutdown (8df123e)
  • linux: gracefully shutdown mqtt message channel (8d06d9e)
  • linux/proc: 🐛 handle unable to split /proc/diskstats (7300ac9)

Performance Improvements

  • linux: send cpu load/usage state on start (a1ea881)
  • linux: utilise new D-Bus helper function for watching app state (fe41e91)

9.0.0 (2024-05-07)

⚠ BREAKING CHANGES

  • linux: This commit changes the disk IO sensors so they are sourced from SysFS. This allows better filtering of devices to avoid creating sensors for partitions and other virtual devices. There should only be sensors created for physical disks, mdadm disks and device-mapper disks. Where possible, an attribute is available containing the model name of the disk. Additionally, a sensor will be created for total read/write counts and rates for all physical disks (excluding mdadm/device-mapper). Some entity IDs may have changed so be sure to check automations and dashboards and adjust as necessary.
  • linux/hwmon: This is another refactoring of the hardware sensor (hwmon) parsing code. This hsould handle duplicate devices and generate unique sensors for all of them. As a result entities in Home Assistant will be renamed (again) which may break any automations and other functionality using the current names.
  • This commit is a major refactoring of the MQTT functionality coinciding with changes to the underlying library that powers it. MQTT entities have been renamed, which will result in some breakage of automations and features in Home Assistant. No functionality has been lost however, and this change will make it easier to add additional controls and features powered by MQTT to Go Hass Agent.

Features

  • agent: add a --no-log-file command-line option to not write a log file (59f2ce5)
  • linux: add a volume mute switch (3b8eb54)
  • linux: add volume level control (cac7077)
  • linux: don't send swap sensors if there is no swap enabled (f8508e2)
  • linux: improved disk IO sensors (179f94e)
  • preferences: add a function to return MQTT origin info for use in MQTT code (2ab73bb)

Bug Fixes

  • agent: 🔥 remove testing commands (6bd339d)
  • linux: 🐛 correct string version of disk rate units (85a4164)
  • linux: 🐛 disk reads/writes sensors should not use data size device class (46f47bd)
  • linux: 🐛 don't block sending initial power state sensor update (5e2100a)
  • linux: 🐛 don't block sending user sensor updates (d6a982d)
  • linux: 🐛 ensure disk read/write count sensors have correct units (da4f805)
  • linux: 🐛 fix broken D-Bus control (a49fce1)
  • linux: 🔥 remove spews (debugging) (5e6aeb6)
  • linux: ensure sending version sensors doesn't block (838fd1e)
  • linux: use unbuffered channel for disk usage sensors (9b8b50a)
  • linux: use unbuffered channel for hardware sensor updates (d4bbee2)
  • linux: use unbuffered channel for time sensors (13bf514)
  • linux/hwmon: refactor sensor parsing (again) (de865f1)
  • linux/proc: 🐛 fix stringer generation (b0e5dc8)

Code Refactoring

  • major MQTT functionality refactor (decd825)

8.0.0 (2024-04-27)

⚠ BREAKING CHANGES

  • linux: When more than one chip exposed by the hwmon userspace API have the same name, the agent was not treating them as unique. This commit fixes the code to ensure every chip gets its own sensors. This unfortunately required changing the naming format of all chips, so will result in new sensors being recorded in Home Assistant.

Features

  • device: add an agent version sensor (92be2e1)
  • linux: add Linux device IO rate sensors (1011ea3)
  • linux: add sensors for accent color and color scheme type (50c2eab)
  • linux/hwmon: 💄 better hwmon sensor naming (ae5aa9e)
  • linux/hwmon: expose the sysfs path for the hwmon sensor (4a198fa)

Bug Fixes

  • linux: 🐛 disk IO rate sensors should be marked as diagnostic sensors (8ae0ffe)
  • linux: 🐛 send lid state sensor on startup (b1e2aea)
  • linux: ✏️ fix warning message if desktop sensors are unavailable (1005e35)
  • linux: improve lock handling for running apps sensor (ed50a68)
  • linux: rework network sensor code to attempt to avoid race conditions (e91f389)
  • linux: handle hwmon chips with the same name (16f56dd)
  • logging: 🐛 try to create the directory for log file storage. change error msgs to warn if cannot (596f6e4)
  • scripts: 🎨 capture and return script parser errors (949bef5)

7.3.1 (2024-04-17)

Bug Fixes

  • agent: 🐛 ensure .desktop file is valid and keep previous change for desktop environment display (1aa6fef)
  • agent: 🐛 ensure agent shows up in the menus of more desktop environments (9e93473)
  • agent: 🐛 reconnect to MQTT on disconnect and fix issue with MQTT commands not working (cfce533)
  • hass: switch registry implementations to fix unregisterable sensors (c31b06c)
  • linux: 🔊 better warning message when app sensors cannot run (c640bac)
  • linux: sending offline event when interface goes offline (8ed1a8a)
  • scripts: 🐛 prevent invalid script causing agent crash (07d3e0e)

Performance Improvements

  • preferences: replace golang.org/x/sync/errgroup with github.com/sourcegraph/conc/pool (1c814ae)

7.3.0 (2024-04-09)

Features

  • agent: add support for screensaver control under Xfce desktop (78e560c)
  • agent: support stateless MQTT (a8e886a)
  • linux: added laptop lid sensor (0d92428)

Bug Fixes

  • agent: 🐛 correct D-Bus path for Xfce screensaver control (9650059)

Performance Improvements

  • agent: improve reliability and error handling of websocket connection (344e78a)
  • hass: rework request error handling (1d9d372)

7.2.0 (2024-03-03)

Features

  • agent: add suspend and hibernate control via MQTT (f1678ea)
  • agent: allow overriding URL for API requests (3d1c9d9)
  • agent: set the auto-detected server to a default value for convienience (f39ef5b)

Bug Fixes

  • dbusx: 🐛 avoid nil pointer access when busRequest exists but bus conn doesn't (6f69316)
  • hass: 🐛 handle APIError or HTTP Error response more gracefully (68b18dc)
  • hass: 🐛 handle uunknown error (103ebeb)
  • hass: 🐛 support string or int code return for API errors (c0ebed7)
  • hass: 🔒 don't show the URL in trace logging output (aac3ef8)
  • hass: increase request timeout to a more realistic time to wait for requests to complete (4a48ab3)

7.1.0 (2024-02-26)

Features

  • agent: add agent reset command (853ee60)
  • agent: arbitrary dbus commands via MQTT (thanks @jaynis!) (7204181)

7.0.1 (2024-02-20)

Bug Fixes

  • agent: 🐛 load preferences from file to get MQTT preferences (6f92a75)

7.0.0 (2024-02-17)

⚠ BREAKING CHANGES

  • dbusx: The dbusx package now uses Go generics for some functions, to combine both fetching or setting a value or property as the required type.
  • Major refactor of requests code with internal breaking changes. Migrate from requests package to resty package. This allows exposing more details about the response from Home Assistant, providing cleaner response handling code. In addition, refactor code to migrate tracker and request code into the hass package, keeping the sensor code as a distinct package for now.
  • Legacy agent config package has been removed and replaced with preferences package. This breaks upgrades from all versions besides the last release in the previous major version series. Users upgrading from older releases should first upgrade to the latest version of the last major release before this release, then upgrade to this release.

Features

  • ⚗️ add ability to run a trace/heap/cpu profile over execution lifetime (9b73cd8)
  • ♻️ rework sensor registry to abstract from sensor tracker (a88a04a)
  • agent: ⬆️ update for latest go-hass-anything (db884fe)
  • dbusx: use generics to simplify dbusx usage (45335c4)
  • device: migrate external ip checker to resty package (4894fef)
  • hass: API response rewrite (a979728)
  • hass: new functions to retrieve entities from Home Assistant (a3d0fc6)
  • hass: utilise new ExecuteRequest function (dff2e83)
  • remove config and replace with preferences (630d4e6)
  • ui: 💄 show dialogs for success/failure of saving preferences (a2ab9c2)
  • ui: show extra details in about window (e8277cc)

Bug Fixes

  • log file name set in cmd package (11c4dd1)
  • only retry if the server is overloaded by default (23f214f)
  • agent,hass: 🐛 fix registration flow (486890c)
  • agent: 🐛 pass appropriate context to runners (d96a4e5)
  • agent: ♻️ clean up context creation in agent (cad5d56)
  • device: 🐛 remove spew (8b81d77)
  • hass: 🐛 ensure registry directory is created if it does not exist (e33a4d4)
  • hass: 🐛 fix naming of device class values presented to Home Assistant (ad4a73a)

Performance Improvements

  • hass: remove unneccesary goroutine usage for ExecuteRequest (8505455)

Code Refactoring

  • major requests refactor (24097f3)

6.5.0 (2024-02-06)

Features

  • major config rewrite (680bee1)
  • cmd: 🎨 move long command descriptions to embedded text files (58c2305)

Bug Fixes

  • 🐛 registration flow for new install (f71d7c6)
  • agent: 🐛 check for mqtt enabled (8c2e5f0)
  • config: 🐛 handle mqtt config migration quirk (c4824f3)

6.4.0 (2024-01-29)

Features

  • agent: 🎨 MQTT agent adjustments (b094c4a)
  • agent: control the agent via MQTT (5756092)
  • agent: map mqtt settings to go-hass-agent package settings (a3dee24)
  • cmd,agent: agent rework (8ab63e2)
  • config: Export an AppURL config option (0076019)
  • linux: add CPU Usage % sensor (6fdb91b)
  • linux: add memory and swap usage % sensors (3a7ca08)
  • ui,agent,config: UI overhaul (ded576b)

Bug Fixes

  • agent: 🎨 device context abstraction (878438b)
  • agent: 🐛 correct registration logic (569091d)
  • agent: 🐛 fix race condition where agent exits before workers start (1976238)
  • linux/dbusx: 🐛 check nil struct not attribute (ed4d3be)

6.3.1 (2024-01-22)

Bug Fixes

  • linux: ensure sensors have appropriate icon, device class and state class (1756f2c)
  • linux: support new sensor types exposed via hwmon (eadacba)
  • linux/hwmon: expose alarm and intrusion as separate sensors (5e19a48)

6.3.0 (2024-01-21)

Features

  • linux: switch to using hwmon package to get hardware sensors (a8360c2)
  • linux/hwmon: add a hwmon package to retrieve all hardware sensors from the kernel (cf50826)
  • linux/hwmon: add an example usage (174840f)
  • linux/hwmon: add units output to sensors (8663945)
  • linux/hwmon: apply appropriate scale to sensor values (bdf3e82)
  • linux/hwmon: expose sensor type (ad970be)
  • vscode: add additional conventional commit scopes (b7d439c)

Bug Fixes

  • linux/hwmon: 🐛 remove race condition when fetching sensors (1262c3f)
  • linux/hwmon: improve hwmon code (dee17e4)
  • linux/hwmon: reduce struct memory usage (3f452f6)

6.2.0 (2024-01-14)

Features

  • agent: 🔥 remove unused and unnecessary info command (dcc0a31)
  • agent: add error types for use by config code (961f98f)
  • agent: Allow embedding config interface in context (058950d)
  • agent: simplify config upgrade and validation process (7fcf14b)

Bug Fixes

  • agent: 🏗️ wrap workers, scripts and notifications in goroutine with waitgroup (e593dff)
  • container: ensure agent runs as a non-privleged user inside a container (1a3168f)

6.1.2 (2024-01-04)

Bug Fixes

  • agent: improve warning messages about windowing/UI environment (222c3ab)
  • linux: protect against potential map read/write race condition (26be3af)

6.1.1 (2023-12-27)

Bug Fixes

  • linux: capture more possible screen lock events (775a9ab)

6.1.0 (2023-12-20)

Features

  • linux: monitor for battery devices being added/removed (bde0b2e)

Bug Fixes

  • linux: adjust log levels for some messages (514bf31)
  • linux: better detection of screenlock D-Bus signal (fe10af0)
  • linux: better naming of battery sensors (e5f67a1)
  • linux: ensure initially added battery devices are tracked correctly (20c2574)
  • tracker/registry: better type safety (ce1afe1)

6.0.3 (2023-12-17)

Bug Fixes

  • dbushelpers: adjust logging levels for soft errors (1966408)
  • linux: correct batteryLevels and batteryStates values for batterySensor (2c53790)
  • tracker: more flexible channel return (5b890f1)

6.0.2 (2023-12-16)

Bug Fixes

  • agent: remove unused app settings for MQTT for now (274d4dc)
  • linux: rework batterySensor code to reduce complexity and improve safety (a1349a6)

6.0.1 (2023-12-13)

Bug Fixes

  • linux: screen lock sensor type casting issue (a975f04)

6.0.0 (2023-12-13)

⚠ BREAKING CHANGES

  • agent: drop upgrade support for versions < 3.0.0
  • dbushelpers: improve code safety and logic
  • agent,linux: return a channel for sensor updates from updater funcs

Features

  • agent: drop upgrade support for versions < 3.0.0 (a33167e)
  • dbushelpers: improve code safety and logic (c033587)
  • hass/api: rework sensor response parsing to simplify code (bc935e5)

Bug Fixes

  • linux,agent: spelling of PowerProfileUpdater function (f5a63b8)
  • linux: batterySensor should inherit linuxSensor (f1d09ca)
  • linux: ensure type assertion is checked (dc312f5)
  • linux: more type assertion checks (46ab539)
  • linux: portal detection (e3b2606)
  • linux: protect against divide by zero in networkStatsSensor (b79d0b2)
  • linux: protect against error in type assertion for batterySensor (8eff883)
  • linux: protect type assertion for username list generation (3a3e4af)
  • linux: protect type assertions for wifi sensors (c3e85ac)
  • linux: type assertion check for generating power state icon (f1f0099)
  • linux: type assertion check for generating screen lock icon (50cd304)
  • linux: variable shadows import (860b6a8)

Code Refactoring

  • agent,linux: return a channel for sensor updates from updater funcs (c64c369)

5.3.1 (2023-12-06)

Bug Fixes

  • linux: protect against nil value panic in batterySensor (94af4da)

5.3.0 (2023-12-02)

Features

  • dbushelpers: simpler signal removal logic (b185320)

Bug Fixes

  • agent: better logging around finding scripts (bcf41f9)
  • dbushelpers: remove not useful debug log messages (a78118c)
  • linux: adjust power state D-Bus watch (d1eefeb)
  • linux: clean up active app D-Bus watch (6380b6b)
  • linux: clean up location sensor D-Bus watch (6fad74e)
  • linux: clean up users D-Bus watch (fd14a16)
  • linux: improved network connection sensor detection and error handling (f456b55)
  • linux: power profile sensor reporting incorrect state (5591998)
  • linux: screen lock sensor improved logic and error checking (dfa1123)

5.2.0 (2023-11-27)

Features

  • agent: add script sensors (ece4ddd)
  • cmd: auto-detect whether to run in headless mode or not (7c77032)
  • scripts: support TOML output (2a67c32)

5.1.2 (2023-11-19)

Miscellaneous Chores

5.1.1 (2023-11-18)

Bug Fixes

  • hass: better handling of potential nil values (71667e7)
  • linux: alternative approach to tracking screen lock state (be67e53)
  • linux: ensure power state is sent immediately (70d60d5)
  • linux: remove call trace on log message (a79058b)
  • linux: return a nil dbus.Variant if prop not retrieved (6db5c79)
  • linux: simplify watch for screen lock sensor (d7c4399)

5.1.0 (2023-11-08)

Features

  • build: better container support (ada30ec)
  • linux: add sensors for tracking shutdown/suspend state via D-Bus (cbcb8b5)
  • linux: change power management sensor to power state sensor (820a23f)
  • linux: network transfer rate sensors (851b517)
  • linux: rework network connections sensor code (a6f8dfb)
  • tracker: log a warning if an unknown sensor has been sent (09604b2)

Bug Fixes

  • linux: add datasource to network transfer rates sensors (043c8a4)
  • linux: better check for no address for connection (6c66a67)
  • linux: clean up D-Bus connection and signals on shutdown (c815184)
  • linux: correct tracking of user sessions created/removed (7f7e01b)
  • linux: fix name of power state sensor in warning message (136da9c)
  • linux: follow android app and treat wifi sensors as diagnostics (f06cbc4)
  • linux: handle no address for network connection sensor (254ad19)
  • linux: make AddWatch non-blocking, add more logging (053a86b)
  • linux: network connection sensor state should be diagnostic (3b42944)
  • linux: set values of power management sensors on startup (7ac5304)

5.0.2 (2023-10-28)

Bug Fixes

  • agent: should wait for waitgroups (8c711a0)

5.0.1 (2023-10-24)

Bug Fixes

  • agent,hass,device: better clean-up on agent quit/cancellation (ec7a7e0)

5.0.0 (2023-10-12)

⚠ BREAKING CHANGES

  • agent: switch to config powered by Viper

Features

  • agent: improve config upgrade and validation (31561e0)
  • agent: migrate registry as part of Fyne to Viper config migration (e347c94)
  • agent: switch to config powered by Viper (cd27058)
  • build: add a Dockerfile (1e0bc96)
  • linux: add temperature sensors (4815197)
  • linux: simplify getting hostname and hardware details (ddff4e2)

Bug Fixes

  • agent,hass: fix logic around retrying websocket connection (6603e06)
  • agent/config: don't try to migrate already migrated registry (035430a)
  • agent/register: avoid unnecessary config validation (9ce8a4b)
  • agent/ui: remove broken HA version display (4705a35)
  • agent: broken registration validation flow (e3ef8f2)
  • agent: command-line registration flow (d63752e)
  • agent: continue if config upgrade fails because config does not exist (c116a8d)
  • agent: don't use context for linux device creation (a0d8bb1)
  • agent: remove the need to import custom viper package in agent package (833e78c)
  • agent: use command-line debugid for config path if specified (3f8b688)
  • cmd: wrap long description onto multiple lines (f2de9fd)
  • linux: add "temp_" prefix to temp sensor entity ids (c6480f3)
  • linux: better handling of unavailable sensors (f070be7)
  • linux: clean up network connections sensor (78dc843)
  • linux: show warning if app sensors could not be enabled (737f4ed)
  • linux: use string constant for procfs source attribute (9521449)

4.1.1 (2023-10-03)

Bug Fixes

  • linux: sensor type strings (29b995c)

Miscellaneous Chores

4.1.0 (2023-10-02)

Features

  • linux: rewrite D-Bus logic (fa0e5bc)
  • linux: simplify D-Bus signal matching (44a0d74)

Bug Fixes

  • agent/ui: don't do any init of Fyne if running headless (533a1f2)
  • agent/ui: remove unused setting (90d7ce9)
  • linux: fix spelling mistake (3deea46)

4.0.3 (2023-09-27)

Bug Fixes

  • agent: tray icon not shown (d2bcc00)

4.0.2 (2023-09-27)

Miscellaneous Chores

4.0.1 (2023-09-27)

Miscellaneous Chores

4.0.0 (2023-09-26)

⚠ BREAKING CHANGES

  • agent,hass,tracker: split UI into own package and more interface usage

Features

  • agent,device: change to a variadic list of sensor workers to start (c6ddac2)
  • agent,tracker: move device worker init from tracker to agent (05b3b1b)
  • agent/config,agent/ui: add more mqtt prefs. add secret config entry (28f1ddc)
  • agent/ui: add a configCheck function for bool config items (134c876)
  • agent/ui: new validator and placeholder functionality (98d0cf2)
  • agent: start exposing optional settings for the agent (dea2cd9)
  • cmd: clean up logging (316b357)
  • tracker,device,linux: move to utilising an interface for updating sensor networkStatsSensor (af4f0aa)

Bug Fixes

  • agent,hass: remove Fyne-isms from notification code (6fee81f)
  • agent: (hopefully) get some memory savings in sensors table display (8efbd0b)
  • agent/ui: embed tray icon png directly rather than use converted []byte array (eee1ab1)
  • agent/ui: only instatiate translator once for UI (1863c24)
  • agent/ui: uncomment code that should be used (a2131d6)
  • agent: agent struct doesn't need to export any fields (89fd9e2)
  • agent: broken registration flow after recent changes (c227220)
  • agent: don't export version global var (56fa638)
  • agent: remove workaround for https://github.com/fyne-io/fyne/issues/3170 (537e121)
  • agent: rework registration/preferences to properly set agent config (9fd0002)
  • cmd: debugID argument was ignored after recent logging changes (ffc40d6)
  • device: don't log transport error when fetching external ip (c6efde9)
  • device: signal waitgroup finish properly (ba309fa)
  • device: wrap polling code in waitgroup (6e203c2)
  • tracker: use correct context (8736dc4)

Code Refactoring

  • agent,hass,tracker: split UI into own package and more interface usage (7eb18bb)

3.3.0 (2023-09-14)

Features

  • agent,hass,tracker: move to interface access to agent config (9d824ca)
  • agent: sorted sensors table window and update on scroll (c44aa2a)
  • agent: values update every n seconds on sensors window (d3428d6)

Bug Fixes

  • hass: websocket connection should gracefully handle home assistant disconnects/restarts (1f74f83)

3.2.0 (2023-09-10)

Features

  • linux: simplify fetching device details for registration (e2ddf5f)
  • ui: add headers to sensors window table (fbcee6e)

3.1.0 (2023-08-27)

Features

  • linux: add a sensor to track logged in users and their usernames (50f76d4)
  • linux: add new sensors for kernel and distribution version, name (e9b86a1)

Bug Fixes

  • linux: add data source to kernel, distribution version/name sensors (8243f67)
  • linux: add space in name of battery sensors (fb7b498)

3.0.3 (2023-08-22)

Bug Fixes

  • tracker: add missing waitgroup.Wait (0268981)

3.0.2 (2023-08-04)

Bug Fixes

  • linux: remove unused context (a25e592)

3.0.1 (2023-07-28)

Bug Fixes

  • linux: adjust debug/trace information (1006240)
  • linux: remove duplication of active_app and running_apps values (3390b58)
  • location: assert type safely (2f753c4)

3.0.0 (2023-07-23)

⚠ BREAKING CHANGES

  • tracker: migration of registry to new format
  • linux: intialise DBus API internally in linux package
  • agent,tracker: major tracker rewrite

Features

  • linux: add a Data Source attribute to all Linux sensors (f59d224)
  • tracker: migration of registry to new format (c37a793)

Bug Fixes

  • agent: bail early if no sensors available when requesting sensors window (7b8b0d3)
  • agent: call context cancellation if no need to register (cf56a8e)
  • agent: headless option crash on startup (1619ea2)
  • agent: if already upgraded, don't try again (ea9a0b4)
  • agent: make sure to clean up old registry files on upgrade (8d98899)
  • agent: UI fixes (e96eb0d)
  • hass: close of closed channel (3dd9966)
  • tracker: actually use new json registry (99cee01)
  • tracker: improve handling of disabled state (5ab5281)

Code Refactoring

  • agent,tracker: major tracker rewrite (a7cb475)
  • linux: intialise DBus API internally in linux package (baa6086)

2.0.0 (2023-07-17)

⚠ BREAKING CHANGES

  • introduce a Config interface for the api
  • cmd: remove shorthand flags for debug, profile and terminal
  • replace mockery with moq
  • major internal rewrite

Features

  • agent,api,hass,settings: standardise naming of shared settings (30ab245)
  • agent,api,hass: new settings package for shared/global settings access (52601eb)
  • agent,api: define an interface for fetching config values for api, (24369d2)
  • agent,api: websocket connection fetches needed config from interface (a972f66)
  • agent,hass,tracker: simplify HA config interaction (5ea40b0)
  • agent: rework registration UI process (6d907d3)
  • agent: window resuage (2de0785)
  • cmd: add an option to toggle trace logging (cff5097)
  • introduce a Config interface for the api (d50b78c)
  • major internal rewrite (58f9610)
  • settings,api,hass: stop sharing settings through a context variable (291f651)

Bug Fixes

  • agent,tracker: adjust log levels for tracker-related messages (6938a35)
  • agent,translations: adjust levels for misc ui-related messages (61dc8c6)
  • agent: abstract app config for more portability (c580536)
  • agent: bail on websocket creation if running headless (e8befd2)
  • agent: correct logic for retrieving token and server from registration details (0be94be)
  • agent: expose error messages for config issues, remove call trace (2ce72c5)
  • agent: rework agent UI (046c4f4)
  • cmd: remove shorthand flags for debug, profile and terminal (1fa6add)
  • device: adjust log levels for external_ip sensor (e01ab42)
  • hass: adjust log levels for messages in websocket handling (f4bc216)
  • linux: adjust log levels for networkConnectionSensor (5b24fe2)
  • linux: adjust logging levels for DBus functions (27e5654)
  • location: error log message should be error log level (da1be00)
  • tracker: remove call trace from debug log message for state update (d3d2976)

Tests

  • replace mockery with moq (587d3dc)

1.4.3 (2023-07-07)

Bug Fixes

  • agent,hass: store api and websocket urls in config (2e38d97)
  • agent: add a config upgrade action to remove trailing slash from host (1be71ad)
  • agent: additional error checking and code safety (68f6b90)
  • agent: better logic around closing the app (b59c1c9)
  • agent: ensure agent config satisfies Config interface (e9aec95)
  • agent: force registration flow stall (c1a1511)
  • agent: tray menu entries did not display windows and quit did not work (1bc86b7)
  • config: adjust interface methods (bf49018)
  • hass: check type assertion before using (8b9e2c3)
  • linux: export LinuxDevice type (2fd1319)
  • sensors: don't store HA config, just fetch as needed (ea26f02)
  • sensors: handle error in setting registry item (fd7c15d)
  • sensors: nil pointer reference condition on new device added to HA (4d1e6ad)
  • tracker: check type assertions in sensor response (1664606)
  • tracker: correctly handle setting registration and disabled status (664be51)
  • tracker: expose error on db creation (5f73d8f)
  • tracker: remove spews (d104593)

1.4.2 (2023-07-03)

Bug Fixes

  • agent: remove spew.Dump debugging function (d1103d8)
  • agent: validation of config should accept both old and new formats (575559a)
  • agent: wrong return type for config option (dd7b3b7)
  • config,agent,hass: add an Upgrade function to Config interface (fb7d405)

1.4.1 (2023-07-03)

Bug Fixes

  • agent: wrap tray icon creation in goroutine to avoid block (5eae020)
  • cmd: update info and version commands (903561f)
  • hass: bump websocket dependency and fix breaking changes (3443df6)

1.4.0 (2023-07-02)

Features

  • agent: rework registration to require a url over hostname/port (ed3edf6)

1.3.1 (2023-07-02)

Bug Fixes

  • agent,hass: allow hostname or hostname:port for HA server (b76d112)

1.3.0 (2023-06-29)

Features

  • major re-write for registration process (6838d29)

Bug Fixes

  • agent: add check to flag existing registration of upgraded agents (9322500)
  • agent: save DeviceName and DeviceID with registration (2356905)

1.2.6 (2023-06-26)

Bug Fixes

  • agent: fix links for creating issue/requesting feature (01665a6)

1.2.5 (2023-06-22)

Bug Fixes

  • linux: potential fix to remove race condition on dbus watches (83edb5c)

1.2.4 (2023-06-19)

Bug Fixes

  • sensors: revert attribute code and clean-up error message (791a3f2)

1.2.3 (2023-06-19)

Bug Fixes

  • sensors,agent: refactor sensor tracker to avoid data races (319a8fc)

1.2.2 (2023-06-14)

Bug Fixes

  • agent: add validation to token entry for registration (9af1984)
  • agent: fix error message (4fba211)
  • agent: rework sensor table to use Fyne table widget (33423c5)
  • hass: fix error message (ef1d239)
  • linux: remove attributes for active app sensor to avoid memory leak (e700db5)

1.2.1 (2023-06-11)

Bug Fixes

  • agent: no need to wait on app quit (b59a31e)

1.2.0 (2023-06-11)

Features

  • assets: add systemd service file (1d6f695)

Bug Fixes

  • hass: remove unused code in websockets (3d9f466)
  • linux: catch error (fd60fc4)

1.1.0 (2023-06-06)

Features

  • linux: add screen lock sensor (ffb7276)

Bug Fixes

  • agent: correct formatting of debug messages (33346c1)
  • hass: add omitempty to JSON fields where appropriate (a139511)
  • hass: update API tests (a1daa09)
  • linux: remove unneeded parameters (42af00d)

1.0.1 (2023-06-03)

Bug Fixes

  • agent: handle no sensors data display (4d22c2f)
  • agent: use a waitgroup for registration (3461859)
  • hass: handle empty config response (f4b4412)
  • hass: omit sending response body if empty or nil (7281cbb)
  • sensors,hass: merge Sensor and SensorUpdate interfaces (aa9e200)

1.0.0 (2023-05-20)

⚠ BREAKING CHANGES

  • linux: remove unused context management for previous api
  • linux: remove deprecated functions and rework api struct
  • agent,linux: utilise the device API interface in agent code
  • device,linux,sensors: remove sensorinfo struct, move sensor workers into device API

Features

  • agent: add a (very rough) window to display all sensors and their states (f7fb4b9)
  • agent: add tray menu option to access fyne settings (3ef943e)
  • agent: report Home Assistant version in About dialog (a7e1d83)

Bug Fixes

  • agent: better initial window size for sensors display (c46792f)
  • agent: correct config validation returns (8c89544)
  • agent: waitgroup decrement for worker finish (42ff9f0)
  • device,linux: create and use a safer function for getting an endpoint from the API interface (d5a8c66)
  • device: use a context with timeout for fetching external ip (a888d5f)
  • hass: cancel websocket connection context when done message received (6ecfc8e)
  • hass: don't run response handler if request was never sent (dc6e4b1)
  • hass: make sure api context is cancelled/closed in all branches (f40971d)
  • linux: bail early if the matched signal doesn't have a body (d53eb02)
  • linux: clean up finding processes (8856bb2)
  • linux: remove outdated external package for geoclue/location (22a4b7f)
  • linux: safer access to api endpoint map (f7defa3)
  • sensors: bail on error getting sensor workers (1f1442b)

Code Refactoring

  • agent,linux: utilise the device API interface in agent code (a87cc06)
  • device,linux,sensors: remove sensorinfo struct, move sensor workers into device API (bceea60)
  • linux: remove deprecated functions and rework api struct (6125e9f)
  • linux: remove unused context management for previous api (dd740e5)

0.4.0 (2023-05-14)

Features

  • add a way to run "headless" (without any GUI) (90b9a82)
  • cmd: add a "register" command (0fa27ad)
  • hass: add backoff functionality for registration requests (d268cff)

Bug Fixes

  • agent: ensure preferences get saved (30e2735)
  • hass: fix backoff package dependency (9b8f519)
  • hass: id increment for websocket requests (f941fb6)
  • hass: improve websocket resiliency with ping/pong logic (6428b77)

0.3.5 (2023-05-11)

Features

  • agent: add "report issue" and "request feature" actions to tray icon menu (7f75a52)

Bug Fixes

  • hass: fix websocket not working and migrate to different websocket package (2607346)
  • linux: uptime sensor now measured in hours (f8fccd2)

Miscellaneous Chores

0.3.0 (2023-05-07)

Features

  • linux: add uptime and last boot sensors (1b5cbb1)
  • linux: improve network connection sensor code (5a18911)
  • linux: move to a single dbus watch for networkmanager (89569dd)

Bug Fixes

  • build: fix dependencies for rpm/deb packages (0a16bd2)
  • linux: remove spew (c77c4be)

0.2.0 (2023-05-02)

Features

  • better handling of app interrupt/termination (47dce34)
  • sensors: add a nutsDB registry backend (6a7cb84)
  • sensors: implement a Registry interface (80c4c0a)
  • sensors: use nutsDB registry backend by default (e533f91)

Bug Fixes

  • agent: remove spew debug message (0b8e5bf)

Miscellaneous Chores

0.1.0 (2023-04-27)

Features

  • device_linux: add disk usage sensors (d85d79e)
  • linux: add network bytes received/sent sensors (a71effc)

Bug Fixes

  • command-line description FR working this time... (d89c265)
  • hass,device: fix incorrect state/device class types (85abcd8)
  • linux: add units to sensors (97db5cf)
  • missing app description for command-line! (6f49f22)

0.0.7 (2023-04-22)

Features

  • add a problems sensor on Linux to track problems reported by abrt (59978d6)
  • add memory usage sensor on Linux (81b9a2e)
  • add swap memory sensors on Linux (6dfd177)
  • and active command start time to active apps sensor. (992d832)
  • use jitterbug package to add some jitter to polling sensors to (85366e7)

Bug Fixes

  • GetDBusData* functions properly handle optional arguments. (992d832)
  • handle unknown process creation time attribute (73b3904)
  • memory and loadavg sensors work properly on Linux now (5b7e922)
  • naming of variable for release please (bfc4336)
  • release please use token (d6cd37f)

Miscellaneous Chores