From 98bf33a08a21dbbd4c7332599ef2cf3bb1bb992e Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Fri, 3 Oct 2025 12:41:02 +0200 Subject: [PATCH 1/2] pdudaemon: add config for labgrid-wigyori The pdudaemon here hosts a ClusterHAT which is an RPi hat for triggering 4 microUSB ports. Managing the ports is done via the "clusterctrl" tool which pokes the GPIO expander on the hat via i2c. Due to this, the pdudaemon service file is also extended to give i2c group access to the pdudaemon process. Signed-off-by: Zoltan HERPAI --- .../files/exporter/pdudaemon-labgrid-wigyori.conf | 15 +++++++++++++++ ansible/files/exporter/pdudaemon.service | 1 + 2 files changed, 16 insertions(+) create mode 100644 ansible/files/exporter/pdudaemon-labgrid-wigyori.conf diff --git a/ansible/files/exporter/pdudaemon-labgrid-wigyori.conf b/ansible/files/exporter/pdudaemon-labgrid-wigyori.conf new file mode 100644 index 000000000..b0193f6fb --- /dev/null +++ b/ansible/files/exporter/pdudaemon-labgrid-wigyori.conf @@ -0,0 +1,15 @@ +{ + "daemon": { + "hostname": "localhost", + "port": 16421, + "logging_level": "DEBUG", + "listener": "http" + }, + "pdus": { + "clusterhat": { + "driver": "localcmdline", + "cmd_on": "/usr/sbin/clusterctrl on p%s", + "cmd_off": "/usr/sbin/clusterctrl off p%s" + } + } +} diff --git a/ansible/files/exporter/pdudaemon.service b/ansible/files/exporter/pdudaemon.service index 61840dc5c..efe131abd 100644 --- a/ansible/files/exporter/pdudaemon.service +++ b/ansible/files/exporter/pdudaemon.service @@ -8,6 +8,7 @@ DynamicUser=yes StateDirectory=pdudaemon ProtectHome=true Restart=on-abnormal +SupplementaryGroups=i2c [Install] WantedBy=multi-user.target From ea1875763f12b5a3402b09bbf9300019d3258555 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Fri, 3 Oct 2025 13:21:09 +0200 Subject: [PATCH 2/2] labnet: wigyori: set up pdudaemon for two devices hooked to a clusterhat Signed-off-by: Zoltan HERPAI --- ansible/files/exporter/labgrid-wigyori.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ansible/files/exporter/labgrid-wigyori.yaml b/ansible/files/exporter/labgrid-wigyori.yaml index 5f74ff6a8..3c301f09e 100644 --- a/ansible/files/exporter/labgrid-wigyori.yaml +++ b/ansible/files/exporter/labgrid-wigyori.yaml @@ -83,6 +83,10 @@ labgrid-wigyori-linksprite_a10-pcduino: NetworkService: address: "192.168.1.1%eth0.205" username: "root" + PDUDaemonPort: + host: localhost:16421 + pdu: clusterhat + index: 1 labgrid-wigyori-pine64_pine64-plus: location: wigyorilab @@ -97,4 +101,7 @@ labgrid-wigyori-pine64_pine64-plus: NetworkService: address: "192.168.1.1%eth0.206" username: "root" - + PDUDaemonPort: + host: localhost:16421 + pdu: clusterhat + index: 2