GithubHelp home page GithubHelp logo

unyacat / mh-z14a-webui Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.17 MB

NDIRCO2センサー MH-Z14A と Flask を利用した定期的な計測および簡易的な WebUI

Python 41.97% JavaScript 6.59% HTML 9.05% Vue 42.39%
mh-z14a co2monitor co2

mh-z14a-webui's Introduction

MH-Z14A-WebUI

NDIRCO2センサー MH-Z14A と Flask を利用した定期的な計測および簡易的な WebUI

サンプル

デフォルトで常に 5 分ごとに記録され,WebUI では 10 秒ごとに数値のみを更新,5分おきにグラフを更新します.

動作確認済み環境

  • NanoPi NEO2
  • MH-Z14A

準備

NanoPi から MH-Z14A の値を取れるように接続・設定する

実行

  1. $ pip install -r requirements.txt
  2. $ python3 app.py
  3. http://localhost:5000 を開く

API / Grafana との連携

JSON形式で取得する

  • 今の値: /api/now
  • 過去 24 時間: /api/day

Grafana との連携

Grafana に marcusolsson-json-datasource 等のJSONを読めるプラグインを導入することで描画させることができます.

marcusolsson-json-datasource の場合

  • <サーバーIP>/api/day を指定.
  • $[*].created_at$[*].ppm を軸に指定.それぞれ Time, Number とする.
  • Panel タブの Axes から Left Y の Unit を parts-per-million(ppm) にすることで正しい単位系になる. image

mh-z14a-webui's People

Contributors

unyacat avatar

Watchers

 avatar

mh-z14a-webui's Issues

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.