Community
OpenEnergyMonitor

OpenEnergyMonitor Community

emonPiFrontendCM compile error 'SpiDev10' was not declared in this scope

Please help. I cannot see why this error is stopping me compiling this code.
I have followed the instructions and installed all libraries restarted IDE but still have this error.
please help.
I am compiling emonPiFrontEndCM v1.0.0 ,
I have got the EmonTXV3CM installed and think im right in installing this to see the TX as ite not showing up on the emoncms log.
please help.

Arduino: 1.8.13 (Windows 7), Board: “Arduino Uno”

emonPiFrontEndCM:49:6: error: ‘SpiDev10’ was not declared in this scope

RF69 rf;

  ^~~~~~~~

emonPiFrontEndCM:49:14: error: template argument 1 is invalid

RF69 rf;

          ^

C:\Users\The User\Documents\Arduino.old\emonPiFrontEndCM\emonPiFrontEndCM.ino: In function ‘void setup()’:

emonPiFrontEndCM:197:53: error: call of overloaded ‘EmonLibCM_setPulseMinPeriod(int, int&)’ is ambiguous

EmonLibCM_setPulseMinPeriod(0, EEProm.pulse_period); // Minimum pulse period

                                                 ^

In file included from C:\Users\The User\Documents\Arduino.old\emonPiFrontEndCM\emonPiFrontEndCM.ino:41:0:

C:\Users\The User\Documents\Arduino.old\libraries\EmonLibCM/emonLibCM.h:100:6: note: candidate: void EmonLibCM_setPulseMinPeriod(int, byte)

void EmonLibCM_setPulseMinPeriod(int _period, byte _edge=FALLING);

  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\The User\Documents\Arduino.old\libraries\EmonLibCM/emonLibCM.h:101:6: note: candidate: void EmonLibCM_setPulseMinPeriod(byte, int, byte)

void EmonLibCM_setPulseMinPeriod(byte channel, int _period, byte _edge=FALLING);

  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

emonPiFrontEndCM:200:53: error: call of overloaded ‘EmonLibCM_setPulseMinPeriod(int, int&)’ is ambiguous

EmonLibCM_setPulseMinPeriod(1, EEProm.pulse_period); // Minimum pulse period

                                                 ^

In file included from C:\Users\The User\Documents\Arduino.old\emonPiFrontEndCM\emonPiFrontEndCM.ino:41:0:

C:\Users\The User\Documents\Arduino.old\libraries\EmonLibCM/emonLibCM.h:100:6: note: candidate: void EmonLibCM_setPulseMinPeriod(int, byte)

void EmonLibCM_setPulseMinPeriod(int _period, byte _edge=FALLING);

  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\The User\Documents\Arduino.old\libraries\EmonLibCM/emonLibCM.h:101:6: note: candidate: void EmonLibCM_setPulseMinPeriod(byte, int, byte)

void EmonLibCM_setPulseMinPeriod(byte channel, int _period, byte _edge=FALLING);

  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

emonPiFrontEndCM:250:6: error: request for member ‘init’ in ‘rf’, which is of non-class type ‘int’

rf.init(EEProm.nodeID, EEProm.networkGroup,

  ^~~~

C:\Users\The User\Documents\Arduino.old\emonPiFrontEndCM\emonPiFrontEndCM.ino: In function ‘void loop()’:

emonPiFrontEndCM:281:16: error: request for member ‘receive’ in ‘rf’, which is of non-class type ‘int’

int len = rf.receive(&nativeMsg, sizeof(nativeMsg)); // Poll the RFM buffer and extract the data

            ^~~~~~~

emonPiFrontEndCM:287:23: error: request for member ‘rssi’ in ‘rf’, which is of non-class type ‘int’

 rfInfo.rssi = -rf.rssi/2;

                   ^~~~

emonPiFrontEndCM:305:8: error: request for member ‘send’ in ‘rf’, which is of non-class type ‘int’

 rf.send(0, (void *)outmsg, outmsgLength);                          //  void RF69<SPI>::send (uint8_t header, const void* ptr, int len) {

    ^~~~

emonPiFrontEndCM:320:10: error: request for member ‘init’ in ‘rf’, which is of non-class type ‘int’

   rf.init(EEProm.nodeID, EEProm.networkGroup,                      // Reset the RFM69CW if NodeID, Group or frequency has changed.

      ^~~~

exit status 1

‘SpiDev10’ was not declared in this scope

Hello @padyju it may be easier for you to use the precompiled firmware uploader tool within emoncms itself if you have an emonPi there already. See Admin > Update > Update firmware only:

You cannot have spi.h installed in your Libraries directory. Have you downloaded RF69.zip, unzipped and copied/moved the contents into your libraries directory? The procedure is exactly the same as written in the ‘Learn’ section for installing Arduino libraries - the exact details depend on your OS, of course.

The same applies to each of the “Required Libraries” listed on the release page.

This is a separate problem from compiling the front end sketch. EmonTXV3CM uses the “Classic JeeLib” radio message format, which as the release page carefully explains, is not compatible with the emonPiCM software. The sketches that ARE compatible are listed on the release page.