Software apps and online services
Corona virus out-break has put our lives upside dow, creating new norms. The most obvious impact of COVID-19 on the labor force is the sharp increase in employees working remotely. Some companies are already planning to shift to flexible workspaces after positive experiences with remote work during the pandemic, a move that will reduce the overall space they need and bring fewer workers into offices each day. A survey of 278 executives by McKinsey in August 2020 found that on average, they planned to reduce office space by 30 percent [source ]
While WFH provided flexibility and cost reduction for companies, there are some serious side effects. Recent studies have indicated, work from home brought serious physical and mental health issues impacting overall productivity of a person and after work life. Most of key factors are
- Improper work schedule, sitting on chair/couch for extensive period of time
- Less physical activity
- Inadequate ambient light which makes person less energetic after work
- Improper working temperature and humidity
- Improper indoor air quality
Based on statistics 1/3 of the population working remotely don't have dedicated or proper home office. When we are in office, most of the environmental measurements are monitored/controlled by office infrastructure.Impact of temperature and humidity on productivity
Recent studies have shown that slightly warmer temperatures are now considered ideal for productivity levels. Most used to consider 70 to 73 degrees Fahrenheit as the best temperature for the office, but a Cornell study found that up to 77 degrees Fahrenheit is now considered optimal.
There are a number of factors to consider when deciding on the right temperature for your office. The first one is, are there women in the office? Studies have shown that women are more productive in warmer office temperatures. Other things to consider are how many windows there are in the office and how tall the ceilings are. Large windows will bring in more sunlight and make the room warmer, while high ceilings can create drafts and make the room feel colder. Having a good understanding of the building and the people in it is key to finding the ideal temperature.
It’s important to consider humidity when determining the ideal office temperature. If the air is too humid people are more likely to sweat and feel tired. On the other hand, lower humidity can make the air feel colder than it actually is, leading to discomfort and dryness. An ideal humidity level is around 40% for year-round comfort [source]The Importance of Good Lighting on Productivity
Lighting makes a tangible impact on employee mood, motivation, and productivity. Studies have demonstrated that spending time in areas with the right lighting can boost vitamin D levels, improve sleep, fight seasonal depression, and cultivate a positive outlook.
Research also revealed that working in dim light for several days increases stress on eyes and brain fatigue, as a result, person feels low on energy and sleepy after office hours.A Sedentary Lifestyle When Working From Home
Many professionals have had to drastically alter their daily activities to integrate remote work into their lives this past year. While this meant working from the comfort of their own homes, it also may have led to a more sedentary lifestyle than the naturally active one they once enjoyed when commuting to work daily.
A lack of physical activity can lead to severe problems for a human body, including obesity, heart disease, diabetes and more, along with the depression and anxiety that can arise from having to deal with such maladies. For those who have not yet returned to the office, what is the best way to recover from an increasingly inactive lifestyle and make sure they’re getting enough exercise to keep their mind and body healthy?How Technology Can Help ?
Using technology we can combat most of the above issues. We can build a smart device connecting a set of sensors which would gather room temperature, humidity, light and indoor air quality. A human presence sensor can be connected to the microcontroller which can detect is the person is sitting for an extended period of time. Based on all these data collected from the device via bluetooth, a mobile app can send the data to the cloud. An algorithm running on cloud can send alerts / suggest recommendation to the person indicating if it's time for a walk or indoor air quality needs attention or need to control the temperature to increase productivity.Introducing Buddy
Buddy is a smart device built on AWS Edukit ( M5Stack Core 2 ), connecting a set of sensors
- BME680 - To capture room temperature, humidity and indoor air quality
- AK9753 - To capture human movement, it can precisely capture left-right, up-down movement
- Light Sensor - To capture room ambient light
Buddy is accompanying by a mobile app which connects to the device over bluetooth. Device runs an algorithm to calculate productivity considering temperature, humidity, light and IAQ. The productivity percentage is simply a number to indicate productivity. This number can be used to make necessary adjustment to your environment.
App also sends you reminder to take a break from work and walk to break sedentary.
- Productivity monitoring and recommendation - Based on sensory data, Buddy calculates the productivity and alerts you if productivity is dropping due to environmental data
- Readiness - Based on light, IAQ, buddy determines your readiness after work. High score indicates you will be more energetic and less sleepy after your work hours.
- Push Notification - You app does not need to be running on foreground. Buddy backend will send push notification via AWS Pinpoint
- Analytics - You can track all the sensor data on the app dashboard
- Production ready backend - Entire backend is built on highly scalable AWS server-less architecture which make this product ready to roll out in the market.
- Simplicity - The app is purposefully made very simple. You get all relevant information right on the dashboard page which opens up when you open the app after successful login. There is a 2nd tab where you can see all analytic data and 3rd tab with some settings.
A lot to talk about software architecture of this product. As mentioned before, I built this on AWS server-less architecture which means you pay by use, not running a server for 24x7 and paying when your system is not in used. Moreover, all the resources used are fully managed by AWS which means you don't need to worry about security patches, upgrades etc. Moreover all these resources auto scalable, you don't need to worry about scale-up / scale-down.
I am fond of AWS Amplify for some obvious reasons - easy to get started with prototype and deploy in production. Easy integration with Cognito authentication, app sync, pinpoint, lambdas.
User authentication ( signup/signin/signout) is managed by AWS Cognito. When new user signs up, user identity is given access to AWS IOT Core to send data from mobile app. As I am not connecting to AWS IOT Core from Edukit which has secured element, rather I am connecting from mobile app, it's very important to secure the communication. Mobile app can send data to IOT core using only authenticated cognito users.
Code snippet to attach a policy to cognito user identity
I granted permission to all iot actions during proof of concept. You can be specific and it's recommended as well. Important thing to call out here is the "*" in resource property. If you specify a particular topic, it does not work. If you find a solution, please let me know in the comment section. I am curious.
Once mobile app connects to the Edukit via bluetooth, Edukit starts sending data to RX characteristic. Upon receiving data, mobile app sends data to AWS IoT core on a predefined channel along with MAC address is is used as unique identifier of the device.
At the same time, mobile app stores the data to AWS datastore which gets synced with dynamoDB through AppSync.
One IoT rule is created to push the message to AWS IOT Event input
I have created a detector model to manage the workflow. This is a "no code" workflow management tool for IoT use cases. You can model your entire workflow logic via AWS console. AWS will automatically manage workflows for all your devices, uniquely identified by the key you specify. Here I am using "mac" address as key identifier.
AWS Edukit is acting as a BLE peripheral with below service UUID and two characteristics. The device is discoverable as M5StackCore2. From Swift code, I am discovering the device by service UUID so that BLE communication can continue even when app is not running on foreground.
#define BLENAME "M5StackCore2"
#define SERVICE_UUID "4D7D1101-BA27-40B2-836C-17505C1044D7"
#define TX_CHAR_UUID "4D7D1102-BA27-40B2-836C-17505C1044D7"
#define RX_CHAR_UUID "4D7D1103-BA27-40B2-836C-17505C1044D7"
When the device is connected to the app, LED bars turned BLUE to provide a visual indication.
As M5Stack has grove connectors, there is no soldering needed. All sensors can be plugged into grove sockets.
Pa I2C Hub connected to Core 2 I2C port
BME680 connected to channel 0 of Pa I2C Hub
AK9753 connected to channel 1 of Pa I2C Hub
Grove Light sensor to Core 2 B port
And that's it.Let's see it in action
Alright. So, enough of writing, now it's time to show how the entire system works. Check out below video.What's Next ?
This project was created keeping production deployment in mind. As you can understand, AWS backed backend architecture is highly scalable and we can go from development to production in no time.
With help of some PCB fabricator and partnership, we should be able to make the device for real use.
Buddy app is written in Swift which is only for iOS. I need to think about some hybrid mobile development such as flutter or ionic so that I don't need to maintain separate codebase for iOs, Android, Amazon Fire OSWant To Replicate ?
As part of the Hackster.io project commitment, I made my project open sourced. Please checkout my github repo in code section where I documented how to clone and build the project.