The process is to first find the sensor. For that the name of the sensor needs to be known.
root@pavilion-evb:~# busctl tree | grep sensor
will give you a list.
Then have ObjectMapper tell what Hwmon is monitoring that sensor.
root@pavilion-evb:~# dbus-send --system --print-reply --dest=xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper.GetObject string:"\<**SENSOR NAME**>" array:string:
example:
root@pavilion-evb:~# dbus-send --system --print-reply --dest=xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper.GetObject string:"/xyz/openbmc_project/sensors/voltage/psu4_vin" array:string:
returns
method return time=1663175959.916697 sender=:1.12 ->
destination=:1.24984 serial=220988 reply_serial=2 array [
dict entry(
string "xyz.openbmc_project.Hwmon-3678593568.Hwmon1"
array [
string "org.freedesktop.DBus.Introspectable"
string "org.freedesktop.DBus.Peer"
string "org.freedesktop.DBus.Properties"
string "xyz.openbmc_project.Sensor.Threshold.Critical"
string "xyz.openbmc_project.Sensor.Threshold.Warning"
string "xyz.openbmc_project.Sensor.Value"
string "xyz.openbmc_project.State.Decorator.OperationalStatus"
]
) ]
The key information here is:
xyz.openbmc_project.Hwmon-3678593568.Hwmon1
The use busctl introspect:
root@pavilion-evb:~# busctl introspect xyz.openbmc_project.Hwmon-3678593568.Hwmon1 /xyz/openbmc_project/sensors/voltage/psu4_vin xyz.openbmc_project.Sensor.Value
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.MaxValue property d inf emits-change writable
.MinValue property d -inf emits-change writable
.Unit property s "xyz.openbmc_project.Sensor.Value.Unit.\u2026 emits-change writable
.Value property d 208.25 emits-change writable
Or just the value can be gotten by:
root@pavilion-evb:~# busctl get-property xyz.openbmc_project.Hwmon-3678593568.Hwmon1 /xyz/openbmc_project/sensors/voltage/psu4_vin xyz.openbmc_project.Sensor.Value Value
d 208.25