Strange Data P1 Readings.

Moderator: leecollings

paulvha
Posts: 40
Joined: Friday 29 January 2016 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Strange Data P1 Readings.

Post by paulvha »

The OBIS code 0-1:24:3:0 is indeed checked and I assume found in line 133 (case LINE17) in P1MeterBase.cpp. It will determine that the gas should be on the next line. Setting the linecount to 17. it finalises the parsing in matchline() and returns to parsedata(). Here it will get the next line, increment the counter and calls matchline() again. It will match on LINE18, with line counter being 18 and looking for "(" it should find a match. In the next loop LINE18 (codeline 208) will have a match and will look for the ")" and cop what is in between. In the next check it will copy the value in m_p1gasusage. Unless there is no increment in gas or 5 minutes has not passed it will not sent. need to do some debugging to discover what is happening.
paulvha
Posts: 40
Joined: Friday 29 January 2016 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Strange Data P1 Readings.

Post by paulvha »

I have just replied on on similar issue on : viewtopic.php?f=14&t=10020
NLRad
Posts: 13
Joined: Sunday 20 December 2015 15:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Strange Data P1 Readings.

Post by NLRad »

Issue has been fixed. See this thread: viewtopic.php?f=14&t=10020
peterprinsen
Posts: 8
Joined: Tuesday 09 June 2015 20:13
Target OS: Linux
Domoticz version: v2.2516
Location: The Netherlands
Contact:

Re: Strange Data P1 Readings.

Post by peterprinsen »

I figured I spent enough time debugging (see my posts earlier in this topic) so I decided to buy a new cable, this time not one off Ebay but a P1 converter cable v2 from smartmeterdashboard.nl (avoiding any issues in the RS232 to USB connection). It was a bit more expensive but everything works now :-).
paulvha
Posts: 40
Joined: Friday 29 January 2016 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Strange Data P1 Readings.

Post by paulvha »

If have seen that the gas meter OBIS code can be different over the different meters and different installations. in this case it is the channel number
The OBIS reference Channel number (n) will be defined by the installing order of the M-Bus devices. So for example a Gas meter can be installed on channel 1, 2, 3 or 4. For that reason the Device-Type is sent first to identify the medium on P1.

in other situations it is because the Gas number is on the next line. It seems to be a moving target not easy to code. I have made a python script that is running in the background and updates my gasmeter (that I created on the dummy device.) It has command line options to adjust what code to look for and how to handle. But you need to to capture the full meter information in a separate file.
User avatar
thecosmicgate
Posts: 188
Joined: Monday 06 April 2015 14:37
Target OS: Linux
Domoticz version: newest
Location: The Netherlands / Hoeven
Contact:

Re: Strange Data P1 Readings.

Post by thecosmicgate »

i exactely build my P1 cable as :
Image

But when i connect it to the E350 landys meter and opened termite / or bray's terminal , nothing :(
Even when i change the baudrate to 9600 / 115200



Update : I also used the extra resistors als i found on google :
Image

But no data :(
what did i do wrong ?
It's nice to be important, but it's more important to be nice
Scooter ;)
paulvha
Posts: 40
Joined: Friday 29 January 2016 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Strange Data P1 Readings.

Post by paulvha »

Using the numbers from the drawing above:
1 = RTS : this needs to be put high to sent data every 10 seconds. it needs to be connected to +5V (as it looks to be )
2 = GND : needs to connected to the emitter of the BS170 + GND of USB (as it looks to be )
The 10K pull-up to the collector is needed to provide a high signal is case the BS170 is not conducting and that receive line should be on the collector as well (as it looks to be)
Your issue is data. The lowest drawing should work, It has a ~1K pull-up (as the output from the P1 is "floating" in high.. I have used a BC170 (or any NPN) before and not a FET, but that should not matter.


regards,
paul
User avatar
thecosmicgate
Posts: 188
Joined: Monday 06 April 2015 14:37
Target OS: Linux
Domoticz version: newest
Location: The Netherlands / Hoeven
Contact:

Re: RE: Re: Strange Data P1 Readings.

Post by thecosmicgate »

paulvha wrote:Using the numbers from the drawing above:
1 = RTS : this needs to be put high to sent data every 10 seconds. it needs to be connected to +5V (as it looks to be )
2 = GND : needs to connected to the emitter of the BS170 + GND of USB (as it looks to be )
The 10K pull-up to the collector is needed to provide a high signal is case the BS170 is not conducting and that receive line should be on the collector as well (as it looks to be)
Your issue is data. The lowest drawing should work, It has a ~1K pull-up (as the output from the P1 is "floating" in high.. I have used a BC170 (or any NPN) before and not a FET, but that should not matter.


regards,
paul
I think that I solved this :) the problem seems to be some bad VCC (+5v) connection in the USB connector side .
Next ;-)
It's nice to be important, but it's more important to be nice
Scooter ;)
harml
Posts: 4
Joined: Wednesday 11 October 2017 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Strange Data P1 Readings.

Post by harml »

I am using Domoticz in combination with Klik aan Klik uit for a while but I want to expand the possibilities of Domoticz by reading out the smartmeter in my house. I also ran into a data P1 reading problem.

The hardware is on ttyUSB1 and I followed the steps to make a port ttyUSB-P1 but still I do not get any devices in domoticz (v3.8153). So I thought to go back to the source and first check the read-out of the Smartmeter via the USB-P1 cable from Robbshop connected to a Raspberry Pi 2.

I checked it with cu -l /dev/ttyUSB1 -s 9600 -e --parity=even. Smartmeter is a ISKRA MT-382 and also did a check from windows with putty settings 9600, 7,1, even and the result is the same.

eTVE3dR-rvvRg/NoVm6,lYZ2-r-V]Y9RV6vvVV66v6VV%g/Rm6,2mdZr-rVR6m266%!E!%N/Rm6,2mdZr-RR,62-2%!E!%N/Rm6l2mdZrmVrvddZYY2%!E!%N/Rm6l2mdZrm6rV62m622%!E!%NoVm6,lYZr2mvmvvVRg/Rm6,2$2Mvmvvv6-V6%!E%N/Rm6l2-2mvmvvv6mv6%!E%..........................................
every 10 seconds.

I am new to this is some setting wrong or is it a problem with the cable?
harml
Posts: 4
Joined: Wednesday 11 October 2017 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Strange Data P1 Readings.

Post by harml »

I am using Domoticz in combination with Klik aan Klik uit for a while but I want to expand the possibilities of Domoticz by reading out the smartmeter in my house. I also ran into a data P1 reading problem.

The hardware is on ttyUSB1 and I followed the steps to make a port ttyUSB-P1 but still I do not get any devices in domoticz (v3.8153). So I thought to go back to the source and first check the read-out of the Smartmeter via the USB-P1 cable from Robbshop connected to a Raspberry Pi 2.

I checked it with cu -l /dev/ttyUSB1 -s 9600 -e --parity=even. Smartmeter is a ISKRA MT-382 and also did a check from windows with putty settings 9600, 7,1, even and the result is the same.

eTVE3dR-rvvRg/NoVm6,lYZ2-r-V]Y9RV6vvVV66v6VV%g/Rm6,2mdZr-rVR6m266%!E!%N/Rm6,2mdZr-RR,62-2%!E!%N/Rm6l2mdZrmVrvddZYY2%!E!%N/Rm6l2mdZrm6rV62m622%!E!%NoVm6,lYZr2mvmvvVRg/Rm6,2$2Mvmvvv6-V6%!E%N/Rm6l2-2mvmvvv6mv6%!E%..........................................
every 10 seconds.

I am new to this is some setting wrong or is it a problem with the cable?
adval40
Posts: 14
Joined: Sunday 28 May 2017 18:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11528
Location: Eindhoven (The netherlands)
Contact:

Re: Strange Data P1 Readings.

Post by adval40 »

did you try ?

baudrate 115200
data bits 8
no parity
stopbits 1
harml
Posts: 4
Joined: Wednesday 11 October 2017 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Strange Data P1 Readings.

Post by harml »

As mentioned above I tried with the settings gordonb3 sets in his call but on windows (putty) and direct from the Raspberry Pi console the result is the same. The dots at the end are not shown in the real output but they stand for a bit of the same output as the first two lines. The total output per 10 seconds is 3 to 4 lines.

Settings used:
Baudrate = 9600
Data bits = 7
Parity = Even
Stop bits = 1
harml
Posts: 4
Joined: Wednesday 11 October 2017 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Strange Data P1 Readings.

Post by harml »

Your device receives data but is not in a right format I had the same (Windows and Raspberry the same wrong data)

Look at this page http://www.maartendamen.com/2012/04/new ... er-e06140/ this did the trick for me. Invert one

By changing the setting RxD with the program FT_PROG to invert I receeived the data readable. First tried this on windows with Putty. After that I wasn 't afraid the PI 2 would work too. In Domoticz you will see devices directtly in devices en utilities. The settings that I used for my ISKRA MT-382 are: speed 9600, databits 7, stop bits 1, parity even, flow control none

My cable was on ttyUSB1 but you can also configure a port see: https://www.domoticz.com/wiki/Assign_fi ... o_USB_port
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest