esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
416 stars 26 forks source link

Add the QMP6988 from the M5 Env III sensor #1567

Closed olaxe closed 2 years ago

olaxe commented 2 years ago

Describe the problem you have/What new integration you would like

Retrieve pressure from the QMP6988 embedded in the M5 Stack ENV III

Please describe your use case for this integration and alternatives you've tried:

I have tried to use the BMP280 but, of course, the chip id is not correct and I think other internal things are different

Additional context

The official documentation: https://docs.m5stack.com/en/unit/envIII The QMP6988 datasheet: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/enviii/QMP6988%20Datasheet.pdf The library for the chip: https://github.com/m5stack/UNIT_ENV/tree/master/src

comnam90 commented 2 years ago

+1 This would be a great addition

andrewpc commented 2 years ago

+1 would be great. Thank you

alexruffell commented 2 years ago

+1 The M5Stack Env III Sensor has a great packaging (except for the hard to find connectors) solution that makes it easier to use in projects.

image

Support for the SHT30 is already present. All that is missing, for full support, is the QMP6988 pressure sensor support.

Edit: Seems like it is happening: https://github.com/esphome/esphome/pull/3192 (Thanks to @andrewpc)

andrewpc commented 2 years ago

No problems. Ive just updated the code based on the feedback so hopefully its ready to merge soon.

AlliTec commented 2 years ago

+1. Would be awesome to include this. Please... :)

andrewpc commented 2 years ago

This has now been merged and should be in the next major release. You can start using it now by referencing it on the dev branch as an external component:

external_components:
  - source:
      type: git
      url: https://github.com/esphome/esphome/
      ref: dev
    components: [ qmp6988 ]

and then configure accordingly:

sensor:
  - platform: qmp6988
    temperature:
      name: "Temperature FB QMP ESP32"
      oversampling: 4x
      id: temp_qmp
      accuracy_decimals: 1
    pressure:
      name: "Pressure FB QMP ESP32"
      id: pressure_qmp
      oversampling: 4x
      accuracy_decimals: 0
    address: 0x70
    update_interval: 60s
    iir_filter: 2x

Let me know if you experience any issues.