Output RFM69PI

Tags: #<Tag:0x00007f1ff7ce46e0>

(Eng Icaro) #1

Hello people. I need to know what the RFM69PI output means, I can see it in minicom, but I wanted to know what each number or value represents.
OK 8 105 0 191 1 175 1 0 0 31 2 184 11 184 11 184 11 184 11 184 11 0 0 0 (-28)

RFM69PI V3 Output data decoding
(Robert Wall) #2

The first byte is the NodeID, the last (bracketed) is the RSSI (received signal strength), the remainder is the data in the order that the transmitting node sends it, and you’ll need to look either in emonHub or in the sketch for that to see exactly what each (normally pair for integer, sometimes 4 for a long, LSB first) represents.

(Glyn Hudson) #3

Packet structure is explained here:

We use emonHub to decode the data and post to MQTT and Emoncms:

(Eng Icaro) #4

Thank you very much for your attention.

(Eng Icaro) #5

Personally, I’ve been trying to install emonhub and emoncms on raspberry pI. I followed all the github steps for installation, but I still could not use the interface. Anyway after having tried to download the interface or re-read the entries through minicom -b38400 -D / dev / ttyAMA0, but started reading wrong entries, it looks like it is reading more often than necessary, with this is coming wrong packets Or empty or nonexistent. EX:

OK 8 105 0 191 1 175 1 0 0 31 2 184 11 184 11 184 11 184 11 184 11 0 0 0 (-28)
? 2 102 2 5 1 0 0
? 6 555 0 0 0 5 1 3 4 3 (20)
? 6 8 7 4 2 55 22 30 ()
OK 8 105 0 191 1 175 1 0 0 31 2 184 11 184 11 184 11 184 11 184 11 0 0 0 (-28)

Ie it gets a certain package and several wrong. My question is whether I moved on the RFM69PI and misconfigured it or misconfigured my raspberry pi in the UART of it. please help me. thank you

(Glyn Hudson) #6

The ? lines are incomplete packets, you can enable quiet mode by issuing the serial command 1q in minicom. Or it can be set in EmonHub.

If you would like to run EmonHub on a Raspberry Pi, I recommend starting by trying our pre-built emonSD card image:

Emonhub, MQTT and Emoncms are pre-configured.

(Eng Icaro) #7

OK. Let me try to explain my situation. I am a beginner in this area and bought an emontxv3, raspberry PI, rfm69pi. I’m thinking of using it to control the data on my solar plate. By what I understood I will receive the data from emontxv3 through the RF to the RFM69PI, after that it transforms the data via UART to my raspberry. After that, will emonhub be responsible for decoding this data and launching the correct emoncms interface? Is there an interface / app that runs on raspberry? Or just through the site?

(Robert Wall) #8

emonHub feeds the data to emonCMS. It can feed emonCMS running on your Raspberry Pi, or, or both.

(Eng Icaro) #9

So I’m thinking of replacing the raspberry pi with an FPGA. But a doubt arose from me. The packages that I print on the screen of the serial monitor they arrive via UART in which sequence? from left to right? And what bits do I get that tell me which packet (data) will arrive? Would be the hexadecimal ‘OK’?

(Robert Wall) #10

The data will be coming from your emonTx. You can make that send whatever you wish.

The default sketch sends the data as defined in the structure “PayloadTX”
typedef struct { int power1, power2, power3, power4, Vrms, temp; } PayloadTX;

which is instantiated as:

PayloadTX emontx;

The data is sent and received by the RFM69CW as a byte stream. The firmware in the RFM69Pi is on GitHub:

Unless you can run emonHub on your FPGA, you will need to interpret the serial data that the RFM69Pi firmware sends, or you could rewrite that to suit your FPGA firmware.

(Eng Icaro) #11

Thanks a lot for the help. I’m looking at the code. But speaking of the same low level. In what sequence are the bits coming? First I get the bits from the OK, then the from the nodeId or I get from right to left, the bytes from the rssi then temperature? Is there parity bits?

(Robert Wall) #12

In the example above, NodeID is part of the JeeLib header (details are over on JeeLabs site), power1 comes first, low byte first.
OK is added by emonHub.
It should be clear when you look at the source file on GitHub.

(Eng Icaro) #13

I have a datalog with current data measured by a multimeter and the same data from emontx+rfm69pi serial.
The problem is, i cannot correlate the data measurement. Is it necessary to convert the serial data from emontx?

Follow an example that i measured two currents ( 4.6A and 7.0A and Vrms = 116V):
OKX 081400440068FF0000802D5203B80BB80BB80BB80BB80B01000000 (6F)

(Robert Wall) #14


But you need to know what data is being sent. There is nothing in the string that defines what the bytes mean. You must look at the sketch that is running on your emonTx for that information, like I told you above.

“08” will be the NodeID of your emonTx.

After that, it is likely (not guaranteed, because I don’t know which sketch you are using) that:

1400 is Power 1 in watts
4400 is Power 2 in watts
68FF is Power 3 in watts
0000 is Power 4 in watts
802D is rms voltage × 100
5203 is temperature No 1 (°C × 10) - possible fault: no reading requested
B80B is temperature No 2 (°C × 10) - fault: no sensor found
B80B is temperature No 3 (°C × 10) - fault: no sensor found
B80B is temperature No 4 (°C × 10) - fault: no sensor found
B80B is temperature No 5 (°C × 10) - fault: no sensor found
B80B is temperature No 6 (°C × 10) - fault: no sensor found
01000000 is the pulse count

(6F) is the received signal strength

(Eng Icaro) #15

So I already know that. What I’m saying is that what I’m getting is not in line with the actual measurement. Where should the problem be? On emontxV3 or on RFM69PI?

(Robert Wall) #16

If the output of the RFM69Pi is what you posted above, then that looks credible. The RFM69Pi only transmits the data it receives. It does not manipulate the numbers.

Are you saying the calibration of the emonTx is not correct?

OK, so what are you measuring, what are the numbers you are seeing from the emonTx, and what do you think the numbers should be?
What is your electricity supply? Is it single phase, split phase, three-phase 4-wire or 3-phase 3-wire? What are the voltages?
What sort of instrument are you using for “the actual measurement”?
What are you using for your a.c. adapter?
What CTs are you using, and on which inputs of your emonTx?
Which sketch are you using, and have you altered it?

(Eng Icaro) #24

So I will try to give all the information. first I pass the pictures of my dados.

I bought RFM69PI and EMONTxV3 in official site, the only things what I did was update the firmware of RFM69PI and download of emonSD-07Nov16. the Measurement was did with 3-phase 3-wire, 220V phase to phase and phase to neutral 110V . the actual measurement of each data.
in wire of power1. courrent: 3,25A Voltage: 120v
in wire of power2: courrent: 850mA Voltage: 115v
in wire of power3: courrent: in between 3,5A and 4A Voltage 125v
And the temperature does not change. Is fixed at 80º celsius. What do I need to do to solve it?

(Bill Thomson) #25

That description sounds like a N. American split-phase system (or similar) vice a 3-phase system

(Robert Wall) #26

I think you are confused about your electricity supply.

We count the current-carrying live wires, we do not count the protective earth conductor.

If you have a 3-phase, 4 wire supply, then the 4th wire is the neutral. The voltage between any 2 lines is approximately the same. The line-line voltage = line-neutral voltage × √3. The neutral-earth voltage will be small.

If you have a 3-phase, 3 wire supply, then the voltage between any 2 lines is approximately the same, but you do not have a neutral. The line-earth voltage might be line-line voltage / √3.

If you have a split-phase supply, like N.America, then you have a 3-wire supply. The line-line voltage = line-neutral voltage × 2. The neutral-earth voltage will be small.