Help with Kellerbus Library *Updated* Now £100 for working Answer

Hello,

I am trying to use the following library: GitHub - thewknd/kellerbus: kellerbus library for Arduino

Using the example "test"

/**

#include <kellerbus.h>
#include <Time.h>
#include <SoftwareSerial.h>

SoftwareSerial Serial1(5, 4); // RX, TX

CKellerBus kbus((Stream*)&Serial1,9600,22,250);


time_t kbusTime;

void setup() {
  Serial.begin(115200);
  Serial1.begin(9600);
  while (!Serial) ;
}


void loop() {
  uint8_t mclass,group,myear,week,cfg_p,cfg_t,cnt_t,buffer,state;

  uint16_t pageAddress;
  uint16_t actPageAddress, startPageAddress, endPageAddress, timegap;
  uint8_t index = 0, overflow = 0, offset = 0, datatype, chan;
  float measure;
  char txt[4];
  uint32_t tmptime;

  Serial.println("\n-- KELLERBUS --");

  kbus.initDevice(250,&mclass,&group,&myear,&week,&buffer,&state);
  Serial.print("TYPE            : ");
  Serial.print(mclass,DEC);
  Serial.print(".");
  Serial.print(group,DEC);
  Serial.print("-");
  Serial.print(myear,DEC);
  Serial.print(".");
  Serial.println(week,DEC);
  Serial.print("BUFFER          : ");
  Serial.println(buffer,DEC);
  Serial.print("STATE           : ");
  Serial.println(state,BIN);
  Serial.print("SN              : ");
  Serial.println(kbus.getSerialnumber(),DEC);
  Serial.print("DEVICE ADDRESS  : ");
  kbus.writeDeviceAddress(0);
  Serial.println(kbus.getDeviceAddress(),DEC);
  Serial.print("BAT. CAPACITY   : ");
  Serial.println(kbus.readBatCapacity(),DEC);
  kbusTime = kbus.readDeviceTime(); 
  Serial.print("DEVICE TIME     : "); 
  Serial.print(day(kbusTime),DEC);
  Serial.print(".");
  Serial.print(month(kbusTime),DEC);
  Serial.print(".");
  Serial.print(year(kbusTime),DEC);
  Serial.print(" ");
  Serial.print(hour(kbusTime),DEC);
  Serial.print(":");
  Serial.print(minute(kbusTime),DEC);
  Serial.print(":");
  Serial.print(second(kbusTime),DEC);
  Serial.println(" (d:m:y h:m:s)");

Due to its length of the code i can't show it in full sorry.

I get the following error:

C:\Users\Brigh\AppData\Local\Temp\Rar$DIa16020.28476\test\test.ino: In function 'void loop()':

test:62:28: error: 'day' was not declared in this scope

   Serial.print(day(kbusTime),DEC);

                            ^

test:64:30: error: 'month' was not declared in this scope

   Serial.print(month(kbusTime),DEC);

                              ^

test:66:29: error: 'year' was not declared in this scope

   Serial.print(year(kbusTime),DEC);

                             ^

test:68:29: error: 'hour' was not declared in this scope

   Serial.print(hour(kbusTime),DEC);

                             ^

test:70:31: error: 'minute' was not declared in this scope

   Serial.print(minute(kbusTime),DEC);

                               ^

test:72:31: error: 'second' was not declared in this scope

   Serial.print(second(kbusTime),DEC);

                               ^

exit status 1
'day' was not declared in this scope

Specified folder/zip file does not contain a valid library

I realise the error is the Time.h library however the version of the Time.h library the code runs with is old and no longer supported. I'm using a RTC for other projects: RTClib.h not sure if its possible to change out Time.h in the library for RTClib.h instead?

If anyone can get this working for me i will happily pay for your time,

Thank you.

You may need to edit the sketch, and change the #include statement for Time.h to TimeLib.h.

@PaulS

Sorry for the PM I was on mobile.

Hi PaulS,

I tried you suggestion and got some additional errors.

Will try editing the libraries also and let you k ow how it goes

Thank you for the help

I tried you suggestion and got some additional errors.

But, you elected not to share them. Well, I'm OK with that.