Camera doesn't work with pulse_meter integration
- Dominant language
- No language data
- Stars
- 313
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
### The problem
It is not possible to use `esp32_camera` and `pulse_meter` integrations both together.
Camera setup always failed.
### Which version of ESPHome has the issue?
2022.6.2
### What type of installation are you using?
pip
### Which version of Home Assistant has the issue?
2022.7.0
### What platform are you using?
ESP32
### Board
esp32cam
### Component causing the issue
pulse_meter, esp32_camera
### Example YAML snippet
```yaml
esphome:
name: campulse
platform: ESP32
board: esp32cam
<<: !include network.yaml
captive_portal:
api:
password: !secret password
ota:
password: !secret password
logger:
level: INFO
sensor:
- platform: pulse_meter
name: Pulse
pin: GPIO16
internal_filter: 10us
accuracy_decimals: 2
timeout: 30s
esp32_camera:
id: camera
external_clock:
pin: GPIO0
frequency: 20MHz
i2c_pins:
sda: GPIO26
scl: GPIO27
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
vsync_pin: GPIO25
href_pin: GPIO23
pixel_clock_pin: GPIO22
power_down_pin: GPIO32
name: Image
test_pattern: false
vertical_flip: false
horizontal_mirror: false
jpeg_quality: 63
```
### Anything in the logs that might be useful for us?
```txt
INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from watermeter.local using esphome API
INFO Successfully connected to watermeter.local
[06:50:24][I][app:102]: ESPHome version 2022.6.2 compiled on Jul 26 2022, 06:49:32
[06:50:24][E][esp32_camera:129]: Setup Failed: ERROR
```
### Additional information
I tried to find out where the problem was and it seems to be with the interrupt handling.
If I remove the `attachInterrupt` call in the pulse_meter `setup`, there is no problem and camera initialization is ok.
Note:
- I use the `ESP32 AI Thinker` board (schematic: https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2020/03/ESP32-CAM-AI-Thinker-schematic-diagram.png?quality=100&strip=all&ssl=1)
- The `GPIO16` is not used by the camera module (and problem is the same with other free GPIO)
Related links:
- https://github.com/espressif/esp32-camera/issues/256#issuecomment-813520803
- https://github.com/esphome/issues/issues/2483
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.