Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please, need a little help :) #5

Open
didierst opened this issue Mar 25, 2024 · 1 comment
Open

Please, need a little help :) #5

didierst opened this issue Mar 25, 2024 · 1 comment

Comments

@didierst
Copy link

Hello LeoDJ :)

First of all, thank you for your work and sharing your knowledge ;)

Allow me to contact you to perhaps get some help, otherwise, a track of reflection concerning your script to read the data from a CO2 sensor CM1106

To put it simply, I’m trying to improve a commercial Rovary RV2000P detector by adding an ESP32 in order to feed the data back to Home Assistant, ...

This project has already been considered by another enthusiast, but with a slightly different approach (no ESPHOME) and a slightly different Rovary motherboard.
The original project provides some details: https://www.weigu.lu/microcontroller/co2_sa1200p_hacks/index.html

The author retrieves the humidity and temperature values of the SHTxx sensor via the I2C bus, which I also manage to do without difficulty.
It retrieves the CM1106 value via "ESP softserial library" and it only connects a single cable (TX) from CM1106 to an esp8266 input (D5)

When I try your solution (CM1106.h + YAML) with RX and TX connected to the CM1106 I manage to read the CO2 sensor without any problem as long as the cm1106 is not plugged on the motherboard of the Rovary.
On the other hand when the sensor is plugged, so connected to the CPU of the Rovary, I get an error message ! this is most likely due to the fact that the sensor also interacts with the Rovary CPU.

I would be very grateful if your valuable knowledge would help me solve this problem by a trick comparable to that used by the author of the initial project, but compatible with ESPHOME

In advance, thank you for your advice and your opinion on the feasibility

Best regards,

Didier

Some logs of what I get :

When cm1106 not connected on MB of Rovary :

Capture d’écran 2024-03-25 à 19 30 47

Capture d’écran 2024-03-25 à 19 31 12

When connected :

Capture d’écran 2024-03-25 à 19 10 38

@didierst
Copy link
Author

The YAML Used

esphome:
name: cm1106_sensor
platform: ESP32
board: mhetesp32devkit
includes:
- "cm1106.h"

logger:

web_server:
port: 80

api:

ota:
password: !secret ota_password

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

ap:
ssid: "Rovary Fallback Hotspot"
password: !secret ap_password

captive_portal:

i2c:
sda: 21
scl: 22
scan: true
id: bus_a

uart:
rx_pin: GPIO16
tx_pin: GPIO17
baud_rate: 9600
id: cm1106_uart

sensor:

  • platform: custom
    lambda: |-
    auto cm1106Sensor = new CM1106Sensor(id(cm1106_uart), 10000);
    App.register_component(cm1106Sensor);
    return {cm1106Sensor};
    sensors:

    • name: "CO₂ Sensor"
      accuracy_decimals: 0
      unit_of_measurement: "ppm"
      icon: "mdi:molecule-co2"
  • platform: sht3xd
    temperature:
    name: "Rovary Room Temperature"
    humidity:
    name: "Rovary Room Humidity"
    address: 0x44
    update_interval: 60s

switch:

  • platform: custom
    lambda: |-
    auto cm1106Calib = new CM1106CalibrateSwitch(id(cm1106_uart));
    App.register_component(cm1106Calib);
    return {cm1106Calib};
    switches:
    • name: "CM1106 Zero Calibration"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant