Code Monkey home page Code Monkey logo

gmc3xx's Introduction

GQ Radiation Monitor addon for Homeassistant

This is adding a GQ GMC-320 (and GMC-300+, ...) radiation monitor to homeassistant. It should work with other devices from the same manufacturer.

The device is attached to the HA machine via a USB port, where it will appear as a USB serial device. The code then queries the monitor on a regular period and publishes the returned data to the HA API. The baud rate on the monitor should ideally be set to 115200. Make sure the config on the device is set to the same baud rate configured in the addon configuration.

Building / Installation

This HA addon will automatically add the build tools, download the latest source, compile, install and run the gmc3xx application on the local HA machine.

System Dependencies

None

Addon Configuration

You need to specify the server, user and password for the MQTT broker. A user-name and password is mandatory. The server defaults to localhost:1883.

Note: There is no parameter checking, so if you get anything wrong the add-on will not start.

Sensor usage

You can add the following to your ESPHome device yaml changing the unit serial number to match the one returned by your device (this is reported in the logs). That way you can have a display showing the CPM value.

sensor:
  - platform: homeassistant
    id: cpm
    entity_id: sensor.gmc3xx_f4880a454eb9

The sensor state will be updated every 60 seconds (or whatever you set the repeat option to). The cpm value (state) is probably the only one most people need, the rest are there just because they are reported back by the hardware. The full state content will be in the format:

{
  "state" : 26, // cpm
  "attributes": {
    "unit_of_measurement" : "cpm", // unit of measurement
    "version" : "GMC-300Re 4.15", // version of the device
    "serial" : "f4880a454eb9", // serial number of the device
    "temp" : 0.0, // temperature
    "volt" : 4.0, // battery voltage
    "x" : 0, // gyro X
    "y" : 43520, // gyro Y
    "z" : 256 // gyro Z
  }
}

Then simply use the value like id(cpm).state in your config.

Running

The application will automatically run if a GQ radiation monitor is attached via serial USB serial port and a configured MQTT broker is available. The GQ radiation monitor is polled every 60 seconds unless the "repeat" option is changed.

gmc3xx's People

Contributors

gi1mic avatar rk-exxec avatar alex-vg avatar

Stargazers

 avatar  avatar

Watchers

 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.