TED (the Energy detective) 1001 or 5000 MTU to emoncms

Hi there I forgot some important info to get this sketch to work with your device it has to know your MTU but you could also just remove the if statement for that if you can not figure out you inverted Hex of your MTU

void showGroupsOfBytes() {
    if ( receivedBytes[0]==0x1A )  { //inverted number of your MTU ie for 0x1A = mTU decimal = 229  and  hex = E5
    // if (numReceived < 9) {
    byte j = 0;
    byte k = 0;
    byte m = 0;
    byte r = 0;
    byte h = 0x1A;  //edit here too
     byte n = (0);

another way to get the number is with CUTECOM or what ever terminal program you use and modify your ted100 RDU like this:
cutting trace at pin 5 and then soldering a jumper to R20

this modification allows to to directly view the transmitted data from MTU unit ( actually all MTU connected to your system)
the Hex that is required comes after AA that is the start and end bit

example output from cutecom - you notice the aa then follows 1A that is your MTU its inverted value

00001080: aa 1a 85 ff ff ff 45 e4 94 02 f3 aa 1a 80 ff ff
00001090: ff f6 10 95 03 1a aa 1a 7b ff ff ff 9e fa 94 02
000010a0: 8e aa 1a 79 ff ff ff f6 10 95 03 21 aa 1a 76 ff
000010b0: ff ff 9e fa 94 02 93 aa 1a 74 ff ff ff 9e fa 94
000010c0: 02 95 aa 1a 70 ff ff ff 45 e4 94 03 08 aa 1a 6c
000010d0: ff ff ff 45 e4 94 03 0c aa 1a 63 ff ff ff 9e fa
000010e0: 94 02 a6 aa 1a 61 ff ff ff 45 e4 94 03 17 aa 1a
000010f0: 5e ff ff ff 45 e4 94 03 1a aa 1a 5c ff ff ff

another way to get it is use binary to hex an invert manually
example : MTU 229 = hex E5
hex to binary
e5 = 1110 0101
inverted
1110 0101 = 00011010
binary to hex
00011010 = 1A //insert this into the sketch