Coder Social home page Coder Social logo

home-assistant-sensor-mc66c's Introduction

I no longer own this device.

I'm happy to accepts PR's, but I won't be able to develop and test changes myself. If you want to take over the development, let me know.


Intro

This is a custom component for Home Assistant to get the readings from a Kamstrup Multical 66C meter.

Dashboard group

According to the docs (attached) this might also work on the 66D and 66E versions. I was not able to test this, in case you've got one of these meters and want to give it a try, I would like to hear back from you. For more technical details about the communication with the meter, you might want to check out pages 33-36. I also found page 9 with the units interesting.

Requirements

To use this component, you'll need a cable with an IR read/write head and connect your machine running Home Assistant directly to the IR sensor of the Kamstrup Multical 66C meter. For me, this USB-cable from Ebay worked perfectly. The one from Volkszaehler.org seems also to work fine, but might be harder to get, though the PCB schematics looks to be available under an open source hardware license from https://github.com/Hal9k-dk/kamstrup (plus BOM and more info on http://wiki.hal9k.dk/projects/kamstrup).

Installation

There are a few ways you can install this custom component into your Home Assistant. A solution I quite often see, is to manually copy all the files from custom_components/mc66c/ folder to your <home_assistant_path>/config/custom_components/mc66c/

A better way would be to check out this git repository in your Home Assistant. eg. into a folder called external. So <home_assistant_path>/config/external and then create a symbolic link for the custom component:

cd <home_assistant_path>/config/custom_components
ln -s ../external/Home-Assistant-Sensor-MC66C/custom_components/mc66c mc66c

Doing this allows you to update the files easily from this repo.

cd <home_assistant_path>/external/Home-Assistant-Sensor-MC66C
git pull

Configuration

Also, there are many ways to add this sensor to your configuration. You can add the bellow sensor and (optional) group from the example below directly to your configuration.yaml file. The way I prefer doing this is making use of the packages approach. In that case you could use the following configuration in <home_assistant_path>/packages/stadsverwarming.yaml

sensor:
  - platform: mc66c
    name: Stadsverwarming
    port: /dev/ttyUSB1
    scan_interval: 30
    resources:
      - energy
      - volume
      - op_hrs
      - temperature_in
      - temperature_out
      - temperature_diff
      - power
      - flow
      - peak_power

group:
  mc66c:
    name: Stadsverwarming meter
    entities:
      - sensor.stadsverwarming_energy
      - sensor.stadsverwarming_volume
      - sensor.stadsverwarming_operating_hours
      - sensor.stadsverwarming_temperature_in
      - sensor.stadsverwarming_temperature_out
      - sensor.stadsverwarming_temperature_difference
      - sensor.stadsverwarming_power
      - sensor.stadsverwarming_peak_power
      - sensor.stadsverwarming_flow

Configuration variables

This component has the following configuration variables:

platform: mc66c

This is required, to use this platform for the sensor. You can't change this.

name: Stadsverwarming

This is optional, the name will be used to prefix the sensors, mc66c will be used if the name is specified.

port: /dev/ttyUSB1

This is required, the port that has the IR cable, note if you use docker, that you have to expose this device to the container.

scan_interval: 30

This is optional, the seconds that the sensor will check for updates, 30 is the default.

resources: list

This is optional, however an empty list (the default) will result in no sensors being created. Only the sensors that are being listed will be created. Possible values are:

  • energy - Energy usage in GJ
  • volume - Volume in M3
  • op_hrs - Operating hours, using unit hrs
  • temperature_in - Temperature in, in °C
  • temperature_out - Temperature out in °C
  • temperature_diff - difference in temperatures in °C
  • power - Power usage in kW
  • peak_power - Peak power in kWp

Logging

logger:
  logs:
    custom_components.mc66c: info

Feedback

If you're facing any issues or have feedback or a request, feel free to raise an issue and I'll see what I can do. I've to admit I'm not very familiar with python, however, I'll try my best to make this component work for everyone. I'm also happy to accept any PR with fixes/improvements.

Thank you!

Jurgen on Tweakers, pointing out the cable needed for this to project to work.

@RuntimeError123 for his integration using MQTT, it helped me a lot setting up this custom component. If you're looking for a solution where the cable and Home Assistant are not running on the same machine, I recommend using his implementation.

home-assistant-sensor-mc66c's People

Contributors

golles avatar hedda avatar

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.