Coder Social home page Coder Social logo

toto / homebridge-airrohr Goto Github PK

View Code? Open in Web Editor NEW
52.0 52.0 12.0 682 KB

HomeBridge module for the DIY luftdaten.info particulates sensor. See http://luftdaten.info how to build your own

Home Page: http://luftdaten.info

License: MIT License

JavaScript 100.00%
homebridge homebridge-airrohr homebridge-plugin luftdaten opendata sensor

homebridge-airrohr's People

Contributors

arouanet avatar dependabot[bot] avatar honkmaster avatar matthiasfriese avatar nicoh88 avatar toto 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-airrohr's Issues

Firmware in HomeKit

Minor issue: Firmware in sensors details shows still 1.0.0 instead of 1.1.4.

Error when reading public API

Hi,
First of all thanks for the great plug-in!
I'm trying to use the plugin via the public API, but homebridge keeps failing with the following error

 [AirRohr] Could not get sensor data: TypeError: this.dataCache.sensordatavalues is not iterable
{
    "accessory": "airrohr",
    "name": "AirRohr",
    "json_data": "http://api.luftdaten.info/v1/sensor/4668/",
    "sensor_id": "4668",
    "update_interval_seconds": 60
}

I checked the response of the API and it seems to be fine

[{"sampling_rate":null,"sensordatavalues":[{"value_type":"P1","value":"36.50","id":1404263069},{"value_type":"P2","value":"11.77","id":1404263070}],"timestamp":"2018-01-04 20:26:13","id":644020044,"sensor":{"sensor_type":{"id":14,"manufacturer":"Nova Fitness","name":"SDS011"},"pin":"1","id":4668},"location":{"longitude":"10.044","latitude":"53.568","id":2348,"country":"DE"}},{"sampling_rate":null,"sensordatavalues":[{"value_type":"P1","value":"33.57","id":1404275471},{"value_type":"P2","value":"10.70","id":1404275472}],"timestamp":"2018-01-04 20:28:40","id":644025931,"sensor":{"sensor_type":{"id":14,"manufacturer":"Nova Fitness","name":"SDS011"},"pin":"1","id":4668},"location":{"longitude":"10.044","latitude":"53.568","id":2348,"country":"DE"}}]

Do you have an idea what could be the problem?

Binary sensors for PM2.5 and PM10

Currently the PM2.5 and PM10 values are combined in an air quality sensor. This enables to see the air quality in the home overview (if the sensor is selected as a favourites) and in the home status (if the sensor reports a low air quality).

Would it be possible to show both PM2.5 and PM10 as separate binary sensors as well? This way, when the certain treshhold is reached the binary sensor will be triggered. These binary sensors allow for notifications and automations.

The CO2 sensors of Netatmo Home Coach (native HomeKit support) and Indoor modules of the Netatmo Weather Station (through Homebridge plug-in) work the same way, which I find really useful.

Ideally this would be an option in the config, so users can choose whether to have the additional two tiles in the Home app.

Korrekturwert für Luftdruck

Hi,
kann man ins Plugin evtl noch ein Korrekturwert für den Luftdruck hinzufügen?
Airrohr misst den Luftdruck auf Basis der Meereshöhe.

How to find Sensor ID

I am using Nova Nova Sds011 Sensor and getting this error

Could not get sensor data: Error: getaddrinfo ENOTFOUND feinstaubsensor-SENSORID.local feinstaubsensor-SENSORID.local:80

and I think the problem comes from setting false SENSORID. I don't know how to get the correct SENSORID as I just guest it by entering some number I saw on the sensor

Any help would be very appreciated

kein Update der Sensordaten

Hi,

ich habe seid längerem das Problem dass die aktuellen Daten des Sensors nicht in Home aktualisiert werden. Nach einem neustart der homebridge funktioniert es für ein paar Stunden danach bekomme ich immer nur die selben Werte, die neuen werden nicht aus der data.json gezogen.
Jemand eine Idee an was es liegt?

Die persist.json habe ich bereits gelöscht und das plugin neu installiert, aber ohne Erfolg

Multiple temperature/humidity sensors

When both a BME280 and DHT22 sensor are added, the temperature and humidity is registered twice. Results can vary quite a bit between the two.

Any chance for two temperature and two humidity sensors to be added to HomeKit with such a set-up?

Here's the local JSON data:

{"software_version": "NRZ-2018-123B", "age":"18", "sensordatavalues":[{"value_type":"SDS_P1","value":"48.42"},{"value_type":"SDS_P2","value":"27.48"},{"value_type":"temperature","value":"15.30"},{"value_type":"humidity","value":"80.80"},{"value_type":"BME280_temperature","value":"16.91"},{"value_type":"BME280_humidity","value":"56.89"},{"value_type":"BME280_pressure","value":"100426.13"},{"value_type":"samples","value":"1786702"},{"value_type":"min_micro","value":"77"},{"value_type":"max_micro","value":"41141"},{"value_type":"signal","value":"-57"}]}

Warnings during homebridge startup: characteristic was supplied illegal value: undefined!

[21/12/2020, 13:05:31] Received warning for the plugin 'homebridge-airrohr' from the characteristic 'Current Temperature': characteristic was supplied illegal value: undefined! This might throw errors in the future!
[Current Temperature@Homebridge CAD8] characteristic was supplied illegal value: undefined! This might throw errors in the future!
[21/12/2020, 13:05:31] Received warning for the plugin 'homebridge-airrohr' from the characteristic 'Current Relative Humidity': characteristic was supplied illegal value: undefined! This might throw errors in the future!
[Current Relative Humidity@Homebridge CAD8] characteristic was supplied illegal value: undefined! This might throw errors in the future!
[21/12/2020, 13:05:31] Received warning for the plugin 'homebridge-airrohr' from the characteristic 'Air Quality': characteristic was supplied illegal value: undefined! This might throw errors in the future!
[Air Quality@Homebridge CAD8] characteristic was supplied illegal value: undefined! This might throw errors in the future!
[21/12/2020, 13:05:31] Received warning for the plugin 'homebridge-airrohr' from the characteristic 'PM2.5 Density': characteristic was supplied illegal value: undefined! This might throw errors in the future!
[PM2.5 Density@Homebridge CAD8] characteristic was supplied illegal value: undefined! This might throw errors in the future!
[21/12/2020, 13:05:31] Received warning for the plugin 'homebridge-airrohr' from the characteristic 'PM10 Density': characteristic was supplied illegal value: undefined! This might throw errors in the future!
[PM10 Density@Homebridge CAD8] characteristic was supplied illegal value: undefined! This might throw errors in the future!

Missing: air pressure, WIFI signal strength, WIFI quality

Hi ToTo,

just installed homebridge-airrohr.

Temperature, air quality and humidity are displayed. Only air pressure and (optional) the WIFI values are missing.
http://myAirRohr/data.json
{
"software_version": "NRZ-2020-129",
"age":"70",
"sensordatavalues": [
{"value_type":"SDS_P1","value":"3.92"},
{"value_type":"SDS_P2","value":"1.85"},
{"value_type":"BME280_temperature","value":"21.29"},
{"value_type":"BME280_pressure","value":"100357.12"},
{"value_type":"BME280_humidity","value":"17.94"},
{"value_type":"samples","value":"4334655"},
{"value_type":"min_micro","value":"32"},
{"value_type":"max_micro","value":"84705"},
{"value_type":"signal","value":"-75"}
]
}

Also in the "Homebridge logs" the pressure data are listed. Except the WIFI one.

I got some warnings during installation also.

sudo npm install -g homebridge-airrohr
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/cryptiles. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/boom. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.

Keine History bei Verbindungsproblemen

Bei mir setzt die History immer komplett aus, wenn kein Empfang ist, Eve speichert dann die Werte erst wieder, wenn die History gelöscht wurde.

Problem besteht sowohl bei Abruf über die IP, als auch vom Web-Server

Ports

Hello which ports is the plugin using or can I configure it?

Add SHT3x temperature and humidity values

Hey,

I'm using homebridge-airrohr for quite some time now. Yesterday I replaced my BME-280 sensor with an SHT35. The temperature and humidity are not read from the JSON data anymore.

I will attach an example local json:

{
    "software_version": "NRZ-2020-131",
    "age": "105",
    "sensordatavalues": [
        {
            "value_type": "SDS_P1",
            "value": "93.28"
        },
        {
            "value_type": "SDS_P2",
            "value": "38.72"
        },
        {
            "value_type": "SHT3X_temperature",
            "value": "1.83"
        },
        {
            "value_type": "SHT3X_humidity",
            "value": "91.34"
        },
        {
            "value_type": "samples",
            "value": "3558967"
        },
        {
            "value_type": "min_micro",
            "value": "32"
        },
        {
            "value_type": "max_micro",
            "value": "358241"
        },
        {
            "value_type": "interval",
            "value": "145000"
        },
        {
            "value_type": "signal",
            "value": "-70"
        }
    ]
}

Would be great if that information also be read by your plugin.

Thanks,
Matthias

Add air pressure from the BME280

As mentioned in Issue #1 I'm using the BME280 sensor.
A search in the public data for the sensor shows up more than 1000 hits so the Sensor seems to be relatively common.
In addition to #4 (measurement history via "fakegato") it would be great to have the air pressure in the homebridge data.

Including BME280 instead of the DHT22 for Humidity, Temperature and air pressure

Hi, I'm very happy with the plugin and it works perfect for PM2,5 and PM10 for me.

I'm using a "BME280"(also supported by the AirRohr Software) instead of the default "DHT22" for humidity and temperature (higher accuracy),
and the air pressure as well.

Would it be Possible for the plugin to include these as well?
At least humidity and temperature?
Here is the data.json output from my AirRohr device:

{"software_version": "NRZ-2017-099", "age":"145", "sensordatavalues":[{"value_type":"SDS_P1","value":"6.50"},{"value_type":"SDS_P2","value":"3.20"},{"value_type":"BME280_temperature","value":"6.86"},{"value_type":"BME280_humidity","value":"86.66"},{"value_type":"BME280_pressure","value":"100003.54"},{"value_type":"samples","value":"598753"},{"value_type":"min_micro","value":"231"},{"value_type":"max_micro","value":"505639"},{"value_type":"signal","value":"-82"}]}

I assume that your plugin isn't expecting the value name prefix.
Perhaps something like a wildcard for the prefixes would do?

Enhancement: Add history to sensor data

Using fakegato-history, you can simply add a history functionality to your sensors. The history, then will be available in the Elgato Eve App. I first seen this feature in homebridge-dht, and really like it. homebridge-airrohr could replicate an Elgato Eve Room device, e.g.:

this.loggingService.addEntry({time: moment().unix(), temp:this.temperature, humidity:this.humidity, ppm:this.ppm});

See: https://github.com/simont77/fakegato-history

Publish Air Pressure

I'm using the BME280, is it possible to publish the air pressure into homekit?

(Thank you for writing and sharing. All worked 1st time and as documented!)

Disable Temperature option results in temperature sensor showing 0 degrees

I have disabled the BME-280 sensor in the sensor config and have set "disable_temperature": true in the Homebridge config. Both result in a sensor showing 0° in the Home app. It seems as if a temperature sensor is added to Homebridge / HomeKit no matter the sensor set-up or plug-in config.

In case there is no temperature/humidity sensor set-up in the sensor (and no temperature data in the JSON), or if the "disable_temperature" is set to true in the config, no temperature sensor should be exposed to HomeKit.

Screenshot 2023-06-12 at 19 14 37 Screenshot 2023-06-12 at 19 14 11 Screenshot 2023-06-12 at 19 13 55 Screenshot 2023-06-12 at 19 13 29

No public data.... and only air quality sensor possible ?

Hi

thx for this great plug-in.
tried today to use it.

{
"name": "AirRohr",
"accessory": "airrohr",
"public_temperature_json_data": "http://api.luftdaten.info/v1/sensor/4021/",
"public_airquality_json_data": "http://api.luftdaten.info/v1/sensor/4021/",
"sensor_id": "1234579",
"update_interval_seconds": 120
}

I get always "POOR" Quality ?!?!?!?
The readings are:
PM10: 50u/m³
PM2.5: 25u/m³

Why is the quality "POOR" ???
or is this a poor Air quality ???

Richard

please, update to more sensors

Hi;

I'm Pedro from Spain, a Homebridge enthusiast.
I'v been testing/using this Homebridge plugin:

https://www.npmjs.com/package/homebridge-udp-json

I'v seen that you were/are some kind of contributor, or at least I'v seen that you have been very active in Homebridge developing.

What I need is, I think, kind of simple: I have an air quality station with:
SDS011 PM25/PM10 dust sensor
DHT22 temperature/humidity/baro sensor
MH-Z19B CO2 sensor
ESP LOLIN V3 nodeMCU controller

So, they'r hardwired and running Easy ESP firmware for controlling them all, and need to link that station to homebridge. One easy way is using UDP packets, but the plugin I link to you only creates temp/humidity sensors in homebridge. I need it to create temp/humidity/barometric/CO2/PM25/PM10 sensors.

Would you be so kind modifying the plugin to provide all these 6 accessories?

Thank you SO MUCH in advance

Can I add multiple Luftdaten Sensors to the Homebridge Config Editor?

Hello. Sorry if this is a dumb question, but does this plugin support adding multiple Luftdaten sensors to HomeBridge? I've successfully configured my first sensor, but when I try to add a second accessory, nothing appears under my Accessories list. I just wanted to double check that it is possible to add a second Luftdaten sensor?

Thank you!

Different / Custom names for each sensor information

First of all, thanks for this component.

Would it be possible to add a configuration options to have different names for the sensors? Would be very useful, e.g. in a non english environment. Thanks.

P.S.: I am not familiar with JS, otherwise I would have created a PR. Sorry :).

Error message is always thrown out

Hi,

I've had problems with the plugin since this morning. The same error message is always thrown out, although I have changed the sensor. Does somebody has any idea?

Logs:
[15/04/2021, 21:34:09] [homebridge-airrohr] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[15/04/2021, 21:34:09] [homebridge-airrohr] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[15/04/2021, 21:34:09] [homebridge-airrohr] This plugin generated a warning from the characteristic 'Air Quality': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[15/04/2021, 21:34:09] [homebridge-airrohr] This plugin generated a warning from the characteristic 'PM2.5 Density': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[15/04/2021, 21:34:09] [homebridge-airrohr] This plugin generated a warning from the characteristic 'PM10 Density': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.

Secondary Homebridge Logs here
[15/04/2021, 21:37:13] [homebridge-airrohr] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[15/04/2021, 21:37:13] [homebridge-airrohr] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.


**Environment:**
Node.js Version v14.16.1
NPM Version   v6.14.12


* **Homebridge Version**:  homebridge -V 1.3.4

No Response status when sensor can't be reached

Unfortunately my sensor drops off of the Wi-Fi every now and then. The logs show the following when it can't be reached:

Oct 28 19:44:02 raspberry-pi-homebridge homebridge[29182]: [10/28/2019, 7:44:02 PM] [AirRohr] Could not get sensor data: Error: connect EHOSTUNREACH 10.0.0.26:80

At the moment, the sensor in HomeKit doesn't reflect this. Instead just shows values of 0 or the previous values for temperature, humidity and air quality, so there's no way of knowing it's dropped off of the Wi-Fi.

Could this be updated so that a sensor running into errors is given a No Response status in HomeKit?

homebridge-airrohr crashes Homebridge

I am running homebridge-airrohr since the last update (maybe you remember ;)). Since then, my homebridge instance is crashing every second day or so. The log gives the following information:

/usr/lib/node_modules/homebridge-airrohr/index.js:187
        callback(null);
        ^

TypeError: callback is not a function
    at AirRohrAccessory.updateCache (/usr/lib/node_modules/homebridge-airrohr/index.js:187:9)
    at Timeout.AirRohrAccessory.setInterval [as _onTimeout] (/usr/lib/node_modules/homebridge-airrohr/index.js:213:12)
    at ontimeout (timers.js:458:11)
    at tryOnTimeout (timers.js:296:5)
    at Timer.listOnTimeout (timers.js:259:5)

Can this issue be solved?

Plugin crashing Homebridge

Sometimes the Plugin crashes on callback which will cause Homebridge to crash.

/usr/local/lib/node_modules/homebridge-airrohr/index.js:187 callback(null); ^ TypeError: callback is not a function at AirRohrAccessory.updateCache (/usr/local/lib/node_modules/homebridge-airrohr/index.js:187:9) at Timeout.AirRohrAccessory.setInterval [as _onTimeout] (/usr/local/lib/node_modules/homebridge-airrohr/index.js:213:12) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)

Local URL, sometimes not responding due to bad WiFi connectivity of the esp.

No History for Air Quality

Since Fakegato support is included I very like to have a look at historical data for temperature and humidity.
But unfortunately there is no history available for air quality although the Eve app seems to recognize support for historical data.
img_4949

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.