# EmonPI Upgrade

**URL:** <https://community.openenergymonitor.org/t/emonpi-upgrade/11073>\
**Category:** emonPi\
**Created:** [31 May 2019 13:37 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073 "2019-05-31T13:37:29Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Meadows](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tim_meadows/32/10234_2.png) [@Tim\_Meadows](https://community.openenergymonitor.org/u/Tim_Meadows)\
**Post date:** [31 May 2019 13:37 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/1 "2019-05-31T13:37:29Z")

</div>

Hi,

Hopefully a simple question.  
I’m thinking of upgrading my EmonPI. It has a couple of issues (LCD is stuck, and it won’t update from Emoncms) and I was thinking of starting again from the latest SD Card image.

I purchased the EmonPI back in July 2015, so I am assuming that it is a Pi 2 B. I have a PI 3 B+ in the house that is just being used to display the Node Red dashboard on a screen. So, my questions are:

- Can I just replace the PI currently in the EMonPI with the PI 3 I have, or are there any physical changes that would stop me?
- If I can, Should I - I’m assuming there would be a performance increase, but I haven’t noticed it being slow…
- Is emonSD-30Oct18 the image to go for?
- Is it just a case of backing up from the Emoncms backup menu, and the Node Red files?

Is there anything else I need to think about?

Many thanks in advance.

Tim

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [1 June 2019 09:54 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/2 "2019-06-01T09:54:18Z")

</div>

> [@Tim\_Meadows](#):
>
> If I can, Should I - I’m assuming there would be a performance increase, but I haven’t noticed it being slow…

I don’t think there is any real need to do this.

> [@Tim\_Meadows](#):
>
> Is emonSD-30Oct18 the image to go for?

Yes and no. We are just in the process of generating some new scripts for installing emoncms and I suggest holding off for a couple of weeks if there is no desperate need for the update. There are a couple of issues with that image. The scripts will work off a vanilla Raspbian Lite image.

> [@Tim\_Meadows](#):
>
> Is it just a case of backing up from the Emoncms backup menu, and the Node Red files?

Yes; but use a new SD Card so you have a roll back strategy!

I also cannot remember of Node-Red was installed on that image (check the release notes).

---

<div class="post-metadata">

**Author:** ![Tim\_Meadows](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tim_meadows/32/10234_2.png) [@Tim\_Meadows](https://community.openenergymonitor.org/u/Tim_Meadows)\
**Post date:** [1 June 2019 14:10 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/3 "2019-06-01T14:10:22Z")

</div>

Thanks Brian,

I had a quick play this morning, and tried using my Pi3.  
It worked, but the Pi2 didn’t have the power to run the NodeRed Dashboard so I rolled it back.

I’ll wait for the new script process and give it another go with that. Will it be ‘announced’ on here when it is done?

I now have a good idea of how to get a new image going, so will be ready to go when it is available! 🙂

Thanks for your help.

Tim

---

<div class="post-metadata">

**Author:** ![Thelmike](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/thelmike/32/13997_2.png) [@Thelmike](https://community.openenergymonitor.org/u/Thelmike)\
**Post date:** [9 May 2020 16:30 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/4 "2020-05-09T16:30:57Z")

</div>

> [@Tim\_Meadows](#):
>
> I had a quick play this morning, and tried using my Pi3.

Did you indeed run your emonPi with the Pi3? Everything fitted inside?

I read that [emonSD-17Oct19](https://community.openenergymonitor.org/t/emonsd-17oct19-release/12231) does work with Pi3 and up.  
I suppose then that Pi2B will not…

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [9 May 2020 16:47 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/5 "2020-05-09T16:47:36Z")

</div>

I’m running emonCMS on an RPiZ quite happily. Add in other things and it will struggle. A Pi2B should be fine just running emonCMS.

Thing to watch with the emonSD is it fiddles with the clock speed that the older Pis & the Zero don’t like.

Pi 2B and the Pi 3 are the same form factor IIRC so a strainght swap (I could be wrong).

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [9 May 2020 22:30 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/6 "2020-05-09T22:30:58Z")

</div>

> [@borpin](#):
>
> Pi 2B and the Pi 3 are the same form factor IIRC

They are. (I’ve got a couple of each)

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [10 May 2020 09:13 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/7 "2020-05-10T09:13:03Z")

</div>

I never bought a Pi3 - always felt the gain for the cost didn’t merit the investment over the Pi 2B+.

---

<div class="post-metadata">

**Author:** ![Thelmike](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/thelmike/32/13997_2.png) [@Thelmike](https://community.openenergymonitor.org/u/Thelmike)\
**Post date:** [10 May 2020 12:03 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/8 "2020-05-10T12:03:16Z")

</div>

Thanks guys.

I will give it a try and see how long the history gap is…

---

<div class="post-metadata">

**Author:** ![Robert.Wall](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/robert.wall/32/38246_2.png) [@Robert.Wall](https://community.openenergymonitor.org/u/Robert.Wall)\
**Post date:** [10 May 2020 12:57 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/9 "2020-05-10T12:57:03Z")

</div>

> [@Thelmike](#):
>
> I suppose then that Pi2B will not…

Yes it will, but it needs a small change, [Feed from one input stops updating, others feeds continue to work - #9 by borpin](https://community.openenergymonitor.org/t/feed-from-one-input-stops-updating-others-feeds-continue-to-work/11084/9)

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [10 May 2020 13:21 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/10 "2020-05-10T13:21:08Z")

</div>

> [@Robert.Wall](#):
>
> Yes it will, but it needs a small change

I’ve raised it as a new topic again. Not sure why we fiddle with the frequencies in the first place.

> [@Arm\_freq variables](https://community.openenergymonitor.org/t/arm-freq-variables/14133):
>
> Continuing the discussion from [Feed from one input stops updating, others feeds continue to work](https://community.openenergymonitor.org/t/feed-from-one-input-stops-updating-others-feeds-continue-to-work/11084/10): @Bill.Thomson had a good suggestion here. @TrystanLea, Why do we fiddle with the frequencies? Can this be implemented so the emonSD works with all variants of the Pi out of the Box.

---

<div class="post-metadata">

**Author:** ![Robert.Wall](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/robert.wall/32/38246_2.png) [@Robert.Wall](https://community.openenergymonitor.org/u/Robert.Wall)\
**Post date:** [10 May 2020 14:26 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/11 "2020-05-10T14:26:06Z")

</div>

> [@borpin](#):
>
> Not sure why we fiddle with the frequencies in the first place.

Me neither. But if we have to, then if it’s at all possible to detect the hardware reliably, why does the user have to find out there’s a problem, search the forums/Google/S.O. to find a fix, and then find the file to edit and edit it to do the change manually?

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [10 May 2020 17:43 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/12 "2020-05-10T17:43:02Z")

</div>

> [@Robert.Wall](#):
>
> why does the user have to find out there’s a problem,…

Because despite being suggested almost a year ago, as a means to help avoid issues like this,  
the two sections in `/boot/config.txt` _don’t_ deal with the CPU frequency.  
i.e. the suggestion was never implemented. The CPU freq is “hard coded” to 1200 MHz

One section is for the Pi4. It deals with video. (framebuffer)  
The other section deals with disabling bluetooth.

Taken from `/boot/config.txt emonSD-17Oct19` only the relevant lines are shown.

```auto
#uncomment to overclock the arm. 700 MHz is the default.
arm_freq=1200
gpu_mem=16

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
dtoverlay=pi3-disable-bt

```

* * *

If instead, the file looked similar to this:

```auto
[pi4]
arm_freq=1500
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[pi3+]
arm_freq=1400

[pi3]
arm_freq=1200
arm_freq_min=600
dtoverlay=pi3-disable-bt

[pi2]
arm_freq=900
arm_freq_min=600

[pi1]
arm_freq=700

[pi0]
arm_freq=1000

[all]
gpu_mem=16

```

There shouldn’t be any _frequency_ issues.  
More info at: [https://www.raspberrypi.org/documentation/configuration/config-txt/conditional.md](https://www.raspberrypi.org/documentation/configuration/config-txt/conditional.md)

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [10 May 2020 20:14 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/13 "2020-05-10T20:14:50Z")

</div>

In addition the emonScripts hard code the change via SED as well.

> <https://github.com/openenergymonitor/EmonScripts/issues/83>
>
> https://github.com/openenergymonitor/EmonScripts/blob/f1a322ea8049278eff957e39e6…434ca693f03766/install/emonsd.sh#L53
> 
> This line causes a problem with a PiZero install.

---

<div class="post-metadata">

**Author:** ![Thelmike](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/thelmike/32/13997_2.png) [@Thelmike](https://community.openenergymonitor.org/u/Thelmike)\
**Post date:** [13 May 2020 10:07 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/14 "2020-05-13T10:07:40Z")

</div>

Replacing the Pi2B with a Pi3 worked out fine! It even makes Emoncms more reactive, for instance when looking at the history. Specially ‘Show all’ (4y data) is much faster now.

USB Import did not work.

```auto
=== USB Emoncms import start ===
2020-05-13-10:13:05
Backup module version:
    "version" : "2.2.3"
EUID: 1000
Reading /opt/emoncms/modules/backup/config.cfg....
Location of data databases: /var/opt/emoncms
Location of emonhub.conf: /etc/emonhub
Location of Emoncms: /var/www/emoncms

Scanning for USB card reader:
- Found: /dev/disk/by-id/usb-USB_2.0_SD_MMC_Reader_842341670035-0:0 at /dev/sda
- No card reader found on sdb
- No card reader found on sdc
USB drive not found

```

I did the fsck, but that did not help.  
Instead I did the manual import of an older backup…

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [13 May 2020 10:33 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/15 "2020-05-13T10:33:01Z")

</div>

> [@Thelmike](#):
>
> USB Import did not work.

Check the other topics on that subject. It is possible. @TrystanLea

---

<div class="post-metadata">

**Author:** ![Thelmike](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/thelmike/32/13997_2.png) [@Thelmike](https://community.openenergymonitor.org/u/Thelmike)\
**Post date:** [13 May 2020 11:27 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/16 "2020-05-13T11:27:08Z")

</div>

Thanks for pointing @borpin .  
I was looking for ‘USB Emoncms import’ and did not find anything.

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [13 May 2020 11:35 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/17 "2020-05-13T11:35:19Z")

</div>

Try **usb import**

---

<div class="post-metadata">

**Author:** ![Thelmike](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/thelmike/32/13997_2.png) [@Thelmike](https://community.openenergymonitor.org/u/Thelmike)\
**Post date:** [13 May 2020 11:46 UTC](https://community.openenergymonitor.org/t/emonpi-upgrade/11073/18 "2020-05-13T11:46:39Z")

</div>

That’s what I did, and found the solution.  
Made it work.  
Emonpi running fine now…

Apparently my remarks are ‘a little too compact’?
