Smart Meter Interface only provides garbage on serial from P1 port #22348
-
I put together a test gear for reading our new smart meter, a Sagemcom MA105 (single phase). I hooked the P1 port output to GPIO21, configured the meter and a single metric for tests using the following script:
But whatever config I try to change, I only get garbage:
What could be the problem? I used direct connection without inverter for the port, since to the best of my knowledge, the Smart Meter Interface inverts the P1 serial output signal on its own. Is that true? I also tried GPIO3 (HW serial) with the same results. Using the new port serial signal inversion feature of 14.3.0 ( Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
What is your serial config and baudrate? |
Beta Was this translation helpful? Give feedback.
-
It seems I still need the inverter hardware. I've built the simple transistor-based one and now I get meaningful values over the P1 port. It's a shame, though, as the ESP32 is capable of using inverted HW serial and SW serial could also be programmed so. I've noticed 2 weird things, though.
|
Beta Was this translation helpful? Give feedback.
-
For whomever wanders around here by means of searching for info. The signal inverting hardware is NOT needed, at least as of 14.3.0 and ESP32 (possibly works for other versions and ESP826x, but I haven't tried that). Simply add a line before the metrics definitions that contains I don't receive occasional garbage using this method. Now I just directly connect GND, output enable and the data line to the board (I'm not powering the ESP32 from the P1 port). All on 3.3V, I don't connect 5V to the output enable on the P1 port. The power factor being a weirdly high value when exporting remains a mystery. |
Beta Was this translation helpful? Give feedback.
For whomever wanders around here by means of searching for info. The signal inverting hardware is NOT needed, at least as of 14.3.0 and ESP32 (possibly works for other versions and ESP826x, but I haven't tried that). Simply add a line before the metrics definitions that contains
1,=so2,4
. This inverts the HW serial input on GPIO3. It's documented in the special commands section but it escaped my attention earlier.I don't receive occasional garbage using this method. Now I just directly connect GND, output enable and the data line to the board (I'm not powering the ESP32 from the P1 port). All on 3.3V, I don't connect 5V to the output enable on the P1 port.
The power factor being a weirdl…