Page 4 of 7

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

Posted: Wednesday 16 March 2016 13:13
by mvdcamp
Yep, I used 115200 baudrate

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

Posted: Wednesday 16 March 2016 13:19
by Draakje
It is always good practise to first use a terminal program to connect to the smart meter.
With the terminal program you can easily change settings on the connection and test if you get readable data.

Have you tried 9600 baudrate ?

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

Posted: Wednesday 16 March 2016 15:21
by mvdcamp
On my Windows machine Domoticz showed the information from the smart meter using 115200 baud rate, and I used the same setting for Domoticz on the Raspberry Pi without any results...

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

Posted: Wednesday 16 March 2016 15:26
by Draakje
try using a terminal on your raspberry..
have to google it.. it is something like screen /dev/usb... 115200
maybe it;s a stop bit or parity ?

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

Posted: Wednesday 16 March 2016 15:29
by mvdcamp
i have already tested it with cu through SSH and this gave me a blank output every ten seconds (no strange characters, only the cursor jumped ahead)

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

Posted: Wednesday 16 March 2016 15:38
by Draakje
so there is no information coming from the smart meter..
Please remind me.. what is cu ?

You should see readable info every x seconds... When you don't have that Domoticz will not be able to use it.

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

Posted: Wednesday 16 March 2016 15:48
by mvdcamp
I saw cu (CallUp) or Minicom mentioned on different websites, that's why I used it. I still think it's strange that domoticz on Windows gives me readouts and on Raspberry Pi it does not.

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

Posted: Thursday 17 March 2016 10:50
by mvdcamp
I tried screen but this gives me the same blank readout. I was discussing the issue with a coworker and I am starting to think it is a power issue. I have a Raspberry Pi B and a 5v 1.2A power supply and I saw a 5V 2A power supply is advised to use domoticz. I think the USB port is not giving enough power to the chip in the P1 cable I am using. I will try to use a more powerfull power supply. If anyone can confirm my assumptions or has another idea I am still interested.

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

Posted: Thursday 31 March 2016 21:18
by intimidate
I've got a Landis Gyr E350 DSMR 4.0 smart meter.

This is my output:
Screen Shot 2016-03-31 at 21.07.39.png
Screen Shot 2016-03-31 at 21.07.39.png (71.83 KiB) Viewed 10481 times
This is my cable using a HL-340 USB 2 serial, I also use a 1k ohm resistor, but no readable output
IMG_3305.jpg
IMG_3305.jpg (260.49 KiB) Viewed 10481 times

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

Posted: Friday 01 April 2016 0:45
by Draakje
have you tried connecting on 9600 baud ?

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

Posted: Friday 01 April 2016 7:27
by intimidate
Yes I've tried that.

The cable was connected to a Raspbery Pi 3 at first but I also got blank read data every 10 seconds. Then I connected it to my MacBook Pro and got this. I've played around with the cables but no readable data. :?

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

Posted: Friday 01 April 2016 22:42
by Jeff
If we are still talking about the E350 Smartmeter what works for me is the settings below, i'm using the E350 v 4.4

Baudrate: 115200
Databits: 7 instead of the normal 8
Stopbits: 1
Parity: none
FlowControl: none

The above settings where tested with the FTDI TTL-232R-5V and a 1Kohm resistor between VCC and RxD (pin 2&5) soldered on a little piece of pcb, Now the only disadvantage is that after using these settings domoticz shows no data for the energy usage and gas meter.

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

Posted: Sunday 03 April 2016 17:03
by Daniel
I had a similar problem. In my case it was caused by insufficient power supply on my RPi. Replacing the USB cable and power supply fixed the problem.

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

Posted: Wednesday 06 April 2016 12:16
by Jeff
Well replacing actually didn't work for me, Once again the meter gets recognised by domoticz it only doesn't log data.
Testing it directly without domoticz in a terminal such as putty on windows gives a proper 10 sec telegram, Testing it on rpi with minicom on 115200 7N1 gives gibberish output.

Code: Select all

Welcome to minicom 2.6.1

OPTIONS: I18n
Compiled on Apr 28 2012, 19:24:31.
Port /dev/ttyUSB0

Press CTRL-A Z for help on special keys

/|mX\no6'r[8=0?9.8>0(960>05;0-8:9?>1?9(>=38;03;30&C |RCZ2_nO^b_~Z
                                                                   _rno{Jrcr
                                                                               z
j-8>3;9-8>52                                                                   r
 L      {^{^r{BbCBCj1-8:7;>3?>0<80880)0KRorrOOZrCbno{Z
                                                           {zrCbCzRuj
                                                                      nozzOj
                                                                            1K |


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

Posted: Thursday 07 April 2016 14:18
by bbqkees
Try with another resistor value.
It is only half gibberish, you are almost there.

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

Posted: Friday 22 April 2016 16:54
by Jeff
It seems that after switching to a 2k resistor the data gets pushed into domoticz :) ,Problem solved.

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

Posted: Thursday 12 May 2016 19:41
by osiris
I am trying to build the "cheap p1 cable" So far with no result.

As a usb to serial converter I bought this cable: http://www.ebay.com/itm/191734723491?rmvSB=true Which is listed as an

USB to 9-Pin Serial Cable HL-340 USB To Serial Cable USB-RS232 Support Win7

What I've done so far:
  • tried both 9600 and 115200
  • tried cu and screen
  • tried a resistor of 1000 and 2200 ohm
  • tried a 2.0A and a 1.2A power adapter for the RPI
  • tried to switch green and red (according to the official wire coloring the red should be disconnected while the picture uses the red wire)
All I get is scrambled messages. Does anyone have a clue what I might do wrong?

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

Posted: Saturday 14 May 2016 14:48
by osiris
gordonb3 wrote:
osiris wrote:
  • tried to switch green and red (according to the official wire coloring the red should be disconnected while the picture uses the red wire)
All I get is scrambled messages. Does anyone have a clue what I might do wrong?
I posted about this earlier. The wires on a standard 4-wire phone cable are crossed (or mirrored, which happens to be the same for this layout). Meaning that if you get no signal at all with the red wire connected you should not only use the green instead, but also exchange black and yellow. Or use the other half of the original cable you cut for this project.
Thanks! I tried switching yellow and black before without result. I decided to start all over again with new wires and now it worked. It turned out a connect worn out because of the many changes I made on the prototype board.

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

Posted: Thursday 23 June 2016 17:16
by fibigod
Hey guys,

I use the same cable as osiris.
And connect it to my Synology.

I use it at 9600 baud rate. And I see in the log that the power reading is coming in every so what seconds. But the device is staying at 0.
at 115200 it gives no log entry's so I assume that's not working.

2016-06-23 16:59:39.429 (P12) P1 Smart Meter (Power)
2016-06-23 16:59:49.922 (P12) P1 Smart Meter (Power)
2016-06-23 17:00:00.429 (P12) P1 Smart Meter (Power)

When I connect the cable to my laptop and use putty, 9600,7,none,none. I can see clearly data without any errors.
I also tried using a 1K and a 2K resistor, but with no success. (data putty fine, no data in domoticz)
Also check cables for bad connections etc.

Still I think it's a setting? because putty gives clear info.
Can i use a serial monitor on the NAS trough ssh? Like CU on unix/RPI?

- Synology NAS
- Domoticz V3.4834
- Kamstrup Meter

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

Posted: Tuesday 28 June 2016 12:23
by fibigod
Progress so far.

I installed minicom on my NAS. And there is a lot of gibberish coming out the first time and then every 10 seconds a square.
With Putty on my windows machine the data is perfect.

Tried external psu to kamstrup and used different resistors, but I think it's a problem on the synology. Because the windows machine has no problem with the cable.

Is there somebody with a few tips I can try?