diff --git a/Smart-Meter-Interface.md b/Smart-Meter-Interface.md index dc78ca93..de7117b1 100644 --- a/Smart-Meter-Interface.md +++ b/Smart-Meter-Interface.md @@ -37,11 +37,16 @@ next is defining the type of interface for each meter, seperated by commas - `+1` adds the meter number 1 - the source GPIO pin of signal => here 3 => RX pin -- the type of meter => `o`=obis ASCI type of coding, `s`=sml binary smart message coding, `c`=counter type, `e`=ebus binary coding, `r`=raw binary coding (any binary telegram). +- the type of meter => `o`=obis ASCI type of coding, `s`=sml binary smart message coding, `c`=counter type, `e`=ebus binary coding, `m`=modbus binary coding,`r`=raw binary coding (any binary telegram). - flag => 0=counter without pullup, 1=with pullup - parameter => on `o,s,e,r` type serial baud rate, on type `c` positive value means counter poll interval, negative value irq driven counters with this debounce time (milliseconds) - MQTT JSON prefix up to 7 chars,this prefix is also shown in WEBUI +- in case of interactive telegram comma separated +**e.g. +1,3,m,0,9600,MODBUS,1,1,01040000,01040002,01040004,01040006,01040008,0104000a,0104000c,0104000e,01040010** +- GPIO pin of transmit signal +- timeframe in 250 ms steps +- comma separated hex coded byte blocks to send to meter device, every n*250 ms, in case of modbus each block is a command to retrieve a certain register of the meter the list of meter entries start with the meter number to which this decoder belongs. (up to 16 entries, #define MAX_VARS 16) @@ -51,8 +56,9 @@ the list of meter entries start with the meter number to which this decoder belo - then until `@` char => sequence to decode OBIS as ASCI, or SML, EBUS, RAW as HEX ASCI OBIS: asci OBIS code until the `(` char which indicates the start of the meter value SML: SML binary OBIS as hex until FF indicating start of SML coded value -EBUS,RAW: hex values of EBUS,RAW block to compare `xx` means ignore value, `ss` = extract this signed byte, `uu` = extract this unsigned byte, `uuuu` = extract this unsigned word, `ssss` = extract this signed word. -decoding a bit as 0,1 is done after the `@` sign with `bx:` x=0...7 extracting the corresponding bit from a byte. e.g. 1,xxxx5017xxuu@b0:1,Solarpumpe,,Solarpump,0 extracts bit zero +EBUS,RAW: hex values of EBUS,RAW block to compare `xx` means ignore value, `ss` = extract this signed byte, `uu` = extract this unsigned byte, `uuuu` = extract this unsigned word, `ssss` = extract this signed word, `ffffffff` = extract this float value. +decoding a bit as 0,1 is done after the `@` sign with `bx:` x=0...7 extracting the corresponding bit from a byte. e.g. 1,xxxx5017xxuu@b0:1,Solarpumpe,,Solarpump,0 extracts bit zero +in case of modbus an ix: designates the index x (0...n) referring to the demanded block in the transmit section of the meter define line. (e.g. 1,010404ffffffffxxxx@i0:1,Voltage P1,V,Voltage_P1,2) - scaling factor (divisor) (may also be negative or smaller then zero e.g. 0.1 => result * 10) when decoding a string result (e.g. meter serial) put a # char here (only in one line per meter) after the # char you need a termination char at OBIS a `)`