ruudverheijden / node-p1-reader

Node.js package for reading and parsing data from the P1 port of a Dutch or Belgian Smart Meter.
MIT License
25 stars 25 forks source link

startOfFailure #2

Closed timoline closed 7 years ago

timoline commented 7 years ago

Just a simple Feature Request. If you know the endOfFailure and the duration, it is possible to calculate the startOfFailure :-)

        "longPowerFailureLog": {
            "count": 2,
            "log": [
                {
                    "endOfFailure": "2010-12-08T14:24:15.000Z",
                    "duration": 240,
                    "unit": "s"
                },
                {
                    "endOfFailure": "2010-12-08T14:10:04.000Z",
                    "duration": 301,
                    "unit": "s"
                }
            ]
        },
ruudverheijden commented 7 years ago

Sounds like a good addition! I can add by the end of the week. Or you can submit a PR ;)

timoline commented 7 years ago

Thanx, I will, but first i have to rebuild my scripts with your great p1 module :-)

ruudverheijden commented 7 years ago

The feature has been added in version 1.4.0, which is now released.

timoline commented 7 years ago

great thx