Coder Social home page Coder Social logo

raspberry-mh_z19's Introduction

raspberry-mh_z19

For more information,please visit https://qiita.com/revsystem/items/76ab1e21d386c5977892 (in Japanese.)

Raspberry Pi and mh_z19 connection diagram

Raspberry Pi

Raspberry Pi config

sudo raspi-config

5 Interfacing Option -> P6 Serial

Would you like a login shell to be accessible over serial?

-> No

Would you like the serial port hardware to be enabled?

-> Yes

install mh-z19 library

sudo pip3 install mh-z19
sudo apt-get install jq ruby

mh_z19 command

You can get CO2 value with below command.

sudo python3 -m mh_z19
{"co2": 398}
sudo python3 -m mh_z19  --all
{"co2": 383, "temperature": 26, "TT": 66, "SS": 0, "UhUl": 0}

Example of mackerel-agent.conf

[plugin.metrics.co2]
command = "ruby /home/pi/mackerel/mh_z19_monitoring.rb"
env = { MONITOR = "co2" }

[plugin.metrics.temp]
command = "ruby /home/pi/mackerel/mh_z19_monitoring.rb"
env = { MONITOR = "temperature" }

reference

command reference: https://pypi.org/project/mh-z19/

Calibration reference: https://github.com/UedaTakeyuki/mh-z19/wiki/CALIBRATION-&-detection-range

raspberry-mh_z19's People

Contributors

revsystem avatar

Stargazers

 avatar

Watchers

 avatar  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.