Giter Site home page Giter Site logo

nobodyinperson / co2monitor Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 174 KB

!MOVED TO GITLAB.COM! Plug'n'play co2 monitoring for devices with USB id 04d9:a052 - e.g. AirCO2ntrol mini

Home Page: https://gitlab.com/nobodyinperson/co2monitor

License: GNU General Public License v3.0

Python 87.31% R 8.59% Makefile 4.09%
usb co2 monitoring debian ubuntu plug-n-play

co2monitor's Issues

use logrotate for service log

It would be elegant to use logrotate for service log rotating.

Needed:

  • configuration file /etc/logrotate.d/co2monitor
  • service command (on dbus?) to re-open the logfile

udev kills co2monitor-service

Recent udev versions do not want long-running tasks (like co2monitor) to be invoked with RUN+="...", they will be killed after some time. This is very bad and breaks functionality of the data logger completely.

Service desired features

  • provide dbus signals for state and measurement changes
  • uniquely identify each device if possible
  • write comments to each output file, providing metadata as device path in sysfs, device file, time of logging, etc.
  • fail on wrong devices

Create the service

Create the background service with following abilities:

  • automatically started by udev rule
  • configurable via configuration file
  • logging of service messages to logfile
  • logging of measurements to csv files

basic structure

The plans on the basic structure of the co2monitor application:

There shall be a service:

  • That service shall be activated by udev via a udev rule everytime a CO2 monitoring USB device is connected.
  • The service shall be able to log all extractable information from the CO2 monitoring device.
  • The service shall be configured by a configuration file unter /etc, e.g. if and where logging should take place and what format.
  • The service shall be hooked up to dbus to make the data available to the whole system.

Based on the data provided by the service, there shall be an applet.

  • The applet shall show graphs of the measured data.
  • The applet should preferably be capable of being docked to a taskbar.
  • From the applet it should be able to view older data, save or send it elsewhere.

Documentation

  • Fill the manpages with enough and appropriate information
  • Fill the Github Wiki

set logging interval time

Thank you for the working software.
Is it possible to set an interval time. If the software writes every 10sec the data in the csv file, it will very big after some time.
Does it split the file after some time (day/month files)?

Add plug'n'play support to non-systemd systems

On systems without systemd, there is no automaic data logging on plugging in. A solution could be to use a udev RUN+="..." again but use a script like this and check if there's systemd support to conditionally start logging.

Better hotplug handling

When hotplugging like hell, co2monitor gets confused and crashes, because the hotplugging handling is not yet backed by enough exception tests.
The following is thus to implemented:

  • service: on hotplug, check if the device node is already monitored (i.e., does the dbus object exist already)

Crash on bootup

For some reason, co2monitor in version 0.0.1 crashes everytime at bootup. Actually, there is no reason for the service to be started at all. It does not matter because it's started again when the co2 device is plugged in. But it's annoying.

Create the applet

Create the desktop applet with the following abilities:

  • dockable to taskbar somehow
  • show measurements on taskbar
  • draw a graph of the data
  • browse and save data elsewhere

Stop when unplugging during warmup

The service does not recognize if the device is unplugged during warmup.

  • implement an service method stop_device_logging(devicefile) that takes a device file/path and is also exported via dbus. The invoker can then call that method on the REMOVE action.

Check dh_installdocs execution

For some reason, dh_installdocs installs the manpages all over the place under /usr/share/doc/co2monitor/ so they end up twice there plus gzipped in the man system. This is useless and needs to be fixed.

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.