[[Success!]] Dutch Smart meters

Hi all,

New to all this, so please be gentle ;)

I am currently in the process of writing some PHP code that hopefully make OEM/EmonCMS more useful for Dutch users. Since it has recently be decided by our government that everybody should have one in their homes, the coming few years will see a big influx of possible users of EmonCMS (less so of OEM users, I think).

However, one of the demands the government had was that the smart meter had to be user readable, I believe we have some benefit here over other countries where this was not mandatory, but correct me if I am wrong in that department.

This demand resulted in all smartmeters having a so called P1-port, which is a serial port that has the ability to transmit the available data every 5 seconds (available data consists of: High/Low Tarif Import/Export (updated every 5 seconds) and gas usage (updated every hour), sadly the water companies are somehow not involved in all this, alhough technically they could have been.

This is where EmonCMS comes in. My plan is to write a plugin to EmonCMS which is capable of reading the data from the P1-Port, and enter it into EmonCMS. 

Possible blocking issues are:

My very basic knowledge of PHP (hey, that's half the fun, but am more of a perl guy:))

And that's about it. I've been a UNIX sysadmin for almost all of my professional career, so the computer knowledge is there, challenge accepted ;)

 

First steps are taken btw, here is the output of a PHP script that reads and prints the meter output:

/ISk5\2ME382-1003
0-0:96.1.1(XXXXXXXXXXXXXXXXXXXXXXXXXXXX)
1-0:1.8.1(01774.500*kWh)
1-0:1.8.2(01259.416*kWh)
1-0:2.8.1(00443.464*kWh)
1-0:2.8.2(00400.373*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(0000.61*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(XXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
0-1:24.3.0(140315000000)(00)(60)(1)(0-1:24.2.1)(m3)
0-1:24.4.0(1)
!

Definitions of the message: http://goo.gl/MjpuYe (lengthy document, Appendix A contains the definitions)

 

Wish me luck! :)

Hertog's picture

Re: [[Success!]] Dutch Smart meters

Some progress, most of the time is in looking up the PHP equivalent of PHP functions ;).

I now have the needed data in an array that I can use to make calls to EmonCMS. But that's something to figure out tomorrow ;)

Something weird happens now and then though, for some reason the logic can't 'lock in' at the right place in the serial data stream, and the message as send by the smart meter comes in al garbled. I guess I'm trying to read too fast, or something like that.

 

Anyhow, this is what I have to process further and to send via the right API calls to EmonCMS:

Array
(
    [Grid_Import_LowTarif] => 01776.784
    [Grid_Import_HighTarif] => 01259.416
    [Grid_Export_LowTarif] => 00443.464
    [Grid_Export_HighTarif] => 00400.373
    [Actual_Usage_LowTarif] => 0000.68
    [Actual_Usage_HighTarif] => 0000.00
    [ActualTarif] => Low
    [Gas] => 00845.893
)

When submitting to EmonCMS I'll have to do some logic with the Actuall_Tarif to see which of the Actual_Usage_(High|Low)Tarif values I'll send.

Hertog's picture

Re: [[Success!]] Dutch Smart meters

Success!

Although there are still a few kinks to work out (the reader of the serial data loses track now and then) I can now read all the values out of the SmartMeter.

http://emoncms.org/hertog/SmartM

Only the value of the gasmeter (not actual usage, but total usage), high or low tariff and Actual Power Usage are shown in the dashboard above (and the measurements from the EmonTXv3 for comparison).

now some code cleaning is required ;) 

gerbrand's picture

Re: [[Success!]] Dutch Smart meters

Hi Hertog,

your project sounds incredibly interesting. My shipment of emonTx and emonPi are under way and I have requested priority installation of a smart meter. Would you be willing to share your code? How did you interface physically with the smart meter? 

Thanks!
Gerbrand
(based in Amsterdam)

 

fversteegen's picture

Re: [[Success!]] Dutch Smart meters

Really looking forward to your implementation! I do not (yet) have a smartmeter, but I guess it will be just a matter of time before I will.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.