How to put sensors into the ObjectMapper
mspinler at linux.ibm.com
Wed Aug 5 05:54:42 AEST 2020
On 8/3/2020 1:03 PM, Mike Jones wrote:
> My RaspPi work has progressed but I don’t know how to get sensors in
> the ObjectMapper, which I hope will mean sensors end up in webui.
> BASIC INFORMATION
> At this point, I have my PMbus devices in the device tree like this path:
> /sys/firmware/devicetree/base/soc/i2c at 7e804000/ltc2974 at 32/regulators/vout0
> to vout3
> And the config files like this path:
> /etc/default/obmc/hwmon/soc/i2c#7e804000/ltc2974 at 32/reg1 at 32.conf
> <mailto:32/reg1 at 32.conf>
> The sensors show up here:
> Indicating that the device tree is causing hwmon to offer its
> telemetry nodes.
> From my reading of the docs, it seems like the ObjectMapper keeps an
> inventory of sensors.
> So to search, I did something like:
> dbus-send —system -print-reply \
> —dest=xyz.openbmc_project.ObjectMapper \
> /xyz/openbmc_project/object_mapper \
> xyz.openbmc_project.ObjectMapper.GetAncestors \
> string:”/xyz/openbmc_project/inventory.system” array:string: | grep
> But none of my devices are there.
> I looked at meta-ibm and meta-hxt and could not see how to get the
> devices into the ObjectMapper.
> ACTUAL QUESTIONS
> So I have these questions:
> - What it the mechanism for getting these into the ObjectMapper?
The mapper just adds some convenience functions to be able to find
things on D-Bus, so if the mapper
can't find it, then it isn't on D-Bus.
talks about how
phosphor-hwmon-readd will put sensor values on D-Bus. What I don't
think it mentions is that it
uses a udev rule to start its service when udev sees the hwmon subsystem
> - Once there, will they show up in webui without any other files and
Yea, they will show up as /xyz/openbmc_project/sensors/<type>/<name> and
bmcweb can find that.
> - What docs might describe what I need to know to connect the hwmon
> devices to the ObjectMapper?
That sensors doc I mentioned above has the goal of describing that.
> - Is there something I have to do to start the ObjectMapper service? I
> don’t see it with a grep through systemctl.
The service file for that is
that is present on your system.
> - Is there an existing meta layer that would be a good example and a
> pointer to the proper bb files to look at?
The meta-ibm layer makes extensive use of phosphor-hwmon:
> THE CODE/LAYERS
> My work so far is here:
> Configured by:
> Thanks, and sorry I am a newbie without tribal knowledge. I am trying
> to find solutions on my own and only ask for help when stuck.
> Unfortunately, I’m stuck.
More information about the openbmc