Module homie-p1.parser

P1 smartmeter datagram parser (DSMR).

Functions

P1Parser:push_line (line) Line-by-line parser function.
new ([opts={}]) Creates a new parser object.


Functions

P1Parser:push_line (line)
Line-by-line parser function. Lines must be fed in line by line. Lines will be buffered until the datagram is complete.

Parameters:

  • line string read from the P1 port

Returns:

    table parsed datagram or nil+error. If the error is "incomplete" then more lines are needed to complete the datagram.
new ([opts={}])
Creates a new parser object.

Parameters:

  • opts table table with options (none supported for now) (default {})

Returns:

    P1Parser the parser object
generated by LDoc 1.4.6 Last updated 2023-01-05 15:41:28