This project is a clean-sheet rewrite of the `clusterctrl` tool and underlying device driver provided by the 8086 consultancy for interacting with their ClusterCTRL and ClusterHAT line of Raspberry Pi backplane products.
from clusterctrl.driver import ClusterCTRLv2Driver as Driver
from smbus2 import SMBus
hat = Driver(SMBus(3)) # Note that 3 here is the number of the i2c device the HAT is on
```
A quick API overview -
The CTRL/HAT products "order" themselves (identify boards) using an EEPROM stored value called 'order'.
The official clients use "order" to enable for somewhat stable sequential addressing of "pi6" as being board 2 pi 1.
However it's far more general purpose and predictable to directly expose and model the device tree.
Note that the firmware default for "order" is `20` and this driver will automatically assign random IDs to boards with orders of 20.
This behavior can be disabled by subclassing the driver and overloading `_post_init()`.
This API is built atop a `PiRef(board_id, pi_id)` tuple which is intended to allow for the construction of cluster management APIs which allow for automatic but predictable mapping of requests (eg. `power_on`, `power_status`) to a given device.