Difficulties compiling EmonTX5 (avrdude) firmware

I’m trying to compile the avrdude firmware for my EmonTX5 following the OEM guide and using PlatformIO. I’m encountering an error related to a missing dependency:

<redacted>/avrdb_firmware/emon_DB_12CT/emon_DB_12CT.ino:61:10: fatal error: emonEProm.h: No such file or dir
ectory

*******************************************************************
* Looking for emonEProm.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:emonEProm.h"
* Web  > https://registry.platformio.org/search?q=header:emonEProm.h
*
*******************************************************************

 #include <emonEProm.h> // OEM EEPROM library

This suggests I need to manually download the library dependency. But that command fails as well (both the suggested syntax and the pio suggested non-deprecated syntax):

> platformio lib search "header:emonEProm.h"

WARNING: This command is deprecated and will be removed in the next releases.
Please use `pio pkg search` instead.

Nothing has been found by your request
Try a less-specific search or use truncation (or wildcard) operator *

***********************************************************************************************************************
We found 86.51MB of unnecessary PlatformIO system data (temporary files, unnecessary packages, etc.).
Use `pio system prune --dry-run` to list them or `pio system prune` to save disk space.

> pio pkg search "header:emonEProm.h"
Nothing has been found by your request
Try a less-specific search or use truncation (or wildcard) operator *

I also checked the PlatformIO registry, but no results came up.

Is the emonEProm library retrievable through a different method or location? Any guidance on how to resolve this issue would be appreciated.

Platfromio screwed up my system when I tried it - so it got binned. I used the plain old Arduino IDE when developing both the emonLibCM and emonLibDB libraries. OK, it’s a bit of a pain installing the libraries etc, but it does get you there. It’s only a problem when Trystan moves stuff around and doesn’t tell anybody, and then my script for downloading/updating the libraries gives “not found” errors :rage:.

It’s all in Docs (but I’ve not proven this, though it all looks correct):
https://docs.openenergymonitor.org/emontx5/firmware.html#compile-and-upload-using-arduino-ide

To be fair, I hadn’t tried the Arduino route yet. The one command to build and uploaded looked really appealing. :wink: Since pio is the recommended method, I’m hoping someone can easily get me up and going…otherwise I’ll break out the old reliable and figure out how to get all the native Arduino bits up and running.

I can only tell you what it did to me - moved a load of files without warning, it took me hours to figure out why my scripts didn’t work and where everything had moved to. “Malware” is the word that sprang to mind, and I refuse to touch it ever again. I’ve been driving compilers for 40+ years, and never come across anything like that.

I found what looks like the fix - a missing line from the lib_deps stanza. I’ve opened a PR which, on my system, at least allows the compilation to succeed. PR link is Add missing library to lib_deps stanza. by davidski · Pull Request #1 · openenergymonitor/avrdb_firmware · GitHub.

I’ve never managed to find the time to make sense of Github, so that means nothing to me. In any case, while I wrote the demo sketches to illustrate how to use emonLibDB, I had no hand in the “Shop” sketches, which are supplied by default when purchasing.