SysFS

The SysFS driver is still under development. Please report any issues or feature requests.

SysFS driver included in the kernel module for all Unipi controllers, except UniPi 1.1 and UniPi 1.1 Lite, provides easy file-based access to all inputs and outputs of the controller. Check the following examples to get started:

Set state of DO to 1

echo 1 > /sys/devices/platform/unipi_plc/io_group1/do_1_01/do_value

Read the state of DI

cat /sys/devices/platform/unipi_plc/io_group1/di_1_01/di_value

All IOs can be accessed similarly.

Further documentation can be found here: https://git.unipi.technology/UniPi/unipi-kernel/blob/master/docs/sysfs-platform-unipi.txt