Git Product home page Git Product logo

local_luftdaten's Issues

HA 2023.6.0 luftdaten.local failed

System:

 Home Assistant 2023.6.0
 Supervisor 2023.06.1
 Operating System 10.2
 Frontend 20230607.0 - latest

My config in HA configuration.yaml

sensor: 
  - platform: local_luftdaten
    host: 192.168.178.56
    scan_interval: 180
    name: Feinstaubsensor
    monitored_conditions:
      - SDS_P1
      - SDS_P2
      - BME280_temperature
      - BME280_humidity
      - BME280_pressure

Error-Message:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.loader
Source: custom_components/local_luftdaten/sensor.py:61
Integration: local_luftdaten (documentation, issues)
First occurred: 23:54:14 (1 occurrences)
Last logged: 23:54:14

Unexpected exception importing platform custom_components.local_luftdaten.sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/local_luftdaten/sensor.py", line 61, in <module>
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'

BMP and BMP280 sensors

Hi!
I have a BMP and BMP280 sensor which produce the following entries in the json:

{"software_version": "NRZ-2020-129", "age":"2", "sensordatavalues":[{"value_type":"SDS_P1","value":"1.27"},{"value_type":"SDS_P2","value":"1.12"},{"value_type":"BMP_pressure","value":"97986.00"},{"value_type":"BMP_temperature","value":"18.80"},{"value_type":"BMP280_pressure","value":"97707.13"},{"value_type":"BMP280_temperature","value":"18.51"},{"value_type":"samples","value":"4389330"},{"value_type":"min_micro","value":"32"},{"value_type":"max_micro","value":"20054"},{"value_type":"signal","value":"-74"}]}

It would be great if the component could support it :-)

Possibility to monitor more than 1 sensor

Hello,

Please excuse my ignorance but is it possible to monitor more than sensor with your integration? I've 3 sensor (1 outside and 2 inside) and would like to see values from all of them in HA.

Thank you.
Kamil

Warnings in 2021.12

2021-12-13 14:23:41 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that called async_timeout.timeout with loop keyword argument. The loop keyword argument is deprecated and calls will fail after Home Assistant 2022.2. Please report issue to the custom component author for local_luftdaten using this method at custom_components/local_luftdaten/sensor.py, line 163: with async_timeout.timeout(30, loop=self._loop):
2021-12-13 14:23:42 WARNING (MainThread) [homeassistant.components.sensor] sensor.router_system_boottime is providing a string for its state, while the device class is 'timestamp', this is not valid and will be unsupported from Home Assistant 2022.2. Please report it to the custom component author.

BME280 data

Unfortunately I see an issue when using an BME280 sensor..

The output:

{"software_version": "NRZ-2018-123B", "age":"35", "sensordatavalues":[{"value_type":"SDS_P1","value":"0.55"},{"value_type":"SDS_P2","value":"0.55"},{"value_type":"BME280_temperature","value":"23.36"},{"value_type":"BME280_humidity","value":"49.53"},{"value_type":"BME280_pressure","value":"103342.53"},{"value_type":"samples","value":"1730201"},{"value_type":"min_micro","value":"81"},{"value_type":"max_micro","value":"21159"},{"value_type":"signal","value":"-63"}]}

Settings for BME280/ESP8266 from omebridge-mcuiot

Hallo,
perhaps you can help me with the settings for that web-output?

{ "Hostname": "NODE-177D3F", "Model": "BME", "Version": "1.5", "Firmware": "2.2.0", "Data": {"Temperature": 20.495327102804, "Humidity": 49.896, "Moisture": 4, "Status": 0, "Barometer": 1036.238, "Barometer Locl": 997.523, "Dew": 11.01 }}

So it won't work:
`sensor:

  • platform: local_luftdaten
    host: 192.168.2.155
    name: Temp-SZ
    monitored_conditions:
  • Temperature
  • Humidity
  • Barometer`

That is the Info from the HA-Log:
Invalid config for [sensor.local_luftdaten]: value is not allowed @ data['monitored_conditions'][0]. Got 'Temperature' value is not allowed @ data['monitored_conditions'][1]. Got 'Humidity' value is not allowed @ data['monitored_conditions'][2]. Got 'Barometer'. (See ?, line ?).

I am using some ESP8266 with BME280 in my Homebridge (mcuiot PlugIn) and want the data also in my HomeAssistant.
Thanks for a little help ...
CU Kai

no datas in Home App

I use this integration with Home Assistant for PM, humidity and temperature sensors but no idea why the only temperature is visible in my Home App on iPhone. The HA App show all these datas so how can I move the datas to Home App?

Plantower sensor support

Hi,
there would be a chance to add Plantower sensor support, e.g. PMS7003.
An example json file is:

{"software_version": "**********", "age":"0", "sensordatavalues":[{"value_type":"PMS_P0","value":"22.00"},{"value_type":"PMS_P1","value":"38.40"},{"value_type":"PMS_P2","value":"31.60"},{"value_type":"BME280_temperature","value":"20.01"},{"value_type":"BME280_humidity","value":"51.85"},{"value_type":"BME280_pressure","value":"100893.76"},{"value_type":"samples","value":"1744880"},{"value_type":"min_micro","value":"78"},{"value_type":"max_micro","value":"89701"},{"value_type":"signal","value":"-48"}]}

PMS_P0 = PM1
PMS_P1 = PM10
PMS_P2 = PM2,5

Please ;)

PS.
I also have a problem with showing the pressure by BME280, I don't know how to change it despite the instructions; /

SHT3X sensor request

Hi,
Could you please add SHT3X sensor?

{"software_version": "NRZ-2020-133", "age":"104", "sensordatavalues":[{"value_type":"SDS_P1","value":"5.90"},{"value_type":"SDS_P2","value":"4.10"},{"value_type":"SHT3X_temperature","value":"25.84"},{"value_type":"SHT3X_humidity","value":"46.32"},{"value_type":"samples","value":"10575534"},{"value_type":"min_micro","value":"27"},{"value_type":"max_micro","value":"20137"},{"value_type":"interval","value":"300000"},{"value_type":"signal","value":"-83"}]}

many thanks in advance
MK

Support for Home Assistant 2025.1

There is a breaking changes to Local Luftdaten that has been reported by Home Assistant:

TEMP_CELSIUS was used from local_luftdaten, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/lichtteil/local_luftdaten/issues

BTW - thanks for great component.

No value returned after upgrade to HA 2021.6.3

Hello lichtteil,
Since the last update , local luftdaten show NAN on all values. I still see the value localy and IP address didn't change.
I don't have any logs issues reported. Reinstall + Restart don't help.

Version installed is 2.0.0 via HACS

Can you help ?

Do you think there is a link with something change in HA because I see this home-assistant/core#50365 ?

TypeError: timeout() got an unexpected keyword argument 'loop'

Since updating to 2.0.0 I am not getting data and am seeing the following errors in the log:

2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop'

Support for DNMS

https://sensor.community/de/sensors/dnms/

output from data.json:

{"software_version": "NRZ-2020-133", "age":"62", "sensordatavalues":[{"value_type":"DNMS_noise_LAeq","value":"54.52"},{"value_type":"DNMS_noise_LA_min","value":"43.09"},{"value_type":"DNMS_noise_LA_max","value":"75.97"},{"value_type":"samples","value":"6093860"},{"value_type":"min_micro","value":"23"},{"value_type":"max_micro","value":"9888"},{"value_type":"interval","value":"145000"},{"value_type":"signal","value":"-84"}]}

Json error

Logger: custom_components.local_luftdaten.sensor
Source: custom_components/local_luftdaten/sensor.py:186
Integration: local_luftdaten (documentation, issues)
First occurred: 01:40:21 (900 occurrences)
Last logged: 09:07:24

REST result could not be parsed as JSON

WARNING (MainThread) [custom_components.local_luftdaten.sensor] REST request timeout

I installed the pluging through HACS, I added the lines in configuration.yal, see first lines below:

' ## LuftDaten

  • platform: local_luftdaten
    host: 192.168.XX.11
    scan_interval: 180
    name: Fijnstofsensor
    monitored_conditions:
    • SDS_P1
    • SDS_P2
    • BME280_temperature
    • BME280_pressure
    • BME280_humidity
    • signal'

If I go to 192.168.XX.11/data.jason than I can also see the raw data.
In HA I do not see any data, if I look in the logs I see:

2023-02-20 13:07:05.610 WARNING (MainThread) [homeassistant.components.sensor] Updating local_luftdaten sensor took longer than the scheduled update interval 0:03:00
2023-02-20 13:07:05.626 WARNING (MainThread) [custom_components.local_luftdaten.sensor] REST request timeout

Can someone help me out please?

Platform error sensor.local_luftdaten - Exception importing custom_components.local_luftdaten.sensor

Any Homeassistant Version >2023.5 does not load the local_luftdaten component and hitting the "check configuration" from inside Homeassistant ends up in an error message:
"Platform error sensor.local_luftdaten - Exception importing custom_components.local_luftdaten.sensor"

The behavior can be reproduced by upgrading to e.g. 2023.6....when downgrading to 2023.5 again, everything starts working again.

Not sure if this is an issue in Homeassistant itself or in the local_luftdaten component.

Does anyone else have this behaviour?
Double checked my config but couldnt find any issues there - and again, with "older" HA versions everything is working like a charm.

Support for RadSens radiation sensor

Hi

I would like to see support for custom luftdaten build with RadSens radiation sensor included. Sample json is below. Value name is RadSens_radiation_static

{
"software_version": "NRZ-2020-134-B1-airomsk2custom",
"age": "124",
"sensordatavalues": [{
"value_type": "SDS_P1",
"value": "10.73"
}, {
"value_type": "SDS_P2",
"value": "4.95"
}, {
"value_type": "BME280_temperature",
"value": "-5.46"
}, {
"value_type": "BME280_pressure",
"value": "100822.44"
}, {
"value_type": "BME280_humidity",
"value": "81.40"
}, {
"value_type": "samples",
"value": "5059822"
}, {
"value_type": "min_micro",
"value": "22"
}, {
"value_type": "max_micro",
"value": "20049"
}, {
"value_type": "interval",
"value": "145000"
}, {
"value_type": "signal",
"value": "-80"
}, {
"value_type": "RadSens_radiation_static",
"value": "7.40"
}]
}

Documentation or migration for changed unique entity id

With e13069a we introduced a new way of building the unique entity id. To prevent errors and confusion when updating component we need to add either a BIG warning and explanation or better a migration function that takes care of old entity IDs. Maybe we can set the new unique ID and at the same time use the existing ID as a customizer option of the entity.

@JoachimEngelmann do you have any idea on how we could do this? I was reading about the Hass entity registry but I'm a bit lost.

Specify port number for the host?

Is it possible to specify a certain port for the specified host? I would like to connect the luftdaten sensor to a separate network using a esp repeater/AP. When a port could be specified some portmapping rules would do the job but currently I'm unable to get to the sensor.

Wrong unit for pressure?

I upgraded to the new release that includes BMP and just realized that I probably made a mistake in my PR.

As an orientation I took the existing implementation for BME280 sensors and set the unit of the pressure to mbar. It seems to me, however, the sensor reports the values in Pa.
I would prepare a Pull Request with changed units for both the sensors that I introduced and the BME280 for you to review.

TypeError: the JSON object must be str, bytes or bytearray, not NoneType

Hi,

The integration with my Luftdaten_Sensor is working fine (thx for that). When the data retrieval coincides with the dust collection/sending the response takes longer. It seems that then the response returned by Rest is None. It probably is best to ignore this measurement or retry in 10 seconds.

Is this the correct assumption?

Error:
2020-01-12 16:34:24 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.feinstaubsensor_humidity is taking over 10 seconds 2020-01-12 16:34:24 ERROR (SyncWorker_5) [custom_components.local_luftdaten.sensor] Error fetching data: <PreparedRequest [GET]> 2020-01-12 16:34:24 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.feinstaubsensor_humidity fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/local_luftdaten/sensor.py", line 117, in update parsed_json = json.loads(value) File "/usr/local/lib/python3.7/json/__init__.py", line 341, in loads raise TypeError(f'the JSON object must be str, bytes or bytearray, ' TypeError: the JSON object must be str, bytes or bytearray, not NoneType

Data:
{"software_version": "NRZ-2020-129", "age":"0", "sensordatavalues":[{"value_type":"SDS_P1","value":"10.83"},{"value_type":"SDS_P2","value":"5.00"},{"value_type":"temperature","value":"4.50"},{"value_type":"humidity","value":"83.10"},{"value_type":"samples","value":"4398224"},{"value_type":"min_micro","value":"32"},{"value_type":"max_micro","value":"20151"},{"value_type":"signal","value":"-58"}]}

HTU21D sensor

Hello!

The HTU21D Sensor have the following structure:
{ "software_version":"NRZ-2020-130-B5", "age":"174", "sensordatavalues":[ { "value_type":"SDS_P1", "value":"11.50" }, { "value_type":"SDS_P2", "value":"6.22" }, { "value_type":"HTU21D_temperature", "value":"30.15" }, { "value_type":"HTU21D_humidity", "value":"14.55" }, { "value_type":"samples", "value":"3190747" }, { "value_type":"min_micro", "value":"55" }, { "value_type":"max_micro", "value":"20120" }, { "value_type":"signal", "value":"-76" } ] }

Can you update the Component?

Thank you.

Support for ClimateGuard Radiation sensor

Please add support for ClimateGuard Radiation sensor

https://climateguard.info/radsens/

It's integrated in beta of Luftdaten since last March.

Here is the json for it:

{"software_version": "NRZ-2020-134-B1-airomsk2custom", "age":"93", "sensordatavalues":[{"value_type":"SDS_P1","value":"20.17"},{"value_type":"SDS_P2","value":"9.93"},{"value_type":"BME280_temperature","value":"-7.99"},{"value_type":"BME280_pressure","value":"99043.78"},{"value_type":"BME280_humidity","value":"78.89"},{"value_type":"samples","value":"4952196"},{"value_type":"min_micro","value":"28"},{"value_type":"max_micro","value":"20513"},{"value_type":"interval","value":"145000"},{"value_type":"signal","value":"-86"},{"value_type":"RadSens_radiation_static","value":"10.20"}]}

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.