QUOTE(th3game @ Nov 12 2019, 08:18 PM)
i dunno about mi ecosystem. are you controlling your porch light using the board or just normal on/off switch?
if u are tapping porch light from the board,u must know that the board can activate the porch light when the gate is opening and will turn off after the gate is closed.
below taken from the user instructions of the dcmoto gfm925w
ps: photosensor always on the board that always dark

but if you have normal on/off switch then you should do the automation. sense the gate is opening then turn on the porch light and vice versa.
to sense the opening/closing gate, if you using the same board as mine, i would suggest to use optocoupler 12VDC. input side tap it on port on autogate board it says LAMP. then other side tap it onto any GPIO,for my case i will tap on my sonoff 1ch on GPIO14,GND,VCC. need abit soldering. to simplify it
open gate>board sense it then send 12VDC to port LAMP>opto isolator triggered>pull dow logic to low GPIO14>publish MQTT gate open. the logic low will retained as long as the gate is open
and after the gate is closed, the board will stop send 12VDC after 1min to port LAMP> opto isolator not triggered > logic high on GPIO14>publish MQTT gate closed.
sorry abit long to explain.
optocoupler examplewhat Fubar20 said is correct
Thanks for the detailed explanation. I should have the same board as you and no, the porch lights are not control by the board. The lights are control by smart switch. I do not need to control switching off the lights when the gate closes. Normally once i park my car, i will close the gate before getting down the car for safety reason.
Edit: just done some research on optocoupler, i think that solved my issue of isolating the two circuits to avoid the high voltage from the board.
Edit 2: after further thoughts, going to change my plan. I will use the optocoupler as the 'switch'. The receiving end will be using a modified door sensor. Read a link on modifying the sensor below.
https://community.home-assistant.io/t/porta...or-sensor/74090By using this door sensor, i will be able to know the open and close status of the gate.
Do you have information on what is the LAMP relay in the circuit diagram that you posted? Just wondering what is that for if the output from the LAMP is 12VDC?🤔
This post has been edited by lencent: Nov 15 2019, 11:45 AM