5 ms·
It's a cool project, but for these kind of things I'd rather use a Shelly1. Runs locally, can easily be flashed with Tasmota firmware and it connects to my Home
by dirktheman 6y ago
It's a cool project, but for these kind of things I'd rather use a Shelly1. Runs locally, can easily be flashed with Tasmota firmware and it connects to my Home Assistant instance. This thing has never failed me and it's only $15, way cheaper than a Pi (keep the RBPi as your Home Assistant server!)
- zaabis 6y agoThanks for sharing! Will try it out ;)
- bonzini 6y agoOr an ESP8266, using MQTT to "press" buttons on a standard garage door remote control through a relay module. I uploaded mine here: https://imgur.com/a/l2wt40w https://imgur.com/a/l2wt40w (green and blue are ground and 5V, gray and white are the pulses to the relays).
- sgt 6y agoThis is great. Question - why did you use the relays and not just the GPIO pins on the ESP to short circuit the contact on the remote for a brief moment?
- jstanley 6y agoYou can't use GPIO pins to short 2 contacts together. The best you can do is apply voltage to the contacts (which might be workable, depending on how the remote is designed). To short the contacts you need either a relay or a transistor.
- sgt 6y agoAh yes, of course. Perhaps a transistor could work as well for low voltage?
- jstanley 6y agoYep, should work fine since you only need current flow in one direction!
- jononor 6y agoYes, though you will need to determine whether it should be pull up or pull down, and to what voltage level. And make sure not to provide it with too high a load (too low resistance), or too high a voltage, which may damage the circuit. Since the voltage levels might be different from your microcontroller, so I would probably recommend an optocoupler to simplify the interfacing. Gives the isolation of a relay but without the mechanical operation and size of one.
- bonzini 6y agoYes but I wasn't too comfortable with hacking the remote control because I wasn't sure if the button shorted the two contacts towards Vcc or ground (so if I needed an NMOS or PMOS). My knowledge of electronics is super minimal, I can read schematics, design simple circuits, size resistors, etc. but reverse engineering is beyond my level. Also I used this remote control only because one of the switches was broken, I didn't have a spare one so I couldn't afford breaking it. An optocoupler would be better but I figured maybe one day I will repurpose the relay shields for something else, or unsolder the relays. Actually my next project involves both optocouplers (for efficient 12V->3.3V conversion) and relays to drive AC but I will probably have a PCB manufactured for that one!
- bonzini 6y agoAssuming one of the contacts is connected to either ground or Vcc, one thing you can do is connect a GPIO pin to the other contact. Then when the GPIO is made an input the switch is "open", to close it you first write the value the other contact was connected to, and then you make the GPIO an output. Whether this works depends on the current that is sinked by the remote. This was my plan initially but then I went with the relays.
- aequitas 6y agoI second this. Pi is well suited for HA if you don't do have database stuff. And the Shelly allows to still keep manual controls in case your automation is broken. Although I've grown cautious of products like Shelly which use Wifi as they will become obsolete once their Wifi security protocol becomes broken (like WEP en WPA). But then again the same probably goes for more expensive Zigbee and Zwave devices.
- dirktheman 6y agoMy WiFi-connected IOT devices run on a separate network, with outgoing connections disabled, but that's more out of a privacy concern. I'm a big fan of IOT and home automation, with one exception: door locks. I wouldn't trust any electronic device with my door lock. There's just so much more that can go wrong, both from a technical and a security standpoint. Also, electronic door locks aren't THAT more convenient than my physical house key.
- aequitas 6y agoWith locks it's kinda reverse that a homebrew solution might actually be more secure than a commercial one (consumer grade at least). Mostly due to security by obscurity. The average thief won't take the time to reverse engineer your lock solution but just pick the next best break-in option which would be smashing a window or breaking the lock/frame. (Unless of course you have really dedicated enemies that want to specifically get something, but then no solution would be perfect. They will just bash your door in with an axe). But a thief might scan for Bluetooth signatures of known broken lock systems and just do drive by brake ins that way. I'm thinking of building a elektronic lock solution myself because it would actually increase security for me. As currently I often neglect to lock the doors when going to the back of the yard. Mostly because I don't have the key on me. And my kids are at an age that they will still neglect it for many years. A quick drive-by thief could be in and out in no time. An electric lock with a rfid and keypad would be a proper solution as it always locks when you close the door and are never locked out (unless the power fails but then you use a backup key stored somewhere safe).
- 6y ago
- tssva 6y agoA RPi Zero W is only $10 where I live and sometimes is on sale for less.