ParseP1

Basic parser for P1 Companion Standard used by Dutch Smart Meters.

Library is by no means complete (yet), it is now implemented only on one real example of a so called Dutch smart meter, in this case a Iskra MT382.

Example of P1 data

/ABc1\\1AB123-4567

0-0:96.1.1(1A123456789012345678901234567890)  
1-0:1.8.1(00136.787*kWh)  
1-0:1.8.2(00131.849*kWh)  
1-0:2.8.1(00000.000*kWh)  
1-0:2.8.2(00000.000*kWh)  
0-0:96.14.0(0002)  
1-0:1.7.0(0003.20*kW)  
1-0:2.7.0(0000.00*kW)  
0-0:17.0.0(0999.00*kW)  
0-0:96.3.10(1)  
0-0:96.13.1()  
0-0:96.13.0()  
0-1:24.1.0(3)  
0-1:96.1.0(1234567890123456789012345678901234)  
0-1:24.3.0(120502150000)(00)(60)(1)(0-1:24.2.1)(m3)  
(00092.112)  
0-1:24.4.0(1)  
!

Usage

p1 = ParseP1::Base.new(p1_string)

p1.electra_meter_id                                  #-> 1A123456789012345678901234567890
p1.electricity(:type => :import, :tariff => :normal) #-> 116.34 (kWH)
p1.electricity(:type => :import, :actual => :true)   #-> 1245   (watt)

or with the direct methods: electra_import_normal, electra_import_low, electra_export_normal and electra_export_low

and for gas:

p1.gas_usage                                         #-> 91.224 (m3)

See tests for futher available methods

Running tests

First install libraries with: <pre> bundle </pre>

Test with <pre> bundle exec rake test </pre> or <pre> bundle exec guard </pre>

Caveats

Documentation

See Datalogging van “slimme meters” in Dutch

See P1 Companion Standard Version 2.2 April 18th 2008 from Enbin (also in docs directory)

See Representation of P1 telegram P1 Companion Standard Version 4.0 from Netbeheer Nederland (also in docs directory)

Contributing to ParseP1

Copyright

Copyright © 2012 Frank Oxener - Agile Dovadi BV. See LICENSE.txt for further details.