Connected but No Data

I had a similar problem with raspbx on a pi4. With “sudo systemctl status pms_agent” and “sudo journalctl” I could see that the pms_agent service could not be started.

The Sixfab Power HAT installer expects that a user pi exists, which is a member of the groups sudo, i2c and video and is allowed execute sudo without password.

If you are using an image other than raspbian or you want the pms_agent service to run as a different user (e.g. power), you could do the following:

# create user power, add power to the groups: sudo, i2c, video
sudo adduser power
sudo adduser power sudo
sudo adduser power i2c
sudo adduser power video

# edit /etc/sudoers and at the end of the file insert a line with the following content: "power ALL=(ALL) NOPASSWD:ALL".
echo "power ALL=(ALL) NOPASSWD:ALL"|sudo EDITOR='tee -a' visudo

# stop pms_agent, edit user in /etc/systemd/system/pms_agent.service and start pms_agent
sudo systemctl stop pms_agent
sudo sed -i 's/^\(User=\).*/\1power/' /etc/systemd/system/pms_agent.service
sudo systemctl start pms_agent