[Virtual Wire] String not being sent or unable to parse

I am working on an environmental monitor in two parts, one half on an Uno with ethernet shield and el-cheapo 433Mhz receiver, and the other half on an Arduino Mega with a 433Mhz transmitter. Both arduinos have sensors, which are read and then posted to a MySQL DB via the ethernet shield.

The arduino mega is sending the values from its sensors via Virtual Wire to the Uno using the code below, which works fine - at least in terms of the string being visible in the serial monitor.

char msg[19];
char msglcd[19];
int whole, frac, wholep, fracp;
whole = (int)T; // Get everything before the decimal point by casting to an int
wholep = (int)P;
frac = (int)((T-whole)*10); // frac is now equal to the first number after the decimal point
fracp = (int)((P-wholep)*10); // frac is now equal to the first number after the decimal point

snprintf(msg, sizeof(msg), " T2:%i.%i P:%i.%i", whole, frac, wholep, fracp);
snprintf(msglcd, sizeof(msg), "T:%i.%i P:%i.%i", whole, frac, wholep, fracp);

lcd.setCursor(0,1);
lcd.print(msglcd);


   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx();        // We wait to finish sending the message
   delay(200);         // We wait to send the message again

The transmitting arduino also has a PIR, which should send an "M" character via virtualwire when there is movement detected:

char msg[] = "M";
delay(300);
   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx();        // We wait to finish sending the message
   delay(300);         // We wait to send the message again     
/////motionrf

Now I'm not sure if it's the above which is the problem, or if it's at the receiving end. I do the the output from the first block of code on the receiving arduino so I know that works fine. But when the PIR is triggered, no M appears in the serial monitor of the receiver, and the code below isn't triggered either.

  uint8_t buf[VW_MAX_MESSAGE_LEN];
  uint8_t buflen = VW_MAX_MESSAGE_LEN;

int i;
if( vw_get_message(buf, &buflen) )
{
if(pos < 2)
lcd.setCursor(0, pos);
else
{
pos=0;
lcd.clear();
}
str = "";
for (i = 1; i < buflen; i++)
{
lcd.print((char)buf[i]);
str = str + char(buf[i]);

pos++;
}
}
Serial.print("This is the string! ");
Serial.println(str);

if(str.indexOf("M") >=0)
{
  digitalWrite(9, HIGH);
  delay(2000);
  digitalWrite(9, LOW);
  str = "";
  Serial.println("Detected remote movement in string!");
}

I can post the full code of both sketches if that would help more, but I am sure the issue must lie in one of those snippets of code.

Thanks for any help in advance! Shout if any info is lacking.

First of all: ethernet on the Uno and not the Mega ?
The Arduino Uno will run quick out of memory with an Ethernet shield. Wouldn't it be better to use the Arduino Mega with the Ethernet shield ?

You should carefully check each step of the data that is transmitted and received.
The VirtualWire is often used with binary values and not with strings. But to display something on a LCD, transmitting a string makes sense of course.

When the vw_get_message received something, it is valid data. You could print it to the serial monitor. Print both the message and the buflen, so you can see what is received.

When you transmit "M" and the size with strlen(), only 1 byte is transmitted. The zero-terminator of the string is not transmitted.

In the receiver you receive just one byte, and you print it with the for-loop: for ( i = 1...
However, the first (and only) valid byte is buf[0].

P.S.: Did you know that you can start two instances of the Arduino IDE, each connected to it's own Arduino board, and each with its own serial monitor. So you can develop the transmitter and receiver at the same time.