New emonSD release: emonSD-30Oct18 (Raspbian Stretch Pi3B+ compatible) šŸŽ‰

3 posts were split to a new topic: Emoncms DietPi

Are you referring to a Model B Pi V1 i.e pre Model 2?

Iā€™ve not tested on a gen 1 Pi, but I see no reason why it should not work. You just need to remove the following lines from /boot/config.txt :

arm_freq=1200
arm_freq_min=600

You may also need to remove the line

dtoverlay=pi3-miniuart-bt

If possible I would recomend using at least a Pi2. There should be 2nd hand Pi2/3ā€™s available at low cost online e.g ebay.

Please let us know how you get on running it on a Pi Model B gen 1. I donā€™t have access to one to test. We have standardized on Pi3 since the on-board wifi is a very useful addition.

Iā€™m currently moving towards a test of the DietPi solution because it allows me to work with the hardware I have at hand. Getting a new Pi is not so much an issue of cost as one of need and a commitment to not throwing away something simply because itā€™s a little old. The original Pi 1 Model B has more than enough processing power to manage a house (if we could put a man on the moon with less processing power than a modern phone, I feel I ought to be able to turn on and off a few switches and track the power consumption with an SBC running at 700MHz.

Since power consumption tracking is a relatively small part of my usage, Iā€™m probably now going to drop a local EmonCMS installation in favour of storing the data in some other system using MQTT. Prior to the crash which took out my old SD card about 1 year ago, my original installation of EmonCMS based on a vanilla install of the EmonSD, had run for about 12 months with no unplanned downtime. Sadly for most of that time it had just been logging temperature data and not electricity so it was somewhat pointless! :slight_smile:

Edit to add: Having pulled the Flash drive that was running the OS I can confirm that it was the May16 release of EmonSD and that it worked flawlessly on the Pi1.

1 Like

Thatā€™s good to hear. If you just want to run emonHub and not a local version of Emoncms then maybe DietPi could be a good solution. Iā€™ve split out the DietPi discussion to a new topic.

21 posts were split to a new topic: emonSDexpand on 30Oct18 Raspbian Stretch Image

I just installed this image to work with my own custom version of the emonBase (some pins swapped, some features added/removed). Nice work!

One thing I noticed though is that there is an automatic firmware flasher. I donā€™t want my firmware flashed because emonPiā€™s firmware is not compatible with my custom board. Is there a way to stop the automatic updates from happening in the future?

1 Like

Hi:
I would like to update the new software for 30Oct18. My version was an emonpi with emonSD-26Oct17.

Can I rebuild the SD card of the 30Oct18, start the system, and then do a emoncms-upload to get my data/dashboard, etc?

Thanks for any helpā€¦

Hi,

I upgraded my emoncms to version 9.9.4 successfully with emonSD-26Oct17 image on my emonPi. Iā€™m now wondering if it is possible to migrate to the emonSD-30Oct18 image directly from my computer through my wifi network, or if it is necessary to open the case of my emonPi to flash the SDcard with Etcher.

Regards

Gerard

The key difference is that the new imageā€™s base OS is a ā€˜Stretchā€™ image (old one was ā€˜Jessieā€™ i.e. different versions of Raspbian/Debian).

To make the upgrade, you do need to reflash the SD Card - personally, Iā€™d buy a new card so you have a path back if it is not successful.

You will need to backup the data and the import it. As you have upgraded to 9.9.4 that should be less of a hassle.

I would suggest you

  • First update the existing setup to 9.9.4.
  • Backup / export data
  • Flash new image to (new) SD Card
  • Install card, get system up and running (wifi etc).
  • Update EmonCMS system (image is not on latest).
  • Restore data (which will include dashboards etc (hopefullyā€¦)

By using a new card, you have a route back to where you were if something goes wrong.

2 Likes

Thank you for the is list - I need to run through this listā€¦

ā€œFirst update the existing setup to 9.9.4.ā€ - I have Version low-write 9.8.31 | 2018.06.21 - so I need to update. Should I use ā€œemonpi Updateā€ or ā€œemonBase Updateā€ button? Iā€™m not clear what each does this instance. Alternative I could ssh and then a ā€œ.shā€?

Similarly the line ā€œUpdate EmonCMS system (image is not on latest).ā€ - does that also use ā€œemonpi Updateā€ or ā€œemonBase Updateā€ button? etcā€¦

Yes ā€˜emonpi updateā€™ is the best method in both instances. The emonbase update updates the firmware on the rflink (I think - not an emonpi user).

Take a backup first :smile: - there are a number of threads on baking up / exporting data.

My crib notes say:

Update EmonPi Button or Update EmonBase Button? - #15 by pb66

And in rather more detail (all courtesy of @pb66)

Updating emonPi sketch:
If you do want to change the firmware, itā€™s best to compile the Arduino sketch on your PC then transfer the .hex to the emonPi and upload directly from the RaspberryPi using avrdude. Emonhub will need to be stopped to free up the serial port. See example script to upload .hex emonpi/update at master Ā· openenergymonitor/emonpi Ā· GitHub

#!/bin/bash
sudo service emonhub stop
avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 115200 -U flash:w:/home/pi/emonpi/firmware/compiled/latest.hex
sudo service emonhub start

Not updating the emonPi sketch:
EmonPi AC-AC input - #13 by pb66
ā€œIf you use the ā€œupdate RFM69Piā€ button rather than the ā€œupdate emonPiā€ button it will update in exactly the same way but when it tries to upload the firmware at the wrong upload baud it will fail and the existing firmware will remain intact. This works as the 16MHz emonPi has a different bootloader to all the 8MHz RFM2Pi type devices.ā€

If you have an emonPi with a totally stock sketch you are best using ā€œupdate emonpiā€ to keep up to date.
If you have an emonPi with a modified sketch you are best using ā€œupdate emonbaseā€ to avoid overwriting.
If you have an emonBase and you know your RFM2Pi or RFM69Pi is rfm69 based and has a totally stock sketch you are best using ā€œupdate emonBaseā€ to keep it updated
If you have an emonBase with a rfm69 based RFM2Pi or RFM69Pi running a modified sketch OR if you have a rfm12 based RFM2Pi OR you are unsure what RFM2Pi you have you should use ā€œupdate emonpiā€ to avoid over-writing the firmware.
Aside from the firmware differences, there is no difference, both buttons fully update the emonSD used in both the emonPi and emonBases. There is no emonHub update button, emonhub is updated along with emoncms and other softwares in that same emonSD update.

2 Likes

Thanks for your advices. Buying a new card is probably a safer solution.

1 Like

This was discussed in great length already, and thereā€™s a link to the discussion in Glynā€™s first post in this thread. Have a read through that discussion - the argument has already been lost :wink:

Iā€™ve not been able to revive a couple of inputs - i.e. those from Robinā€™s Mk2 pv diverter. The standard emontx and emonth nodes have been picked up and are updating, but not these additional ones. The imported backup file has these nodes (basically node ā€˜12ā€™ and ā€˜13ā€™) listed in inputs, but null values. The log file shows an error:

2018-11-14 00:44:16.296|ERROR|phpmqtt_input.php|ErrorException: Undefined index: nodeid in /var/www/emoncms/Modules/input/input_model.php:206

but Iā€™m on the edge of my knowledge hereā€¦do I need to edit the script on the diverter (which I presume is still transmitting the data with the same format) or do I need to try and find these nodes in the php script?

3 posts were split to a new topic: Getting started with energy monitoring using RasPi + CT sensors

Fixed it - basically needed to edit the emonHub config nodes and delete the old ones :smile:

2 Likes

Thanks everyone. I did a full backup for everything in keep in case of trouble, butā€¦

The backup/SDcard2018/import works fine.

The one issue which might be nothing is that I the ā€˜averdudeā€™ I updated.

At the end of the procedure it saidā€¦

=============================================
avrdude-original: safemode: lfuse reads as 0
avrdude-original: safemode: hfuse reads as 0
avrdude-original: safemode: efuse reads as 0
avrdude-original: safemode: Fuses OK (E:00, H:00, L:00)
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe

avrdude-original done. Thank you.

strace: |autoreset: Broken pipe

Is that just then drop the connection? In which case nothing to worried aboutā€¦

Thanks for everyone for the adviceā€¦