Giter Club home page Giter Club logo

sensors-software's Introduction

firmware master branch: Build Status
firmware beta branch: Build Status

Software for Sensor.Community / Luftdaten.Info Sensor

airrohr-firmware

The maintained main firmware for the Sensor.Community / Luftdaten.Info Sensor.

airrohr-update-loader

A transitional firmware which will look for a firmware file stored on SPIFFS to replace itself with for next reboot or do an endless loop of panic LED blinking if this fails.

This allows to do an Over-the-air (OTA) procedure on setups that have a 1M/3M split layout (rather the more modern 2M/2M) for firmwares larger than 512k (up to ~ 740k).

Directories

  • BeginnersGuide Beginners guide to ESP programming with Arduino code
  • airrohr-.... currently used versions (2017-05-23+)
  • airrohr-update-... currently used for OTA (2019-08-30+)
  • apiclients clients for the dusti API and other APIs
  • arduino native arduino code
  • esp8266-lua nodemcu firmware code, lua scripts (not maintained after change to arduino)
  • esp8266-arduino programming esp8266 with arduino code/IDE
  • r-scripts sensor data analysis with R
  • schematics frizzing schematics (not updated, 2016-03-01)

Development

The development is done in the beta branch.

sensors-software's People

Contributors

asmaps avatar basilfx avatar bertrik avatar christianammer avatar corny avatar dadosch avatar darcoto avatar davidmoraisferreira avatar deekey avatar dhebbeker avatar dirkmueller avatar dokape avatar fmeerkoetter avatar gvidinski avatar hakan42 avatar jurajbelobrad avatar liutikas avatar marcauberer avatar marwe avatar meneerhenk avatar mfa avatar modem-man-gmx avatar n0c0n avatar nospam2000 avatar phaze-iii avatar pjgueno avatar ricki-z avatar stewecar avatar tiborb avatar ubergesundheit 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sensors-software's Issues

Ambiguous specification of Arduino IDE to install

Different Arduino IDE versions are stated in the installation guides. This can be confusing.

Is it required to use a specific version of Arduino IDE? Otherwise I would like to suggest to soften the specification: In cases where a version is specified, add a statement like

(getestete Version)

In case this change is approved, I volunteer to implement it.

GPIO PINSs <-> nodemcu PINs (Dx) mapping

Hi marwe,
the mapping GPIO <-> Pins is defined in Arduino.h (via pins_arduino.h and variants). I.e. you can use D1 to access Pin 1. This saves space for other variables and reduces the size of the compiled binary.

Rajko

Add Sensor ID to sensordatavalues for own API

I think it would be a great addition to the JSON data that is sent in the sensordatavalues to provide also the Sensor ID. If you have multiple sensors you currently have to use URL Parameters or use different endpoints for the different sensors.

INPUT definition

line 72 and 73: should be changed to pinMode(xx,INPUT_PULLUP)

activates internal pullup resistor

otherwise input pin can produce random state changes

Create tags

Tag the stable or near stable sensors firmware to have a better overview.

How to connect a BMP180 sensor?

I have a sensor that currently uses a DHT temp/hum sensor. I would like to upgrade to a BMP180 to also get pressure readings. How do I connect the BMP? Do I need to remove the DHT= Do I need a new Sensor ID for the BMP or will the software use the one of the DHT?

Connection to InfluxDB is broken

I have the sensor send data to InfluxDB on my Pi and visualize that in Grafana. From today, early afternoon, there are no data points anymore. InfluxDB is up and running just fine, existing data points are still visible in Grafana, just no new ones are coming in.

Judging from the different looking UI there was a software update recently. Is it possible that something broke so data doesn't get send to Influx correctly anymore?

Use platformio for enhanced command line support

Platformio ( http://platformio.org/ ) is a good replacement for Makefiles in embedded development.

Using this setup, you can run integration test builds on CI systems (like Jenkins), set up automated build and deployment chains, and yadda yadda yadda.

Best of it all: your development environment with the Arduino IDE is not impacted in any way, you can continue working how you are used to.

Custom sample rate

Hi,
where can I modify the firmware so that the sample rate is reduced to e.g. every 5min instead of every minute and thereby increasing the battery life?

Thanks
Jochen

HTTP Header umbenennen

Pin und Sensor sind keine standardisierten HTTP-Header. Sie sollte daher umbenannt werden in X-Pin und X-Sensor. Wofür wird der Pin-Wert überhaupt verwendet?

Anzeige der MAC-Adresse

Hallo, gäbe es die Möglichkeit auf noch die MAC-Adresse anzuzeigen. Ich hab in meinem WLAN einen MAC-Filter und es wäre schön wenn man diesen bei der (erst) Konfiguration sehen könnte.

Anosnten biete ich hier noch ein Beispielsketch zum auslesen der MAC-Adresse:

/*
 *  This sketch demonstrates how to scan WiFi networks. 
 *  The API is almost the same as with the WiFi Shield library, 
 *  the most obvious difference being the different file you need to include:
 */
#include "ESP8266WiFi.h"

uint8_t MAC_array[6];
char MAC_char[18];

void setup() {
  Serial.begin(115200);

  // Set WiFi to station mode and disconnect from an AP if it was previously connected
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);

  WiFi.macAddress(MAC_array);
  for (int i = 0; i < sizeof(MAC_array); ++i){
      sprintf(MAC_char,"%s%02x:",MAC_char,MAC_array[i]);
    }

  Serial.println(MAC_char);
  Serial.println("Setup done");
}

void loop() { 
}

Aussetzer bei der Übertragung

Einige Sensoren haben regelmäßige, kurze Aussetzer bei der Übertragung der Werte.
Beispiele:
303, 304
1010, 1011
1044, 1045
1517, 1518

Wer auch solche Aussetzer z.B. in den Grafiken hat, bitte kurz melden. Am Besten mit Angaben zum Internetanschluß: Provider, Geschwindigkeit des Ansschlusses, Router-Modell.

Sensor restarts and looses Wifi

My sensor (301) reboots frequently. I checked the power and think it's not a power issue. It works fine after a reboot but the Wifi config is lost.

Is there a way to configure the SSID and Wifi password persistently so that I don't have to go through the manual configuration each time?

Is there a script to configure the sensor so that I don't have to go through the manual configuration each time?

Unable to connect to own API on port 443

Hi!
I want to send the sensor data to my own API on port 443. I'm running an Apache with a proper configured let's encrypt certificate.

The only debug out put via serial is as follows:

## Sending to custom api: 
Start connecting to api.xxxxxxxxxx.com
connection failed

Is there something "special" I need to configure? Is it possible to get a more detailed debug output?

Neuer Sensor TSL2561 (Luninosity), VEML6070 (UV) und Erweiterung BME280

Update 4: 30. Mai 2017
Auf aktuelle Version: NRZ-2017-082 gehoben

Update 3: 17. Mai 2017 21:40
VEML6070 UV-Sensor integriert
Für jeden Sensor kann nun bestimmt werden, ob seine Daten an die APIs gehen.

Hallo,

ich habe den Code um den Luminosity-Sensor TSL2561 und den VEML6070 erweitert und den BME280 so umgebaut, dass zwei davon betrieben werden können.

In den Adafruit Library's habe ich die Objektorientierung entfernt und sie so angepasst, dass durch Übergabe der Sensoradresse die Funktionen direkt aufrufbar sind. Die .cpp und .h ist nun als .ino und .h ins Sketchverzeichnis gewandert. Meine Ergänzungen habe ich etwas schöner gemacht und die aktuellen Änderungen zur Mehrsprachigkeit übernommen.

Vielleicht habt Ihr ja Lust das zu übernehmen.

Grüße Jörg

airrohr-firmware.zip

Sensor config webpage availability for reconfiguration

Hi there,
I have cloned the sensors software from this repository.

I have compiled and flashed the firmware in /esp8266-arduino/ppd42ns-wificonfig-ppd-sds-dht/ successfully for my NodeMCU.

The sensor's WiFi for configuration came up once, as described in http://luftdaten.info/feinstaubsensor-bauen/. I have set the credentials to connect to my own WiFi. As I wanted to take another look at the sensor's "webpage" within the config WiFi (to check for valid sensor data) and I tried to reflash the Arduino sketch.

I cannot find the "Feinstaubsensor-*" SSID again. Is this also covered by "Bitte beachten: Wenn die Konfiguration des Sensors funktioniert hat, ist diese Seite nicht mehr erreichbar", i.e. are the credentials stored in a part of the flash memory not overwritten by the sketch and therefore expected functionality? If not, can you give some hints on how to debug this issue, please?

Cheers,
maehw

lua firmware (mqtt): DNS Fail

After 10-12h of operation:

Connecting to MQTT broker. Please wait...
DNS retry 1!
DNS retry 2!
DNS retry 3!
DNS retry 4!
DNS Fail!

Umrechnen von Partikel/Liter in µg/m³

Hi,

rein aus Interesse habe ich mir mal den billigeren PPD42NS Sensoren bestellt um die Werte mit denen eines Frenudes zu vergleichen der den teureren SDS011 hat.

Aufgefallen ist, dass der SDS011 die Werte in µg/m³ angiebt, so wie es auch jede öffentliche Feinstaubmesstation macht. Der PPD42NS zeigt die Werte jedoch in #Partikel/Liter an. Damit kann man leider nicht wirklich was anfangen. Eine kurze Googlesuche hat gezeigt dass man die Werte eigentlich ineinander umrechnen kann.

Gibt es einen Grund wieso das aktuell in der Software nicht gemacht wird? Weil in dieser Einheit sind die Werte halt ziemlich Nutzlos mMn.
Falls nein, würd ich mich die Tage mal hinsetzen und versuchen das reinzubauen und einen PR basteln.

Viele Grüße,
Felix

Include GPS positions

For mobile sensors, there should be a GPS position included with the data.
In that case, GPS lat lon alt PDOP fixtype, maybe RMS info (azimuth, speed) and GPS time might be of interest. All these values are measurement values (define a sensor accordingly).

Possible approaches:

  • the GPS sends messages in parallel (e.g. push lat lon with same nodeID), maybe the easiest/most flexible way (nodeID needs to be configurable).
    • generally no direct sync between measurements, needs to be handled by analysis
  • The GPS position is directly parsed by node (connect to serial, parse NMEA messages, at least RMC/GGA messages)
  • the GPS position can be received by node via network (e.g. from a gpsd) and be added/sent

Hardware:

capture time zone of sensor location

Since the project has attracted good attention and there are multiple sensors outside of Germany I think it is important to capture the time zone of the actual sensor location.
This should be a setting in the sensor software.

Work in progress: new sensors and components

This is the sensors and components wish list:

- [x] MQ2 (limited lifetime, comsumes too much power, needs calibration)
- [x] MQ135 (limited lifetime, comsumes too much power needs calibration)

  • BMP280 (temp., humidity, pressure)
  • Plantower PMS1003, PMS3003, PMS7003 (PM10, PM2.5, PM1)
  • Plantower PMS5003, PMS6003 (PM10, PM2.5, PM1)
  • BME680 (temp., humidity, pressure, VOC)
  • DS18B20 (temp.)
  • TSL45315 (light)
  • VEML6070 (uv)
  • LCD 1602/1604

ArduinoJson 5.8.2 Version geht nicht, 5.7.3 und 5.8.1 ist OK

aktuelle Version von ArduinoJson (5.8.2) funktioniert nicht mit Projekt, die 5.7.3 geht, die 5.8.1 compiliert auch.

5.8.2 Fehlermeldungen:

Build-Optionen wurden verändert, alles wird neu kompiliert
C:\Users\andreas\Documents\GitHub\sensors-software\esp8266-arduino\ppd42ns-wificonfig-ppd-sds-dht\ppd42ns-wificonfig-ppd-sds-dht.ino: In function 'String create_influxdb_string(const String&)':

C:\Users\andreas\Documents\GitHub\sensors-software\esp8266-arduino\ppd42ns-wificonfig-ppd-sds-dht\ppd42ns-wificonfig-ppd-sds-dht.ino:1401:88: warning: 'const char* ArduinoJson::JsonVariantBase::asString() const [with TImpl = ArduinoJson::JsonObjectSubscript<const char*>]' is deprecated (declared at C:\Users\andreas\Documents\Arduino\libraries\ArduinoJson/include/ArduinoJson/Deserialization/../JsonVariantBase.hpp:36): use as<char*>() instead [-Wdeprecated-declarations]

tmp_str = jsonBuffer.strdup(json2data["sensordatavalues"][i]["value_type"].asString());

                                                                                    ^

C:\Users\andreas\Documents\GitHub\sensors-software\esp8266-arduino\ppd42ns-wificonfig-ppd-sds-dht\ppd42ns-wificonfig-ppd-sds-dht.ino:1403:83: warning: 'const char* ArduinoJson::JsonVariantBase::asString() const [with TImpl = ArduinoJson::JsonObjectSubscript<const char*>]' is deprecated (declared at C:\Users\andreas\Documents\Arduino\libraries\ArduinoJson/include/ArduinoJson/Deserialization/../JsonVariantBase.hpp:36): use as<char*>() instead [-Wdeprecated-declarations]

tmp_str = jsonBuffer.strdup(json2data["sensordatavalues"][i]["value"].asString());

                                                                               ^

C:\Users\andreas\Documents\GitHub\sensors-software\esp8266-arduino\ppd42ns-wificonfig-ppd-sds-dht\ppd42ns-wificonfig-ppd-sds-dht.ino: In function 'void send_csv(const String&)':

C:\Users\andreas\Documents\GitHub\sensors-software\esp8266-arduino\ppd42ns-wificonfig-ppd-sds-dht\ppd42ns-wificonfig-ppd-sds-dht.ino:1431:88: warning: 'const char* ArduinoJson::JsonVariantBase::asString() const [with TImpl = ArduinoJson::JsonObjectSubscript<const char*>]' is deprecated (declared at C:\Users\andreas\Documents\Arduino\libraries\ArduinoJson/include/ArduinoJson/Deserialization/../JsonVariantBase.hpp:36): use as<char*>() instead [-Wdeprecated-declarations]

tmp_str = jsonBuffer.strdup(json2data["sensordatavalues"][i]["value_type"].asString());

                                                                                    ^

C:\Users\andreas\Documents\GitHub\sensors-software\esp8266-arduino\ppd42ns-wificonfig-ppd-sds-dht\ppd42ns-wificonfig-ppd-sds-dht.ino:1433:83: warning: 'const char* ArduinoJson::JsonVariantBase::asString() const [with TImpl = ArduinoJson::JsonObjectSubscript<const char*>]' is deprecated (declared at C:\Users\andreas\Documents\Arduino\libraries\ArduinoJson/include/ArduinoJson/Deserialization/../JsonVariantBase.hpp:36): use as<char*>() instead [-Wdeprecated-declarations]

tmp_str = jsonBuffer.strdup(json2data["sensordatavalues"][i]["value"].asString());

Messerwerte bündeln?

Kann ich die Daten mehrere Sensoren (z.B. SDS011 und BME280) in einem Request an api.luftdaten.info übertragen? TLS-Handshakes sind ziemlich teuer - das macht sich auch auf eurem Server bemerkbar.

Beispiel:

{
  "software_version": "NRZ-2016-054",
  "sensordatavalues": [
    {
      "value_type": "P1",
      "value": "11.25"
    },
    {
      "value_type": "P2",
      "value": "10.12"
    },
    {
      "value_type": "temperature",
      "value": "22.70"
    },
    {
      "value_type": "humidity",
      "value": "34.57"
    },
    {
      "value_type": "pressure",
      "value": "103294.48"
    }
  ]
}

Versionsunklarheit

Hallo,
ich hab Version #define SOFTWARE_VERSION "NRZ-2016-048"
in der readme steht was von:

Bis Version NRZ-2016-15:
DHT https://github.com/adafruit/DHT-sensor-library
(DHT.cpp und DHT.h downloaden und in das Softwareverzeichnis kopieren)
ist damit die "NRZ-2016-015" gemeint? (die dht brauchte ich jedenfalls nicht)

DHT22 is not read

h = dht.readHumidity(); //Read Humidity  
t = dht.readTemperature(); //Read Temperature

and connecting to 5V (Vin) instead of 3,3V

solved the issue for me!

Using DHT Sensor Library by Adafruit Version 1.3.0

"endless" loop and cpu usage

According to the esp8266 documentation, "endless" loops without delays can break wlan functionality.

Are the any changes in measurement if we include a yield() (euivalent to delay(0)) at the end of loop(). This will give the cpu a chance to work on interrupts and to reconnect on wlan errors.

Missing Library in Readme.md

Hi,
after adding all recommended libraries, compilation ended up with:
"Adafruit_Sensor.h: No such file or directory"
After adding "Adafruit Unified Sensor", compilation went through without errors.

Kind regards and a happy new year ;-)
Jo

Multi-language web interface question

Hi,
Do you have any plans for multi-language web interface of ESP?

I know that I can fork repo, but it is not very useful to keep it in sync with master only for translation.
I hope you will choose some technology for multi-language strings in sources.
If you are agree that it must be done and give some ideas, I can take some work to implement it.

Best regards

wire: 'void TwoWire::pins(int, int)' is deprecated

in der "ppd42ns-wificonfig-ppd-sds-dht.ino" wird diese Zeile (1898) angemosert.

#if defined(ESP8266)
	Wire.pins(D3,D4);					// must be set before all other I2C cmds

Soweit meine Recherche ist ein Wire.pins(D3,D4); nicht mehr nötig, das macht ja das Wire.begin(D3,D4); was dahinter kommt.
Wenn ich es auskommentiere compiliert es ohne Meldungen.

Angabe von GPS-Koordinaten

Es sollte möglich sein, bei der Konfiguration die GPS-Koordinaten einzugeben, damit diese zusammen mit den Messwerten übertragen werden. Ähnliches machen z.B. die Freifunker in ihrer Gluon-Software.

Das vereinfacht bei euch ebenso die Verwaltung der Positionen von Sensoren.

WiFi configuration password input length limits

Just leaving this here as a reminder, because I was too stupid to address it to the correct repo at the first approach.

opendata-stuttgart/feinstaub-map#22

@ricki-z already gave me the hint, that this will be changed in the future to maxlenght=64. (This is the maximum length for WPA2 passwords).

My initial issue reads:

Unfortunately it is not possible to enter WiFi passwords with more than 32 characters in the config form >provided with the latest firmware binary:

https://github.com/opendata-stuttgart/sensors-software/blob/master/esp8266-arduino/ppd42ns-wificonfig-ppd-sds-dht/ppd42ns-wificonfig-ppd-sds-dht.ino.nodemcu.bin

maxlength= "32"

<input name="wlanpwd" id="wlanpwd" placeholder="Passwort" >value="IWouldLikeToEnterALongPasswordHe" maxlength="32" type="password">

ESP freeze after refreshing values page

The ESP will freeze (Firmware Version: NRZ-2016-062) if the values http page was updated (refresh button at the browser) while the firmware is communicating with the SDS011 sensor (led on the sensor flashing).
If this occurs, the ESP is was completely dead, no more http communication, no ping possible (timeout) EDIT: I am not sure anymore about the ping, but http communication was definite down.
If the web pages are not used, the ESP works like a charm.

The Freeze will then occur exactly after the communication with the SDS011 ends.

Last log lines at log level 5 are at every freeze:
...
End connecting to api.luftdaten.info

Sending to luftdaten.info (DHT):

Start connecting to api.luftdaten.info
Requesting URL: /v1/push-sensor-data/
1197671
{"software_version": "NRZ-2016-062", "sensordatavalues":[{"value_type":"temperature","value":"22.10"},{"value_type":"humidity","value":"35.60"}]}

Add support for UV and light sensor.

From @h0lz on April 2, 2017 11:15

Hi,
Opensensmap.org accepts light sensors like the TSL45315 and UV sensors like the VEML6070.
Both connect via i2c.
I would like to submit theese data as well.
Would it be possible to add the function in the firmware?
I've ordered a bmp180 already to submit the barometric pressure to Opensensemap as well.

Copied from original issue: opendata-stuttgart/feinstaub-map#30

Location info for sensors

Add location (machine readable e.g latlong) to each of the sensors, so that the air quality can be compared in different city regions. The info can be stored at the API too and can be added even after the sensor is in production.

Keep in mind that we have to protect the sensor host's privacy and not reveal the exact location, or obfuscate it some other way.

opensensors.io as MQTT broker

Opensensors is a convenient and free way to make the particle data open/public.
The account holder can publish to a topic, topics can be public or private, a public topic can be used by anyone.

Usage in the CLI:

mosquitto_pub -h mqtt.opensensors.io -i <client_id> -t <topic> -u <dusty> -m 'measure and timestamp' -P <your password> 

Use cases:

  1. Sensors publish directly to opensensors (permissions must be reviewed)
  2. Only dusty publishes to opensensors

Public topic example:
https://opensensors.io/topics/orgs/London-Air-Quality-Network/westminster/westminster-oxford-street

platformio not working

platformio with standard espressif8266 compiles with error '.pioenvs/nodemcuv2_bg/firmware.elf section .text' will not fit in region iram1_0_seg'
with espressif8266_stage compile is okay, but SPIFFS is not read. Saved config isn't found and connect to internal webserver is not possible.

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.