Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

The arm server serves the Pi's temperature and under-voltage flags at GET /health/pi, read from sysfs, never a shell #531

shipped merged opened this has it
opened this

Replaces the source half of #520. The builder declined #520 because /var/log/so101-health.log has no format defined anywhere in the repository. Read the kernel's own files instead.

Done when:

  • [ ] Software/so101/src/pi-health.ts reads the SoC temperature from /sys/class/thermal/thermal_zone0/temp (millidegrees) and the throttled bits from /sys/devices/platform/soc/soc:firmware/get_throttled when it exists. It returns { tempC, underVoltage, underVoltageSince, throttled, at }, and null for anything missing. Both paths are injected for tests, and it never shells out.
  • [ ] src/server.ts (the arm server) serves it at GET /health/pi. Off a Pi, or on the fake server, it answers 200 with nulls.
  • [ ] src/pi-health.test.ts covers a normal reading, an under-voltage bit (0x1 now, 0x10000 since boot), missing files and garbage content.
  • [ ] bun --cwd Software/so101 test passes.

Brief: any builder.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs