Introduction: DIY - Smart Office Automation Using Raspberry Pi
The smart office concept has evolved significantly over the last few years. Energy efficiency is one of the most common functions for smart offices. Office Automation facilitates efficient and detailed information through the use of devices. Automation also increases the goodwill and reputation of any workplace because it adds to the prestige and status symbol of the enterprise.
In this Instructables, we hope to show how you can easily automate your office or workplace with Prota OS with no skills and tailored specifically to your needs. The idea is to strategically use office resources that can monitor energy usage and enable easy control for devices. The key idea of this instructable is to optimize workplace resources and utilize them well.
- Automated and connected devices, lights and appliances.
- Trigger automation when entering or leaving office using IFTTT
- Turn your webcam into a smart cam and receive a snapshot of your workplace and to monitor it easily.
- Save power and manage resources efficiently
- Get notified for each and every automation easily
Step 1: REQUIRED COMPONENTS
All the required components can be tailored based on your specific needs. Here is a list of the components which we used in our office automation.
- Raspberry Pi 2 or 3 = $25~35 each
- 32GB SD card = $15~20
- RF transmitter (with soldered antenna) = $2
- RF socket = $3~5 each
- Jumper wires = 1$~2$
- Old webcam
- MicroBot Push
- Amazon Echo Dot or Google Home
If you don’t have Echo or google home, you can use the app “Reverb” instead of Alexa and Google assistant for smartphones as well.
Step 2: SETTING UP YOUR PROTA SMART HUB
Prota OS is available on RPi B, B+ 2, 3. It can be downloaded for free from here . It’s only 3.8GB and easy to burn on an SD card (make sure to use a 16GB card).
Follow the instructions of Raspberry Pi foundation to write the OS image on your SD card. Extract the .img file from the zip in your SD card. Download and open Etcher, select the image and the drive and start the process.That’s it!
Once Prota OS is burned on the SD card, you can follow this simple installation guide to set up your Prota hub (less than 1 minute!). You only need to define its name and password, your time zone and your email address and the rest is completely automatic!That’s it! Within 10 to 15 minutes and with no hassle, you transformed your Raspberry Pi into a Smart Office automation hub!
Step 3: SETUP YOUR SMART PLUGS
The connectivity of your Raspberry Pi allows you to create easily your own smart office which can be used to connect the switches easily. To do that we need to connect an RF (radio frequency) antenna to your Raspberry Pi, configure it then pair it to RF sockets. You can solder and make the antenna very easily in a minute.
You need to solder the RF transceiver and self-made antenna together. Make sure the soldering connects the antenna to the ANT port on the RF transceiver.
You can have more information on how to make an external antenna in this article.
Keep in mind that the required length of your antenna will depend on the frequency of your RF socket. Our OS supports 433, 477 and 315 MHZ.
Once soldering is done, plug three jumper wires to your RF transceiver (433/477/315 MHZ).
VDD = Electric current (5V)
GND = ground (select a ground PIN)
DATA = has to be connected to GPIO23
You can connect those three jumper wires as we did on PIN 2 (5V), PIN 6 (GND) and PIN 16 (GPIO 23).
The last step is to connect the configured antenna with the RF socket.
- Open App Libraries and download ON/OFF app
- Click on “Add socket”
- Type-in the details, select “On Board” and click on “Done"
- The app will start scanning the surrounding sockets. Press and hold on the socket’s button until the LED blinks.
- When the LED stops blinking and stay on solid red, it means your Prota Pi has paired with your socket. You can then press on “Remember”.
You can now try turning it on and off via the app interface.
Alternatively, if you have WeMo, you can also very easily connect your WeMo smart plug via ON/OFF by selecting “WeMo Switch” in the New Device interface above.
Step 4: SET UP YOUR MONITORING WEBCAM
Using Prota OS, you can easily turn your webcam into a smart cam for monitoring with Prota OS!
It’s simple and setting up takes 60 seconds and just a few clicks (see above).
- Plug your old webcam
- Open App Libraries
- Download Webcam app
- Open Webcam app
Now that your webcam is turned into a smart cam, you’ll be able to get a snapshot from it whenever you want, by simply triggering an automation workflow that would take the snapshot and send it to you.
You can install your webcam in a specific room in your workplace you want to monitor, either when you’re in another room or even when you’re at the office or on the go. If what you want to monitor is too far away from where you want to install your Prota Pi, you can buy inexpensive USB extension cables for that purpose.
Step 5: TURN YOUR APPLIANCES AND SWITCHES INTO a SMART DEVICE
MicroBot Push is a wireless button pusher that allows you to turn any appliance that uses buttons into a smart device. It’s a great way to retrofit your old appliances and trigger them remotely. We recommend you install it on appliances or buttons you want to trigger automatically or from a distance.
For instance, placing it on your door button will allow you to open the door with a simple trigger from your smartphone or it will detect your presence in the region. Now Prota also iBeacon support for MicroBot Push. Currently, it is only available for iOS but it will be released soon for the Android.
Once turned into an iBeacon, your MicroBot Push will be able to detect your iPhone as soon as you get in range of the MicroBot Push.
Notified of your arrival, your Prota can start all the automation workflows that you want to be triggered as soon as you reach office. iBeacon allows a hand-free accurate trigger for your favorite smart office automation.
In order to do the pairing, please follow the instructions to pair the MicroBot.
Then just place your MicroBot Push on your appliance’s button and try it.
Now using IFTTT, you will be able to use directly your MicroBot Push or add the automation for controlling and automatically triggering it via Stories app. We will see the detailed automation in the following steps.
Step 6: SET UP YOUR TELEGRAM BOT
A Telegram Bot is a virtual assistant that you can create on Telegram messenger app. You can use this app to receive snapshots for your office easily through the webcam app.
- Download Telegram app on your smartphone and create an account
- Download Telegram app on your Prota Pi (in App Libraries)
- Open the Telegram app on Prota and click on “Request Authorization”
- Set a name and username for your bot, then click on "Create"
Your bot is now created!
Step 7: TIME TO AUTOMATE !!
Now it is time to create all the automation workflows for this project in order for setting up various automation rules for your smart office interface!
To do so, we need to connect our Prota features to IFTTT applets through automation storylines on the Stories app of your Prota Pi.
- Download IFTTT app from App Libraries
- Open Stories app
- Click on + and then on “When”
You need then to create the below-mentioned storylines that will be later connected to IFTTT applets. Alternatively, click on the links attached to import them automatically via the CITE feature (it’s necessary to add the personal elements to adapt the structures you import).
- For triggering on arrival:
When IFTTT applet run, ON/OFF smart socket turn on and office lights push the button, Then My iPhone receives notification message⇒ LINK
- For triggering on departure:
When IFTTT applet run, ON/OFF smart socket turn off and office lights pull the button, Then My iPhone receives notification message⇒ LINK
- For detecting and monitoring your workplace:
When Webcam detect some motion, Webcam takes a snapshot and MyBot sends a photo to Me ⇒ LINK
- For scheduling the particular devices to turn on or turn off:
When Scheduler triggers, My office socket turns off ⇒ LINK
- When your Phone enters or exits the beacon region:
When My iPhone enters to beacon region, Door pushes the button⇒ LINK
Similarly like this, you can make and create your own storylines based according to your specific needs. You can put your creativity for customizing your workplace just perfect for your needs.
Next, create the following applets:
It’s now necessary to create the IFTTT applets that will connect to your office Prota to our previously created storylines
- Create your account on IFTTT
- Search for the channel “Prota”
- Click on “Connect” and select your Prota (you need to use a device which has been granted a Prota Space access)
- Search for “Alexa”
- Click on “Connect” and identify with the account linked to your Amazon account.
- Select New applet and the click “this”- Choose “say a specific phrase” in Amazon Alexa
- Use whatever phrase you want to use and click “Create trigger”
- Click on “+that”
- Choose “Execute Storyline” in Prota and then choose the story which you set earlier from “Which storyline”.
- Click “Create action” and it's done.
You can create other applets as well in a similar way. Alternatively, if you’re using Google home, then you can create a similar applet for Google home usage as well.
Now every time you arrive or leave from your office, it automatically can trigger a preferred set of Storylines for your office automation. Simple as that.
Step 8: TEST THE OFFICE AUTOMATION
Now that you have set it up all, now it’s time to test your Smart Office. You can now enjoy the benefits of an automated office!
We hope you enjoyed this Instructables and discovered the many possibilities you can have to make your workplace or office a much smarter place in very simple and easy ways at a fraction of a cost. Other good improvements can be set up Philips Hue lights to control your lights color as well and using MicroBots to control your dumb mechanical switches and a lot more. This idea has tremendous potential to put your creativity to use.
What’s great about automating with Alexa or Google is that you bring your voice assistant with you when you are on the go using your Google assistant enabled smartphone or through the Reverb app. This allows you to trigger remotely any automation even from outside of your office or when you’re commuting towards your office which is very helpful to prepare something for your arrival or monitor your office. Make sure to use the same Google account or Amazon account to have the same assistant on all your devices.
We hope this project should have helped you to understand how you can easily turn your workplace or office into a perfectly professional smart office as much as you want. Make sure to have a look at our previous Instructables to get inspired.
Don’t forget to support us by leaving a “favorite” heart and do keep following us on both Instructables and Twitter .
JOIN OUR BETA PROGRAM TODAY!
You like Prota OS and want to test our newest apps before their release?
Subscribe us to enroll and get more information on our Beta program.
LIKE OUR PROJECTS?
Make your own interesting ideas and show us your creativity!
We are currently running a maker contest until September 30. Show us the creative projects you can do with Prota OS and win amazing prizes! Find out more info about the Maker contest here: https://support.prota.info/hc/en-us/community/t op...
If you have any question, please use our forum !