GithubHelp home page GithubHelp logo

dfederschmidt / airsensor-py Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 3.0 7 KB

Python package for getting sensor values from an Ambient Air Sensor

License: MIT License

Python 100.00%
airquality home-automation python3 pyusb

airsensor-py's Introduction

Metrics

Calender

airsensor-py's People

Contributors

dfederschmidt avatar paulchenplump avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

airsensor-py's Issues

second get fails

dont know if this still active,

but calling

airsensor.get_voc()

leads to timeout and error (first call is just fine, and c version also works correctly):

Traceback (most recent call last):
  File "airsens.py", line 28, in <module>
    voc = airsensor.get_voc()
  File "/home/lucian/miniconda3/lib/python3.8/site-packages/airsensor/core.py", line 23, in get_voc
    n = self.dev.write(0x02, cmd, timeout=10000)
  File "/home/lucian/miniconda3/lib/python3.8/site-packages/usb/core.py", line 989, in write
    return fn(
  File "/home/lucian/miniconda3/lib/python3.8/site-packages/usb/backend/libusb1.py", line 855, in intr_write
    return self.__write(self.lib.libusb_interrupt_transfer,
  File "/home/lucian/miniconda3/lib/python3.8/site-packages/usb/backend/libusb1.py", line 938, in __write
    _check(retval)
  File "/home/lucian/miniconda3/lib/python3.8/site-packages/usb/backend/libusb1.py", line 602, in _check
    raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 110] Operation timed out

Improve documentation

Would be cool to have a picture of such a sensor in there as well as some concise background information how it works and what is measured to determine the VOC score.

Build a real CLI

At the moment, when called, it just outputs the current VOC value. It would be nice to have some options regarding output format for various things:

  • add timestamp to output
  • output in JSON format

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.