This project won the Southern California Azure IOT Hackathon 2017. It is a remote monitoring IOT solution for a Shared Laundry service.
A common problem in apartments with Shared Laundry room is not knowing if enough number of machines are free to use at any given point of time. This project aims to bridge the knowledge gap by an IOT solution and Mobile app so the tenants can better plan their laundry activities.
This remote monitoring solution when implemented will save time and free tenants from frustration. The apartment manager will also be able to analyze machine activity and can plan to increase the total number of machines in his building if required.
This solution can be implemented in public Laundrymats as well.
The solution consists of 4 main components
- Sensor Data collection: Vibration sensors connected to RaspberryPi for determining machine state.
- Data storage: Microsoft Azure IOT Hub, DocumentDB to receive, analyze and store data from Raspberry Pi.
- Data retrieval: HTTP triggered Azure Function to act as a server less application to retrieve latest machine state from Document DB.
- Mobile App: App to retrieve latest machine state by triggering Azure function and visually presenting its availability to the user.
Sensor Data Collection
Vibration sensors attached to each machine are used to detect if a machine is running or not. Hardware Wiring documentation can be found here. A Node.JS program running on Raspberry Pi receives data from sensors every 2 seconds. When a state change is discovered, it sends a message to the Azure IOT hub. The program is available to download from Github.
Data storage
Azure IOT Hub is used securely to collect messages from the Raspberry Pi. Azure Stream analytics is used to process the data and store in DocumentDB.
Input for the stream analytics job is Azure IOT hub. Output is DocumentDB. The query used is
SELECT
machine,
CAST(Status AS BIGINT) AS machinestatus,
EventProcessedUtcTime
INTO
dbout
FROM slrawin
Data retrieval
A HTTP triggered Azure function was used to query the documentdb database to retrieve the latest machine state of the desired machine. Here is the main Node.js script. The entire package can be downloaded from Github
For more detail: Shared Laundry Monitoring Solution