Potential Problem with NanodeRF base station sketch and a solution

Hi

About a week ago my local Pi based emoncms that had been working perfectly for months suddenly stopped posting inputs.

With a great deal of help from Paul (pb66) I discovered I had 8000 individual rf_fail inputs that was clearly impacting performance. As far as I understand the number of entries was due to the rf_fail not having a nodeID. I believe the NodeID requirement has been added in a recent update so if you haven't updated you will not see the problem.

I altered this section of the NanodeRF sketch to add a nodeID and this, as far as I can test, has solved the problem.

if ((millis()-last_rf)>30000)
  {
    last_rf = millis();                                              
    str.reset();                                                    
    str.print(basedir); str.print("/api/post.json?");
    str.print("apikey="); str.print(apikey);
    str.print("&node=");  str.print(MYNODE);  // Add this line where MYNODE is the node no of the NanodeRF this sketch is uploaded to 
    str.print("&json={rf_fail:1}\0");                                   // No RF received in 30 seconds so send failure 
    data_ready = 1;                                                     // Ok, data is ready
    rf_error=1;
  }

Regards

Ian

pb66's picture

Re: Potential Problem with NanodeRF base station sketch and a solution

Glyn has updated the NanodeRF sketch to include the node id.

Paul

Comment viewing options

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