Hi,
just found the time to migrate from an EmonTX to a (Kickstarter) EmonPi, and I have a query re EmonGLCD code. Currently running SolarPV.ino, and it decides whether it's getting an energy packet from the TX or a time update from Emonbase by checking the source node:
if (node_id == 10) {emontx = *(PayloadTX*) rf12_data; last_emontx = millis();}
if (node_id == 15)
{
RTC.adjust(DateTime(2013, 1, 1, rf12_data[1], rf12_data[2], rf12_data[3]));
With the EmonPi, both packets will I believe both have node id = 5. Before I go hacking the code around, is there an existing preferred fix for this? I've searched this forum but haven't found anything.
I also ran into the bug of Emonhub splitting a node name into multiple lines when there's only one variable sent ( http://openenergymonitor.org/emon/node/11322 ) but found a different workaround, just changed the name to a single letter "T"
Thanks!
Re: EmonGLCD - changing from EmonTX system to Emonpi
Unfortunately that's not going to work, Previously with the emonTx (node 10) the emonGLCD was listening in on the transmision from the emonTx to the emonBase, when using an emonPi instead of the emonTx, there is no transmission to listen to, plus if it did transmit the data as node 5 as well as the time as node 5 the emonGLCD wouldn't be able to use the node id to distinguish the time from the data.
The emonPi is able to transmit the time and you could extend this to send one packet including both the time and the data, which would also require some minor edits in the emonGLCD sketch. Or you will need to edit emonPi to repeat the locally captured data over the rfm network with a different id. either an edit to the emonPi sketch to just broadcast the data as it passes it to the Pi over serial or in emonhub to TX the dat it gets from the emonpi board or by "fetching" the required data from emoncms in emonhub and TX over rfm.
The last one IMO is the better option, but any will do the job and all will require some coding, with the last one the coding can be all done in emonhub so no sketches to upload.
Paul
Re: EmonGLCD - changing from EmonTX system to Emonpi
Derek - I have an emonPi and the emonGLCD but I am running a hacked up version of the HomeEnergyMonitor.ino code. I get my power and time from the emonPi (node 5). I do not own the emonTX. I changed the HomeEnergyMonitor.ino code Payload to accept the time and power (and energy).
And I changed to the EmonHubJeeInterfacer.py code in the "def action(self):" area to send both the time and the power (and energy) to the emonGLCD.
The above was with the help of many others on this forum! How to send feed data from emoncms to emonGLCD?
Hope this helps - Jon
Re: EmonGLCD - changing from EmonTX system to Emonpi
Thanks for the quick response guys,
I'll probably put the time in the main payload - looks as if I'm doing some recoding!
In the meantime I plan to leave the old emonbase powered up on node 15 just to provide a temporary time signal...
regards