[HN Gopher] Automating my gate door via a smart relay
       ___________________________________________________________________
        
       Automating my gate door via a smart relay
        
       Author : farslan
       Score  : 23 points
       Date   : 2024-06-30 09:56 UTC (1 days ago)
        
 (HTM) web link (arslan.io)
 (TXT) w3m dump (arslan.io)
        
       | Animats wrote:
       | All that electronics associated with the gate and you can't get
       | info back about whether it's open, closed, moving, or blocked.
        
         | randunel wrote:
         | The PCB stores the state persistently, but it doesn't expose
         | it. After all, how would it? ADC, I2C, SPI, PWM? Those pins
         | cost unjustified $, what percentage of buyers would even know
         | what those letters mean?
         | 
         | You can check state persistence by cutting the gate's power
         | during operation. When the power comes back on, your next
         | button press will trigger the next operation in order, not the
         | previous one (if you cut the power during opening, the next
         | button press closes it and viceversa).
        
           | PenguinCoder wrote:
           | Over thinking it I suppose. All it takes is a simple relay
           | board, registering a signal on whatever pinout is available,
           | be it GPIO or SPI. Example:
           | 
           | https://www.seco-larm.com/product/sr-1212-c7alq
           | 
           | And
           | 
           | https://www.seco-larm.com/product/sm-226l-3q/
        
           | stavros wrote:
           | These switches do expose their state over Zigbee, it's just
           | that their state is only on when the door is moving (I
           | believe). Other than that, they don't know what the door's
           | status is, that's why the OP had a door sensor.
        
       | kelnos wrote:
       | Love stuff like this. Years ago I lived in an apartment building
       | where the main entrance was controlled by an analog phone system
       | with an extra pair of wires. All the handsets in the unit were
       | connected to a speaker/microphone outside the door (directly;
       | there was no enable/disable when your unit was or was not getting
       | buzzed), and there was an extra pair of wires for activating the
       | door unlock.
       | 
       | I wanted to give my partner (and houseguests) the ability to come
       | and go as they pleased without having to give them a building key
       | (I only had one spare key provided by my landlord, and it was
       | expensive to replace if lost). I bought a relay and grabbed an
       | old Raspberry Pi, hooked the relay to the Pi's GPIO pins, and
       | opened up the intercom phone and found the wires that activated
       | the door unlock. Wrote a little HTTP server in python that would
       | enable the GPIO pins for 10 seconds to unlock the door, and wired
       | that up to my home automation system (openHAB). I got a Twilio
       | phone number, and set it up so it would respond to particular PIN
       | codes from specific phone numbers. When I was hosting someone for
       | a weekend, I'd generate a random 8-digit PIN code and add that
       | and their phone number to a config file on the Pi.
       | 
       | At the time I hadn't realized there were smart relays; otherwise
       | this maybe would have required less work. This was 6 years or so
       | ago, though, so maybe they weren't really a thing back then.
        
       ___________________________________________________________________
       (page generated 2024-07-01 23:00 UTC)