ESP8266: Read and trigger a e-bike brake cutoff

Before I start reinventing the wheel I wanted to ask if there is already anything on that subject?
As far as I know, the brake gets triggered as soon as the circuit is shorted.

What I need is a method to observe the line with the ESP and to distinguish between the two states.

Furthermore I need a method to trigger the brake cutoff or to trigger a short circuit with the ESP.

ESP8266 is actually an IC. It does not specify a board.

Do you need wifi ?
Why the ESP8266 ?

.

ieee488:
ESP8266 is actually an IC. It does not specify a board.

It's not about a special board, it's about how you can basically do that with this type of IC.
I will use a WEMOS D1 mini Pro.

ieee488:
Do you need wifi ?
Why the ESP8266 ?

Yes, I will observe and control the brake cutoff from a mobile phone
furthermore the board needs to be small.

Possibly I could trigger the brake cut off by using the digitalWrite() function?
Question is, could I read the brake status (brake applied not applied) like a external button?