Giter Club home page Giter Club logo

hass-ams's Introduction

hass-AMS - AMS Reader for Norwegian and Swedish AMS meters

logo

hacs_badge Buy Me A Coffee

Custom component reading AMS through MBus adapter into HomeAssistant. Supports the new energy dashboard in Home-Assistant.

Electricity meter hardware

Works with the following Swedish and Norwegian meters:

Kamstrup:

  • 6861111 tested by janna at homeassistant community forum
  • 6841121 tested by me
  • 6841131
  • 6841138A tested by NilsFA at homeassistant community forum
  • 6851121
  • 6851131

Kaifa:

Norway:

  • MA304H3E Thanks to @thomasja27 for testing ๐Ÿ‘
  • MA105H2E Thanks for confirming: @Futrax

Sweden:

  • MA304H4 Thanks to @runlar for testing (Swedish version) ๐Ÿ‘
  • MA304H4D

Not tested with, but should work:

  • MA304T4
  • MA304T3

Aidon:

Norway:

  • 6525 Thanks to @razzymoose for testing and providing patch ๐Ÿ‘
  • 6515 Thanks to @maxgyver87 for fault finding and testing ๐Ÿ‘
  • 6534 Thanks to @mariwing for testing and debugging ๐Ÿ‘
  • 6483 Thanks @PerBob81 for confirming ๐Ÿ‘

Sweden:

  • 6484 Thanks to @bo1jo for testing and debugging ๐Ÿ‘

Not tested with, but should work:

Norway:

  • 6540
  • 6550

Sweden:

  • 6479

If it does not decode your data, please submit a ticket, and I will try to make a parser for your meter. If your meter type shown "unknown", please submit a ticket, and I will add your meter to the module.

Home-assistant installation

Easiest method is to install via HACS. Then setup via Integrations config.

Or

  1. Copy ams folder into your custom_components folder.
  2. Config by YAML setup or config by integrations in Home-assistant

YAML options

#Serial port example
ams:
  protocol: serial # Required. The Protocol type for communications.
  serial_port: '/dev/ttyUSB0' # Required. The serial port used to communicate through
  baudrate: 2400 # Optional, defaults to '2400'
  parity: 'N'  # Optional, defaults to 'N'
  meter_manufacturer: 'auto' # Optional, defaults to 'auto'
# TCP/IP config example
ams:
  protocol: tcp_ip #Required. The protocol type for communications.
  tcp_host: 192.168.2.11 # Required. The transmitting host address.
  tcp_port: 8900 #Required. The transmitting host port.
  meter_manufacturer: 'kamstrup' # Optional, defaults to 'auto'

All options:

protocol: Options are 'tcp_ip' or 'serial' This is option is required.
serial_port: Input your serial port to communicate through. Required if 'serial' is selected for 'protocol'.
baudrate: Input a custom baudrate. Default is 2400. This option in optional.
parity: Input a custom parity option. Default is 'N'. See https://github.com/pyserial/pyserial/blob/master/serial/serialutil.py#L79
tcp_host: Ip adress to host of meter data. Required if 'tcp_ip' is selected
tcp_port: Port at host of meter data. Required if 'tcp_ip' is selected.
meter_manufacturer: Set the meter manufacturer if 'auto' fails. This option is optional.

For meter_manufacturer values the options are:

'auto' # This is default if nothing is specified.
'aidon'
'aidon_se' # Swedish aidon meter RF2 modules
'kamstrup'
'kaifa'
'kaifa_se' # Swedish kaifa meters

This will create sensors for each of the available usage data in the meter. The accumulative sensors will only be fully available after first read, and is transmitted from the meter 5 seconds past the hour. There seems to be a bug in the current Kamstrup firmware that the hour package is transmitted at xx:xx:55.

MBus interface hardware

Known working modules

Known NOT working modules

Technical documentation

Latest information about OBIS for all the Norwegian meters: https://www.nek.no/info-ams-han-utviklere/

Latest information about Swedish standard for AMS: https://www.energiforetagen.se/globalassets/energiforetagen/det-erbjuder-vi/kurser-och-konferenser/elnat/branschrekommendation-lokalt-granssnitt-v2_0-201912.pdf

Feedback

Improvements and suggestions are also welcome. Keep in mind, I am not a experienced programmer :) Enjoy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.