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

User avatar
mlamie
Posts: 150
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post by mlamie » Wednesday 11 January 2017 14:48

renerene wrote:I have managed to solve the permisseon denied issue on ttyAMA0 with help from this post

The cable is succesfully tested, using my Windows10 laptop, after fidling with some settings (baudrate, stop bits, etc) in the terminal program.
However: still no smart meter devices show up in Domoticz after clicking 'enable hardware for 5 minutes'
Also, in putty i can not get correct screendumps.

Two questions:
- which port to choose? (ttyAMA0, ttyUSB0, ttyUSB1 or ttyACM0)
- what is the correct CU command line for a Kaifa MA105C?
A small tip, look at the following wiki page: https://www.domoticz.com/wiki/PersistentUSBDevices

Use the lsusb command to see all the devices connected on your Raspberry Pi.
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

renerene
Posts: 73
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

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

Post by renerene » Wednesday 11 January 2017 23:17

A small tip, look at the following wiki page: https://www.domoticz.com/wiki/PersistentUSBDevices
Use the lsusb command to see all the devices connected on your Raspberry Pi.
1) Sorry, I don't get it. On which USB port is device 012?
Image

2) With help from my laptop I found out that handshake type is critical: it should be RTS/CTS. In the command line CU and in Domoticz there is no handshake parameter, that can be set. How to set the correct handshake type?
Image

pkessels
Posts: 1
Joined: Wednesday 22 February 2017 21:39
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by pkessels » Wednesday 22 February 2017 21:45

Nobody a clue regarding the issue with the handshake, I have exactly the same issue.
On my laptop with a terminal I got data, on the raspberry pi I got a message connected and then the screen starts scrolling but no text on the screen.
In Domoticz I see in the logging that the device get opened, but also closed.
Help!

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

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

Post by bbqkees » Friday 24 February 2017 12:07

Did you try a resistor between pin 2 and 5?

What you can also try is to connect pin 1 and 2.
This will drive RTS high all the time. This will force the meter to generate the datagram every 10 seconds.
Intel NUC-> Philips Hue, Aeon Zwave stick V2, Qubino, Fibaro, Everspring, Philio, RFXCom, X10, Harmony Hub, Xiaomi Flora + Gateway, BS440. And P1 / Resol VBus / Nefit EMS bus / DHT21 / DS18B20 / Sonoff / I2C display, all via Arduino/ESP8266.

User avatar
mlamie
Posts: 150
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post by mlamie » Friday 24 February 2017 13:08

renerene wrote:
A small tip, look at the following wiki page: https://www.domoticz.com/wiki/PersistentUSBDevices
Use the lsusb command to see all the devices connected on your Raspberry Pi.
1) Sorry, I don't get it. On which USB port is device 012?
The idea is that you will create a rule in the udev folder. That rule will contain the {idVendoridVendor}, {idProduct} and the {serial} of your USB device. Based on those device details you can plug the USB device in any of the RPI USB ports and will automatically be matched with the SYMLINK which you have given in the rule. That SYMLINK should be selected in Domoticz Hardware setup page.
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

Jeff
Posts: 36
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

Post by Jeff » Wednesday 17 May 2017 0:32

I've had a new gas+electricity meter installed (landys+gyr E350 DSMR 5) and hade to make a new cable for it,
While doing the initial testing with the 115200 7N1 parameters and inverted RXD i noticed that the data is not being displayed properly with this cable.

The board is correctly soldered since it worked fine with another FTDI 232 TLL232 5V cable, so i got a replacement cable and completely remade the board with a 1.5kohm resistor. Unfortunately still no proper telegram.

Could this be meaning that the p1 port is bogus? or does anyone have another solution for this?

The only data that is coming trough is the following:
Image
Image
Last edited by Jeff on Saturday 01 July 2017 16:09, edited 1 time in total.

snottt
Posts: 1
Joined: Sunday 21 May 2017 19:26
Target OS: -
Domoticz version:
Contact:

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

Post by snottt » Friday 26 May 2017 13:38

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? I used 115200 baudrate. A power adapter 5V 2.0A for the RPI gives the same blank result every 10s.

Jeff
Posts: 36
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

Post by Jeff » Saturday 01 July 2017 16:09

Anyone ?
Jeff wrote:I've had a new gas+electricity meter installed (landys+gyr E350 DSMR 5) and hade to make a new cable for it,
While doing the initial testing with the 115200 7N1 parameters and inverted RXD i noticed that the data is not being displayed properly with this cable.

The board is correctly soldered since it worked fine with another FTDI 232 TLL232 5V cable, so i got a replacement cable and completely remade the board with a 1.5kohm resistor. Unfortunately still no proper telegram. This while the data comes trough every 10 seconds

Could this be meaning that the p1 port is bogus? or does anyone have another solution for this?

The only data that is coming trough is the following:
Image
Image

RFAH
Posts: 20
Joined: Monday 16 March 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.6395
Location: Netherlands
Contact:

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

Post by RFAH » Monday 17 July 2017 22:22

I've recently also the Landis + GYR 350 DSMR 5 installed.
The parameters are baudrate=115200 parity=None databits=8 stopbit=1
I've tested this with cu
The command: cu -l /dev/ttyUSB1 -s 115200 --parity=none
It should give the response "connected" and a telegram should appear.

I also found some documentation.
https://www.wijhebbenzon.nl/media/kunen ... inalP1.pdf
Hope this will help.

Draakje
Posts: 87
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

Post by Draakje » Saturday 05 August 2017 16:49

Hi All,

I have my P1 smart meter running for a couple of years now. All seems in working order.
But.. Now that I have solar panels I was expecting to see information about return of energy.

I do see the totals of kW being returned but I do not see a current (Actual ) return. it is always 0
Does this have something to do with the cable or is there some more configuration needed?

Regards,
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

Jeff
Posts: 36
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

Post by Jeff » Sunday 06 August 2017 17:52

Draakje wrote:Hi All,

I have my P1 smart meter running for a couple of years now. All seems in working order.
But.. Now that I have solar panels I was expecting to see information about return of energy.

I do see the totals of kW being returned but I do not see a current (Actual ) return. it is always 0
Does this have something to do with the cable or is there some more configuration needed?

Regards,
Normally when you've had solar panels installed it doesn't need any additional configuration in domoticz. However i read somewhere on the ned, Depending on how long ago this was installed it could take a little while for the returned kWh's to appear on the meter.

After some time it should look like this:
Image

The green line is the total return counter and the other line is the actual return.

Draakje
Posts: 87
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

Post by Draakje » Monday 07 August 2017 8:37

Well it does display it in the graph but the "Actual" usage is not updated.

It may just be a display issue..
Below is a screenshot made from my iPhone.
(maybe a bad example but I think you will get the idea, currentle there is not enough power generated to return some of it to the net :) )

In the screenshot the Actual return will always be 0 (it may switch between -0 and 0 )
IMG_1871.PNG
IMG_1871.PNG (266.34 KiB) Viewed 825 times
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

freijn
Posts: 178
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

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

Post by freijn » Monday 07 August 2017 9:44

Perhaps your meter?

Image

Draakje
Posts: 87
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

Post by Draakje » Monday 07 August 2017 9:47

yes but what to change then?
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

freijn
Posts: 178
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

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

Post by freijn » Monday 07 August 2017 9:53

You Solar is generating "only" 612 Watt.
Your house consuming 2130 Watt from the grid + 612 Watt from the Solar so 2742 Watts in total.

You are NOT returning anything in this screenshot......

Draakje
Posts: 87
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

Post by Draakje » Monday 07 August 2017 9:55

ok but that is what I said.. .(Bad Example)

When my Solar is generating enough it still displays 0 Watt as consumption (I never have what you have like a -1405 Watt)

It is either a consumption or it is 0
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

freijn
Posts: 178
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

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

Post by freijn » Monday 07 August 2017 10:02

Have a look in the devices ( apparaten ) there you can see the rough vanlues you receive :

1 Slimme Meter 1 1 Power P1 Smart Meter Energy 2709832;2145763;320415;825673;0;1948

Draakje
Posts: 87
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

Post by Draakje » Monday 07 August 2017 10:05

1 Electra 1 1 Electra P1 Smart Meter Energy 12272407;11858038;1372475;3106999;0;0

So I guess the information is not coming from the meter ?

If so, does this have something to do with the cable ? or just a non function for the meter?
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

Milifax
Posts: 72
Joined: Friday 23 June 2017 9:27
Target OS: Raspberry Pi
Domoticz version: v3.8094
Location: The Netherlands
Contact:

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

Post by Milifax » Monday 07 August 2017 10:14

Draakje wrote:1 Electra 1 1 Electra P1 Smart Meter Energy 12272407;11858038;1372475;3106999;0;0

So I guess the information is not coming from the meter ?

If so, does this have something to do with the cable ? or just a non function for the meter?
Check the readings on the meterdisplay itself. Compare it with the sw readings.
Then you can rule out the cable and/or sw.

Draakje
Posts: 87
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

Post by Draakje » Monday 07 August 2017 10:15

ok, many thanks
I will check this. (not now as I am at work :P)
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests