Skip to content

Conversation

seriyps
Copy link
Collaborator

@seriyps seriyps commented Oct 12, 2025

This adds optional periodical polling of 3 types of OS sensors:

  • CPU load
  • Radxa chip temperature (those are built-in)
  • INA226 power sensor (to monitor power supply, eg, battery voltage and current) - it requires INA226 sensor to be installed to i2c, which is a bit advanced topic

All 3 are publishing OSD facts so can be used for some kind of warning widgets or to just display the value. All 3 are optional, can be enabled/disabled/configured in pixelpilot.yaml

  • sensors
  • readme
  • auto-discovery
  • OSD widgets

@zhouruixi
Copy link
Contributor

Can hwmon_id: auto be used to implement automatic detection?

@seriyps
Copy link
Collaborator Author

seriyps commented Oct 15, 2025

@zhouruixi auto-discovery added

os_sensors:
  cpu: auto
  power: auto
  temperature: auto

* fix power sensor autodiscovery arguments order
* fix CPU load calculation (/proc/stat is a counter, not gauge)
@seriyps
Copy link
Collaborator Author

seriyps commented Oct 15, 2025

I tested it on a real hardware and added some fixes. Untill I add widgets, the contents can be viewed with

        {
            "name": "Debug",
            "type": "DebugWidget",
            "x": 50,
            "y": 100,
            "facts": [
                {"name": "os_mon.cpu.load_total"},
                {"name": "os_mon.cpu.load_iowait"},
                {"name": "os_mon.temperature", "tags": {"sensor": "thermal_zone0"}},
                {"name": "os_mon.temperature", "tags": {"sensor": "thermal_zone1"}},
                {"name": "os_mon.power.voltage"},
                {"name": "os_mon.power.current"},
                {"name": "os_mon.power.power"}
            ]
        },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants