Newbie: Can't get anything useful to happen

Hi

I'm a total newbie to this... I have bought a RFM69Pi module and a emonTH unit along with a SD card of software.

I plugged in the RFM module to the Pi and powered it up.  I also added a DHT22 to the emonTH unit and powered it up.

The Pi boots up fine and attaches to the ethernet network and presents itself as 192.168.1.247.  I can log on to EmonCMS.  Meanwhile the emonTH has a red LED and is glowing serenely.

But... nothing seems to be going from the emonTH back to emonCMS?

I ssh into the Pi using pi/raspberry and in /var/log/emonhub I find...

2015-12-23 21:50:46,461 DEBUG    RFM2Pi     device settings updated: E i5 g210 @ 868 MHz
2015-12-23 21:50:46,573 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 7 45 120 149 20 160 35 9 231 164 17 94 97 196 9 160 120 55 187 123 146 (-99)
2015-12-23 21:50:52,821 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 183 22 60 134 88 202 228 120 20 242 204 216 177 181 252 219 146 31 15 47 126 (-99)
2015-12-23 21:50:58,289 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 229 119 23 42 232 91 92 13 111 99 238 93 231 8 35 248 154 41 105 226 14 (-96)
2015-12-23 21:51:00,023 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 165 247 203 212 155 77 33 191 1 151 11 206 87 223 255 230 206 255 181 101 237 (-98)
2015-12-23 21:51:01,748 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 25 144 171 59 184 161 47 144 160 159 74 231 217 0 185 157 36 112 254 192 9 (-100)
2015-12-23 21:51:03,011 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 159 111 188 61 194 144 237 3 251 244 216 40 49 251 16 156 182 22 45 177 228 (-97)
2015-12-23 21:51:05,358 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 46 20 37 38 68 70 231 253 247 185 43 243 30 180 230 142 147 25 125 64 187 (-99)
2015-12-23 21:51:11,471 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 180 30 64 219 222 185 190 128 225 245 247 49 4 61 223 201 225 201 93 56 241 (-101)
2015-12-23 21:51:14,087 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 17 27 137 72 93 100 208 130 135 222 115 7 112 22 163 16 63 55 54 112 67 (-97)
2015-12-23 21:51:15,595 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 153 (-97)
2015-12-23 21:51:16,412 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 160 252 39 181 145 241 63 3 48 240 74 254 49 182 177 17 180 173 60 5 141 (-97)
2015-12-23 21:51:19,171 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 18 79 50 230 255 63 32 143 34 155 77 108 68 74 225 58 95 218 72 103 93 (-97)

 

I went to the config page and forced the frequency to 868 (as that is what I ordered for the emonTH)

So no data seems to be received?

Any idea on what to do next?

Thanks in advance

Nivag

 

NivagSwerdna's picture

Re: Newbie: Can't get anything useful to happen

I also... unscrewed the PCB from the emonTH and looked underneath... it has a black splodge against 868.

pb66's picture

Re: Newbie: Can't get anything useful to happen

All those discarded packets all look "faint" and are probably noise, is the emonTH fairly close? or could it be closer whilst debugging? The last value in each frame, in brackets is the RSSI (signal strength) and ideally you want to be below -80 (at least). How frequently is the led flashing on the emonTH? should be around once per minute, does the RFM2Pi led flash in-time with the TH to indicate receipt of the transmitted packet?

setting RFM2Pi "quietmode = true" in emonhub.conf may help see any "non-garbage" packets easier if the packets are not ear marked for discarding and failing a different check.

Paul

NivagSwerdna's picture

Re: Newbie: Can't get anything useful to happen

Thanks for the interest.... I set quietmode=true...

2015-12-23 22:21:55,881 INFO     MainThread Setting RFM2Pi quiet: 0 (0q)
2015-12-23 22:21:55,982 DEBUG    RFM2Pi     acknowledged command: > 0q
2015-12-23 22:21:56,085 DEBUG    RFM2Pi     device settings updated: E i5 g210 @ 868 MHz
2015-12-23 22:21:56,883 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2015-12-23 22:21:56,988 DEBUG    RFM2Pi     acknowledged command: > 1p
2015-12-23 22:21:57,298 DEBUG    RFM2Pi     acknowledged command: <nn> i     - set node ID (standard node ids are 1..30)
2015-12-23 22:21:57,404 DEBUG    RFM2Pi     acknowledged command: <n> b      - set MHz band (4 = 433, 8 = 868, 9 = 915)
2015-12-23 22:21:57,511 DEBUG    RFM2Pi     acknowledged command: <nnnn> o   - change frequency offset within the band (default 1600)
2015-12-23 22:21:57,725 DEBUG    RFM2Pi     acknowledged command: <nnn> g    - set network group (RFM12 only allows 212, 0 = any)
2015-12-23 22:21:57,831 DEBUG    RFM2Pi     acknowledged command: <n> c      - set collect mode (advanced, normally 0)
2015-12-23 22:21:57,887 DEBUG    MainThread MQTT Subscribed to channel' : ToEmonCMS
2015-12-23 22:21:57,889 DEBUG    MainThread emoncmsorg Subscribed to channel' : ToEmonCMS
2015-12-23 22:21:58,043 DEBUG    RFM2Pi     acknowledged command: ...,<nn> a - send data packet to node <nn>, request ack
2015-12-23 22:21:58,149 DEBUG    RFM2Pi     acknowledged command: ...,<nn> s - send data packet to node <nn>, no ack
2015-12-23 22:21:58,256 DEBUG    RFM2Pi     acknowledged command: <n> q      - set quiet mode (1 = don't report bad packets)
2015-12-23 22:21:58,363 DEBUG    RFM2Pi     acknowledged command: <n> x      - set reporting format (0: decimal, 1: hex, 2: hex+ascii)
2015-12-23 22:21:58,678 DEBUG    RFM2Pi     acknowledged command: <hchi>,<hclo>,<addr>,<cmd> f     - FS20 command (868 MHz)
2015-12-23 22:21:58,792 DEBUG    RFM2Pi     acknowledged command: <addr>,<dev>,<on> k              - KAKU command (433 MHz)
2015-12-23 22:21:59,013 DEBUG    RFM2Pi     device settings updated: E i5 g210 @ 868 MHz
2015-12-23 22:22:05,043 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 167 221 252 186 116 238 212 119 107 159 68 215 4 245 241 163 236 59 50 247 59 (-98)
2015-12-23 22:22:06,255 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 153 209 176 33 235 82 92 50 222 213 174 24 181 126 92 58 113 11 22 112 81 (-97)
2015-12-23 22:22:08,170 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 157 135 252 197 145 140 79 134 123 123 111 145 146 204 117 165 248 252 159 171 62 (-96)
2015-12-23 22:22:10,085 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 1 183 20 5 92 224 100 125 225 239 201 48 222 39 68 125 106 192 81 124 91 (-99)
2015-12-23 22:22:11,498 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 27 127 63 67 173 58 123 147 181 253 156 240 94 153 123 221 252 38 92 164 239 (-99)
2015-12-23 22:22:15,435 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 46 46 29 45 189 128 32 175 154 226 134 143 101 46 67 45 39 231 223 181 168 (-100)
2015-12-23 22:22:15,895 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 37 68 190 215 70 108 168 118 53 67 163 27 94 208 116 200 172 151 57 225 228 (-96)

Same sort of thing really.

The emonBase and emonTH are approximately 2m apart on either side of my desk.

 

 

glyn.hudson's picture

Re: Newbie: Can't get anything useful to happen

Sorry to hear you're having trouble. When the emonTH is powered up (batteries inserted) does the red LED light up for a few seconds then extinguish then not flash again? If so, this is correct operation. If the LED flashes this indicated a fault condition (sensor not detected?). 

Have you updated your emonBase? Once logged onto local emoncms, head to admin > update emonPi: http://openenergymonitor.org/emon/modules/emonpi#update. The update should update your emonhub.conf file with the decoders for the latest emonTH firmware. 

If update does not fix your issue, please could you post your emonhub.conf file, editable via the EmonHub tab in local Emoncms. 

If you'rer still having issues, you might have a hardware problem. Please drop a line to shop support: support@openenergymonitor.zendesk.com

 

pb66's picture

Re: Newbie: Can't get anything useful to happen

2 things - Firstly. Sorry! it should of been "quiet = true" not quietmode !

Next while your editing the emonhub.conf delete or "comment out" the uk/usa voltage setting (sorry I don't recall the exact wording) it's not used or recognized by the rfm69pi, that is why it's returning the full help text which emonhub is discarding line by line as "non-numeric content", this won't fix your issue but it will tidy the logs and ease the workload both end of the serial connection.

How about the rfm69pi led is it flashing when the emonTH led flashes?

Paul

 

NivagSwerdna's picture

Re: Newbie: Can't get anything useful to happen

OK... Moved them close together...

2015-12-23 22:45:48,807 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 175 159 75 75 188 70 173 77 28 102 225 127 103 123 27 182 35 104 148 20 170 (-97)
2015-12-23 22:45:49,717 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 153 177 3 75 207 79 243 220 253 124 187 210 142 159 194 92 7 106 242 246 166 (-93)
2015-12-23 22:45:52,134 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 31 128 177 64 1 151 60 185 199 27 114 185 255 145 98 183 56 71 4 9 136 (-100)
2015-12-23 22:45:58,663 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 50 19 126 208 127 254 125 230 238 65 122 5 195 44 209 242 197 217 144 116 53 (-96)
2015-12-23 22:45:59,493 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 8 175 56 49 121 240 111 80 247 137 255 222 114 120 129 70 7 187 116 157 220 (-96)
2015-12-23 22:46:00,816 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 39 159 140 242 159 80 65 185 254 216 207 94 92 198 183 60 79 239 90 125 30 (-97)
 

 

 

 

 

NivagSwerdna's picture

Re: Newbie: Can't get anything useful to happen

re: Flashing.

Not seeing the behavior you describe...

On the emonBase side the LED flickers once when the Pi boots up but otherwise is continously off.

On the emonTH side the LED turns on when power is first applied (by inserting two new AA cells) and stays continuously ON ever after.

No flashing.

 

NivagSwerdna's picture

Re: Newbie: Can't get anything useful to happen

Config attached but it is really the standard with a change to 868, quiet and no calibration.

pb66's picture

Re: Newbie: Can't get anything useful to happen

Sounds like the problem at the emonTH end. I mis-read what you were saying about the TH LED. Do you have a  USB programming lead to debug the emonTH? Is the DHT22 (or ds18b20) sensor seated firmly?

Paul

NivagSwerdna's picture

Re: Newbie: Can't get anything useful to happen

What sort of lead?    I have most things!  TTL/USB?

The DHT22 is seated OK.  I actually tried it with DHT22 in and DHT22 out... same effect,,, LED turns on and stays on.

pb66's picture

Re: Newbie: Can't get anything useful to happen

The 6 pin header in the emonTH is for hooking up one of these "USB to serial UART" programmers. It has serial rx, tx, 5v, gnd and a reset line that isn't needed unless programming. The rx, tx and gnd ref are all that is required for debug. I think the board is labeled to confirm the pinout.

Paul

Robert Wall's picture

Re: Newbie: Can't get anything useful to happen

Paul can type faster than I can.

The red LED on the emonTH is turned on at the start of the initialisation, and turned off when all the checks have completed. It does that even if no sensors are detected. So clearly it is stopping somewhere along the line, and you won't get anything in emonHub until that problem is solved.

After the LED is turned on, various messages are sent out via the serial port (the 6-pin header) and the programmer would allow you to read those so you could see where it is stopping.

[Edit]
Only GND is labelled.
In order, the pins are GND, CTS (unused), VCC (+5 V), TXO, RXI, DTR (Reset).
(n.b. TXO goes to the processor's RX pin, it receives data from the computer to the emonTH, connects to TXO on the programmer.)

One easy check - look to make sure the radio module is soldered in correctly.

If you haven't got the necessary hardware, then email Support because it sounds very much like a hardware problem.

glyn.hudson's picture

Re: Newbie: Can't get anything useful to happen

Try using this emonhub.conf with the new node decoders for the new emonth firmware with node ID  23-26. (see attached). This should have been pulled in (or rather new nodes appended) during the emonPi update procedure. 

NivagSwerdna's picture

Re: Newbie: Can't get anything useful to happen

Goodness me this is getting so confusing...

I attached the emonTH to my PC using a USB/TTL adapter I had lying around... I tried to listen to it... nothing... I tried to upload a sketch compiled from https://github.com/openenergymonitor/emonTh but that seemed to fail...

... and then I reset it and got the following out at 9600 baud...

emonTH - Firmware V1.6.1
OpenEnergyMonitor.org
RFM12B Init>
Node: 20 Freq: 868Mhz Network: 210
Detected DHT22 temp & humidity sesnor
No DS18B20 detected
DHT22 Temperature: 21.60C, DHT22 Humidity: 42.80%, Battery voltage: 0.00V

But only once!

On the other side I see...

2015-12-24 00:42:03,168 DEBUG    RFM2Pi     127 NEW FRAME : OK 20 10 0 0 0 0 0 0 0 (-34)
2015-12-24 00:42:03,170 DEBUG    RFM2Pi     127 Timestamp : 1450917723.17
2015-12-24 00:42:03,170 DEBUG    RFM2Pi     127 From Node : 20
2015-12-24 00:42:03,171 DEBUG    RFM2Pi     127    Values : [1, 0, 0, 0]
2015-12-24 00:42:03,172 DEBUG    RFM2Pi     127      RSSI : -34
2015-12-24 00:42:03,173 INFO     RFM2Pi     Publishing: emonhub/rx/20/values 1,0,0,0
2015-12-24 00:42:03,175 INFO     RFM2Pi     Publishing: emonhub/rx/20/rssi -34
2015-12-24 00:42:03,177 DEBUG    RFM2Pi     127 adding frame to buffer => [1450917723, 20, 1, 0, 0, 0, -34]
2015-12-24 00:42:03,178 DEBUG    RFM2Pi     127 Sent to channel' : ToEmonCMS
2015-12-24 00:42:03,381 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 148 8 0 0 0 0 0 0 0 (-45)
2015-12-24 00:42:03,483 DEBUG    RFM2Pi     128 NEW FRAME : OK 20 7 0 0 0 0 0 0 0 (-32)
2015-12-24 00:42:03,485 DEBUG    RFM2Pi     128 Timestamp : 1450917723.48
2015-12-24 00:42:03,486 DEBUG    RFM2Pi     128 From Node : 20
2015-12-24 00:42:03,487 DEBUG    RFM2Pi     128    Values : [0.7000000000000001, 0, 0, 0]
2015-12-24 00:42:03,487 DEBUG    RFM2Pi     128      RSSI : -32
2015-12-24 00:42:03,489 INFO     RFM2Pi     Publishing: emonhub/rx/20/values 0.7,0,0,0
2015-12-24 00:42:03,490 INFO     RFM2Pi     Publishing: emonhub/rx/20/rssi -32
2015-12-24 00:42:03,492 DEBUG    RFM2Pi     128 adding frame to buffer => [1450917723, 20, 0.7000000000000001, 0, 0, 0, -32]
2015-12-24 00:42:03,493 DEBUG    RFM2Pi     128 Sent to channel' : ToEmonCMS
2015-12-24 00:42:03,598 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 141 107 128 173 254 89 225 40 197 190 155 77 31 37 106 111 243 249 21 227 175 (-96)
2015-12-24 00:42:03,701 DEBUG    RFM2Pi     129 NEW FRAME : OK 20 6 0 0 0 0 0 0 0 (-34)
2015-12-24 00:42:03,703 DEBUG    RFM2Pi     129 Timestamp : 1450917723.7
2015-12-24 00:42:03,703 DEBUG    RFM2Pi     129 From Node : 20
2015-12-24 00:42:03,704 DEBUG    RFM2Pi     129    Values : [0.6000000000000001, 0, 0, 0]
2015-12-24 00:42:03,705 DEBUG    RFM2Pi     129      RSSI : -34
2015-12-24 00:42:03,714 INFO     RFM2Pi     Publishing: emonhub/rx/20/values 0.6,0,0,0
2015-12-24 00:42:03,716 INFO     RFM2Pi     Publishing: emonhub/rx/20/rssi -34
2015-12-24 00:42:03,718 DEBUG    RFM2Pi     129 adding frame to buffer => [1450917723, 20, 0.6000000000000001, 0, 0, 0, -34]
2015-12-24 00:42:03,719 DEBUG    RFM2Pi     129 Sent to channel' : ToEmonCMS
2015-12-24 00:42:03,821 DEBUG    RFM2Pi     130 NEW FRAME : OK 20 5 0 0 0 0 0 0 0 (-34)
2015-12-24 00:42:03,823 DEBUG    RFM2Pi     130 Timestamp : 1450917723.82
2015-12-24 00:42:03,824 DEBUG    RFM2Pi     130 From Node : 20
2015-12-24 00:42:03,825 DEBUG    RFM2Pi     130    Values : [0.5, 0, 0, 0]
2015-12-24 00:42:03,826 DEBUG    RFM2Pi     130      RSSI : -34
2015-12-24 00:42:03,827 INFO     RFM2Pi     Publishing: emonhub/rx/20/values 0.5,0,0,0
2015-12-24 00:42:03,829 INFO     RFM2Pi     Publishing: emonhub/rx/20/rssi -34
2015-12-24 00:42:03,831 DEBUG    RFM2Pi     130 adding frame to buffer => [1450917723, 20, 0.5, 0, 0, 0, -34]
2015-12-24 00:42:03,831 DEBUG    RFM2Pi     130 Sent to channel' : ToEmonCMS
2015-12-24 00:42:03,944 DEBUG    RFM2Pi     131 NEW FRAME : OK 20 4 0 0 0 0 0 0 0 (-36)
2015-12-24 00:42:03,946 DEBUG    RFM2Pi     131 Timestamp : 1450917723.94
2015-12-24 00:42:03,946 DEBUG    RFM2Pi     131 From Node : 20
2015-12-24 00:42:03,947 DEBUG    RFM2Pi     131    Values : [0.4, 0, 0, 0]
2015-12-24 00:42:03,948 DEBUG    RFM2Pi     131      RSSI : -36
2015-12-24 00:42:03,949 INFO     RFM2Pi     Publishing: emonhub/rx/20/values 0.4,0,0,0
2015-12-24 00:42:03,951 INFO     RFM2Pi     Publishing: emonhub/rx/20/rssi -36
2015-12-24 00:42:03,952 DEBUG    RFM2Pi     131 adding frame to buffer => [1450917723, 20, 0.4, 0, 0, 0, -36]
2015-12-24 00:42:03,953 DEBUG    RFM2Pi     131 Sent to channel' : ToEmonCMS
2015-12-24 00:42:04,056 DEBUG    RFM2Pi     132 NEW FRAME : OK 20 3 0 0 0 0 0 0 0 (-34)
2015-12-24 00:42:04,057 DEBUG    RFM2Pi     132 Timestamp : 1450917724.06
2015-12-24 00:42:04,058 DEBUG    RFM2Pi     132 From Node : 20
2015-12-24 00:42:04,059 DEBUG    RFM2Pi     132    Values : [0.30000000000000004, 0, 0, 0]
2015-12-24 00:42:04,060 DEBUG    RFM2Pi     132      RSSI : -34
2015-12-24 00:42:04,061 INFO     RFM2Pi     Publishing: emonhub/rx/20/values 0.3,0,0,0
2015-12-24 00:42:04,062 INFO     RFM2Pi     Publishing: emonhub/rx/20/rssi -34
2015-12-24 00:42:04,064 DEBUG    RFM2Pi     132 adding frame to buffer => [1450917724, 20, 0.30000000000000004, 0, 0, 0, -34]
2015-12-24 00:42:04,065 DEBUG    RFM2Pi     132 Sent to channel' : ToEmonCMS

 

which looks much more hopeful.

The behaviour of the emonTH is different now... (no idea why)... it now turns its LED on (for approx 3 seconds)  when it starts, sends a measurement and then goes to sleep forever....  At least that proves that some of the hardware works.

The emonTH board is labelled v1.4.1 April 2014

Should I reflash the emonTH?  If so, how do I do this... which version of s/w is correct for this board?  Do I need to connect other wires apart from TX.RX.5V&GND?

Thanks

Nivag

 

 

 

 

NivagSwerdna's picture

Re: Newbie: Can't get anything useful to happen

Making good progress now... no idea why.

5 mins later I got another update!

Looking good

I will need to update the firmware to support multiple 18B20s but we can do that on another thread.

Very weird.

Robert Wall's picture

Re: Newbie: Can't get anything useful to happen

"Very weird."

I second that. I'll put money on a bad joint somewhere and it'll come back.

I think all the V1.4s used the RFμ328 processor module. It should have that on the module itself - the second layer of PCB. (The third is the radio - it should be a RFM12B, there are pictures in Resources > RFM Radio Modules - Identifying different types.)

If so, you must use sketches that include RFu_JeeLib - "#include <RFu_JeeLib.h>". This https://github.com/openenergymonitor/emonTH/blob/master/emonTH_V1_4_DHT2... appears to be the one you want.

If you're going to program yours, you need to connect the programmer's RTS to the Reset (aka DTR). They say it's possible with careful timing to manually reset it by grounding reset - I've never tried so I don't know the timing of that.

NivagSwerdna's picture

Re: Newbie: Can't get anything useful to happen

I agree.  Probably a poor solder joint and the physical stress of taking it out of the case twice has moved something ever so slightly.  I'll see how it goes and possibly reflow the solder where the bolt-on PCB connects to the main-board if it recurs... or maybe return it for a swap.

Comment viewing options

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