Let op: Tweakers stopt per 2023 met Tweakblogs. In dit artikel leggen we uit waarom we hiervoor hebben gekozen.

Opening my apartment door with a smartphone

Door WeeJeWel op zaterdag 26 augustus 2017 21:00 - Reacties (14)
Categorie: Home Automation, Views: 6.663


I live in a shared apartment building. The front-door of the complex is normally opened by my key, or when someone dials my house number I can open the door remotely when I’m at home.

One day however I figured out that... Continue reading at Athom Blog »

Volgende: Vacature Smart Home Content Marketeer 09-'19 Vacature Smart Home Content Marketeer
Volgende: Tweakers Meet-up terugkijken 11-'15 Tweakers Meet-up terugkijken


Door Tweakers user Glabbeek, zaterdag 26 augustus 2017 21:43

Dat klinkt interessant, maar is er dan geen... Lees verder op een andere plek

Door Tweakers user matroosoft, zondag 27 augustus 2017 00:02

Tja beetje reclame maar op zich wel interessant om te lezen.

Door Tweakers user marti28, zondag 27 augustus 2017 01:09

Continue reading at doei. :)

Kom op, plaats m gewoon hier op tweakblogs.

Door Tweakers user ybos, zondag 27 augustus 2017 07:47

marti28 schreef op zondag 27 augustus 2017 @ 01:09:
Continue reading at doei. :)

Kom op, plaats m gewoon hier op tweakblogs.

Door Tweakers user himlims_, zondag 27 augustus 2017 08:38


[Reactie gewijzigd op zondag 27 augustus 2017 08:38]

Door Tweakers user Kiswum, zondag 27 augustus 2017 09:29

Het begon zo mooi, maar als ik reviews of blogs op andere sites moet bekijken, dan laat ik maar voor wat het is en klik ik de pagina weg.


I got it. Het is de blog van de maker van Athom. In dat geval mag het wel iets duidelijker worden gemaakt.

[Reactie gewijzigd op zondag 27 augustus 2017 13:35]

Door Tweakers user Grvy, zondag 27 augustus 2017 11:20

marti28 schreef op zondag 27 augustus 2017 @ 01:09:
Continue reading at doei. :)

Kom op, plaats m gewoon hier op tweakblogs.

Door Tweakers user onok, maandag 28 augustus 2017 11:07

Volgens mij is tweakblogs niet bedoeld voor klik hier om verder te lezen

Door Tweakers user NoUseWhatsoever, maandag 28 augustus 2017 11:26

This guy is making $30.000 a month working from home with this simple trick.
They cut open a supermarket watermelon and you won't believe what they found.
One day however I figured out that... Continue reading at Athom Blog »

Door Tweakers user jip_86, maandag 28 augustus 2017 12:59

Beetje liefde voor WeeJeWel mag ook wel zeg. Ben erg tevreden met mijn Homey O+

Door Tweakers user GrooV, maandag 28 augustus 2017 18:40

Ach, zolang tweakers al jaren niks doet aan de Tweakblogs kan je mensen niets kwalijk nemen

Nog een tip: maak je API wat veiliger voordat mensen het na gaan doen en alle deuren te hacken zijn

Door Tweakers user dôh, maandag 28 augustus 2017 21:12

Leuke oplossing, lekker hoog Tweakers gehalte! In plaats van dit te bouwen had je natuurlijk je huissleutel gewoon met een musketonhaak aan je fietssleutel gehangen. ;)

Hoe heb je de security rondom het inloggen op je Homey geregeld?

Door Tweakers user LankHoar, dinsdag 29 augustus 2017 15:03

Leuk project! Alleen wel jammer dat click here to continue reading

Door Tweakers user Devian, dinsdag 29 augustus 2017 16:27

I live in a shared apartment building. The front-door of the complex is normally opened by my key, or when someone dials my house number I can open the door remotely when I’m at home.


The key I use to open the door is attached to a keychain, which is in the lock of my bike. So the problem is clear: when I approach home, I have to lock the bike, get the key, open the door, and unlock the bike again. And worse, get off the bike! Argh.
One day however I figured out that the intercom system in my apartment can open the door remotely – even when no one ringed my apartment’s number! Obviously this had to be connected to Homey.

Project requirements
This project will describe how to remotely open the door using the intercom system. If you’re planning to do this yourself as well, you will need:
Intercom with a physical button
Wemos D1 Mini (link)
Wemos Relay shield (link)
5V Micro-usb power supply
Two jump wires
Basic soldering skills

My intercom has a push button that -when pressed- connects two contacts, which then opens the door. One way to connect two wires automatically is by using a relay. The relay is switched on and off by the Wemos D1 module, a Wi-Fi enabled prototype board based on the ESP8266 chip. Homey sends a signal to the Wemos D1 – but first let’s connect the electronics.

Wiring the electronics
The first step is to solder the Wemos Relay shield to the Wemos D1 Mini.


The final result should look like below:

Next, open up your intercom and solder two wires where the button should make contact.

Connect the two wires to the NO (Normally Open) and the C (Common, in the middle) contacts. The button will now not make any connection unless instructed to do so. For more information about how relays work, Instructables has made a great background article about relays.

Flashing the firmware
The Wemos D1 Mini is a microcontroller, and needs some firmware to run. Install the Arduino software as described in this tutorial.
The software I’ve written (named RelayCtrl)is nothing more than a webserver with a /toggle endpoint, which quickly toggles the relay on, waits 500ms, and turns the relay off again.


Download the source code from my GitHub repository and flash it on the Wemos D1 Mini from a PC. After flashing, connect to the Wi-Fi network named RelayCtrl. Follow the instructions to connect the module to your Wi-Fi network.
When the unit is connected to Wi-Fi, disconnect it from your PC, re-assemble your intercom and connect the 5V Micro-usb adapter to the module.


To test the system, navigate to http://relayctrl.local/toggle in your browser. Upon visit, you should hear the relay briefly click on and off.

Connecting to Homey
The relay now can only be controlled when connected to your Wi-Fi network, that’s great! But when you’re in front of the door, you’re usually not connected to your home’s Wi-Fi! Luckily for us Homey is always reachable, even from outside your Wi-Fi network, e.g. over your mobile 3G/4G network.

I’ve used the following apps on Homey:
Webhook Manager
Virtual Devices
HTTP request flow cards

All three are made by our amazing community. Thank you for these very helpful apps!
First, create a virtual ‘Button’ device using the Virtual Devices app, and choose an icon you like.

Next, I’ve created two Flows. The first Flow actually toggles the relay by sending a HTTP GET request, just like we did in the browser.

The second Flow starts this Flow when the virtual device’s button has been pressed:

Now we can open the door from within the Homey app. Neat!

Adding an Android widget
Opening the Homey app can take a few seconds. While we’re working on a new version of the app which is a lot faster, I’m too impatient and created my own solution.
So I’ve added a third Flow:


When a Webhook is received (this is an URL accessible from anywhere in the world), the intercom is also opened. Next, I’ve downloaded the HTTP Widget app from the Google Play Store on my Android phone. Simply add a widget to your homescreen, copy-paste the webhook URL from Settings → Webhook Manager in Homey and replace your_event_name with intercom and paste it in the widget. My URL looked like this: https://webhooks.athom.co...m&data1=a&data2=b&data3=c


Now you can open the intercom from your phone’s homescreen! This is very fast and it feels amazing to cycle inside the apartment building while the door is opening. My neighbours really were wondering how the hell I did that.

Future improvements
I’ve tried tinkering with a Bluetooth iBeacon to automatically open the door when I’m in the neighborhood – but the reliability isn’t as good as I’d hoped it to be yet. But with this setup, opening the door can be done from anywhere: a friend’s phone, a 433 MHz remote… you name it!
I hope this blog was fun reading and made you think about the things you can do with Homey!
— Emile

[Reactie gewijzigd op dinsdag 29 augustus 2017 16:32]

Om te kunnen reageren moet je ingelogd zijn. Via deze link kun je inloggen als je al geregistreerd bent. Indien je nog geen account hebt kun je er hier één aanmaken.