Skip to content

kjetilrong/AmsToMqttBridge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMS <-> MQTT Bridge

Personal fork for Stedy. Intended to use with Home Assistant and a BKK AMS.

This project may help you build your own reader for HAN data streamed from the new AMS electrical meters installed in Norway in 2017/2018. Data is read using an Arduino-programmed ESP8266 (in an ESP12 module from AI Thinker), then pushed to MQTT over WiFi. You can have full control over this data, and you can basically do anything with it.

This project does not include any fancy UI setup or even storage for the AMS data.

Building this project will require some skills in ordering and assembling electronic circuits as well as programming, and I have not included detailed instructions to take a beginner through the steps. I still hope some still find information here useful, maybe also for other projects.

The completed hardware

The HAN Reader Hardware

The completed board mounted in a 3D printed enclosure

The HAN Reader Installed

...installed with the electrical meter...

Data from MQTT displayed on a Node Red Dashboard

...and, showing data on a Node Red dashboard

Background

The purpose of this project is to collect information and build a simplified bridge for reading serial DLSM/M-bus information from electrical power meters (AMS), provided over the HAN port, and publishing to some IoT friendly target.

Components will be ESP8622, Arduino code and an M-bus <-> 3.3V serial interface

As a start, we should try to get information from the three types of AMS meters currently being installed in Norway. Some details about these are available here: NVE_Info_kunder_HANgrensesnitt.pdf

Quite some work was put into parse and guess how the data protocol was defined. Unfortunately, I did not have access to the (rather expensive) standardization documentation, but with some collaborative effort we solved most details.

This project includes

The completed project also includes:

  • Boot as Access Point and web server to allow config from a web browser. This allows you to set SSID, password, MQTT server and port, as well as topics for publish and subscribe
  • On-board temperature sensor, also reported in json to MQTT

Electrical design

The most recent design uses an ESP8266 in an ESP12 module from AI Thinker for micro processing and the TSS721 from Texas Instruments for level conversion from M-Bus to TTL (3.3V). An earlier design solved the level conversion using an op-amp, which might be an easier and more available solution, but also more error-prone. See more details in electrical design.

About

Minimalistic system to read AMS/HAN data from electrical meter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 80.1%
  • C# 18.7%
  • Other 1.2%