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

mvdcamp
Posts: 6
Joined: Tuesday 15 March 2016 22:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby mvdcamp » Tuesday 15 March 2016 23:21

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?

User avatar
bbqkees
Posts: 400
Joined: Sunday 17 August 2014 21:01
Target OS: Raspberry Pi
Domoticz version: 3.5x
Location: The Netherlands
Contact:

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

Postby bbqkees » Wednesday 16 March 2016 10:14

did you set the correct baud rate?
RPi 2, Philips Hue GU10 / E27 / LivingWhites, Aeon Zwave stick V2, Qubino, Fibaro, Everspring, Philio, RFXCom, X10, Harmony Hub,
P1 / Resol VBus / Nefit EMS bus / DHT21 / DS18B20 / relays / I2C display via Arduino/ESP8266, Xiaomi Flora, BS440.

mvdcamp
Posts: 6
Joined: Tuesday 15 March 2016 22:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby mvdcamp » Wednesday 16 March 2016 14:13

Yep, I used 115200 baudrate

Draakje
Posts: 48
Joined: Thursday 22 October 2015 21:14
Target OS: Linux
Domoticz version: 3.5468
Contact:

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

Postby Draakje » Wednesday 16 March 2016 14:19

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 ?
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

mvdcamp
Posts: 6
Joined: Tuesday 15 March 2016 22:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby mvdcamp » Wednesday 16 March 2016 16:21

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...

Draakje
Posts: 48
Joined: Thursday 22 October 2015 21:14
Target OS: Linux
Domoticz version: 3.5468
Contact:

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

Postby Draakje » Wednesday 16 March 2016 16:26

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 ?
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

mvdcamp
Posts: 6
Joined: Tuesday 15 March 2016 22:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby mvdcamp » Wednesday 16 March 2016 16:29

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)

Draakje
Posts: 48
Joined: Thursday 22 October 2015 21:14
Target OS: Linux
Domoticz version: 3.5468
Contact:

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

Postby Draakje » Wednesday 16 March 2016 16:38

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.
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

mvdcamp
Posts: 6
Joined: Tuesday 15 March 2016 22:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby mvdcamp » Wednesday 16 March 2016 16:48

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.

gordonb3
Posts: 360
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

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

Postby gordonb3 » Wednesday 16 March 2016 17:02

Could you try "screen" instead?

Code: Select all

screen /dev/ttyUSB0 115200
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.6584

mvdcamp
Posts: 6
Joined: Tuesday 15 March 2016 22:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby mvdcamp » Thursday 17 March 2016 11:50

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.

intimidate
Posts: 2
Joined: Thursday 31 March 2016 20:23
Target OS: -
Domoticz version:
Contact:

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

Postby intimidate » Thursday 31 March 2016 21:18

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 893 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 893 times

Draakje
Posts: 48
Joined: Thursday 22 October 2015 21:14
Target OS: Linux
Domoticz version: 3.5468
Contact:

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

Postby Draakje » Friday 01 April 2016 0:45

have you tried connecting on 9600 baud ?
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

intimidate
Posts: 2
Joined: Thursday 31 March 2016 20:23
Target OS: -
Domoticz version:
Contact:

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

Postby intimidate » Friday 01 April 2016 7:27

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. :?

gordonb3
Posts: 360
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

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

Postby gordonb3 » Friday 01 April 2016 16:06

Seems like a bad connection somewhere to me. I get similar type of random output sometimes when I connect the card edge connector to my B3 server. Easily fixed by sliding off and back on, but that will be hard to do if you attached the RJ11 plug to the cable yourself. With only white wires it doesn't look like a factory made cable anyway.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.6584

Jeff
Posts: 23
Joined: Tuesday 16 December 2014 0:39
Target OS: Windows
Domoticz version: 2.3674
Location: Weert, Netherlands
Contact:

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

Postby Jeff » Friday 01 April 2016 22:42

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.

Daniel
Posts: 2
Joined: Sunday 03 April 2016 16:58
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby Daniel » Sunday 03 April 2016 17:03

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.

Jeff
Posts: 23
Joined: Tuesday 16 December 2014 0:39
Target OS: Windows
Domoticz version: 2.3674
Location: Weert, Netherlands
Contact:

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

Postby Jeff » Wednesday 06 April 2016 12:16

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 |


User avatar
bbqkees
Posts: 400
Joined: Sunday 17 August 2014 21:01
Target OS: Raspberry Pi
Domoticz version: 3.5x
Location: The Netherlands
Contact:

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

Postby bbqkees » Thursday 07 April 2016 14:18

Try with another resistor value.
It is only half gibberish, you are almost there.
RPi 2, Philips Hue GU10 / E27 / LivingWhites, Aeon Zwave stick V2, Qubino, Fibaro, Everspring, Philio, RFXCom, X10, Harmony Hub,
P1 / Resol VBus / Nefit EMS bus / DHT21 / DS18B20 / relays / I2C display via Arduino/ESP8266, Xiaomi Flora, BS440.

Jeff
Posts: 23
Joined: Tuesday 16 December 2014 0:39
Target OS: Windows
Domoticz version: 2.3674
Location: Weert, Netherlands
Contact:

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

Postby Jeff » Friday 22 April 2016 16:54

It seems that after switching to a 2k resistor the data gets pushed into domoticz :) ,Problem solved.


Return to “Meters”

Who is online

Users browsing this forum: No registered users and 1 guest