Rockpi control PoE error?

Hi
i have a two Rockpi-4b-2g one whit armbian Debian Buster and one whit Ubuntu Server bionic
and have install the Rockpi-poe install script from wiki raxda.

but after a reboot i check if the service running .
whit

   #service rockpi-poe status
● rockpi-poe.service - Rockpi PoE-FAN
   Loaded: loaded (/lib/systemd/system/rockpi-poe.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2020-04-01 20:32:25 CEST; 4min 39s ago
  Process: 376 ExecStop=/usr/bin/python3 /usr/bin/rockpi-poe.py stop (code=exited, status=0/SUCCESS)
  Process: 350 ExecStart=/usr/bin/python3 /usr/bin/rockpi-poe.py start (code=exited, status=0/SUCCESS)
 Main PID: 350 (code=exited, status=0/SUCCESS)

Apr 01 20:32:25 localhost.localdomain libmraa[350]: libmraa initialised for platform 'ROCK PI 4B' of type 20
Apr 01 20:32:25 localhost.localdomain libmraa[350]: pwm_init: pwm0. Failed to open export for writing: No such file or directory
Apr 01 20:32:25 localhost.localdomain python3[350]: 'NoneType' object has no attribute 'write'
Apr 01 20:32:25 localhost.localdomain python3[350]: using python3 rockpi-poe.py start|stop|enable
Apr 01 20:32:25 localhost.localdomain libmraa[376]: libmraa version v2.0.0 initialised by user 'root' with EUID 0
Apr 01 20:32:25 localhost.localdomain libmraa[376]: gpio: platform doesn't support chardev, falling back to sysfs
Apr 01 20:32:25 localhost.localdomain libmraa[376]: libmraa initialised for platform 'ROCK PI 4B' of type 20
Apr 01 20:32:25 localhost.localdomain python3[376]: 'NoneType' object has no attribute 'write'
Apr 01 20:32:25 localhost.localdomain python3[376]: using python3 rockpi-poe.py start|stop|enable
Apr 01 20:32:25 localhost.localdomain libmraa[376]: pwm_init: pwm0. Failed to open export for writing: No such file or directory

and i think its not running on both armbiam/ubuntu ?
any tips :smiley:

Hi, whether or not enable hardware resources?

Please refer to here: How to install PoE HAT's software on Armbian

Hi
On armbian i use the tutorial

on ubuntu server minimal i use
the wiki Raxda Wiki

Is there an error in the armbian?

Rock pi 4b 1.4
Ubuntu server
After first start use:

  1. sudo unminimize
  2. curl -sL https://rock.sh/get-rockpi-poe | sudo -E bash -

Reboot
sudo systemctl status rockpi-poe.service
● rockpi-poe.service - Rockpi PoE-FAN
Loaded: loaded (/lib/systemd/system/rockpi-poe.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Tue 2020-05-12 18:52:26 UTC; 7s ago
Process: 815 ExecStop=/usr/bin/python3 /usr/bin/rockpi-poe.py stop (code=exited, status=0/SUCCESS)
Process: 814 ExecStart=/usr/bin/python3 /usr/bin/rockpi-poe.py start (code=exited, status=0/SUCCESS)
Main PID: 814 (code=exited, status=0/SUCCESS)

May 12 18:52:25 rockpi systemd[1]: Started Rockpi PoE-FAN.
May 12 18:52:26 rockpi /rockpi-poe.py[814]: Maybe need reboot.
May 12 18:52:26 rockpi python3[814]: 'NoneType' object has no attribute 'write'
May 12 18:52:26 rockpi python3[814]: using python3 rockpi-poe.py start|stop|enable
May 12 18:52:26 rockpi /rockpi-poe.py[815]: Maybe need reboot.
May 12 18:52:26 rockpi python3[815]: 'NoneType' object has no attribute 'write'
May 12 18:52:26 rockpi python3[815]: using python3 rockpi-poe.py start|stop|enable

It appears that mraa is not installed, please execute the following command

python3 -c “exec(\“import mraa\nprint(mraa.getVersion())\”)”

python3 -c “exec(“import mraa\nprint(mraa.getVersion())”)”
-bash: syntax error near unexpected token (’`

python3 -c “exec(‘import mraa\nprint(mraa.getVersion())’)”
Traceback (most recent call last):
File “”, line 1, in
File “”, line 1, in
ModuleNotFoundError: No module named ‘mraa’

sudo apt-get install libmraa-rockpi4
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘libmraa’ instead of ‘libmraa-rockpi4’
libmraa is already the newest version (0.7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

python2 -c “exec(‘import mraa\nprint(mraa.getVersion())’)”
v2.0.0-57-gf374a26

Solved by manually upgrade python to 3.8.
But he is useless)))
Processor on the reverse side, it is cooled passively with a radiator!
POE HAT not increases cooling-down speed.
Waste of money.
POE work without POE HAT?

The fan is for PoE itself, not CPU.

PoE hat is required if you want to use PoE.

Not for CPU but always read CPU temperature?)

def read_sensor_temp():
# 42, the answer to life, the universe, and everything
v2t = lambda x: 42 + (960 - x) * 0.05 # noqa
with open(’/sys/bus/iio/devices/iio:device0/in_voltage0_raw’) as f:
t = v2t(int(f.read().strip()))
return t

with stress --cpu 6 t -always lower than processor temperature

and…

def read_soc_temp(n=0): # cpu:0 gpu:1
with open(’/sys/class/thermal/thermal_zone{0}/temp’.format(n)) as f:
t = int(f.read().strip()) / 1000.0
return t

def read_temp():
t1 = read_sensor_temp()
t2 = read_soc_temp(0)
t3 = read_soc_temp(1)
return max(t1, t2, t3)

t2, t3 not CPU, GPU temperature?))

if add to sript print max t in cycle, he always print CPU temperature but fan for poe…

Since you can read the code, you should know the max function.

Here are some temperature graphs that you can refer to. They are the data that we saved during the test.

The test environment was 25 degrees indoor, and the external load was 3A on PoE HAT.

When the power is increased, the temperature of HAT is higher than CPU, so the fan is for HAT.

rock@k8s-node-02:~$ python3 -c "exec(\"import mraa\nprint(mraa.getVersion())\")"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'mraa'

Have a try
sudo apt-get install libmraa

Sure did

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmraa : Depends: libjson-c3 but it is not installable
           Depends: python3.7 but it is not installable
           Depends: libpython3.7 but it is not installable
E: Unable to correct problems, you have held broken packages.

I’m sorry that Ubuntu 20.04 does not have the mraa package, so the PoE control cannot be used now. We will support it as soon as possible.

Thanks, @setq I’m also keen to bump to using 20.10 or even 20.04.2 with kernel version 5.10 if that is in the near future to being supported, either way, the PoE control would be great to avoid overheating!!