Git Product home page Git Product logo

airpi's People

Contributors

edent avatar mattcanty avatar nocturnal42 avatar rjlanc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

airpi's Issues

Custom Sensor

I am not sure if you still are using the AirPi?!

I try to add a new sensor based on your template (SHT31 temperature and humidity sensor) with no luck so far.

Could you please give some advice?

`#!/usr/bin/python

import sensor
import time
import smbus

class SHT31(sensor.Sensor):
requiredData = []
optionalData = []

def __init__(self,data):
    """
    Initialisation.
    Any initialisation code goes here.
    """
    self.readingtype = "temperature"
    self.sensorname = "SHT31"
    self.valname = "Temperature"
    self.valunit = "Degrees Celsius"
    self.valsymbol = "C"
    self.description = "SHT31 Sensor for Temperature and Humidity."
    return

def getval(self):
    try:
        bus = smbus.SMBus(1)
        bus.write_i2c_block_data(0x44, 0x2C, [0x06])
        time.sleep(0.5)
        data = bus.read_i2c_block_data(0x44, 0x00, 6)
        ctemp = data[0] * 256 + data[1]
        temp = -45 + (175 * ctemp / 65535.0)
    except TypeError as terr:
        pass
    return temp`

Break out all settings to config file

Things which should probably be in the config file:

  • LCD on/off
  • ADC pins for analogue sensors
  • DHT22 pin
  • I2C bus number
  • enabled/disabled state of all sensors
  • ADC connections from Pi GPIO
  • API key for Cosm
  • Feed ID for Cosm
  • Watchdog enabled/disabled
  • Restarting Internet enabled/disabled
  • Pull up resistor sizes for MiCS sensors
  • Base resistance for MiCS sensors

Not sure what format it should be in yet.

Add moving averages for certain readings

Ideally, should have configurable duration for the window, as well as ability to control which sensors you want it for. Most probably the Air Quality ones, but maybe also the UV sensor and others. Potentially upload the raw values to Cosm as well.

Update for Tindie kits (board version 1.2)

Hi,
I've just assembled my board I got from the indie campaign and I've noticed that the software is still reporting UV sensor and has no value for microphone. Also, the CO reading seems to be stuck on 40ppm - is this a also a software issue or is something wrong with the sensor?

No PCBs or Kits to order

Dear all, unfortunately i have been waiting for too long on a Tindie order for the Board, so i was wondering if you would be kind enough to share the Eagle file of the latest board (0.4+) so i can have some printed myself on Seeedstudio.
The version you have shared now is an old one, and as i already have a case for it, i would really appreciate having the latest design.

Thank you in advance,

Luka

Error on raspbian buster

Hello,

i made a fresh install with RaspberryPi B+ and my AirPi PCB 1.4 and get the following error. On Debian Jessie it runs great.
All configs checkt, no sensor problem

DEBUG:main: ERROR: Failed to obtain data from these sensors: DHT22-hum, DHT22-temp
ERROR: Failed to obtain data from these sensors: DHT22-hum, DHT22-temp
DEBUG:main: Dataset to output to <outputs.print.Print object at 0xb62eeaf0>:
DEBUG:main: [{'description': 'A combined temperature and humidity sensor.', 'symbol': '%', 'value': None, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-hum', 'unit': '% Relative Humidity', 'name': 'Relative_Humidity'}, {'description': 'A combined temperature and humidity sensor.', 'symbol': 'C', 'value': None, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-temp', 'unit': 'Celsius', 'name': 'Temperature-DHT'}]
Time : 2021-02-06 14:10:00
DEBUG:main: ERROR: Exception during output: Unknown format code 'f' for object of type 'str'
DEBUG:main: ERROR: Failed to obtain data from these sensors: DHT22-hum, DHT22-temp
ERROR: Failed to obtain data from these sensors: DHT22-hum, DHT22-temp
DEBUG:main: Dataset to output to <outputs.print.Print object at 0xb62eeaf0>:
DEBUG:main: [{'description': 'A combined temperature and humidity sensor.', 'symbol': '%', 'value': None, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-hum', 'unit': '% Relative Humidity', 'name': 'Relative_Humidity'}, {'description': 'A combined temperature and humidity sensor.', 'symbol': 'C', 'value': None, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-temp', 'unit': 'Celsius', 'name': 'Temperature-DHT'}]
Time : 2021-02-06 14:10:20
DEBUG:main: ERROR: Exception during output: Unknown format code 'f' for object of type 'str'

It is the third sensor i have tested, sumtimes its ok

Time : 2021-02-06 14:45:01
DEBUG:main: ERROR: Exception during output: Unknown format code 'f' for object of type 'str'
INFO:main: Success: Data successfully obtained from all sensors.
DEBUG:main: Dataset to output to <outputs.print.Print object at 0xb62eeaf0>:
DEBUG:main: [{'description': 'A combined temperature and humidity sensor.', 'symbol': '%', 'value': 45.400001525878906, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-hum', 'unit': '% Relative Humidity', 'name': 'Relative_Humidity'}, {'description': 'A combined temperature and humidity sensor.', 'symbol': 'C', 'value': 22.700000762939453, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-temp', 'unit': 'Celsius', 'name': 'Temperature-DHT'}]
Time : 2021-02-06 14:45:21
Relative Humidity : 45.40 % (sample)
Temperature-DHT : 22.70 C (sample)

INFO:main: Success: Data output in all requested formats.
INFO:main: Success: Data successfully obtained from all sensors.
DEBUG:main: Dataset to output to <outputs.print.Print object at 0xb62eeaf0>:
DEBUG:main: [{'description': 'A combined temperature and humidity sensor.', 'symbol': '%', 'value': 45.400001525878906, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-hum', 'unit': '% Relative Humidity', 'name': 'Relative_Humidity'}, {'description': 'A combined temperature and humidity sensor.', 'symbol': 'C', 'value': 22.700000762939453, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-temp', 'unit': 'Celsius', 'name': 'Temperature-DHT'}]
Time : 2021-02-06 14:45:41

Greetings from Bavaria

BMP085 not calculating

Dear all, first of thank you so much for this project, i just got and built mine and im loving it!!
I have an issue though i hope someone here can helpo me fix.

The Pressure and Temperature readings are not being calculated, they stay stuck to some value since the first time i got it running.
I triple checked the soldering and its all fine.
I also get around 15-20 lines of : Error Accessing 0x77: Check your I2C address, every time after uploading succesfully, but that is set just fine in the cfg, as its working for the other sensors, and the i2cdetect confirms i got a Rev2 board.
The bmp085Backend.py does have a line reading i2c = none near the beginning, but im assuming thats some sort of initialization right ? (sorry im not that good with Python yet. .)

You can check the live feed here, and you will notice pressure and temperature are not working> https://xively.com/feeds/1547432953

Im about to order a new BMP085 as i have to assume this one is busted, but if anyone had encountered this error, or knows what might be causing this please let me know, i would really like to finish this asap so i can move to the projects other parts ..

Thank you in advance,

Luka

Add LICENSE

I find this project very useful and I am developing this further however I need the LICENSE so I can give credit.
Thanks!

Forking this to input data into MySQL?

I'm trying to figure out a way to use this code without uploading it to the internet, probably by way of a MySQL database controlled by Python. Does anyone know the best way to do this?

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.