1.\" $OpenBSD: upd.4,v 1.6 2024/12/01 09:05:05 landry Exp $ 2.\" 3.\" Copyright (c) 2014 Andre de Oliveira <andre@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: December 1 2024 $ 18.Dt UPD 4 19.Os 20.Sh NAME 21.Nm upd 22.Nd USB Power Devices sensor 23.Sh SYNOPSIS 24.Cd "upd* at uhidev?" 25.Sh DESCRIPTION 26The 27.Nm 28driver provides support for monitoring various sensors provided by 29USB Power Devices (such as a UPS). 30Supported sensor values are made available via the 31.Xr sysctl 8 32interface. 33.Pp 34The following sensors are supported by the driver: 35.Pp 36.Bl -item -offset indent -compact 37.It 38BatteryPresent 39.It 40ShutdownImminent 41.It 42ACPresent 43.It 44PercentLoad 45.It 46Overload 47.It 48RelativeStateOfCharge 49.It 50AbsoluteStateOfCharge 51.It 52RemainingCapacity 53.It 54FullChargeCapacity 55.It 56Charging 57.It 58Discharging 59.It 60AtRateTimeToFull 61.It 62AtRateTimeToEmpty 63.It 64RunTimeToEmpty 65.It 66NeedReplacement 67.El 68.Sh SEE ALSO 69.Xr intro 4 , 70.Xr uhidev 4 , 71.Xr sensorsd.conf 5 , 72.Xr sensorsd 8 , 73.Xr sysctl 8 74.Pp 75The USB Power Devices specification can be found at: 76.Lk https://www.usb.org/hid 77.Sh HISTORY 78The 79.Nm 80driver first appeared in 81.Ox 5.6 . 82.Sh AUTHORS 83The 84.Nm 85driver was written by 86.An Andre de Oliveira . 87.Sh BUGS 88The 89.Nm 90driver does not indicate device health via aggregate or 91individual sensor status. 92Users who wish to monitor 93.Nm 94status using 95.Xr sensorsd 8 96must manually establish 97.Dq high 98and 99.Dq low 100limits for sensor values of interest via 101.Xr sensorsd.conf 5 . 102