openbmc / dbus-sensors

D-Bus configurable sensor scanning applications
Apache License 2.0
27 stars 45 forks source link

Exported dbus sensor interfaces do not comply with dbus spec #7

Closed jk-ozlabs closed 4 years ago

jk-ozlabs commented 4 years ago

The phosphor-dbus-interfaces spec defines sensor values as int64. From the spec :

properties:
    - name: Value
      type: int64
      description: >
          The sensor reading.

However, the dbus-sensors implementation exports values as double:

# busctl introspect xyz.openbmc_project.HwmonTempSensor /xyz/openbmc_project/sensors/temperature/Temp xyz.openbmc_project.Sensor.Value
NAME                             TYPE      SIGNATURE RESULT/VALUE FLAGS
.MaxValue                        property  d         127          emits-change
.MinValue                        property  d         -128         emits-change
.Value                           property  d         0            emits-change writable

This causes issues for processes trying to read the sensor values using the standard interface.

feistjj commented 4 years ago

Fix is here https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/11739

jk-ozlabs commented 4 years ago

Brilliant, thanks. +1 from me.

jk-ozlabs commented 4 years ago

Fixed in https://github.com/openbmc/phosphor-dbus-interfaces/commit/4ec6587fa908fe9df41cc0962ab6ff6446fbd54f , closing.