OMG this is really stupid LOL, found the problem...
client.print("GET /emoncms/input/post.json?apikey=xxxxxxxxxxxxxxxxxxxxxx&json={");
client.print(device);
client.print(";"); <=== stupid typo here, used ; instead of : DUH!
client.print(status);
client.println("} HTTP/1.1");
must have been staring to long at the code I guess, LOL
now it works, thanx everybody
globally declared; byte status;
and when needed:
char device[] = "livingroom";
status = 1;
emon_status(device,status);
char device[] = "bedroom";
status = 0;
emon_status(device,status);
etc...
That's how it works, presuming that's how it's supossed to work?