MainThread RFM2Pi thread is dead

Hi,

i have a problem using the latest SD card build from December. All things i found about this subject didn't help so far. Means i googled alot...

Version is:

Powered by openenergymonitor.org | low-write 9.2 | 2015.12.11

I set up the Raspberry from the image and up to now everything seemed to run as expected but now i added the RFM69Pi 433Mhz Raspberry Pi Base Station Receiver Board (868MHz) and the problems began. As long as i don't send anything its catching up noise and in the emonhub log i see bad packets:

2016-01-10 11:19:29,491 DEBUG    RFM2Pi     device settings updated: E i5 g212 @ 868 MHz
2016-01-10 11:19:29,598 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 35 114 12 225 207 120 247 244 99 152 72 220 22                                                                     68 237 233 66 78 116 170 192 (-100)
2016-01-10 11:19:35,431 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 142 99 195 166 253 94 2 203 239 165 246 199 15                                                                     255 115 123 70 21 126 247 113 (-95)
2016-01-10 11:19:38,255 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 172 126 217 46 236 32 7 253 24 159

BUT

Once i start my (custom) Sender Node trying to send 2 Integer values the RFM2Pi Thread is crashing immediately after one packet.

2016-01-10 11:20:39,866 DEBUG    RFM2Pi     7 NEW FRAME : OK 19 215 0 124 2 (-51)
2016-01-10 11:20:40,070 WARNING  MainThread RFM2Pi thread is dead
2016-01-10 11:20:40,294 WARNING  MainThread RFM2Pi thread is dead
2016-01-10 11:20:40,506 WARNING  MainThread RFM2Pi thread is dead

I also tried to debug via Minicom and i'd say what the node is sending should be perfectly ok (its all fake data)!?

Sending two integers:

  rfPayload.temperature = 215;
  rfPayload.humidity = 636;

 minicom -D /dev/ttyAMA0 -b 38400

OK 19 215 0 124 2 (-49)
OK 19 215 0 124 2 (-48)
OK 19 215 0 124 2 (-47)
OK 19 215 0 124 2 (-47)
OK 19 215 0 124 2 (-50)

My Emonhub.conf is edited to:

[[19]]
    nodename = Balkonsensor
    firmware = JEE_Node_V0_1
    hardware = JEENODE
    [[[rx]]]
       names = temperature, humidity
       datacode = h, h
       scales = 0.1,0.1
       units = C,%

Trying for hours now but i cant' figure out what the problem might be here?

Also tried:

[[19]]
    nodename = Balkonsensor
    firmware = JEE_Node_V0_1
    hardware = JEENODE
    [[[rx]]]
       names = temperature, humidity
       datacode = h
       scales = 0.1

No difference. Something causes a hickup and it never recovers from this...

Downstream everything works at the moment. When i inject data via a MQTT Client to topic "emonhub/rx/19/values" the emoncms behaves as it should and recognizes the numbers. Just the path from the /dev/ttyAMA0 causes trouble.

 

 

pb66's picture

Re: MainThread RFM2Pi thread is dead

Just to confirm what have, the custom node is sending via rf and the rfm2pi is receiving correct? this isn't in-place of the rfm2pi. Can you then attach a longer mixed log of the "noise" and custom packets just to see if there are any other entries or formatting anomalies etc.

How frequently are these packets received at emonhub ?

there are some anomolies in the 2 emonhub.conf examples you've given, I would not expect either to work but as I would not expect either to cause a crash either, it may just be typo's in the post. the first one has "datacode = h, h" it needs to be "datacode = h" or "datacodes = h, h" likewise in the second you have "scales = 0.1" it would need to be "scale = 0.1" or "scales = 0.1, 0.1". any combination or the correct variations will work, but you cannot have a singular key name for multiple values or a plural key name for a single value (unless it is for a single value payload of course).

If in doubt, for a test, just comment out the whole [[19]] section in the conf and you should see unscaled values pass through emonhub as the defaults are datacode = h and scale = 1 if nothing is defined.

Paul

Scram's picture

Re: MainThread RFM2Pi thread is dead

You're King man.

The tiny little "s" makes the bug difference ;-)))))))

Changed my emonhub.conf to:

...

[[19]]
    nodename = Balkonsensor
    firmware = JEE_Node_V0_1
    hardware = JEENODE
    [[[rx]]]
       names = temperature, humidity
       datacodes = h, h
       scales = 0.1, 0.1
       units = C, C

...

It seems to crash the python script "emonhub_interface.py" if you mess around with singular and plural.

Thanks alot. Great system for me to learn more.

Comment viewing options

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