Get webcam status into homeassistant - pulldown resistor on ESP8266 needed?

Hello everyone,

I am trying to get the state of my webcam into home assistant. As a cam I am using a raspberry pi zero with a Pi HQ module. The pi is running a firmware that makes it took to the PC as a regular webcam.

One pin on the pi gets HIGH when the webcam is active and I use this as the input for a gpio binary sensor. Documentation of webcam firmware

For esphome I am using a wemos D1 mini with a ESP8266.

Wemos-D1-Mini

I have now connected the 5V and GND of the Pi with the d1 mini and the webcam pin to D4 on the d1 mini.

The good news: it works, although it needed some delay for debouncing and when the pin on the pi goes back to low, the blue LED on the d1 mini stays lit. When the pin on the pi goes high again, the LED goes off. It seems to me that there might be some current flowing where it is not supposed to be.

My question as a electronics noob: do I need some pullup or pulldown resistors? I just connected the pins of the D1 mini and the rpi directly. Do I need a resistor between these two pins?

Thanks for your help!

I found out that on the wemos D1 mini board, the D4 pin is connected to the board LED in an inverted fashion: when the pin goes low, the LED is lit.

So it is working as advertized, maybe using the pin D5 instead would be a better idea, although it is nice to have a visual feedback.