Time requests?

Hello folks,

Hoping someone can help - I’m a long time user of the emonTXv3, NanodeRF, GLCD setup - old school I know but it works and has been for 10+ years now albeit with a small tweak for adding a battery a few years ago. I should add that the software base has never been my strong point, hardware is more my thing but I can hack existing code if it’s commented and can get my head around it! Anyway, recently I noticed that one of my GLCDs wasn’t updating the time and hence backlight which is tied to the time. I have narrowed it down to the NanodeRF not getting the time back from emoncms.org - I think. The code for the NanodeRF hasn’t been touched from the source since I added my API key over a decade ago and I didn’t change anything else! Having found the serial cable, plugged it in and managed to get the COM port serial monitor running (that was a task in itself!) I think this is where the serial info should get the time from but all I see is the line output of “time request sent” and I think this is where it is failing:

str.print(basedir); str.print("/time/local.json?"); str.print("apikey="); str.print(apikey);

I believe it is called every 60s however I can’t suss out the underlying code which requests the time and how that relates to the emoncms? Hoping someone can enlighten me :slight_smile:

Thanks in advance

After being sent around in circles with the Google AI I thought I’d try entering the URL string into a browser with the time request with my API as below and get the following response

http://emoncms.org/time/local.json?apikey=[my write key]

<br />
<b>Warning</b>:  Array to string conversion in <b>/var/www/emoncms/index.php</b> on line <b>506</b><br />
Array

So I have a feeling something has changed on emoncms?

Aha, I just dropped the time module as I’m having a clear out of old code in emoncms, but I am open to reintroducing this as it’s quite a tiny feature anyway..

Ah! Thank you that would be much appreciated if it’s not too much effort - I guess no-one else is still using this tiny feature but it’s been working seamlessly until a few days ago so now that makes sense - I’d prefer to avoid trying to work out how to replace it with NTP even though it gave me a learning exercise whilst trying to seek alternatives (fortunately I still have the old sketches in a back-up folder otherwise I’d have still been scratching my head and hoping it was a temporary glitch!)