No P1 gas usage read by Domoticz

Moderator: leecollings

Sarion
Posts: 7
Joined: Monday 14 December 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

No P1 gas usage read by Domoticz

Post by Sarion »

Hi guys,

I hope you can help me get my gas meter readings in Domoticz.
I have a raspberry pi running a fresh install of Domoticz (2.3530), with a P1 converter cable from SmartMeterDashboard. Also using an RFXcom.

The P1 meter is shown under Hardware, and the power and gas meters are shown, and used, in Devices.

The power readings are coming through nicely, but for gas this always shows 0.

If I run "cu -l /dev/ttyUSB1 -s 9600 --parity=none" (thanks to http://gejanssen.com/howto/Slimme-meter-uitlezen/), I get the following output:

/KMP5 ZABF001551772711

0-0:96.1.1(205A4142463030313531373732373131)
1-0:1.8.1(05080.475*kWh)
1-0:1.8.2(05008.385*kWh)
1-0:2.8.1(00000.000*kWh)
1-0:2.8.2(00000.000*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(0000.68*kW)
1-0:2.7.0(0000.00*kW)
0-0:96.13.1()
0-0:96.13.0()
0-2:24.1.0(3)
0-2:96.1.0(3238313031353431303037313632343132)
0-2:24.3.0(160117120000)(00)(60)(1)(0-2:24.2.1)(m3)
(02025.003)
!

It seems to me that Domoticz should be showing the gas meter registering 2025 m3 of gas, per the last rule of the output above.

Any ideas on what is going wrong?

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

Re: No P1 gas usage read by Domoticz

Post by gizmocuz »

Could be the software in your smart meter is bad (known problem, also posted here on the forum)
The gas meter is stopped at 1 jan 2016 duo a possible millennium bug
New software started rolling out since Friday evening, already received mine, and working good again
it will take 2 weeks before the meters affected (400.000) are all upgraded

In case you just connected it, then it could also be that you have to wait some hours
Quality outlives Quantity!
marcelr
Posts: 42
Joined: Friday 22 May 2015 21:10
Target OS: Linux
Domoticz version: svn 2470
Location: Ehv, NL
Contact:

Re: No P1 gas usage read by Domoticz

Post by marcelr »

It's not the millenium bug. This is a Kamstrup meter, which doesn't have the issue.

grtz,

marcelr
jovo
Posts: 15
Joined: Thursday 12 March 2015 16:57
Target OS: Linux
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by jovo »

I bought the same cable also this week.
Mine is working fine, but I have a Landis+Gyr smartmeter.
I connect it over ser2net to a remote P1 LAN domoticz (ver 3784).
Sarion
Posts: 7
Joined: Monday 14 December 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by Sarion »

gizmocuz wrote:Could be the software in your smart meter is bad (known problem, also posted here on the forum)
The gas meter is stopped at 1 jan 2016 duo a possible millennium bug
New software started rolling out since Friday evening, already received mine, and working good again
it will take 2 weeks before the meters affected (400.000) are all upgraded

In case you just connected it, then it could also be that you have to wait some hours
It was connected earlier in the week, so that should not be the issue.

The output from the P1 is now giving me in the last line
0-2:24.3.0(160117170000)(00)(60)(1)(0-2:24.2.1)(m3)
(02026.175)

So the P1 seems to be working fine, as it appears to show a higher gas meter reading than earlier in the day. But Domoticz still shows 0.000 for gas. Any ideas?
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: No P1 gas usage read by Domoticz

Post by Derik »

From 22.00 yesterday.....


My P1 gas is running again... :-)
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Sarion
Posts: 7
Joined: Monday 14 December 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by Sarion »

Good, Derik!

No such luck here though: 0.000 :-(
Sarion
Posts: 7
Joined: Monday 14 December 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by Sarion »

In fact, it has gotten a bit worse. The Power meter says it received the last data at 12:00 hrs today, almost 7 hours ago. But if I run cu as above, I get updates every 12 secs or so.

Does anyone know what could be going wrong here?
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: No P1 gas usage read by Domoticz

Post by Derik »

The counter is working...
Only give no output:
.
ScreenShot025.jpg
ScreenShot025.jpg (35.27 KiB) Viewed 4320 times
My counter... is give this output after all these days
So do not worry..
You must pay......... :roll: :roll: :roll:
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
NLRad
Posts: 13
Joined: Sunday 20 December 2015 15:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by NLRad »

I have the same experience as Sarion.
I posted about it in this thread:
viewtopic.php?f=14&t=6511&p=72379#p72161

I did some analysis and proposed a solution, but no reactions yet. The gas meter and cable return correct values, but in the sourcecode is being matched against a different string in the output of the serial port.

Anybody who can help us with this issue?
paulvha
Posts: 40
Joined: Friday 29 January 2016 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: No P1 gas usage read by Domoticz

Post by paulvha »

I did a lot work on the smartmeter before looking at Domoticz. I wrote program in Python to read and parse, copy to OneDrive, read in Access and make visible in Excell + developed my own cable to read the P1 meter for a fraction of the cost of the available cables. Domoticz however provides an interesting way to combine different controllers and make the usage easier visible. I have been spending a couple weeks to understand the flow and source code. (Compliments to the creators !) and now working to add Zwave and X10 controller.

The code for parsing the P1 meter ( P1MeterBase.cpp) has its limitations. It assumes a certain amount of output (which varies a lot by smartmeter) and it does not check for the correct checksum that is sent right after the '!' character.

I saw the print-out of your meter. Is it correct that your GAS total is starting on a single line, or should I read that as being appended to the line above?
The OBIS code : 0-2:24.3.0 provides generic information about the Meter (device on MBus)
The OBIS code: (0-2:24.2.1) provide the value /counter of your meter.

if you can provide more clarity, I can see what i can do to help. It might require a recompile but that is easy..

Paul
NLRad
Posts: 13
Joined: Sunday 20 December 2015 15:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by NLRad »

paulvha wrote:I did a lot work on the smartmeter before looking at Domoticz. I wrote program in Python to read and parse, copy to OneDrive, read in Access and make visible in Excell + developed my own cable to read the P1 meter for a fraction of the cost of the available cables. Domoticz however provides an interesting way to combine different controllers and make the usage easier visible. I have been spending a couple weeks to understand the flow and source code. (Compliments to the creators !) and now working to add Zwave and X10 controller.

The code for parsing the P1 meter ( P1MeterBase.cpp) has its limitations. It assumes a certain amount of output (which varies a lot by smartmeter) and it does not check for the correct checksum that is sent right after the '!' character.

I saw the print-out of your meter. Is it correct that your GAS total is starting on a single line, or should I read that as being appended to the line above?
The OBIS code : 0-2:24.3.0 provides generic information about the Meter (device on MBus)
The OBIS code: (0-2:24.2.1) provide the value /counter of your meter.

if you can provide more clarity, I can see what i can do to help. It might require a recompile but that is easy..

Paul
Hi Paul, well executing

Code: Select all

cu -l /dev/ttyUSB1 -s 9600 --parity=none
gives exactly this dump:

Code: Select all

/KMP5 ZABF001521498011

0-0:96.1.1(205A414246303031353231343938303131)
1-0:1.8.1(23373.347*kWh)
1-0:1.8.2(16380.484*kWh)
1-0:2.8.1(00000.000*kWh)
1-0:2.8.2(00000.000*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(0001.20*kW)
1-0:2.7.0(0000.00*kW)
0-0:96.13.1()
0-0:96.13.0()
0-2:24.1.0(3)
0-2:96.1.0(3238313031353431303034333539373131)
0-2:24.3.0(160129230000)(00)(60)(1)(0-2:24.2.1)(m3)
(09871.759)
!
So the gas value seems to be on the line below the OBIS code. Somehow strange as all the other OBIS codes start at the beginning of aline. But in other posts I've seen the same thing.

And a recompile would be great. Again, I'm a total newbie on compiling and stuff; I'm happy when I get things working via install-packages.
paulvha
Posts: 40
Joined: Friday 29 January 2016 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: No P1 gas usage read by Domoticz

Post by paulvha »

the real issue is the OBIS code mismatch. In P1MeterBase.cpp the OBIS code expected for the GAS timestamp line is 0-1:24.3.0 and not 0-2:24.3.0 The 3rd character is expected to be a '1' instead of a '2' what your meter is providing. I did a test with your data and changed the line:
#define P1PGTS 0-1:24.3.0 =====> #define P1PGTS 0-2:24.3.0
recompiled Domotticz and then it all worked fine and picked up the gas value
paulvha
Posts: 40
Joined: Friday 29 January 2016 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: No P1 gas usage read by Domoticz

Post by paulvha »

I had to look up the reason for the 2 instead of 1 : if more than one object is instantiated in the same physical device, the value group B shall
number the measurement or communication channels as appropriate, from 1...64. Seems your installation (Gas meter) is having more then one object. BUT it could still be related to the firmware issue that started begin January (as that seems to be applicable to some Landis+GYR as well)
Sarion
Posts: 7
Joined: Monday 14 December 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by Sarion »

Great work. Is this something that Domoticz is supposed to pick up, but there is something going wrong there? Or is this a new phenomenon since the January bug in the meters?

What direction should we be looking for a solution? I don't know how to recompile, but if you could point me in the right direction, I could try and fix the issue myself.

Or should the developer adjust the code and bring out an update?
User avatar
gizmocuz
Posts: 2363
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: No P1 gas usage read by Domoticz

Post by gizmocuz »

Please check beta version #4349

Added support for this new timestamp, but as Paulvha said, maybe the class has to be rewritten
Quality outlives Quantity!
Sarion
Posts: 7
Joined: Monday 14 December 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by Sarion »

It`s working! Thanks very much for all your efforts! :-)
NLRad
Posts: 13
Joined: Sunday 20 December 2015 15:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by NLRad »

Good to hear that is working!

But, I can only find a windows install-package for beta version #4349.
Can anyone help me to get a install-package for my RaspberryPI? Or can I update it from the commandline?
Any help appreciated.
User avatar
gizmocuz
Posts: 2363
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: No P1 gas usage read by Domoticz

Post by gizmocuz »

for the raspberry pi this is on explained on the wiki, but here it goes

In the settings, set the release channel to beta, then from the setup menu issue -> check for update
If that does not work

Login with SSH with the 'pi' user

cd domoticz
./updatebeta
Quality outlives Quantity!
NLRad
Posts: 13
Joined: Sunday 20 December 2015 15:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: No P1 gas usage read by Domoticz

Post by NLRad »

Thnx, I will give it a try!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest