UtilitechAS / amsreader-firmware

ESP8266 and ESP32 compatible firmware to read, interpret and publish data to MQTT from smart electrical meters, both DLMS and DSMR is supported
Other
379 stars 72 forks source link

Unkown data received #813

Closed Th3H0ff closed 2 months ago

Th3H0ff commented 2 months ago

Before I start asking my utility I would really need some input from this forum. I'm using a Wemos D1 mini with a TTL to Mbus converter which is connected to my Kamstrups power meter using the RJ45 type HAN module.

The amsreader telnet debug keep showing (E) Ended up in default case while unwrapping...(tag FF) (W) Unknown data received (V) payload: (V) FF F7 FF FF FF F7 BF FF FF FF FF FF 7F BF EF FF (V) FF FF FF 7F FF FF BF FF FB FF BF FF FB FF FF DF (V) FF FF FF FF FF FB FF FF FF DF FF FF FF FF DF FF (V) FF FF FF FF BF FF FF FF F7 FF FF F7 FF FF FF FF (V) F7 FF FF F7 EF FF 7F F7 FF FF F7 FF F7 FF FF FF (V) FF F7 BF FF FF FF EF FF BF FF EF FF FF FF BF FB (V) 7F

at regular intervals. My utility provider claims they have activated the Han port.

Hardware information:

Relevant firmware information:

ArnieO commented 2 months ago

My best guess is that your M-bus conversion fails.

Some advise:

  1. There are numerous threads here where users (more or less successfully) have set up systems using same or similar hardware. Search in closed threads under Issues. The two common issues seem to be:
    • Inadequate decoupling on the Wemos D1 mini (depends on which version you have)
    • Interfacing issues with the M-bus converter.
  2. The Kamstrup HAN-NVE module (the one you use) is especially difficult to read (compared to meters with built-in HAN-NVE interface) due to its very limited allowed current draw (max 144 mW) from the M-bus signal. It is far easier to read data from the 6-pin plug inside the Kamstrup meter, where data arrives as a 0/3,3V signal. By taking the signal there you avoid the translation to M-bus levels (24/12V; the HAN-NVE module) and back to logic level (your M-bus adapter). Pinout for the 6-pin plug: https://github.com/ArnieO/SmartMeterDocumentation#han-interface-description

PS: If/when you get tired of trying to make it work, we have several Pow-K operational on Åland. The indicators on the map are linked to postal code, not to exact address - so there are more units than the indicators you see on the map: image

https://lectronz.com/products/pow-k-han-port-reader-for-kamstrup-meters https://www.amsleser.no/home/1-41-pow-k-han-port-reader-for-kamstrup-omnipower-meters.html

Th3H0ff commented 2 months ago

First of all. Thank you for the prompt and accurate answer. It was, as they say on LinkedIn, above and beyond. Furthermore. I CANNOT believe this! You are 100% correct. I unlugged the HAN module from the meter and plugged the D1 mini into the data out pin along with ground and...it worked. HAN wen green in the gui right away. Man I spent 50€ on the HAN module, surely 50€ on different mbus-ttl chips and God knows how many hours digging through different threads and I was in the wrong place all along. :) Crazy.

ArnieO commented 2 months ago

First of all. Thank you for the prompt and accurate answer. It was, as they say on LinkedIn, above and beyond. Furthermore. I CANNOT believe this! You are 100% correct. I unplugged the HAN module from the meter and plugged the D1 mini into the data out pin along with ground and...it worked. HAN wen green in the gui right away. Man I spent 50€ on the HAN module, surely 50€ on different mbus-ttl chips and God knows how many hours digging through different threads and I was in the wrong place all along. :) Crazy.

I've been working on this for several years, so this is very familiar stuff - and spent countless hours to construct what is now the Pow-K and the Pow-U.

By the way, you can draw up to 75 mA from the Vcc pin (which is at nominal 4,15V) of the 6-pin connector in the meter. So if you want a solution without external power it is possible to power from the meter - BUT you then need some serious capacitance to support the ESP while it's on Wi-Fi, or else it will reboot regularly. If you overload the Vcc pin too much, it will shut down the port for a few minutes.

Best of luck, and enjoy the firmware!