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

Moderator: leecollings

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 »

Good to hear.
Yes it will keep measuring now. When clicking on the 'Log' button at the meter, in the top right corner you have the 'Report' button, there the high and low tariff will come back. And in the graphs ofcourse.
I am not active on this forum anymore.
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

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

Post by sincze »

So first my neighbour had a working setup with FTDI -> RJ11 and inverted signals.
After one year his smartmeter died and was replaced by Landis Gyr E350.

So to have domoticz receive the data again we only need to solder a 10k resistor right, between data rx and 5v??
http://www.quassi.nl/2015/01/03/read-da ... art-meter/

Earlier posts in this topic say:
"The colored rings of the resistor translate the value: http://www.weerstandcalculator.nl/
brown - black - orange - gold = 10K / 10 kilo Ohm"
Link above shows a 2k resistor, So I'm a bit confused.

As current cable is 9600 maybe modify the settings to:

Code: Select all

The communication should be set-up with the following settings: (115200 8N1)
– Baudrate:  115200
– Data bits: 8
– Parity: none
– Stop bits: 1
And that will ensures all is working again :D ?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
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 »

I don't know, i have a totally different meter.

http://domoticz.com/forum/viewtopic.php ... 970#p31345 says 1k.... i don't think it is really critical, just try something between 1k and 10k and you will be fine. The port of the meter is protected against user abuse i thought, so very small chance of wrecking it ;)
I am not active on this forum anymore.
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

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

Post by sincze »

A well just followed these exact instructions.
http://www.quassi.nl/2015/01/03/read-da ... art-meter/

Just changed to red cable for permanent 5V.

Image

Domoticz is seeing the Smartmeter again.
:D
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
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 »

I've bought this chip
http://www.ebay.com/itm/311424300824?_t ... EBIDX%3AIT

connected like the picture above. have a Kamstrup smartmeter and connected the cable to my synology.
When i add the component in Domoticz i see 2 USB ports i guess i need to use /dev/ttyUSB0 because my ZWaveStick is connected to the other port /dev/ttyACM0
I pressed Setup and set it to 115200. But i don't see any modules in Domoticz under Devices. What am i doing wrong?

Image

And I did not add the resistor, is it needed in my case?

I'm still new in the Domoticz scene.
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
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 »

Did you do the following:

-Enable hardware for 5 minutes in the Settings?
-Check 'Unused devices'?
-Tested with the the other baud rate?
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

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

Post by sincze »

My kamstrup uses 9600.
And indeed allow new hardware is a good tip.

I don't know if invert signals is necessary for your board.
But as long as 5v is send to kamstrup is should send you back data every 10 seconds
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
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 »

bbqkees wrote:Did you do the following:

-Enable hardware for 5 minutes in the Settings?
-Check 'Unused devices'?
-Tested with the the other baud rate?
Yes did all of that, to bad .. no result.
sincze wrote:My kamstrup uses 9600.
And indeed allow new hardware is a good tip.

I don't know if invert signals is necessary for your board.
But as long as 5v is send to kamstrup is should send you back data every 10 seconds
What did you use? And how did you configure it?
Did you use the drivers from domoticz for the synology?
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
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 »

Please check the module on a laptop and see (with f.i. Putty) if there is valid data coming out.
If not, the module is not wired correctly, and if you see the datagrams the problem is likely with the Synology drivers.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
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 »

I would start by connecting it to a PC, opening putty and then perform a so called, 'loopback-test'.
A loopback-test consists of connecting the RX & TX pins together. If you open putty and type a character, it should echo that character like this:
hheelloo

If you get double characters, you know that the module is good.
I am not active on this forum anymore.
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 »

ThinkPad wrote:I would start by connecting it to a PC, opening putty and then perform a so called, 'loopback-test'.
A loopback-test consists of connecting the RX & TX pins together. If you open putty and type a character, it should echo that character like this:
hheelloo

If you get double characters, you know that the module is good.
When i try that i get strange characters ... but can't type anything. Not on 9600 or 115200.
With a laptop there is no data from the kamstrup. But if it won't work i will buy another cable... will make me poor but ok :lol:
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.
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 »

Now I bought this one and connected a plug like this diagram

Image

What will be next to do? Plug it in and add what to domoticz?
If it works I will make a manual for the wiki.

And I used this settings
Image
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
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 »

That should be all if you wired the plug correctly and have the right chip.

But first test the cable it with f.i. putty on a laptop. If you see the P1 datagrams in the serial port log then you know it will work in Domoticz.
If you only see gibberish, you might need either a pull up resistor or you need to reprogram the chip to invert the data.
If you do not see anything, the wiring is probably wrong.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
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 »

PL2303 can't be reprogrammed like FTDI to invert the data. You will need a transistor (like BS170) and a resistor to do that. Not very difficult if you have handled a soldering iron before :)
See also the first post of this topic.

Testing it with putty first is a good advice. Baudrate is 9600 or 115200 for newer meters.
I am not active on this forum anymore.
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 »

But still, when I add it to Domoticz i should get the interface into my devices... right? There are no changes.

I will look at the first post. I have a BS170 so that wouldnt be the problem also have a soldering iron. will try it tonight.
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.
snadwich
Posts: 3
Joined: Friday 08 January 2016 21:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by snadwich »

Kohen wrote:But still, when I add it to Domoticz i should get the interface into my devices... right? There are no changes.

I will look at the first post. I have a BS170 so that wouldnt be the problem also have a soldering iron. will try it tonight.
Did it work? I just created a page with info about how to create the PL2303 chip. It's in dutch but i guess that's not a problem for you.

(on the RJ11 side, it's not about colour but about the wire location)
Image
Last edited by snadwich on Friday 22 January 2016 15:02, edited 2 times in total.
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 »

I originally checked the pinout of both a cut off telephone cable and the original D-Sub connector on the PCB and soldered them according the the right pinout.
So indeed the wire colors may differ from cable to cable.

The resistor value is not critical, it is just a pull up resistor.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
mdewit
Posts: 1
Joined: Sunday 31 January 2016 15:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by mdewit »

I wrote a unix daemon to read out slimme meters that support the DSMR standard via the P1 port.
It should support Linux, Ubuntu as well as Raspberry Pi, and FreeBSD.

I posted the source on Github, you can find the latest release here:
https://github.com/dsmrd/dsmrd/releases/latest

Let me know if it works for you!

Groetjes,

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

did you set the correct baud rate?
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest