@urbanus in your wiring, did you flip around the leds? (i.e. did you connect the longer pin to the gpio pins instead of to vcc?
With your wiring, are the leds on when there is no traffic?
My guess is that you have reversed the connections. Which is fine, but by default the leds will be on.
Use a latching relay. Here is one I found on Amazon. https://www.amazon.com/dp/B015MRQNXS/?coliid=I3LXTGKX4GEPUR&colid=31WWM91JAUE22&psc=1&ref_=lv_ov_lig_dp_it
If you are trying to use with existing 3 ways use https://www.amazon.com/dp/B015MSYQ8Q/?coliid=I3RP8X9OMYWU97&colid=31WWM91JAUE22&psc=1&ref_=lv_ov_lig_dp_it
Use an optocoupler to indicate lamp status...see the last diagram in this post. https://forum.arduino.cc/index.php?topic=435506.0
@halo6 I use Domoticz instead of Vera, but the general idea should work.
Add another child sensor to your parking sensor that is a binary switch. Maybe S_DOOR, V_TRIPPED or S_BINARY, V_STATUS. That switch gets presented to your controller. Then have the parking sensor listen for a message to that child ID and work normally if on or do nothing (but listen for messages) when off.
In Vera, write a small script that turns on the new parking sensor switch when the garage door is open, and turns it back off again when the garage door is closed.
Hi @tamorgen - sorry for the reply to your old post (ignore if you've solve this already - or perhaps it's valuable still).
Have you looked at the Reactor Plugin for Vera? (it's on Github too - by Patrick Rigney aka Rigpapa from the Vera Forums). I believe it runs on OpenLUUP as well if you were external to Vera.
There are example use case videos on Youtube for it.
It is a logic engine for LUUP - (if/then/else/and/or/not/timers). You can react to any variable or device state. (ie if door not locked, lock it, then unlock it). You can chain actions or conditions together as well.
This was probably done in the past with PLEG, but I was never fond of PLEG so I wrote some conditional stuff directly in LUA, but since Reactor came along - it's so powerful, lightweight and a no brainer to use.
I'm probably going to write some battery monitoring and door state monitoring with MySensors with it shortly.