Page 3 of 7

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Thursday 29 October 2015 19:40
by ThinkPad
Good to hear.
Yes it will keep measuring now. When clicking on the 'Log' button at the meter, in the top right corner you have the 'Report' button, there the high and low tariff will come back. And in the graphs ofcourse.

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Friday 06 November 2015 18:37
by sincze
So first my neighbour had a working setup with FTDI -> RJ11 and inverted signals.
After one year his smartmeter died and was replaced by Landis Gyr E350.

So to have domoticz receive the data again we only need to solder a 10k resistor right, between data rx and 5v??
http://www.quassi.nl/2015/01/03/read-da ... art-meter/

Earlier posts in this topic say:
"The colored rings of the resistor translate the value: http://www.weerstandcalculator.nl/
brown - black - orange - gold = 10K / 10 kilo Ohm"
Link above shows a 2k resistor, So I'm a bit confused.

As current cable is 9600 maybe modify the settings to:

Code: Select all

The communication should be set-up with the following settings: (115200 8N1)
– Baudrate:  115200
– Data bits: 8
– Parity: none
– Stop bits: 1
And that will ensures all is working again :D ?

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Friday 06 November 2015 19:36
by ThinkPad
I don't know, i have a totally different meter.

http://domoticz.com/forum/viewtopic.php ... 970#p31345 says 1k.... i don't think it is really critical, just try something between 1k and 10k and you will be fine. The port of the meter is protected against user abuse i thought, so very small chance of wrecking it ;)

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Monday 09 November 2015 18:53
by sincze
A well just followed these exact instructions.
http://www.quassi.nl/2015/01/03/read-da ... art-meter/

Just changed to red cable for permanent 5V.

Image

Domoticz is seeing the Smartmeter again.
:D

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Friday 13 November 2015 22:18
by Kohen
I've bought this chip
http://www.ebay.com/itm/311424300824?_t ... EBIDX%3AIT

connected like the picture above. have a Kamstrup smartmeter and connected the cable to my synology.
When i add the component in Domoticz i see 2 USB ports i guess i need to use /dev/ttyUSB0 because my ZWaveStick is connected to the other port /dev/ttyACM0
I pressed Setup and set it to 115200. But i don't see any modules in Domoticz under Devices. What am i doing wrong?

Image

And I did not add the resistor, is it needed in my case?

I'm still new in the Domoticz scene.

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Friday 13 November 2015 22:41
by bbqkees
Did you do the following:

-Enable hardware for 5 minutes in the Settings?
-Check 'Unused devices'?
-Tested with the the other baud rate?

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Saturday 14 November 2015 10:01
by sincze
My kamstrup uses 9600.
And indeed allow new hardware is a good tip.

I don't know if invert signals is necessary for your board.
But as long as 5v is send to kamstrup is should send you back data every 10 seconds

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Sunday 15 November 2015 18:33
by Kohen
bbqkees wrote:Did you do the following:

-Enable hardware for 5 minutes in the Settings?
-Check 'Unused devices'?
-Tested with the the other baud rate?
Yes did all of that, to bad .. no result.
sincze wrote:My kamstrup uses 9600.
And indeed allow new hardware is a good tip.

I don't know if invert signals is necessary for your board.
But as long as 5v is send to kamstrup is should send you back data every 10 seconds
What did you use? And how did you configure it?
Did you use the drivers from domoticz for the synology?

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Monday 16 November 2015 11:17
by bbqkees
Please check the module on a laptop and see (with f.i. Putty) if there is valid data coming out.
If not, the module is not wired correctly, and if you see the datagrams the problem is likely with the Synology drivers.

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Monday 16 November 2015 11:21
by ThinkPad
I would start by connecting it to a PC, opening putty and then perform a so called, 'loopback-test'.
A loopback-test consists of connecting the RX & TX pins together. If you open putty and type a character, it should echo that character like this:
hheelloo

If you get double characters, you know that the module is good.

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Monday 16 November 2015 21:18
by Kohen
ThinkPad wrote:I would start by connecting it to a PC, opening putty and then perform a so called, 'loopback-test'.
A loopback-test consists of connecting the RX & TX pins together. If you open putty and type a character, it should echo that character like this:
hheelloo

If you get double characters, you know that the module is good.
When i try that i get strange characters ... but can't type anything. Not on 9600 or 115200.
With a laptop there is no data from the kamstrup. But if it won't work i will buy another cable... will make me poor but ok :lol:

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Tuesday 08 December 2015 21:09
by Kohen
Now I bought this one and connected a plug like this diagram

Image

What will be next to do? Plug it in and add what to domoticz?
If it works I will make a manual for the wiki.

And I used this settings
Image

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Wednesday 09 December 2015 9:10
by bbqkees
That should be all if you wired the plug correctly and have the right chip.

But first test the cable it with f.i. putty on a laptop. If you see the P1 datagrams in the serial port log then you know it will work in Domoticz.
If you only see gibberish, you might need either a pull up resistor or you need to reprogram the chip to invert the data.
If you do not see anything, the wiring is probably wrong.

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Wednesday 09 December 2015 9:18
by ThinkPad
PL2303 can't be reprogrammed like FTDI to invert the data. You will need a transistor (like BS170) and a resistor to do that. Not very difficult if you have handled a soldering iron before :)
See also the first post of this topic.

Testing it with putty first is a good advice. Baudrate is 9600 or 115200 for newer meters.

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Wednesday 09 December 2015 19:05
by Kohen
But still, when I add it to Domoticz i should get the interface into my devices... right? There are no changes.

I will look at the first post. I have a BS170 so that wouldnt be the problem also have a soldering iron. will try it tonight.

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Friday 08 January 2016 22:00
by snadwich
Kohen wrote:But still, when I add it to Domoticz i should get the interface into my devices... right? There are no changes.

I will look at the first post. I have a BS170 so that wouldnt be the problem also have a soldering iron. will try it tonight.
Did it work? I just created a page with info about how to create the PL2303 chip. It's in dutch but i guess that's not a problem for you.

(on the RJ11 side, it's not about colour but about the wire location)
Image

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Friday 22 January 2016 13:40
by bbqkees
I originally checked the pinout of both a cut off telephone cable and the original D-Sub connector on the PCB and soldered them according the the right pinout.
So indeed the wire colors may differ from cable to cable.

The resistor value is not critical, it is just a pull up resistor.

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Sunday 31 January 2016 16:22
by mdewit
I wrote a unix daemon to read out slimme meters that support the DSMR standard via the P1 port.
It should support Linux, Ubuntu as well as Raspberry Pi, and FreeBSD.

I posted the source on Github, you can find the latest release here:
https://github.com/dsmrd/dsmrd/releases/latest

Let me know if it works for you!

Groetjes,

Maarten

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Tuesday 15 March 2016 22:21
by mvdcamp
I have built a P1 cable with a Winchiphead HL-340 chip in a serial to usb cable like posted earlier on this forum. For some reason I get empty readings from it on my Raspberry Pi with cu. Every ten seconds I see the cursor moving forward, but without showing any data. In an attempt to check if my cable is faulty, I installed Domoticz on my windows computer and here Domoticz shows the information from my smart meter every ten seconds. Does anyone have an idea what could be the problem?

Re: DIY cheap USB-cable to read P1 port of Dutch smart meter

Posted: Wednesday 16 March 2016 9:14
by bbqkees
did you set the correct baud rate?