@cleight Your nodes should each have a unique ID. And then the child ID might be 0/1 for each one.
Since you claimed you don't have a programming background I'll try to explain the API (as I understand it anyways) And how to get to each piece
The message that gets passed by the radio is going to look like this
12;6;1;0;0;36.5\n
Looking at each part
12: node-id The unique id of the node that sends or should receive the message (address) message.sender
6: child-sensor-id Each node can have several sensors attached. This is the child-sensor-id that uniquely identifies one attached sensor message.sensor
1: message-type Type of message sent - See table below message.command_ack_payload (I think)
0: ack The ack parameter has the following meaning:
Outgoing: 0 = unacknowledged message, 1 = request ack from destination node
Incoming: 0 = normal message, 1 = this is an ack message message.isAck()
0: sub-type Depending on messageType this field has different meaning. See tables below message.type
36.5: payload The payload holds the message coming in from sensors or instruction going out to actuators.
Various functions exist to get the payload
char* getStream(char buffer) const;
char getString(char buffer) const;
const char getString() const;
void* getCustom() const;
uint8_t getByte() const;
bool getBool() const;
float getFloat() const;
long getLong() const;
unsigned long getULong() const;
int getInt() const;
unsigned int getUInt() const;
So you might have a childID of 0/1 if you are only sending 1-2 items from the sensor but each sensor will have its own nodeID
So using the example Hek provided and assuming temp is sensor 0 humidity is 1
#define BEDROOM_NODE_ID 42
#define KITCHEN_NODE_ID 44
#define TEMP 0
#define HUM 1
float bdtemp = 0, bdhum =0, kntemp = 0, knhum =0;
void incomingMessage(const MyMessage &message) {
switch (message.sender) {
case BEDROOM_NODE_ID:
switch (message.sensor){
case TEMP
bdtemp = message.getFloat();
break;
case HUM
bdhum = message.getFloat();
break;
}
break;
case KITCHEN_NODE_ID:
switch (message.sensor){
case TEMP
kntemp = message.getFloat();
break;
case HUM
knhum = message.getFloat();
break;
}
break;
}
updateDisplay();
}
That will give you 4 variables bdtemp, bdhum, kntemp, knhum so you know the temp/humidity coming from 2 different sensors