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

Moderator: leecollings

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

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

Post by mvdcamp »

Yep, I used 115200 baudrate
Draakje
Posts: 140
Joined: Thursday 22 October 2015 21:14
Target OS: Linux
Domoticz version: 4.11539
Contact:

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

Post 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 ?
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 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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...
Draakje
Posts: 140
Joined: Thursday 22 October 2015 21:14
Target OS: Linux
Domoticz version: 4.11539
Contact:

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

Post 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 ?
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 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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)
Draakje
Posts: 140
Joined: Thursday 22 October 2015 21:14
Target OS: Linux
Domoticz version: 4.11539
Contact:

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

Post 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.
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 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
mvdcamp
Posts: 6
Joined: Tuesday 15 March 2016 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

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

Post 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 9604 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 9604 times
Draakje
Posts: 140
Joined: Thursday 22 October 2015 21:14
Target OS: Linux
Domoticz version: 4.11539
Contact:

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

Post by Draakje »

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

Post 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. :?
Jeff
Posts: 22
Joined: Monday 15 December 2014 23: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

Post 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.
Daniel
Posts: 2
Joined: Sunday 03 April 2016 16:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
Jeff
Posts: 22
Joined: Monday 15 December 2014 23: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

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

User avatar
bbqkees
Posts: 407
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 4.1x
Location: The Netherlands
Contact:

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

Post by bbqkees »

Try with another resistor value.
It is only half gibberish, you are almost there.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
Jeff
Posts: 22
Joined: Monday 15 December 2014 23: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

Post by Jeff »

It seems that after switching to a 2k resistor the data gets pushed into domoticz :) ,Problem solved.
osiris
Posts: 37
Joined: Friday 08 May 2015 8:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Amsterdam
Contact:

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

Post 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?
Attachments
Screen Shot 2016-05-12 at 19.11.47.png
Screen Shot 2016-05-12 at 19.11.47.png (44.17 KiB) Viewed 12927 times
osiris
Posts: 37
Joined: Friday 08 May 2015 8:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Amsterdam
Contact:

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

Post 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.
fibigod
Posts: 4
Joined: Thursday 23 June 2016 17:08
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

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

Post 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
fibigod
Posts: 4
Joined: Thursday 23 June 2016 17:08
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

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

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests