I need a general description of how smart meter decoding works #23258
-
Hello. I don't fully understand how the decoding of a frame of data from a smart meter works. I have build an interface to read data from a kaifa smart meter that delivers a new packet every 10 seconds. The data doesn't seem to be standard obis but a variation of that. When looking at the recieved data in hex i know where all information is. So I have set up the decoding i raw binary and using pattern match I can extract the data I want. The thing I don't understand is how does tasmota smart meter interface determine when the serial packet from the smart meter is complete? And how can I in a script know when the packet decoding is complete so I know that a new packet has arrived and do some calculation on the new data or send new telemetry packet out? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
in raw mode data is shifted into the serial buffer, so the buffer should be at least the size of the packet. |
Beta Was this translation helpful? Give feedback.
-
pm(r30344834) (pattern match) |
Beta Was this translation helpful? Give feedback.
pm(r30344834) (pattern match)
is not recommended here, because it searched the complete buffer.
simply use the pattern itself e.g.
1,30344834x65UUuuUUuu@1,Total Effekt,Wh,Wh,0