Raspberry pi 4 testing

This is the topic where i will put bugs and other problems i find while testing the Rpi 4 on my emonpi.

I already installed the rpi4 in my emonpi and everything went good. Just the faceplate does not fit by a few milimeters but the design is almost the same.

The other thing is emonpi lcd always show “raspberry pi booting”, the light stays on and the admin page says: Emonpilcd - activating: auto-restart.
The command systemctl status emonPiLCD.service guives the output:

emonPiLCD.service - emonPiLCD Script
Loaded: loaded (/lib/systemd/system/emonPiLCD.service; enabled; vendor preset
Active: activating (auto-restart) (Result: exit-code) since Tue 2019-07-16 12
Process: 2344 ExecStart=/usr/bin/python /opt/openenergymonitor/emonpi/lcd/emon
Main PID: 2344 (code=exited, status=1/FAILURE)
lines 1-5/ (END)

At the this day, everything is working well but right after i opened the inputs page, i noticed the “power 2” input having a value of 812 and then changed to 0 after a second. I don’t have any CT connected to it, so, it could be a symptom of something. Need to check that.

The Rpi 4 info and shutdown/restart buttons are still missing. No temperatures showing too.

@glyn.hudson, i am wondering abou the power consumption of the new rpi. Does it need to change the adapter? From what i’ve read, the rpi 4 can use the old AC adapter but we can’t connect almost anything to it because it gives only 2.5A if i remember correctly.
The new AC adapter for Rpi4 gives 3.0A and is USBC.

Here is my admin page:

Server Information

Server Information

Services

  • emonhub :- Active Running
  • emoncms_mqtt :- Active Running
  • feedwriter :- Active Running - sleep 60s 0 feed points pending write
  • service-runner :- Active Running
  • emonPiLCD :- Activating Auto-restart
  • redis-server :- Active Running
  • mosquitto :- Active Running

Emoncms

Server

  • OS :- Linux 4.19.57-v7l+
  • Host :- emonpi | emonpi | (192.168.1.80)
  • Date :- 2019-07-16 13:59:02 CEST
  • Uptime :- 12:59:02 up 24 min, 2 users, load average: 0.04, 0.07, 0.12

Memory

  • RAM :- Used: 7.14%
    • Total :- 3.81 GB
    • Used :- 279.04 MB
    • Free :- 3.54 GB
  • Swap :- Used: 0.00%
    • Total :- 100 MB
    • Used :- 0 B
    • Free :- 100 MB

Disk

  • / :- Used: 51.70%
    • Total :- 6.85 GB
    • Used :- 3.54 GB
    • Free :- 2.99 GB
  • /boot :- Used: 15.49%
    • Total :- 252.05 MB
    • Used :- 39.03 MB
    • Free :- 213.01 MB
  • /var/log :- Used: 3.12%
    • Total :- 50 MB
    • Used :- 1.56 MB
    • Free :- 48.44 MB

HTTP

  • Server :- Apache/2.4.38 (Raspbian) HTTP/1.1 CGI/1.1 80

MySQL

  • Version :- 5.5.5-10.3.15-MariaDB-1
  • Host :- localhost:6379 (127.0.0.1)
  • Date :- 2019-07-16 12:59:02 (UTC 01:00‌​)
  • Stats :- Uptime: 70645 Threads: 12 Questions: 1514 Slow queries: 0 Opens: 45 Flush tables: 1 Open tables: 39 Queries per second avg: 0.021

Redis

  • Version :- 5.0.3
  • Host :- localhost:6379
  • Size :- 62 keys (864.74K)
  • Uptime :- 0 days

MQTT Server

  • Version :- Mosquitto 1.5.7
  • Host :- localhost:1883 (127.0.0.1)

PHP

  • Version :- 7.3.4-2 (Zend Version 3.3.4)
  • Modules :- apache2handler | calendar v7.3.4-2 | Core v7.3.4-2 | ctype v7.3.4-2 | curl v7.3.4-2 | date v7.3.4-2 | dom v20031129 | exif v7.3.4-2 | fileinfo v7.3.4-2 | filter v7.3.4-2 | ftp v7.3.4-2 | gd v7.3.4-2 | gettext v7.3.4-2 | hash v7.3.4-2 | iconv v7.3.4-2 | json v1.7.0 | libxml v7.3.4-2 | mbstring v7.3.4-2 | mosquitto v0.4.0 | mysqli v7.3.4-2 | mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $ | openssl v7.3.4-2 | pcre v7.3.4-2 | PDO v7.3.4-2 | pdo_mysql v7.3.4-2 | Phar v7.3.4-2 | posix v7.3.4-2 | readline v7.3.4-2 | redis v5.0.1 | Reflection v7.3.4-2 | session v7.3.4-2 | shmop v7.3.4-2 | SimpleXML v7.3.4-2 | sockets v7.3.4-2 | sodium v7.3.4-2 | SPL v7.3.4-2 | standard v7.3.4-2 | sysvmsg v7.3.4-2 | sysvsem v7.3.4-2 | sysvshm v7.3.4-2 | tokenizer v7.3.4-2 | wddx v7.3.4-2 | xml v7.3.4-2 | xmlreader v7.3.4-2 | xmlwriter v7.3.4-2 | xsl v7.3.4-2 | Zend OPcache v7.3.4-2 | zlib v7.3.4-2
Client Information

Client Information

HTTP

  • Browser :- Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
  • Language :- pt-PT,pt;q=0.8,en;q=0.5,en-US;q=0.3

Window

  • Size :- 1287 x 644

Screen

  • Resolution :- 1366 x 768

Firstly, the connector style won’t matter as the emonpi add-on board supplies the Pi via the gpio, the power supply to the emonpi unit will remain a mini usb regardless of whether you use a Pi4 (USB-C) or any other Pi (micro USB).

The OEM supplied PSU’s are actually only 2A, this has come up many times in discussion, but the shop still uses the 2.0A PSU because of the interchangeable USB power leads, the emonPi being Mini USB and the emonBases being micro USB (and now the possibility of a Pi4 emonBase using a USB-C).

However, the spec for a 2.5A or 3.0A PSU (depending on Pi model) assumes that up to 1.2A could be drawn via the 4x USB sockets and that a display, mouse and keyboard may well be attached, plus other stuff potentially. The actual “Typical bare-board active current consumption” of a Pi 4 is only 600mA (ref Raspberry Pi Documentation)

So whilst it might be desirable to have more headroom, especially during start up, unless the emonpi add-on board and any attached sensors draw more than 1400mA you should be ok. It’s only with displays and spinning HDD’s etc that you are more likely to struggle.

you can test for under-voltage with this command

vcgencmd get_throttled

it should return

throttled=0x0

if all is well, if it returns anything else you can decode it with this info

the “16” bit is reset at reboot so as long as this remains clear your PSU would appear to be ok.

1 Like

Do you have the $allow_emonpi_admin=true; setting in your settings.php?

Looking at the file default.emonpi.settings.php

// If installed on Emonpi, allow admin menu tools
$allow_emonpi_admin = true;

Yes, i do.

That file will because it is the default template, you need to check your emoncms/settings.php file for the setting.

The same.
// If installed on Emonpi, allow admin menu tools
$allow_emonpi_admin = true;

I am not sure since i installed emoncms using the script and on the top of desktop installation. But the path to the file (removing the sdcard and searching for it in my pc) is /rootfs/var/www/emoncms

Its my project for the next future months. I am already working on node-red dashboard to show the data on a LCD and add SSD.

I assume that getting an adapter USB-C → Mini-usb and using the rpi 4 oficial PSU, it’s ok.

Thanks for the tips! Didn’t know about that!

Thanks!

I think the LCD problems are now solved

pi@emonpi:~ $ systemctl status emonPiLCD.service
● emonPiLCD.service - emonPiLCD Script
   Loaded: loaded (/lib/systemd/system/emonPiLCD.service; enabled; vendor preset
   Active: active (running) since Fri 2019-11-08 09:51:57 GMT; 1h 4min ago
 Main PID: 566 (python)
    Tasks: 5 (limit: 4154)
   Memory: 13.8M
   CGroup: /system.slice/emonPiLCD.service
           └─566 /usr/bin/python /opt/openenergymonitor/emonpi/lcd/emonPiLCD.py

Nov 08 09:51:57 emonpi systemd[1]: Started emonPiLCD Script.
Nov 08 09:52:01 emonpi emonPiLCD[566]: emonSD-30Oct18

cf GitHub - openenergymonitor/emonpi: Raspberry Pi Based Energy Monitor. Hardware, Firmware & related software for the PI.

just replaced the RPI3 by a RPI4 on a emonPI

if yur emonpi repo is not uptodate, just make a git pull

@CelsoHenriques : yu confirm it is OK from your side ?

best

Alex

Sorry for my late reply! I have been away from my project due to work.

Well, i can confirm it is working. I even buy another lcd and connected to rpi4 and is working fine. For the button (rpi4 not inside the emonpi case), i used a capacitive button as i can glue it to a plastic door or anything else that has a limit 5mm thick. No need to touch on the button and it works fine.

One issue i find is, in the admin page, it doesn’t show shutdown / reboot comands and no rpi4 hardware and temperature.
It heats up a little but nothing that makes me worried.
I am waiting for hdd/ssd boot but is taking too long to get support for it.

I am now looking for a 10" lcd to present my node-red dashboard with all the sensors, meteo, and energy/water/gas consumption.

@emrys?

I’ve created an issue to track here: RPI4: Missing shutdown / reboot buttons & hardware info on admin page · Issue #1528 · emoncms/emoncms · GitHub

I’ve created this pull request to include the OUI for the company Raspberry Pi (Trading)

I have not been able to test this on a raspberry pi 4 yet. Any feedback by owners of a raspberry pi 4 would be appreciated.

another github project has also mentioned this in an issue:
https://github.com/ltsp/community/issues/5

1 Like

Great thanks @emrys this works fine on Pi4, I’ve merged into master.

Here’s what it looks like:

1 Like

Well, i did update it and still the same. I used the script to install emoncms on the top of Raspbian OS.

Starting update via service-runner-update.sh (v3.0) >
- emonSD version: emonSD-02Oct19
emonSD base image check passed...continue update
git pull /opt/openenergymonitor/EmonScripts
  master
* stable
No ramo stable
Your branch is up to date with 'origin/stable'.

não há nada para submeter, árvore de trabalho limpa
Already up to date.
-------------------------------------------------------------
Main Update Script
-------------------------------------------------------------
Date: seg mar 23 13:28:11 WET 2020
EUID: 1000
openenergymonitor_dir: /opt/openenergymonitor
type: all
firmware: none
Hardware detected: EmonPi
Stopping emonPiLCD service
Display update message on LCD
I2C LCD DETECTED Ox27
git pull /opt/openenergymonitor/emonpi
* master
No ramo master
Your branch is up to date with 'origin/master'.

não há nada para submeter, árvore de trabalho limpa
A obter de origin
Already up to date.
git pull /opt/openenergymonitor/RFM2Pi
* master
No ramo master
Your branch is up to date with 'origin/master'.

não há nada para submeter, árvore de trabalho limpa
A obter de origin
Already up to date.
Start emonhub update script:
-------------------------------------------------------------
emonHub update
-------------------------------------------------------------
git pull /opt/openenergymonitor/emonhub
* emon-pi
No ramo emon-pi
Your branch is up to date with 'origin/emon-pi'.

não há nada para submeter, árvore de trabalho limpa
Already up to date.
Failed to restart .service.service: Unit .service.service not found.
- Service 
Running emonhub automatic node addition script
[[5]]
Node 5 already present
[[6]]
Node 6 already present
[[7]]
Node 7 already present
[[8]]
Node 8 already present
[[9]]
Node 9 already present
[[10]]
Node 10 already present
[[11]]
Node 11 already present
[[12]]
Node 12 already present
[[13]]
Node 13 already present
[[14]]
Node 14 already present
[[15]]
Node 15 already present
[[16]]
Node 16 already present
[[19]]
Node 19 already present
[[20]]
Node 20 already present
[[21]]
Node 21 already present
[[22]]
Node 22 already present
[[23]]
Node 23 already present
[[24]]
Node 24 already present
[[25]]
Node 25 already present
[[26]]
Node 26 already present

Start emoncms update:
-------------------------------------------------------------
Update Emoncms Core
-------------------------------------------------------------


Checking status of /var/www/emoncms git repository
- git branch: stable
- no local changes
- running: git pull origin stable

A obter de origin
De https://github.com/emoncms/emoncms
 * branch              stable     -> FETCH_HEAD
Already up to date.

Update Emoncms database
[]

-------------------------------------------------------------
Update Emoncms Services
-------------------------------------------------------------
emoncms_mqtt.service already installed
feedwriter.service already installed
service-runner.service already installed

Reloading systemctl deamon
Restarting Services...
- sudo systemctl restart feedwriter.service
--- ActiveState=active ---
- sudo systemctl restart emoncms_mqtt.service
--- ActiveState=active ---
- sudo systemctl restart emonhub.service
--- ActiveState=active ---
/opt/openenergymonitor/EmonScripts/sudoers.d/emoncms-rebootbutton: análise com sucesso
emonPi emoncms admin reboot button sudoers updated

-------------------------------------------------------------
Update Emoncms Modules
-------------------------------------------------------------
------------------------------------------
Updating /var/www/emoncms/Modules/app module
------------------------------------------
- git branch: stable
- git tags: 2.1.0
- no local changes
- running: git pull origin stable

A obter de origin
Já em 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.

------------------------------------------
Updating /var/www/emoncms/Modules/config module
------------------------------------------
- git branch: stable
- git tags: 2.0.2-9-g1bba25a
- no local changes
- running: git pull origin stable

A obter de origin
Já em 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.

------------------------------------------
Updating /var/www/emoncms/Modules/dashboard module
------------------------------------------
- git branch: stable
- git tags: 2.0.5
- no local changes
- running: git pull origin stable

A obter de origin
Já em 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.

------------------------------------------
Updating /var/www/emoncms/Modules/device module
------------------------------------------
- git branch: stable
- git tags: 2.0.4
- no local changes
- running: git pull origin stable

A obter de origin
Já em 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.

------------------------------------------
Updating /var/www/emoncms/Modules/graph module
------------------------------------------
- git branch: stable
- git tags: 2.0.8-2-g7df046d
- no local changes
- running: git pull origin stable

A obter de origin
Já em 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.

------------------------------------------
Updating /var/www/emoncms/Modules/setup module
------------------------------------------
- git branch: stable
fatal: Nenhum nome encontrado, não é possível descrever.
- git tags: 
- no local changes
- running: git pull origin stable

A obter de origin
Já em 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.

------------------------------------------
Updating /var/www/emoncms/Modules/wifi module
------------------------------------------
- git branch: stable
- git tags: 2.0.0-29-g274bcd5
- no local changes
- running: git pull origin stable

A obter de origin
Já em 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.

/opt/openenergymonitor/EmonScripts/sudoers.d/wifi-sudoers: análise com sucesso
wifi sudoers entry updated
------------------------------------------
Updating /opt/emoncms/modules/backup module
------------------------------------------
- git branch: stable
- git tags: 2.2.1-9-g8b670a0
- no local changes
- running: git pull origin stable

Already up to date.
Já em 'stable'
Your branch is up to date with 'origin/stable'.

------------------------------------------
Updating /opt/emoncms/modules/demandshaper module
------------------------------------------
- git branch: stable
- git tags: 1.2.0-27-gfdfbf3d
- no local changes
- running: git pull origin stable

Already up to date.
Já em 'stable'
Your branch is up to date with 'origin/stable'.

------------------------------------------
Updating /opt/emoncms/modules/postprocess module
------------------------------------------
- git branch: stable
- git tags: 2.1.0-21-g0e2d78f
- no local changes
- running: git pull origin stable

Already up to date.
Já em 'stable'
Your branch is up to date with 'origin/stable'.

------------------------------------------
Updating /opt/emoncms/modules/sync module
------------------------------------------
- git branch: stable
- git tags: 2.0.3
- no local changes
- running: git pull origin stable

Already up to date.
Já em 'stable'
Your branch is up to date with 'origin/stable'.

------------------------------------------
Updating /opt/emoncms/modules/usefulscripts module
------------------------------------------
- git branch: stable
fatal: Nenhum nome encontrado, não é possível descrever.
- git tags: 
- no local changes
- running: git pull origin stable

Already up to date.
Já em 'stable'
Your branch is up to date with 'origin/stable'.

--------------------------------------------
Backup module installation and update script
--------------------------------------------
- Loading EmonScripts config.ini
- Copying default.config.cfg to config.cfg
- Setting config.cfg settings
- Backup module symlink already exists
- PHP Version: 7.3
- Creating /etc/php/7.3/mods-available/emoncmsbackup.ini
post_max_size = 3G
upload_max_filesize = 3G
upload_tmp_dir = /var/opt/emoncms/backup/uploads
- phpenmod emoncmsbackup
- /var/opt/emoncms/backup already exists
- /var/opt/emoncms/backup/uploads already exists
- restarting apache

Update Emoncms database
[]


Starting emonPi LCD service..


-------------------------------------------------------------
emonPi update done: seg mar 23 13:29:00 WET 2020
-------------------------------------------------------------
restarting service-runner

And admin info is :

Server Information

Server Information

Services

  • emonhub :- Active Running
  • emoncms_mqtt :- Active Running
  • feedwriter :- Active Running - sleep 300s 0 feed points pending write
  • service-runner :- Active Running
  • emonPiLCD :- Active Running
  • redis-server :- Active Running
  • mosquitto :- Active Running
  • demandshaper :- Active Running

Emoncms

Server

  • OS :- Linux 4.19.97-v7l+
  • Host :- emonpi | emonpi | (192.168.1.80)
  • Date :- 2020-03-23 14:32:57 CET
  • Uptime :- 13:32:57 up 6 min, 1 user, load average: 0.79, 0.83, 0.43

Memory

  • RAM :- Used: 7.14%
    • Total :- 3.86 GB
    • Used :- 282.41 MB
    • Free :- 3.59 GB
  • Swap :- Used: 0.00%
    • Total :- 100 MB
    • Used :- 0 B
    • Free :- 100 MB
      Write Load Period

Disk

  • / :- Used: 3.41%
    • Total :- 109.28 GB
    • Used :- 3.73 GB
    • Free :- 99.96 GB
    • Write Load :- n/a
  • /boot :- Used: 20.71%
    • Total :- 252.05 MB
    • Used :- 52.21 MB
    • Free :- 199.84 MB
    • Write Load :- 0 B/s (4 mins)
  • /var/log :- Used: 6.26%
    • Total :- 50 MB
    • Used :- 3.13 MB
    • Free :- 46.87 MB
    • Write Load :- n/a

HTTP

  • Server :- Apache/2.4.38 (Raspbian) HTTP/1.1 CGI/1.1 80

MySQL

  • Version :- 5.5.5-10.3.22-MariaDB-0+deb10u1
  • Host :- localhost:6379 (127.0.0.1)
  • Date :- 2020-03-23 13:32:57 (UTC 00:00‌​)
  • Stats :- Uptime: 730 Threads: 14 Questions: 1311 Slow queries: 0 Opens: 46 Flush tables: 1 Open tables: 40 Queries per second avg: 1.795

Redis

  • Version :-
    • Redis Server :- 5.0.3
    • PHP Redis :- 5.2.1
  • Host :- localhost:6379
  • Size :- 70 keys (867.25K)
  • Uptime :- 0 days

MQTT Server

  • Version :- Mosquitto 1.5.7
  • Host :- localhost:1883 (127.0.0.1)

PHP

  • Version :- 7.3.14-1~deb10u1 (Zend Version 3.3.14)
  • Modules :- apache2handler | calendar v7.3.14-1~deb10u1 | Core v7.3.14-1~deb10u1 | ctype v7.3.14-1~deb10u1 | curl v7.3.14-1~deb10u1 | date v7.3.14-1~deb10u1 | dom v20031129 | exif v7.3.14-1~deb10u1 | fileinfo v7.3.14-1~deb10u1 | filter v7.3.14-1~deb10u1 | ftp v7.3.14-1~deb10u1 | gd v7.3.14-1~deb10u1 | gettext v7.3.14-1~deb10u1 | hash v7.3.14-1~deb10u1 | iconv v7.3.14-1~deb10u1 | json v1.7.0 | libxml v7.3.14-1~deb10u1 | mbstring v7.3.14-1~deb10u1 | mosquitto v0.4.0 | mysqli v7.3.14-1~deb10u1 | mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $ | openssl v7.3.14-1~deb10u1 | pcre v7.3.14-1~deb10u1 | PDO v7.3.14-1~deb10u1 | pdo_mysql v7.3.14-1~deb10u1 | Phar v7.3.14-1~deb10u1 | posix v7.3.14-1~deb10u1 | readline v7.3.14-1~deb10u1 | redis v5.2.1 | Reflection v7.3.14-1~deb10u1 | session v7.3.14-1~deb10u1 | shmop v7.3.14-1~deb10u1 | SimpleXML v7.3.14-1~deb10u1 | sockets v7.3.14-1~deb10u1 | sodium v7.3.14-1~deb10u1 | SPL v7.3.14-1~deb10u1 | standard v7.3.14-1~deb10u1 | sysvmsg v7.3.14-1~deb10u1 | sysvsem v7.3.14-1~deb10u1 | sysvshm v7.3.14-1~deb10u1 | tokenizer v7.3.14-1~deb10u1 | wddx v7.3.14-1~deb10u1 | xml v7.3.14-1~deb10u1 | xmlreader v7.3.14-1~deb10u1 | xmlwriter v7.3.14-1~deb10u1 | xsl v7.3.14-1~deb10u1 | Zend OPcache v7.3.14-1~deb10u1 | zlib v7.3.14-1~deb10u1
Client Information

Client Information

HTTP

  • Browser :- Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
  • Language :- pt-PT,pt;q=0.8,en;q=0.5,en-US;q=0.3

Window

  • Size :- 2568 x 1214

Screen

  • Resolution :- 2732 x 1536

By the way, i tryied to install emoncms on ssd and it worked very well. Just make sure you have enough power since the default emonpi power transformer is not able to power everything. To not able to complete boot at all, to wifi not working well or random caracters on emonpi lcd.
For those who want to try, i used the first post on the link:
Rpi forum link for usb-ssd install

175MB/s write and 520MB/s read speeds on usb3.

You don’t need to add any formatting when you post this - it is much better if you don’t - it is pre-formatted.

You are on the stable branch (unsurprisingly) so will not see it until it is merged to stable and there is a new version released.

Pi4 really needs an official Pi4 power supply.

I’m running Home Assistant on a Pi4 with an SSD and it is pretty nippy.

True.
Even using 3A power supply, my emonpi with rpi4 and ssd don’t work well. I am testing now again to see if is because i am using a desktop version on it that could suck more power from it.
Strange because the ssd only draws 500mah and that leaves me in trouble because i want to add a 13" lcd to it.

Tomorow i will have more news.

Sorry, i wrongly understood it was merged on stable.

Thanks for the help!

1 Like