P1 Smart meter lan interface with SER2NET Topic is solved

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post
Post Reply
jurgen
Posts: 29
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

P1 Smart meter lan interface with SER2NET

Post by jurgen » Monday 19 December 2016 20:05

Version: 3.5887
Platform: Synology NAS DSM 6.0.2-8451 Update 6
Description:

Hi All,

I have 2 synology NAS stations, one at my parents home and one at my own house.
I have ser2net configured on the NAS from my parents to make the serial P1 smart meter available over TCP.
When I try to telnet to 10.10.10.10:1002 it looks like everything is working fine, but the output is different sometimes. There are some rows missing and domoticz is logging about "P1: dismiss incoming - value is not delimited".

Is there anyone else who is using ser2net or is there a better way to make P1 data available using TCP?


Telnet to 10.10.10.10:1002

/KMP5 ZABF001755987412

0-0:96.1.1(205A41424630303137353539381-0:1.8.(06876.368*kWh)
1-0:1.8.2(04372.833*kW.8.1(0213 1-0:2.87*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(0001.58*kW)
1-0:2.7.0(0000.00*kW)
0-0:96.13.1()
0-0:96.13.0()
0-1:24.1.0(3)
0-1:96.1.0(3238313031353431303037393037303132)
0-1:24.3.0(161219180000)(00)(60)(1)(0-1:24.2.1)(m3)
(06265.005)
!
/KMP5 ZABF001755987412

0-0:96.1.1(205A414246303031373535393837343132)
1-0:1.8.1(06876.368*kWh)
1-0:1.8.2(04372.838*kWh)
1-0:2.8.1(02134.904*kWh)
1-0:2.8.2(04840.157*kWh)
0-0:96.14.0(0002)
001.57*kW)
1-0:2.7.0(0000.00*kW)
0-0:96.13.1()
0-0:96.13.0()
0-1:24.1.0(3)
0-1:96.1.0(3238313031353431303037393037303132)
0-1:24.3.0(161219180000)(00)(60)(1)(0-1:24.2.1)(m3)
(06265.005)
!
/KM5 ZABF001755987412

0-0:961.1(205A14246303031373535393837343132)
1-0:1.8.1(06876.368*kWh)
1-0:1.8.2(04372.842*kWh)
1-0:2.8.1(02134.904*kWh)
1-0:2.8.2(04840.157*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(0001.57*kW)
1-0:2.7.0(0000.00*kW)
0-0:96.13.1()
0-0:96.13.0()
0-1:24.1.0(3)
0-1:96.1.0(323831303135343130303393037303132)
0-124.3.0(161219180000)(00)(60)(1)(0-1:2.2.1)(m3)
(06265.05)
!





Logging output from domoticz:
2016-12-19 18:45:45.177 P1 Smart Meter: connected to: 10.10.10.10:1002
2016-12-19 18:47:09.078 P1: dismiss incoming - value is not delimited in line "1-0:2.8.1(02134"
2016-12-19 18:48:10.259 P1 Smart Meter: connected to: 10.10.10.10:1002
2016-12-19 18:48:21.514 Error: P1 Smart Meter: TCP/IP connection closed!
2016-12-19 18:48:21.514 P1 Smart Meter: retrying in 30 seconds...
2016-12-19 18:48:51.567 P1 Smart Meter: connected to: 10.10.10.10:1002
2016-12-19 18:49:23.919 P1: dismiss incoming - value in line "1-0:1.7.0(00(0000.00*W)" is not a number
2016-12-19 18:49:55.016 Error: P1 Smart Meter: TCP/IP connection closed!
2016-12-19 18:49:55.017 P1 Smart Meter: retrying in 30 seconds...

User avatar
sincze
Posts: 705
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.8153
Location: Netherlands
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by sincze » Monday 19 December 2016 23:07

I have been using ser2net for over 2 years now to read the data from my smartmeter.
Seems to be working just fine.
Maybe have a look at 'socat' ? however I have to see ser2net should be working without problems.
Pretty much all my connections (OTGW and RFLINK) are using ser2net
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

User avatar
gizmocuz
Posts: 8491
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by gizmocuz » Tuesday 20 December 2016 9:48

ser2net is working fine for many years here as well
please post your configuration of ser2net, without this, its hard to tell whats wrong
Quality outlives Quantity!

gordonb3
Posts: 508
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by gordonb3 » Tuesday 20 December 2016 11:05

It doesn't have to be ser2net. The data is probably already bad coming from the smartmeter.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

User avatar
gizmocuz
Posts: 8491
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by gizmocuz » Tuesday 20 December 2016 12:12

Yep, but it is probably related to the configuration
Quality outlives Quantity!

jurgen
Posts: 29
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by jurgen » Wednesday 04 January 2017 19:32

Hello,

I use the following command.
1002:raw:15:/dev/ttyUSB0:9600,7DATABITS,EVEN,1STOPBIT

Which command do you suggest?

User avatar
sincze
Posts: 705
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.8153
Location: Netherlands
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by sincze » Wednesday 04 January 2017 21:37

jurgen wrote:Hello,

I use the following command.
1002:raw:15:/dev/ttyUSB0:9600,7DATABITS,EVEN,1STOPBIT

Which command do you suggest?
Only difference with mine is raw:0 in stead of raw:15
10002:raw:0:/dev/ttyUSB0:9600 EVEN 1STOPBIT 7DATABITS
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

jurgen
Posts: 29
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by jurgen » Thursday 05 January 2017 13:20

Hello,

unfortunately it doesn't make any sense.

When I try to get output from the P1 smart meter using "cat /dev/ttyUSB0" the output is normal without any interuptions or bad format.
/KMP5 ZABF001755987412

0-0:96.1.1(205A414246303031373535393837343132)
1-0:1.8.1(07040.510*kWh)
1-0:1.8.2(04511.159*kWh)
1-0:2.8.1(02136.492*kWh)
1-0:2.8.2(04850.628*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(0000.00*kW)
1-0:2.7.0(0000.89*kW)
0-0:96.13.1()
0-0:96.13.0()
0-1:24.1.0(3)
0-1:96.1.0(3238313031353431303037393037303132)
0-1:24.3.0(170105120000)(00)(60)(1)(0-1:24.2.1)(m3)
(06453.633)
!
/KMP5 ZABF001755987412

0-0:96.1.1(205A414246303031373535393837343132)
1-0:1.8.1(07040.510*kWh)
1-0:1.8.2(04511.159*kWh)
1-0:2.8.1(02136.492*kWh)
1-0:2.8.2(04850.630*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(0000.00*kW)
1-0:2.7.0(0000.74*kW)
0-0:96.13.1()
0-0:96.13.0()
0-1:24.1.0(3)
0-1:96.1.0(3238313031353431303037393037303132)
0-1:24.3.0(170105120000)(00)(60)(1)(0-1:24.2.1)(m3)
(06453.633)
!

Domoticz doesn't complain about the P1 and the graph's are normal, so in my opinion there is no issue with the P1

When I try to get the output using Minicom or ser2net the output format is different.
I'm using a synology NAS with ser2net and minicom from the Jumbotroll packages.
I'm using a p1 smart cable from http://www.smartmeterdashboard.nl/webshop (P1 Converter Cable v2)

Maybe is there in issue within the packages from Jumbotroll?

User avatar
sincze
Posts: 705
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.8153
Location: Netherlands
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by sincze » Thursday 05 January 2017 18:24

Do you have by any chance have a spare raspberry around... so you can check ser2net with a totally different device?

Can you show your current minicom config file ? And how does the data show in minicom?

P1 port and cable seems to be okay so that is good news :D
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

jurgen
Posts: 29
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by jurgen » Thursday 05 January 2017 23:04

Hi Sinzce,

Thank you for your reply.

Yes I have a raspberry and it is not in use so i can try that. In the past I have already used it with domoticz and minicom without any issues with minicom. (never tried ser2net on raspberry)

I use the following parameters with minicom on synology
------[Comm Parameters]----------+
Current: 9600 7E1



Port /dev/ttyUSB0, 20:21:43

Press CTRL-A Z for help on special keys

1.1(205A442463030337353539337343132
1-0:1.37*kWh)
-0:1.8.2(0415.900*:2.8.1(0216.492*kW.2(04851.
0-0:96.14.0(0001)0000.51*)
1-0:2.7.00*kW)
-0:96.13.1.13.0()
(3)
0-1831303135339303730324.3.0(170(00)(60)(1)(0-1:24..1)(m3)/KMP ZABF001
0-0:96.1.1(205A41246303037353539387343132)
1-0:1.81(07041.8*kWh)
04515.9002.8.1(0236.492*kWh8.2(04851.343*kWh)
1-0:1.7.(0000.51*W)
1-0:2.7.0(000000*kW)
00:96.13.()
0-0:9.13.0()
0-1:24.1.(3)
0-1:6.1.0(3283130313543130303739303730332)
7)1:105210000)(00)(60)2.1)(m3)
!
/KMP5 Z7412

0:96.1.1(05A4142465353938373-0:1.8.1(07041.039*k:1.8.2(04515.900*kWh)
1-0:2.82(3*kWh)
0-0:9.14.0(00.51*kW)(0000.00*)
0-0:9.13.1()
.0()
0-1238313030373930(60)(1)(0(m3)
(0!
/KMP5 ZAB87412

00:96.1.1(2303031373543132)
1kWh)
1-0:8.2(04515.900*kWh
1-0:2.8
1-0:2.7.0(0000.000-0:96.13.0()W)
0-1:2
0-1:96.1313534317303132)
0-1:10000)(00)(60:24.2.1(m3)
(064!
ABF001755987412

00:96.1.1(205A417343132)
1-07041.042*kWh)
1-:1.8.2(04)
1-0:2492*kWh)
1-0:2.8.23*kWh)
0-0001)
1
1-0:2.7.kW)
0-0.0()
0-1
0-1:96303135343303037393
0-1:24.210000)(0)(60)(1)(1:24.2.1!
/KMP5 ZABF0(20530313735339383734132)
02136.49*kWh).044*kW900*kWh)
1-051.343*k)
0-0:961)
1-0:1.51*kW)
100.00*kW)13.1()
0-:96.13.0(1.0(3)
03238313030373930370()(60)(1)(0-1:243)
(0646
/MP5 ZABF017559874(2003137353538373432)
1-0:11.046*kWh
1-0:1.80:2.8.1kWh)
1-2.8.2(048h)
0-0:96.14.0(00017.0(0000.0:2.7.0(0
0-0:96.1
0-1:24.0(3)
0-1:96.1.0(135343130303132)
0-1701052100024.2.1)(m3.057)
!
/KMP5 ZABF0175598712

0-0:33031373535938373432)
1-0:1.047*kWh)
1-0:1.8.(04515.00*kWh)
-0:2.8.12136.492*h)
1-0851.343*kWh)
0-0:96.14.0(007.0(0000.51*kW)
100.00*kW
0-0:96.1.1()
0-
0-1:24:96.1.0(135343130037393037-1:24.3.0(000)(00)(0)(1)(0-1:24.2.1)(3)
(0646.057)
!
/01755987412
0-0:6.1.1(205A41424630339383734310:41.048*kWh2(04515.900*kWh)
02136.492*kWh)
1-0h)
0-0:96.14.0(0001)
1-0:1.0:2.7.0(000.00*kW)
0-0:96.1.1()
0-01.0(3)
0-1:9.1.0(35343130037393037303132)
01:24.3.0(24.2.1)(m3)
(06463057)
!
175598742

User avatar
sincze
Posts: 705
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.8153
Location: Netherlands
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by sincze » Friday 06 January 2017 12:46

Mmm puzzled. Ser2net on raspberry and smart meter should 100% work. Just to be sure your are not trying to share the com port of the P1 with a different application??

Sent from my SM-G925F using Tapatalk
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

jurgen
Posts: 29
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by jurgen » Friday 06 January 2017 15:45

sincze wrote:Mmm puzzled. Ser2net on raspberry and smart meter should 100% work. Just to be sure your are not trying to share the com port of the P1 with a different application??

Sent from my SM-G925F using Tapatalk
Good point, I had domoticz running and ser2net they use both ttyusb0.
When I stop or disable P1 smart meter in domoticz the output is normal without a bad format.

I had also fixed the problem that a disconnect happens after 15 seconds, I changed the raw:15 to raw:0.
1002:raw:0:/dev/ttyUSB0:9600,7DATABITS,EVEN,1STOPBIT

I have another question, i have also a S0 KWH meter running with 2 meters on it and I would to make it available over IP using ser2net.
Do you know to do that?


Thanks a lot, you saved my day already!

User avatar
sincze
Posts: 705
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.8153
Location: Netherlands
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by sincze » Friday 06 January 2017 20:41

jurgen wrote: I have another question, i have also a S0 KWH meter running with 2 meters on it and I would to make it available over IP using ser2net.
Do you know to do that?


Thanks a lot, you saved my day already!
Is I don't know what it looks like I assume this meter does not have a p1 port kind of thing. So we will have to read the meters in some way?
Does it have a rotating disk or a flashing led ??
Or just post an image :D
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

jurgen
Posts: 29
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by jurgen » Saturday 07 January 2017 11:03

S0 meters are used for KWH meters between the solar panel inverter and the smart meter. With this in the middle i can read out how many kwh are collected and send to the smart meter.

Something like this:
http://www.smartmeterdashboard.nl/blog/ ... untercable

I can read the S0 meters and transport it over TCP with ser2net 1003:raw:0:/dev/ttyUSB1, and the output is normal but i can't add a S0 meter with lan interface in domoticz because when i would press the Add button in the hardware dashboard nothing happens. The hardware is not added.
DS411J:~$ sudo cat /dev/ttyUSB1
ID:30514:I:10:M1:0:132:M2:0:381
ID:30514:I:10:M1:0:132:M2:0:381
ID:30514:I:10:M1:0:132:M2:0:381
ID:30514:I:10:M1:0:132:M2:0:381
ID:30514:I:10:M1:0:132:M2:0:381

But when i add the S0 meter over USB it will work as it supposed to be.

User avatar
sincze
Posts: 705
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.8153
Location: Netherlands
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by sincze » Saturday 07 January 2017 12:30

Ah OK. What is the brand of the inverter? Maybe we can read the collection data directly from the inverter :). For s0 meter I have to think. It should already be somewhere here in the forum in a different topic.

Sent from my SM-G925F using Tapatalk
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

jurgen
Posts: 29
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by jurgen » Saturday 07 January 2017 16:34

I'm using a SMA sunny boy without bluetooth or ethernet, and I use the S0 meters because the bluetooth or ethernet module is to expensive and with the S0 meters we are not dependent off a brand.

I have a workaround to add S0 meter over LAN

First select the P1 and add the IP adress + port, add the hardware.
Then change P1 to S0 and save changes.
S0 over lan is then configured.

Now I have to wait because the sun is not shining! haha.

For some reason it is not possible to directly select and add S0 meter over lan, but it works like this then i'm happy!

User avatar
sincze
Posts: 705
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.8153
Location: Netherlands
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by sincze » Sunday 08 January 2017 3:11

jurgen wrote:I'm using a SMA sunny boy without bluetooth or ethernet, and I use the S0 meters because the bluetooth or ethernet module is to expensive and with the S0 meters we are not dependent off a brand.

I have a workaround to add S0 meter over LAN

First select the P1 and add the IP adress + port, add the hardware.
Then change P1 to S0 and save changes.
S0 over lan is then configured.

Now I have to wait because the sun is not shining! haha.

For some reason it is not possible to directly select and add S0 meter over lan, but it works like this then i'm happy!
Nice workaround. Keep me posted if it worked. Hopefully tomorrow no snow so you can do some measurements. :D
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

jurgen
Posts: 29
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

Re: P1 Smart meter lan interface with SER2NET

Post by jurgen » Monday 09 January 2017 14:15

Hi Sincze,

Everthing is working fine now. I can measure collected kwh from the solar panels through S0 and read P1 over tcp.

Thank you for support!.

User avatar
sincze
Posts: 705
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.8153
Location: Netherlands
Contact:

Re: RE: Re: P1 Smart meter lan interface with SER2NET

Post by sincze » Wednesday 11 January 2017 23:48

jurgen wrote:Hi Sincze,

Everthing is working fine now. I can measure collected kwh from the solar panels through S0 and read P1 over tcp.

Thank you for support!.
You are welcome

Sent from my SM-G925F using Tapatalk
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests