Page 1 of 7
DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Wednesday 14 January 2015 10:49
by ThinkPad
I sometimes see people buying expensive cables for reading out their smart meters. If you are handy enough, you can make your own for cheap!
I created a cable myself, i just bought the cheapest USB > Serial cable i could find from eBay, together with some RJ11 connectors.
Cut off the default connectors that were attached to the wires and crimped the connector to the USB>Serial cable (pinout can be found here:
http://gejanssen.com/howto/Slimme-meter ... pinout.png) and you are done.
Ofcourse you also need an RJ11 crimping tool (mine is a combined RJ45/RJ11 crimping tool) but maybe your neighbour has it

?
My cable has the Winchiphead HL-340 chip, and is detected fine by the Domoticz Raspberry image. My meter is a Kaifa MA105 (DSMR4 115200 baud, 8N1 with inverted data). The HL-340 chip automatically re-inverts the data to normal. Pay attention to which chip your cable has, the cables with PL2303 are advertised a lot, but they don't automatically invert the data. FTDI is the best, but also the most expensive compared to the others. HL-340 also works fine. For the PL2303 you need extra hardware (
transistor + resistor) to re-invert the datasignal.
The colored rings of the resistor translate the value:
http://www.weerstandcalculator.nl/
brown - black - orange - gold = 10K / 10 kilo Ohm
In the diagram an Arduino is shown, but you need to connect it like this:
- the line shown in yellow to the 'Rx' pin of the PL2303 board
- the line shown in red to the +5V line of the PL2303 board, can also be marked as Vcc / Vdd
- the line shown in blue to the ground (GND) of the PL2303 board
I think this approach will work for 90% of the modern Dutch smart meters, and will cost you no more than 3 - 4 euro. Only need to wait 2 weeks for the parts to arrive from China
Only for some Landis & Gyr meters it is sometimes a bit problematic to read their data, but i already saw a topic somewhere here on this forum that somebody got it working by adding an extra resistor.
Oh and if you bought a very cheap cable with an FTDI chip, pay attention as it might be a fake chip and it could be bricked by when you connect it to a Windows PC (due to a Windows update that contains a driver that will brick fake cables) Search for #FTDIgate
Re: DIY USB-cable to read P1 port of Dutch smart meter
Posted: Wednesday 14 January 2015 17:10
by Lieuwke
For the Landis/Gyr E350 with DSMR 4.0 Solder a pull up resistor between pin 2 and 5 of your RJ connector wiring. 1Kohm should suffice.
Re: DIY USB-cable to read P1 port of Dutch smart meter
Posted: Thursday 29 January 2015 17:02
by rhendriks
I have connect my smartmeter to the original serial port of the raspberry .
I can read out this with a little python script just as gejanssen.com .
The only problem is that I not self can implement in Domotics.
If there anyone can do that , you have an extra usb .
see this :
http://home.versatel.nl/rolandhendriks/rpilink1.html
Re: DIY USB-cable to read P1 port of Dutch smart meter
Posted: Thursday 29 January 2015 20:44
by ThinkPad
It should be possible to use ttyAMA0, as the RaZberry board also uses it. I search on Google, and found this:
http://elinux.org/RPi_Serial_Connection ... peripheral
Also see this:
http://www.raspberrypi.org/forums/viewt ... 44&t=17360 (look at the two links mentioned).
Re: DIY USB-cable to read P1 port of Dutch smart meter
Posted: Thursday 29 January 2015 21:30
by rhendriks
@ ThinkPad I know this and I have a website with the values , they refresh every 10 seconds en is written in python and php.
I would like to implement it in Domoticz but my programming knowledge is not so good that I can do that.
Re: DIY USB-cable to read P1 port of Dutch smart meter
Posted: Thursday 29 January 2015 22:56
by ThinkPad
Ok, but you don't understand my point

What i mean, is that i think that by configuring your OS like on the elinux website, the ttyAMA0 should be also available to Domoticz.
It can't be that hard, as like i said, Razberry also uses it, and the Razberry can be used by Domoticz.
Re: DIY USB-cable to read P1 port of Dutch smart meter
Posted: Friday 30 January 2015 19:48
by rhendriks
If I configured my OS ,ttyAMA0 is not available in Domoticz if I look in the hardware tab.
I see only ttyUSB0 and ttyUSB1.
Re: DIY USB-cable to read P1 port of Dutch smart meter
Posted: Saturday 07 February 2015 10:52
by Nicap
Thinkpad, ik heb deze kabel gister ontvangen uit China.
Waar knip ik hem precies af?
Ik zie in de RS232 connector een chipje zitten, maar aan de usb kant zie ik zo niks. Heb toch wel de goeie kabel besteld he?

Re: DIY USB-cable to read P1 port of Dutch smart meter
Posted: Saturday 07 February 2015 11:05
by ThinkPad
Please talk in English, so others can also read this topic
I think this cable can be used, no problem.
But you have two options:
- Remove the plastic of the RS232 connector, so you can reach the chip. Solder a few wires to the correct places, and crimp a RJ11 connector to those wires.
- Or make an adapter that connects to the RS232 connector and goes to an RJ11 connector. To make this you need a female DB9 connector, some wires and a RJ11 connector.
But i don't know if your cable (or mine) is going to work with your meter. Some meters spit their data out inverted.. If the cable doesn't automatically re-inverts this back to normal, the data is unreadable. You can fix this by adding some extra hardware (a transistor and a resistor is enough) or use a FTDI cable, which can be programmed to re-invert the data.
My Kaifa MA105 (DSMR4) meter spits the data out inverted, but my cheap eBay cable (with Winchiphead CH340) chips automatically re-inverts it back to a readable format.
Re: DIY USB-cable to read P1 port of Dutch smart meter
Posted: Saturday 07 February 2015 11:32
by Nicap
Unfortunately i cannot send a PM on this forum yet. I will send you a DM on tweakers.net instead.
I have the same smart meter as you do, the Kaifa MA105.
Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Tuesday 03 March 2015 6:57
by kevyou
Your post helped me a lot, but I didn't have the same parts as described here.
Here is my post of the pitfalls and solution I made that might help someone else like me
http://kevin--young.blogspot.cz/2015/03 ... -from.html
Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Sunday 29 March 2015 20:26
by j0shua
Hi Thinkpad, I am quite new to the whole smart metering business, and so is my 1 month old Smart Meter
that has been placed end of last February. Happens to be the same as yours. I have been reading about P1
cables all over the internet, but since you have the same meter as I do, I am willing to take you up on the offer
in your signature, as I want to go out and buy a Raspberry Pi myself, and start making data logs.
The forum however doesn't allow me to send you a PM, because I am new. So where do I go from here, I buy
a Pi, install the Domoticz SD image, and follow the Domoticz manual to get the internals running, then plug in
your cable and out come the graphs? Because that's not quite clear yet, the interval of the graphs, how tight
can it be set?
And last but not least, how decent is your (confirmed working) cable, compared to the 'neat' USB solution
(1st cable, 18,60 euro) available on the webshop here:
http://www.smartmeterdashboard.nl/webshop
of which I don't have confirmation that it will work with a Pi and Domoticz ? I just want a better view of my
energy flow during the day, evening, and night.
Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Sunday 29 March 2015 20:48
by ThinkPad
I have sent you a PM
My cable looks exact the same, only uses a different chip (PL2303).
Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Sunday 29 March 2015 20:57
by j0shua
ThinkPad wrote:I have sent you a PM

Ok, got your message, reply is on its way to you now.
Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Sunday 29 March 2015 21:17
by ThinkPad
Should be fixed now, you are now in the normal users group (instead of newly registered) and should be able to PM.
Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Friday 03 April 2015 0:51
by j0shua
Just to report back, the cable arrived today and I finally got the RPi up and running without messing up the micro sd card, and the Kaifa is now spitting data in to my Domoticz dashboard. Thanks for your efforts ThinkPad. Much appreciated.
Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Friday 03 April 2015 9:30
by ThinkPad
Great
Have fun on saving energy

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Thursday 07 May 2015 11:42
by bbqkees
I can confirm the cables with the HL-340 IC automatically invert the data.
I used a FTDI version before but you need to reprogram them before use. This HL-340 one is much easier to use.
However, if you cannot solder yourself you should stick to a FTDI version or similar without a DB9 connector because you can cut the wires and connect the RJ11 plug without soldering.
I bought 2 of the HL-340 cables and they work just fine with the Landis/Gyr E350 with DSMR 4.0.
http://www.ebay.nl/itm/New-USB-to-RS232 ... 1395736651
They indeed need a 1K pull-up resistor between pin 2 and 5 of the RJ11 wiring for the E350 meter. Otherwise no data shows up on the serial interface.
What you need to do is get a RJ11 telephone cable (with all 4 pins wired) and cut it off.
Also remove the blue plastic and the plug from the DB9 side of the serial cable.
This reveals the pcb, on which you can solder the wires.
Plug it in the meter and the Pi and it will work fine.
Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Tuesday 09 June 2015 20:32
by peterprinsen
Hi,
I am trying something similar as described in this topic and I am having some problems getting it to work. My smart meter is a Kamstrup 382JxC and I am using a HL-340 USB to RS232 Serial Port Adapter Cable (from dx.com) to connect the smart meter to a pc running domoticz (on linux). As I wasn't getting any data I connected the smart meter to a windows pc on which I am running Bray's Terminal to see what's coming in on the COM port. I am attaching a screen shot of the terminal. As you can see some characters look like they could be ok but there are also many that aren't. Does anyone know what's going on? Do I need to modify the cable? Or am I using the terminal wrong?
Any hint would be appreciated.
Peter
Re: DIY cheap USB-cable to read P1 port of Dutch smart meter
Posted: Tuesday 09 June 2015 20:49
by ThinkPad
Hi, welcome to this forum (see you just registered)
Have you tried 115200 as baud rate. And maybe try 'putty' also
Could be the cable otherwise....