New inputs not showing/heavily delayed

I have been adding some room temperature sensors over the weekend to my emoncms (v6) and RPi set up [4 existing room sensors and an emonTXv3] with some very odd results.

I am using moteinos (lowpowerlab.com) with RFM12Bs @ 433 mhz for these and have made a few little shields on protoboard to tidy up the sensor wiring (a DS18B20 with a DHT11 for some) and to add a voltage divider for battery monitoring. 

A big thanks to the oem crew for their emonTH code which was a great start and seems to handle upgrading temp nodes from one to two sensors very well - although the serial debug output can be oddly temperamental - maybe down to my cheep ebay FTDI cable.

I was tearing my hair out on Saturday evening/Sunday morning as I just could not get the inputs recognized - I was left wondering if it was a software or hardware issue.  I also seemed to have issues with the existing nodes dropping out (or some of them any way) when I fired up a new sensor.

Just in case I left one of the new nodes switched on in case I had some sort of network stability issues that needed to settle down.

I checked again in the evening and suddenly I had various new inputs flagged for the nodes I had tried in the morning and the new node was being recognized.  I also seemed to have some discrepancies with new nodes in the local and emoncms.org instances.

Is there a known issue with adding nodes to an existing emoncms/Jeelib network? 

Is there a recommended process for adding new nodes, e.g. switch on the new node and wait a while for things to stabilize?

Many thanks

Bra1n's picture

Re: New inputs not showing/heavily delayed

I too have had this problem with my recently upgraded HDD + Raspberry Pi install, it was/is fine on my older  SD Card system. One thing I did find (and time will tell if this was the actual problem) was that the recent install was flashing the RFM12PI's green led continually and further investigation revealed the new RFM12b Packet Generator module already had an example set up which was set to send data every 5 seconds. I assume it was flashing more frequently than this as nothing was receiving the packets thus no acks and frequent retries. Having cleared out the Packet Generator example the LED now only flashes as before when receiving a packet from a node so I hope I've found the problem.

I assume the delay in seeing inputs (and the missing data from existing inputs I was also seeing) was due to the RFM12Pi being busy and not receiving/acknowledging the node's packets until they eventually found a non busy slot after many retries.

Additionally I couldn't get into the Packet Generator web page until I deleted duplicate copies of the packetgen*.php files from the emoncms directory (they already exist in the emoncms/Modules/packetgen directory)

Hope this helps.

Bra1n's picture

Re: New inputs not showing/heavily delayed

Further to the above it looks like my new RFM12Pi V2 is not quite up to the mark of my previous V1 when it comes to reception and is marginal with my furthest node, shutting the door to the room where the Pi resides is enough to lose communication (as I found out last night)

A correction to the above it would seem the problem was reduced transmit power from that node when the battery dropped to 2.85 V, a new battery has solved the issue for now but I am investigating using a repeater.

TrystanLea's picture

Re: New inputs not showing/heavily delayed

Il add a limit to the packetgen update frequency, I wonder if it got stuck just transmitting with no delay, that may well be the same issue that oem06 had here:http://openenergymonitor.org/emon/node/3583

TrystanLea's picture

Re: New inputs not showing/heavily delayed

To manually fix, adding the following line should do it:

if ($controlinterval<5) $controlinterval = 5;

if ((time()-$controltime) > $controlinterval)
      {
        $controltime = time();
        $str = $packetgen->getrfm12packet($session['userid']);
        fprintf($f,$str."s");
        usleep(100);
}

line 321 here: https://github.com/emoncms/packetgen/blob/master/copyto_raspberrpi_modul...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.