joshuar-go-hass-agent/CHANGELOG.md

44 KiB

Changelog

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