GLCD time with RFM12Pi V2

Hi,

After an SD issue I’ve reloaded my Pi with the current emonPi image & all is generally well, apart from my emonGLCD will no longer report time from the Pi (it’s transmitting temperature information happily enough from what I can tell - certainly reported in emonCMS).

I’ve configured the interval setting in EmonHub & can see the following entries in the log:

2016-09-19 14:49:43,170 DEBUG RFM2Pi RFM2Pi broadcasting time: 14:49
2016-09-19 14:49:43,279 DEBUG RFM2Pi acknowledged command: > 0,14,49,0,0s

Which suggest the Pi is at least sending time information, baseid is set to 20 as is the nodeId on the GLCD (re-flashed with the current SolarPV sketch). Any ideas where to look next?

Thanks

Rob

Is the interval set?

https://openenergymonitor.org/emon/emonglcd/

Realtime Clock: A Raspberry Pi-based emonhub can be configured to send the current time information to an emonGLCD.

On the Pi, edit the emonhub.conf (usually /boot/emonhub.conf). Find the section labeled [[RFM2Pi]] [[[runtimesettings]]], add the following line. Save the file. No need to restart.

interval = 300

This will send the current time using its RFM12b, every 5 minutes (5 x 60 secs)

Hi Jon, yes, this is how my config file looks:

    group = 210
    frequency = 433
    baseid = 20                            # emonPi / emonBase nodeID
    quiet = true                            # Report incomplete RF packets (no implemented on emonPi)
    calibration = 230V                      # (UK/EU: 230V, US: 110V)
    interval =  5                        # Interval to transmit time to emonGLCD (seconds)

& the sketch:

   #define MYNODE 20            // Should be unique on network, node ID 30 reserved for base station
   #define RF_freq RF12_433MHZ     // frequency - match to same frequency as RFM12B module (change to 868Mhz        or 915Mhz if appropriate)
   #define group 210            // network group, must be same as emonTx and emonBase

You’re tangled up there.
The base node is usually 5, “#define MYNODE 20” is defining the GLCD as Node 20.
So you have two Node 20s on the system, which is not allowed.
Change the base node back to 5 with
baseid = 5
and tell the GLCD to receive from node 5 with
“const int emonBase_nodeID = 5;”

Then make sure the base can receive from node 20 (the GLCD) with a section that starts

[[20]]
… etc

two things:

  • I think the Base ID is the number for your emonPi, not for the ID of the emonGLCD.
  • and the interval of 5 seconds seems a bit fast. I don’t think the time needs to be reset that often. Try 60 seconds or the 300 seconds in the default.

Indeed, 5 seconds is silly. The GLCD keeps time itself and it’s only necessary to correct it occasionally. The only thing that a fast update does is limit the number of values sent starting with the default power-up time (I can’t remember what that is) until it receives an update.

Hi chaps - thanks for that, the 5 secs update was just in there to help speed things up while I was banging my head against the wall with it :slight_smile:

const int emonBase_nodeID doesn’t exist in the sketch file (or any of them that I can find on github), the config seems to assume a base nodeid of 15 however:

github.com/openenergymonitor/EmonGLCD/blob/master/HomeEnergyMonitor/HomeEnergyMonitor.ino

  if (node_id == 15)			//Assuming 15 is the emonBase node ID
  {
    RTC.adjust(DateTime(2012, 1, 1, rf12_data[1], rf12_data[2], rf12_data[3]));
    last_emonbase = millis();
  } 

(I’m probably mis-reading this!)

Thanks again for your help,

Rob

since my emonPi was setup for node ID #5, I recompiled the emonGLCD code and changed that node_id from 15 to node_id 5.

Yep, gotcha - I’ve changed that to 5 along with the emonPi itself. Still no joy however, rather stuck now…

Success - I dont think the last edit took in the web interface, clicked elsewhere & was prompted to login again, did so & the old baseID was in there still, changed & re-saved & it sprang into life.

Thanks for your help with this,

Rob

excellent!