What is the node ID if using direct serial connection

I succeeded to have inputs in Emoncms.org as shown below. However, after I reviewed all docs, i am still confused.

The following is I quoted from Jerome's reply :"Instead of using a OemGatewayRFM2PiListener, you'll use a OemGatewaySerialListener. The only parameter is the COM port.

Make sure that the TX formats the data like this:

NodeID val1 val2
NodeID val1 val2

Example for temperature and relative humidity fluctuating around 19°C and 60%:

12 19.2 60.1
12 19.5 60.0
12 19.3 60.4"

But, I didn't find any place to add something like "NodeID val1 val2" in my emonTX V3 sketch - "emonTxV3_DirectSerial.ino".

All docs show the default node ID for emonTX is 10, but I get 0. I don't know where this 0 comes from.

One more question, how to check the output from emonTX V3 by using Arduino IDE + USB-to-UART programmer?

 

pb66's picture

Re: What is the node ID if using direct serial connection

If you are using the emonTxV3_DirectSerial.ino sketch, you can add a node id quite easily by inserting a new line (at line 17)

const byte nodeID = 12;

and another new line (at line 68) before the values print,

Serial.print(nodeID); Serial.print(' ');

to see the serial output via the programmer lead you need to have the arduino ide installed then just select tools -> serial monitor, (you may also need to set the baud to 9600) after selecting the correct serial port and board etc which I'm guessing you've done if you can upload sketches.

Paul

ShaneLong's picture

Re: What is the node ID if using direct serial connection

Thank you, Paul

It works now.

Comment viewing options

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