GithubHelp home page GithubHelp logo

maizy / ambient7 Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 2.0 924 KB

Tools for home climate monitoring

License: Apache License 2.0

Scala 83.15% Shell 3.35% Python 6.48% Dockerfile 0.71% C++ 6.14% C 0.18%
influxdb mt8057 react scala

ambient7's People

Contributors

maizy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

melfa sidarali

ambient7's Issues

influxdb dockerfile & setup scripts

  • console writer logs ➡️ influxdb line protocol converter
  • setup scripts
    • create db
    • write data
    • clean data
    • retention policy & continious querie -> extracted to #11
  • dockerfile
  • update readme
    • rus
    • eng

web ui: foundation, co2 daily report

  • foundation
    • transpelling es2015
    • gulp build
    • live dev server
    • css minification
    • js minification
    • less
    • es2015 import support
    • react setup
    • linter
    • immutable js
    • other react tools & libs if required
    • build into web-app assets => #31
  • co2 levels report
    • js graph lib
    • bar chart
    • -by week pagination- => until date + interval picker
    • -hourly reload-
  • device info backend
  • test browser support
    • latest chrome
    • latest firefox
    • latest safari

blocked by #19

universal config

=> #36

  • universal config parsing

    • pluggable parsers
    • hocon config parser
    • cli ops parser
    • options checks
    • options postprocessors
    • cli ops overwrite config opts
  • influxdb config (ro, rw)

  • devices config

    • selected device
  • db config

  • agent support

    • optional --config + --agent-id params
    • use influxdb config
  • analysis

    • use influxdb config
    • use db config
    • use devices config
  • webapp

    • use db config
    • use devices config
  • add config examples to README

  • fix launch instructions

try usb4java

Problems with libusb:

  • unable to claim device because of dump kernel driver in OS X for unknown usb devices

analysis: notification

user story: send slack notification if co2 level increased for N minutes

#38


  • config
    • config structure
      • by device config
      • separate actions config
    • config parsing (hocon only)
      • refresh rate
      • actions
      • device watchers
  • device description
    • read from config
    • display in webapp
  • influxdb client
    • add async future based api (mt8057 agent migration will be in #39)
  • buffer
    • data request using an influxdb client with data mapping
    • co2 - ppm
    • temp - celsius
    • availability - based on co2 / temp values
    • request window size calculation
      • first run value (now - X seconds, where X = max(all watchers requirements))
      • based on the last requested date
      • small shift to past (Y seconds)
      • upper limit (equals to start value ❓ )
      • end value = now (or now - Z seconds ❓ )
  • watchers (event publishers)
    • co2 level
    • availability
    • helper: window size + notify after + resolve after
  • events
    • available
    • unavailable
    • co2 level changed
    • temp
    • detected watched events by event uid
  • actions (events subscribers)
    • cli
    • slack
      • configs
    • in memory log + web api (json + plain text)

db: upgrade to influxdb 1.1

agent: hid4java implementation

  • scala prototype version
  • thread sync
    • hid4java used separate thread for usb events. Sync with main agent thread needed.
    • access to usb device in wrong thread cause jvm crash in native code call (on os x)
  • connection wait loop
  • disconnect & reconnect handling
  • listen loop
  • safety close device
  • check on linux / os x

arduino: offline version

  • ONLINE/OFFLINE flag
  • post formatted data to serial port
  • python script to read serial port
  • post data to influxdb

web-app: unittests

  • infrastructure
    • test config
    • in mem db
  • device by id
  • device list
  • co2 report by hour
  • co2 report by day

analysis: aggregate hourly co2 levels

  • foundation
    • app structure
    • embeded db
    • scheme migration
    • app opts
    • commands
    • reports
    • logging
  • influxdb http client
    • build request
    • parse results
  • aggregate implementation
    • find start date from influxdb
    • find start date from db
    • compute agregate for 1 day
    • analysis logic
    • write results to db
  • example crontab config

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.