Community
OpenEnergyMonitor

Community

Raspberry pi 4 testing

Tags: #<Tag:0x00007fc91dab2fa0> #<Tag:0x00007fc91dab2eb0>

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

  • Version :- low-write 10.1.3-beta
  • Modules :- Administration | App v2.0.1 | Backup v2.1.0 | EmonHub Config v2.0.2 | Dashboard v2.0.3 | DemandShaper v1.0.0 | Device v2.0.0 | EventProcesses | Feed | Graph v2.0.1 | Input | Postprocess v2.1.0 | CoreProcess | Schedule | sync | Time | User | Visualisation | WiFi v2.0.0
  • Git :-

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 https://www.raspberrypi.org/documentation/faqs/#pi-power)

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

[email protected]:~ $ 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 https://github.com/openenergymonitor/emonpi

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