Releases: joshuar/go-hass-agent
v10.5.1
v10.5.0
10.5.0 (2024-11-19)
This release expands the work of the previous release to add more preferences for sensors. You can now optionally disable hwmon and per-cpu sensors.
Additionally, Go Hass Agent will now report Out Of Memory events, when your system is configured with systemd-oomd. An event will be triggered when the OOM occurs and will contain the name of the process killed and its PID.
Features
- linux/cpu: ✨ add preferences to optionally disable all cpu (and specifically, cpu frequency) sensors (ecc5cc6)
- linux/mem: ✨ send oom events to Home Assistant (c491e81)
- linux/system: ✨ add preferences to optionally disable hwmon sensors (7b65aab)
Bug Fixes
v10.4.0
10.4.0 (2024-10-31)
New Feature: Events 🔈
Go Hass Agent can now send events to Home Assistant. Events better encapsulate data where stats and history are not interesting, only the timing when the data occurs. This release adds events for user login/logouts (requires D-Bus and systemd-logind support), so you can set up automations in Home Assistant that react to those events. See the README for more details and the format of the data of each event.
New Feature: Sensor/events/controls Preferences 🎛️
Go Hass Agent now exposes user-configurable preferences for some sensors, events and controls. For example, you can now filter which network devices will create network rate/total sensors and you can completely disable the external IP address sensor if desired. More preferences coming in later releases. See the Sensors/Controls/Events list in the README which ones have preferences. For now, this requires editing toml
files, but a future user-interface is planned!
Features Summary
- agent: ✨ add an interface to represent a worker with preferences for future use (446857e)
- agent: ✨ implement event controller for event workers in agent (c1d2033)
- agent/sensor: ✨ add preference to disable external ip sensor if desired (17f8d97)
- hass: ✨ add support for sending events to Home Assistant (6debf7e)
- linux: ✨ add session events (61b87e6)
- linux: ✨ add tracking stats from chronyd as sensors (3de2c09)
- linux: ✨ add user preference to define devices to ignore for network rates sensors (c36e14e)
- linux/media: ✨ support user preferences for camera worker (fef5dd9)
- linux/net: ✨ filter on user-defined network devices for networkmanger connection state sensors (77e3372)
- preferences: ✨ provide a worker preference to completely disable the worker (and its sensors/events/controls) (23c940b)
- preferences: ✨ support worker preferences (c7c49ac)
Bug Fixes
- hass: 🐛 fix validation of event requests (d95955e)
- hass: 🐛 rework marshaling of sensor requests (1c579d9)
- linux: 🐛 for ignored devices, ensure their stats are still tracked as part of the total network rate sensors (468f692)
Performance Improvements
v10.3.2
v10.3.1
v10.3.0
10.3.0 (2024-10-01)
Important
Container users: please use the image tagged v10.3.0-7-g3b22ee4 as the v10.3.0. stable version. There was a problem during the automatic image generation for the release that led to the images not being generated. This tag only contains additional changes to the build system on top of the changes in the v10.3.0 release and so is functionally equivalent.
This release contains a few new sensors:
- A connection latency sensor for checking the network latency between Go Hass Agent and Home Assistant.
- Sensors reporting the firmware security status (from fwupd) and any CPU vulnerabilities (from the kernel).
- Per network device rates/counts in addition to the existing total rate/count.
- Per device link status and IP addresses.
- A sensor detecting the IO operations in progress per disk.
The following sensors have changed:
- CPU context switches and processes created are now rate values (ctx switches per sec and processes created per sec), which are hopefully more useful values.
There has been a fair bit of refactoring of the code under the hood to make it more manageable and easier to read.
Enjoy 🎉 And please keep those bug reports and feature requests coming!
Features
- agent: ✨ add connection latency sensor (d55b1ed)
- dbusx: ✨ Add a Data type for fetching data via a D-Bus method (edf80e1)
- linux: ✨ add a sensor to track if the kernel has reported any CPU vulnerabilities (8d5ebf2)
- linux: ✨ add link sensors (cece6ed)
- linux: ✨ add per device network counts/rates sensors as well as the total counts/rates (895125f)
- linux: ✨ add sensor for displaying firmware security details (dae37b4)
- linux: ✨ add sensors for IO ops in progress per disk (and total of all disks) (ea33a54)
- linux: ✨ switch total cpu context switches and processes created sensors from totals to rates (ed015e7)
Bug Fixes
- 🚨 add more nil pointer protections (f1f4293)
- agent: 🐛 fix error handling and change endpoint for connection latency sensor (6dedbc1)
- agent: 🐛 pass preferences to notifications worker (30178cd)
- agent: 🐛 try to protect against empty response in connection latency sensor (b40ccc7)
- agent: 🐛 uncomment commented block for testing (9f4b656)
- hass: 🐛 don't exclude nil value sensors when retrieving sensor list (886b7eb)
- hass: 🐛 simplify validation of sensor requests (6db1638)
- linux: 🎨 better netlink shutdown handling in link sensor worker (a265fec)
- linux: 🐛 actually track running app and total running apps in worker (66e4a19)
- linux: 🐛 add missing disk IO sensor attribute so that disk read/write rates are calculated correctly (8d7e6af)
- linux: 🐛 add missing disk IO sensor attribute so that disk read/write sensors are calculated correctly (9b024ee)
- linux: 🐛 avoid pointer ref/deref (86a5b5c)
- linux: 🐛 correct screen lock state with new device class (f6811bb)
- linux: 🐛 don't add
last_reset
attribute for cpu usage sensors withtotal_increasing
state class (89b903f) - linux: 🐛 event based workers should expose a send-only channel on Events method (40e1751)
- linux: 🐛 filter all of
/run
from usage stats (a0d57bf) - linux: 🐛 filter more mount points from generating usage sensors (b238687)
- linux: 🐛 fix changed network rates sensor types stringer (64e9df9)
- linux: 🐛 get the current screen lock state and send as a sensor on start (40cbb57)
- linux: 🐛 protect against potential nil pointer exception (ab99be0)
- linux: 🐛 use distinct device classes for intrusion and alarm hardware sensors (53b552b)
- linux: 🐛 use distinct device classes for laptop sensors (c0f5fac)
- linux: 🔊 add repercussions of some settings being unavailable to warning messages (af6fc62)
Performance Improvements
- agent: 🔥 remove unnecessary context creation (80890aa)
- dbusx: ⚡ more graceful dbus watch closure (5724468)
- hass: 🏗️ remove sensor interfaces, use exported struct instead (80c5780)
- hass: 🔥 remove unnecessary context creation (6dfd48a)
Reverts
- github: ⏪ switch back to audit to check required access (03b7e2a)
v10.2.1
v10.2.0
10.2.0 (2024-09-12)
This release contains a number of performance and stability fixes along with two new major features:
-
You can now configure MQTT settings on the command-line 🎉 The README has been updated with details, but TL;DR, you can run:
go-hass-agent config --mqtt-server=tcp://localhost:1883 --mqtt-user=some-user --mqtt-password=superseret
-
The container has been rebased on top of Alpine Linux. This makes it much smaller, and it can now be built for armv6 🎉 The invocation has changed slightly, so please read the documentation if you are a container user and take note of the changes before upgrading.
Thank you to all the users who have submitted feature requests and bug reports! Please keep them coming!
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)
v10.1.1
v10.1.0
10.1.0 (2024-08-27)
This release is packed with some (hopefully) performance improvements and a few new sensors. Most notably:
- memory, cpu and disk usage sensors are now fetched directly from the kernel.
- more disk partitions should have usage stats now, like network mounts.
- cpu usage (%) sensors are available for each core on the system as well as the overall usage.
- there are now sensors for total processes created and context switches.
- there are now sensors for current running/blocked processes.
- there is a sensor for the amount of memory detected as corrupted by the kernel. If this sensor value is greater than zero, you are probably going to have a bad time...YMMV
Enjoy!
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)