Yesterday’s post showed how to try and figure out the data sent out by the ELRO wireless units. There’s a lot of guesswork in there, but the results did look promising.
The last guess was about how the data bytes are organized in the packet – which is usually the hardest part. Ok, so now if I treat these as low-to-high 8-bit bytes, then the two packets give me:
12 1 231 4 16 0 0 213 81 17 hex: 0C 01 E7 04 10 00 00 D5 51 11
12 1 232 4 16 0 0 214 81 17 hex: 0C 01 E8 04 10 00 00 D6 51 11
There’s not much more one can do with this, because all the packets contain the same information. Now it’s time to add a load to the monitor, so that it will report some more interesting values. I used a 75 W light bulb, so the instantaneous consumption reported should be around that value, and there will probably be a slowly-increasing cumulative power consumption reported as well.
Here are a bunch of packets, using the most recent decoding choices:
Great – the first four repetitions have again mostly zero’s, with a minor fluctuation in what is presumably the line voltage again. Looks like each reading gets sent out 15 (!) times or so. Or maybe a few more which aren’t recognized – the pulse width thresholds might still be off slightly.
And then values start coming in. Let’s see what this gives when decoded as bytes:
200 8 1 231 0 32 0 0 216 81 33
200 8 1 230 0 32 0 0 215 81 33
200 8 1 230 0 32 0 0 215 81 33
200 8 1 229 0 32 0 0 214 81 33
200 8 1 230 32 32 243 2 236 82 33
200 8 1 230 32 32 242 2 235 82 33
200 8 1 229 32 32 240 2 232 82 33
200 8 1 229 32 32 239 2 231 82 33
200 8 1 229 32 32 239 2 231 82 33
200 8 1 229 32 32 240 2 232 82 33
200 8 1 230 32 32 240 2 233 82 33
200 8 1 229 32 32 239 2 231 82 33
200 8 1 229 32 32 238 2 230 82 33
Hm. That fourth byte could indeed be the line voltage, but the rest?
Let’s try the 25 W lamp:
200 8 1 229 10 32 246 0 214 82 33
200 8 1 229 10 32 246 0 214 82 33
200 8 1 228 10 32 246 0 213 82 33
Aha – 10 is ≈ 1/3rd of 32. And 246 is ≈ 1/3rd of 2*256+238. Maybe these are amps and watts, not cumulative values after all. No wonder it’s transmitting so often – a lost transmission will cause an inaccurate reading.
Here’s a 700 W load (my reflow grill):
200 8 1 230 44 33 255 26 29 83 33
200 8 1 230 44 33 246 26 20 83 33
200 8 1 230 43 33 221 26 250 82 33
Checking the load with another meter tells me it’s more like 680 W and 2.89 A @ 231 V.
Well, well: the bytes 221 and 26, when interpreted as little-endian int are 6887, i.e. the wattage in 0.1 W steps!
Let’s try amps the same way. With no load, there were values 16 and 32, so probably bits 4..7 of that second byte are used for something else. Let’s try 43 and 33-32, little-endian: could it be 2.99 A?
If all these guesses are correct, then the 75 W lamp readings are: 0.32 A and 75.0 W, and the 25 W lamp readings are: 0.10 A and 24.6 W – hey, these are indeed all pretty much spot on, yippie!
Here’s the other unit with no load plugged in:
102 12 1 232 0 16 0 0 210 81 17
102 12 1 232 0 16 0 0 210 81 17
The first two bytes differ. Perhaps a unit ID with its own header checksum?
It looks like the 6-byte is either 16 or 32, perhaps indicating an auto-scale amps range. Also, note how the next to last byte changes from 81 to 82 to 83 on these readings. I suspect that the packet checksum is actually 16 bits.
Great, I think I can implement a decoder for them now. It would be nice to get the checksum validation right, but even without this it will be useful.
These two units are going to be used for some varying loads here at JeeLabs: probably the dish washer and the washing machine. Since they send out readings once every 10 seconds, that should give me sufficient info to correlate with the house meter downstairs.
The readout unit is of no use to me anymore, so I’ve taken it apart:
Simple OOK receiver, and single-sided board. Not many surprises, really:
There are low-cost temperature (an NTC ???) and humidity sensors in there, as well as a buzzer (you can set an alarm when a certain power level is exceeded).
The only interesting bit is that the power for the receiver is switched via a transistor, so presumably it synchronizes its reception timing to when the units transmit (the display supports up to 3 units).
One nasty habit of these ELRO units is that they send out a lot of packets: each one sends about 15 per every 10 seconds, and it looks like this takes well over one second per transmission. I’m glad they use the 433 MHz band, otherwise they’d cause quite a few collisions with all the wireless RF12 stuff going on at JeeLabs.
Onwards!
More great work! Can you take apart the socket so we can see how that works?
Too late… already in use. I’ll remember that with the next type of meter – there will no doubt be more.
Okay okay, this time, only a “Wow, well done! Great work!” :-)
Nice work @jcw.
Would it be difficult to make a plug (addon / shield) with this socket and a build-in jeenode instead of the 433Mhz unit ?
I think a plug like this would be a great ad for the shop and for our domotica systems.
Curious that payload is used to send W along with A & V, clearly the display could calculate that. Is this W a computed true W and is matching A*V since the tests are all resistive? Interesting to see some packets from connecting the refrigerator.