Hi there,
this is from where my inspiration comes - Automate your Garage Door! The PERFECT First DIY Smart Home Project. - YouTube - but I would like less functionality. I would like only to monitor garage door open/close status. So basically contact sensor connected to something with wifi functionality. I am not interested into controlling garage door remotely.
Would it be possible just to power Shelly1 (sonoff basic, something else?) from the 230V AC and connect reed switch to it. Then just see door status in mobile App/Home Assistant (my garage wifi and home wifi networks are not the same network so I would probably need to use cloud based solution - but I can live with it - and that is also reason I do not want to have functionality for open/close the door remotely)
because my flat (so home wifi) and my garage (public wifi hotspot) are geographically different locations (unfortunatelly).
I prefer as much out of the box as possible (so if the shelly could work like this with no programing soldering etc i would prefer it over ESP8266)
If your garage is remotely located buy a cheap router with VPN functionality and configure it accordingly - that way garage will be in same network as your flat even if it’s (hundred’s) miles away. Of course you’ll need VPN capable router at home as well.
Regarding module - check out sonoff modules - they can be flashed to ESPHome easy. Sonoff RE5V1 module has non-powered relay (NO contact) and a couple of solder pins - you can use GPIO2, 4 or 5 as input to see state of your garage. For non-soldering option there’s Sonoff SV module, which has already soldered pins for somewhat higher price. Both require 5V power supply, you can use any USB phone charger for that.
Oh, you’re on public wifi at garage… but i guess it could still work…
VPN stands for “Virtual Private Network”. It works in a way that you establish a secure connection between your two routers and this connection then works exactly the same as you’d be at home, connected to your local network.
If that setup will work in your location you must check out for yourself, i guess. I know that i CAN connect to my VPN if i’m in, say, shopping center and i connect to public wifi with my phone. It’s also safer this way than opening various ports in your home router (but that’s another subject).
But you need to connect a router to a wifi.
I have never heard of a router with that capability.
Because the router needs to be both “slave” (connected to a network) and “master” (accepting connections from other devices)
More unclear for me is how to connect the shelly and sensor. I expect from power outlet to Shelly1 L and N
but then not sure where to connect wires from the reed sensor
wifi is not so crucial from my point of view. In worst case I can buy router with GSM module and put simcard with some small data package on it. For me more mystery is wiring (as I am noob in that topic )
@Hellis81: aha…i know what you mean… in that case a small GSM module would be my suggestion also. @helpfinder :i couldn’t say for shelly, but If you look RE5V1 module from my link above, there are 7 dots beside sticker: first one is labelled IO2 - that is your input (gate closed switch), i believe that it’s GPIO2 in ESPHome config. GND is covered with sticker. If you solder two wires there then all you need is flash module with ESPHome program and connect those two wires and you’ll get info in your HA. TX and RX points are also below sticker (for initial flashing).
And power it with a charger or if the GSM module has an USB output.
The reed switch will switch the GPIO high or low.
The resistor is a pull down resistor (perhaps not needed if internal pull down exist) to make sure the value does not float.
Disregard this if I’m wrong: is it not possible with OpenWRT to have a router to connect to a wifi network and function as an AP as well and VPN of course.
In ESPHome you can set input as “INPUT_PULLUP”, but if cable to the reed contact will be long and false trigerrings will occur then external pullup (or down) is reccomended, since internal one is quite weak.
Of course it is possible. Every decent modern prosumer wireless router is capable of this. It’s called point to multipoint wireless bridging. The router connects to the public wifi as a client and at the same time creates an AP for your own private wifi. It bridges both networks, usually over a firewall and NAT and possibly with a VPN. You can also create your own with a Pi, for example. It’s not always trivial to configure though.