esphome icon indicating copy to clipboard operation
esphome copied to clipboard

Feature/add seeed grove gmxxx multichannel gas support

Open YorkshireIoT opened this issue 2 years ago • 14 comments

What does this implement/fix?

Add support for Grove Multichannel Gas Sensor V2 (https://wiki.seeedstudio.com/Grove-Multichannel-Gas-Sensor-V2). The sensors themselves do not produce measurements with units like PPM but instead just raw values read from the sensor ADC. Ideally there would be some baselining built into the sensor but I don't have any other sensors I could provide and test that baselining against. Hopefully this is something someone else can add or I can add further down the line. The raw values still provide insight into relative local changes in the different gas concentrations.

Types of changes

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Other

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#2598

Test Environment

  • [ ] ESP32
  • [ ] ESP32 IDF
  • [x] ESP8266
  • [ ] RP2040

Example entry for config.yaml:

# Example config.yaml
sensor:
  - platform: grove_gas_mc_v2
    no2:
      name: "Nitrogen Dioxide"
    ethanol:
      name: "Ethanol"
    carbon_monoxide:
      name: "Carbon Monoxide"
    tvoc:
      name: "Volatile Organic Compounds"

Checklist:

  • [x] The code change is tested and works locally.
  • [x] Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

YorkshireIoT avatar Jan 16 '23 22:01 YorkshireIoT

Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration (sensor) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

probot-esphome[bot] avatar Jan 16 '23 22:01 probot-esphome[bot]

Hey there @YorkshireIoT, Thanks for submitting this pull request! Can you add yourself as a codeowner for this integration? This way we can notify you if a bug report for this integration is reported. In __init__.py of the integration, please add:

CODEOWNERS = ["@YorkshireIoT"]

And run script/build_codeowners.py

(message by NeedsCodeownersLabel)

probot-esphome[bot] avatar Jan 16 '23 22:01 probot-esphome[bot]

Hey there @jesserockz, mind taking a look at this pull request as it has been labeled with an integration (mics_4514) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

probot-esphome[bot] avatar Feb 21 '23 22:02 probot-esphome[bot]

Please remove unrelated formatting changes in the test yaml file.

@jesserockz R.e. the formatting changes in test1.yaml, these were done automatically on save within the dev container by the YAML extension and it actually stops you from reverting the changes while the extension is still enabled: https://user-images.githubusercontent.com/55233103/221353135-76a5d21b-706c-4c01-a564-d72dbfeb63f2.mp4

I had to disable the extension to be able to save the file and commit/push the changes

YorkshireIoT avatar Feb 25 '23 11:02 YorkshireIoT

lint-python failing due to unrelated error in esphome/components/esp32/__init__.py, but this is fixed in PR#4479

YorkshireIoT avatar Feb 25 '23 14:02 YorkshireIoT

I had to disable the extension to be able to save the file and commit/push the changes

You can save without auto formatting with ctrl+k, s

jesserockz avatar Feb 26 '23 18:02 jesserockz

I had to disable the extension to be able to save the file and commit/push the changes

You can save without auto formatting with ctrl+k, s

Ah thanks, that's good to know

YorkshireIoT avatar Feb 26 '23 19:02 YorkshireIoT

Hi @jesserockz, could I get a rereview of the changes you requested on this please?

YorkshireIoT avatar Apr 02 '23 09:04 YorkshireIoT

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

github-actions[bot] avatar Jul 02 '23 00:07 github-actions[bot]

Hi @jesserockz,

I've tidied up the commits and rebased and resolved some merge conflicts with unrelated changes that have gone into dev since I first open this PR.

This is ready for a rereview when you have time.

Thanks 😄

YorkshireIoT avatar Jul 02 '23 11:07 YorkshireIoT

Workflow run failing due to a 429 Git checkout error. If someone with the right priviledges could re-run the job when they get a chance that'd be really appreciated 😄

YorkshireIoT avatar Aug 20 '23 09:08 YorkshireIoT

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

github-actions[bot] avatar Jan 21 '24 00:01 github-actions[bot]

Ping

YorkshireIoT avatar Jan 21 '24 06:01 YorkshireIoT

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 54.03%. Comparing base (4d8b5ed) to head (7eaf329). Report is 1408 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4304      +/-   ##
==========================================
+ Coverage   53.70%   54.03%   +0.32%     
==========================================
  Files          50       50              
  Lines        9408     9698     +290     
  Branches     1654     1711      +57     
==========================================
+ Hits         5053     5240     +187     
- Misses       4056     4127      +71     
- Partials      299      331      +32     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jun 22 '24 10:06 codecov-commenter