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

peterprinsen
Posts: 8
Joined: Tuesday 09 June 2015 20:13
Target OS: Linux
Domoticz version: v2.2516
Location: The Netherlands
Contact:

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

Postby peterprinsen » Tuesday 09 June 2015 21:27

Thanks! 115200 didn't work but I tried playing around with the other settings and when I set Data bits to 7 (instead of 8) I got sensible data at Baud rate 9600 (see attachment). So I guess the cable is fine. I'll connect it to domoticz again and see if it works now.
Attachments
terminalScreenshot.png
terminal screen shot
terminalScreenshot.png (80.88 KiB) Viewed 3210 times

peterprinsen
Posts: 8
Joined: Tuesday 09 June 2015 20:13
Target OS: Linux
Domoticz version: v2.2516
Location: The Netherlands
Contact:

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

Postby peterprinsen » Tuesday 09 June 2015 21:59

I connected it to domoticz but it's not really working. I added the hardware and set the Baud rate to 9600. It shows up in devices and when I check the log I see an entry from the smart meter every 10 seconds. If I check the Data in devices it's 0;0;0;0;0;0 however. It's been running for about 10 minutes now so I guess there is a problem interpreting the meter's data.

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

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

Postby ThinkPad » Wednesday 10 June 2015 8:26

This topic is about almost the same problem: viewtopic.php?f=14&t=6511
gizmocuz has also responded there. But i don't know how to tell Domoticz to use 7bits instead of 8bits.... then it would work...
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

peterprinsen
Posts: 8
Joined: Tuesday 09 June 2015 20:13
Target OS: Linux
Domoticz version: v2.2516
Location: The Netherlands
Contact:

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

Postby peterprinsen » Wednesday 10 June 2015 13:53

ThinkPad, thanks a lot for your quick responses! The other topic is indeed very similar. I'll look into whether the settings for the reading of P1 can be set manually in domoticz. From gizmocuz' reponse I infer that domoticz should set the correct values automatically but maybe it doesn't work for the particular cable I have. I'll post any solutions I find (or problems I run into) in the other topic since it seems more fitting to my current problem.

peterprinsen
Posts: 8
Joined: Tuesday 09 June 2015 20:13
Target OS: Linux
Domoticz version: v2.2516
Location: The Netherlands
Contact:

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

Postby peterprinsen » Wednesday 10 June 2015 20:19

Btw, I had a quick look at the domoticz code and it seems that baud rate 9600 implies 7 bits character size so that's not where the problem is...

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

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

Postby ThinkPad » Sunday 28 June 2015 12:46

Did you got it working already?
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

User avatar
tcviper
Posts: 166
Joined: Monday 30 June 2014 13:34
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands
Contact:

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

Postby tcviper » Friday 09 October 2015 15:04

Changing Baud rate to 115200 did the trick for me since the 4.0 DSMR meter :) Thx!

Jammerdan
Posts: 3
Joined: Saturday 10 October 2015 23:51
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby Jammerdan » Saturday 10 October 2015 23:59

All thank you so much for setting up this forum, it was a great help so far. Tonight I installed my RPI with the 2563 version for the first time. I had no unix/Linux experience or whatsoever. But installation went fine. Only reading out the DSMR 4.0 Landiss and Gyr meter not working so far... It seems impossible to get any data from the meter, however the RPI seems to recognize the cable, see underneath. What am I doing wrong? How can I use Domoticz to read my energy consumption?

[email protected] ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

[email protected] ~ $ cu -l /dev/ttyusb1 -s 115200 --parity=none
cu: open (/dev/ttyusb1): No such file or directory
cu: /dev/ttyusb1: Line in use
[email protected] ~ $

User avatar
bbqkees
Posts: 403
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 » Monday 12 October 2015 10:10

Jammerdan wrote:All thank you so much for setting up this forum, it was a great help so far. Tonight I installed my RPI with the 2563 version for the first time. I had no unix/Linux experience or whatsoever. But installation went fine. Only reading out the DSMR 4.0 Landiss and Gyr meter not working so far... It seems impossible to get any data from the meter, however the RPI seems to recognize the cable, see underneath. What am I doing wrong? How can I use Domoticz to read my energy consumption?


Are you using the correct cable?
The Landis meters need an additional restistor to work.
You can check with f.i. Putty on a Windows machine if the cable is working.
If you plug it in a laptop and the meter and use a serial connection in Putty you need to see the datagrams of the meter.
If not, the cable is not working properly.

And do not forget to add the P1 device as hardware in Domoticz of course.
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.

Jammerdan
Posts: 3
Joined: Saturday 10 October 2015 23:51
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby Jammerdan » Monday 12 October 2015 19:54

bbqkees wrote:Are you using the correct cable?
The Landis meters need an additional restistor to work.
You can check with f.i. Putty on a Windows machine if the cable is working.
If you plug it in a laptop and the meter and use a serial connection in Putty you need to see the datagrams of the meter.
If not, the cable is not working properly.

And do not forget to add the P1 device as hardware in Domoticz of course.


Thanks Kees, i think the cable is correct, the website sossolutions mentioned my specific meter as functional. So you would expect the resistor is inside right?
I already tried to use putty on my worklaptop and could not get it working. After installation of the cable, i will select the same settings for the cable in putty as in the device manager.
I will try again tonight and see if it works on the laptop of my wife.

Jammerdan
Posts: 3
Joined: Saturday 10 October 2015 23:51
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby Jammerdan » Monday 12 October 2015 20:53

Just tried the cable on another laptop with Putty, cable installed with the FT232 driverset and used the com6 putty settings: 115200 8N1.
Every time i press "open" in putty i get a beep and nothing else, it does not matter if the cable is connected to the meter or not...

Any tips? i have no clue where the problem is...

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 » Thursday 22 October 2015 21:35

Hi All,

First let me say that I am very new in the Domoticz...
But as I can find my way with Linux (and other variances of Linux) I want to start looking into this stuff :)

As a first project I would seem that this is a good starter.

But I am having difficulties to understand what there has to be done with the cable..

Let me explain it a bit more.
As I have done more googles on this subject I find much information. The question I have is this:

I have an USB to serial cable and it is an PL 2303 so I need those two extra components. But it is unclear to me what the precise components are. I see a transistor and a resistor. I ee the transistor is a BS170 but could someone help me ( it has been to long for me to remember) with the value of the resistor?

Secondly, once I have acquired these components how to I connect them to the chip off the serial cable? My guess is that I don't need the Arduino board... (I see lots of solutions with this board..)

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

Kohen
Posts: 28
Joined: Monday 12 October 2015 12:05
Target OS: NAS (Synology & others)
Domoticz version:
Location: Veldhoven, The Netherlands
Contact:

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

Postby Kohen » Friday 23 October 2015 19:32

Did anyone try to connect the cable to a Synology NAS? Will that work?

I did a lot of research but can't find that part ...
Synology NAS 412+, Aeotec stick V5, Aeotec recessed door sensor, Aeotec micro double smart switch, Fibaro Dimmer, iPad 2 with own 3d printed wall mount.

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

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

Postby ThinkPad » Friday 23 October 2015 23:01

Yes, will work if you have the correct drivers. The package from jumbotroll (jadahl repo) has USB-drivers integrated (FTDI, PL2303, ...)
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

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 » Tuesday 27 October 2015 12:39

Draakje wrote:Hi All,

First let me say that I am very new in the Domoticz...
But as I can find my way with Linux (and other variances of Linux) I want to start looking into this stuff :)

As a first project I would seem that this is a good starter.

But I am having difficulties to understand what there has to be done with the cable..

Let me explain it a bit more.
As I have done more googles on this subject I find much information. The question I have is this:

I have an USB to serial cable and it is an PL 2303 so I need those two extra components. But it is unclear to me what the precise components are. I see a transistor and a resistor. I ee the transistor is a BS170 but could someone help me ( it has been to long for me to remember) with the value of the resistor?

Secondly, once I have acquired these components how to I connect them to the chip off the serial cable? My guess is that I don't need the Arduino board... (I see lots of solutions with this board..)

Many thanks in advance


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

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

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

Postby ThinkPad » Tuesday 27 October 2015 13:08

You can use the diagram from the topicstart: http://i.imgur.com/5waRPTp.jpg
The colored rings of the resistor translate the value: http://www.weerstandcalculator.nl/
brown - black - orange - gold = 10K / 10 kilo Ohm

In the diagram an Arduino is shown, but you need to connect it like this:
- the line shown in yellow to the 'Rx' pin of the PL2303 board
- the line shown in red to the +5V line of the PL2303 board, can also be marked as Vcc / Vdd
- the line shown in blue to the ground (GND) of the PL2303 board

Good luck and let us know if you managed to get it working. If you solder a bit tidy, everything will fit nicely in those PL2303 cable housings. Be sure to check that the wires don't touch each other.


Something different: i am reading my smart meter for months and months with this self made cable, no problems at all. But for my OTGW i have ordered a RS232 to Ethernet module (USR-TCP232). I will try and see if i can read my smart meter over LAN. Domoticz already has support for it. I will post my findings in the topic i made about the converter: viewtopic.php?f=30&t=8505 be sure to click 'Subscribe topic' at the bottom of the page, if you like to get notified.
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

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 » Tuesday 27 October 2015 14:54

ThinkPad wrote:You can use the diagram from the topicstart: http://i.imgur.com/5waRPTp.jpg
The colored rings of the resistor translate the value: http://www.weerstandcalculator.nl/
brown - black - orange - gold = 10K / 10 kilo Ohm

In the diagram an Arduino is shown, but you need to connect it like this:
- the line shown in yellow to the 'Rx' pin of the PL2303 board
- the line shown in red to the +5V line of the PL2303 board, can also be marked as Vcc / Vdd
- the line shown in blue to the ground (GND) of the PL2303 board

Good luck and let us know if you managed to get it working. If you solder a bit tidy, everything will fit nicely in those PL2303 cable housings. Be sure to check that the wires don't touch each other.


Something different: i am reading my smart meter for months and months with this self made cable, no problems at all. But for my OTGW i have ordered a RS232 to Ethernet module (USR-TCP232). I will try and see if i can read my smart meter over LAN. Domoticz already has support for it. I will post my findings in the topic i made about the converter: viewtopic.php?f=30&t=8505 be sure to click 'Subscribe topic' at the bottom of the page, if you like to get notified.



Yes Many thanks and I will subscribe to your other topic! (As I also want to use ethernet :) )
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

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 » Thursday 29 October 2015 15:04

It Works.
What I mean is that I see the values of the electricity and gas meters .

I had no need for the additional components I have just connected pin 2, pin 5 and pin 7 (2=Rx, 5=GND and 7=Vcc)

one question, my electric meter has a day and night tarrif. How is this displayed in Domoticz?

Have to say tat this is very easy!


Hij werkt..
Dat wil zeggen.. Ik zie mijn meter en ik zie waardes. (zowel gas als electra)

De componenten had ik niet nodig. Heb pin 2, 5 en 7 gebruikt ( 2=Rx, 5=GND en 7=Vcc)

Heb er wel een vraagje bij..
Nu heb ik zoals velen een dubbele meter.. Ik kan zo snel even niet beide zien in domoticz. Moet ik hiervoor iets instellen ?
Of moet ik gewoon even paar uur wachten zodat er voldoende info beschikbaar is om iets te laten zien? (zie namelijk wel beide meet waarden in de log staan)


Moet wel ff zeggen dat dit echt super simpel is.. :)
Last edited by Draakje on Thursday 29 October 2015 20:34, edited 1 time in total.
Hardware: Raspberry Pi 3, OTGW, 433MHz Superheterodyne 3310 RF Link
Software: Ubuntu 16.04, Domoticz v3.5468, WiringPi, rc-switch

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

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

Postby ThinkPad » Thursday 29 October 2015 16:00

English please, see forum rules.

What do you mean with a double meter? Multiple electricity tariffs or electricity + gas?
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

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 » Thursday 29 October 2015 20:31

Yes sorry for non english.
What I mean is a day and night meter. I believe it is T1 and T2 ?

Maybe it is just contiguous measuring but only in calculation it will use the two tariffs...

So my next step is getting the info off the water meter :)
But, like you , I want to have the sensor via ethernet so I have ordered a serial to ethernet from china will take about 2 weeks to get here..

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


Return to “Meters”

Who is online

Users browsing this forum: No registered users and 2 guests