For a few weeks now, I have my personal Domotics solution. I could have bought a complete solution but rather I was intrigued by Domoticz. It’s an open source Home Automation System and what’s really great, it interacts with all kinds of communication protocols.
Basically, you need a device which can run a web server and you need a local gateway for the transmission of the various signal.
This is how my rig looks like:
Note: I still have to replace the antenna with a bi-polar 433MHz one.
When I ordered the hat three weeks ago, I received a gateway version 1.1.4 and did the soldering myself. the manual for v1.1.3 is still useful.
Here is a picture of the gateway:
The Arduino Mega is running specific RFLink Gateway firmware. An executable (RFLinkLoader.exe) is provided to flash the latest firmware. The same tool is also very useful to check if the gateway is functioning correctly (I had to fix my soldering job twice when I checked the gateway, I just got no signal).
The mega is just attached with a USB cable to my Raspberry Pi. The Pi was configured using this manual.
I started with ‘Klik aan/Klik uit’ power plugs. These are great when you want to schedule lights etc. to power on or off. But I also got a door bell. What could I do with that?
But I also got an electric door bell. What could I do with that?
The Internet Button
I bought an electric door bell from a local Action shop:
I managed to capture the signal of the button but I had some issues with the doorbell. Domoticz was unable to replicate the button signal. I could not trigger the doorbell sound using the website. At first, this was a little disillusion But I found a better usage for the button.
Could the button trigger something else than the doorbell?
tldr; Yes, you can!
First, you have to learn Domoticz about the doorbell button:
Right now, nothing will happen. You have to attach a notification.
So, you first have to decide what will have to happen when you push the button. Domotics supports various solutions to send notifications.
- Clickatell SMS
- Custom HTTP/Action
I have no experience with the various push notification providers. But I have experience with custom HTTP!
Introducing Microsoft Flow
If you want to send SMS messages in general, Twilio is an interesting suggestion, they provide a free trial. You only have to request a free API key. And the good news is that Microsoft Flow supports Twilio!
So I created a simple SMS flow:
The endpoint is created by Microsoft Flow. And I have defined the JSON that I want to receive:
And because I have defined these tho fields (device/actions), I can reuse the values of the fields to combine them into an SMS message.
So now we can define a custom action in Domoticz for our Microsoft Flow endpoint:
I just copied the URL from Microsoft Flow into Domoticz. And I defined the ‘same’ JSON message in the POST data.
And when the notification is saved, we can attach it to our button:
Note: in the JSON message of the custom HTTP action, I introduced the #MESSAGE. This is the Custom Message field, above.
Pushing the button
So finally it’s time to push the button.
And within just a few seconds, after I have pushed the button, I receive this message on my Lumia:
So, there it is! The simple six euro doorbell button is now connected to the internet. Please leave a message in the comments. I love to hear what you do with the button yourself!