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

Moderator: leecollings

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

Post by peterprinsen »

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
terminal screen shot
terminal screen shot
terminalScreenshot.png (80.88 KiB) Viewed 10845 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

Post by peterprinsen »

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.
ThinkPad
Posts: 890
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

Post by ThinkPad »

This topic is about almost the same problem: http://domoticz.com/forum/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...
I am not active on this forum 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

Post by peterprinsen »

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

Post by peterprinsen »

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...
ThinkPad
Posts: 890
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

Post by ThinkPad »

Did you got it working already?
I am not active on this forum anymore.
User avatar
tcviper
Posts: 89
Joined: Monday 30 June 2014 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

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

Post by tcviper »

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 / ODroid
Domoticz version:
Contact:

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

Post by Jammerdan »

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?

pi@raspberrypi ~ $ 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

pi@raspberrypi ~ $ cu -l /dev/ttyusb1 -s 115200 --parity=none
cu: open (/dev/ttyusb1): No such file or directory
cu: /dev/ttyusb1: Line in use
pi@raspberrypi ~ $
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 »

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.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
Jammerdan
Posts: 3
Joined: Saturday 10 October 2015 23:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Jammerdan »

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 / ODroid
Domoticz version:
Contact:

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

Post by Jammerdan »

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: 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 »

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: 23
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

Post by Kohen »

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.
ThinkPad
Posts: 890
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

Post by ThinkPad »

Yes, will work if you have the correct drivers. The package from jumbotroll (jadahl repo) has USB-drivers integrated (FTDI, PL2303, ...)
I am not active on this forum anymore.
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 »

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
ThinkPad
Posts: 890
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

Post by ThinkPad »

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: http://domoticz.com/forum/viewtopic.php?f=30&t=8505 be sure to click 'Subscribe topic' at the bottom of the page, if you like to get notified.
I am not active on this forum anymore.
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 »

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: http://domoticz.com/forum/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: 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 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 19: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
ThinkPad
Posts: 890
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

Post by ThinkPad »

English please, see forum rules.

What do you mean with a double meter? Multiple electricity tariffs or electricity + gas?
I am not active on this forum anymore.
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 »

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

Who is online

Users browsing this forum: MikeVanD and 1 guest