wardrobe which can suggest you which cloth to wear, notify you which cloth has been ignored.
People nowadays like to shopping and buy clothes. However most of the clothes will be storing inside wardrobe for long time even up to several years. Especially in those countries with high humidity, clothes can easily get molded while putting it aside for long time.
Smart wardrobe will help them to manage their clothes inside wardrobe. Besides an attached screen, it can also push all data into cloud and further sync up data with mobile application. User can get suggestion on what to wear today from their phone app base on what event are there in their calendar and also the weather. The application will provide a dashboard to show that which cloth having the highest frequency of wearing and which is never touch for long time. Application can further suggest user to sell it into second hand platform or make a donation for charity.
Girls will tend to buy more clothes than their need and ended keep inside wardrobe for years but never wear it. While buying clothes, girls will be controlled by emotion rather than rational. They will likely buy without thinking and this ended up as a result paying more money and occupied more spaces.
Besides, living in the high humidity and warm weather country such as Singapore, new clothes can easily become moldy and smelly.
The idea integrated IoT units together with mobile app. It is not only an inventory tracking system but an established mobile personal inventory management system. With a better management of clothes, user have a better view on which clothes they wear the most frequent at the same time which is least frequent. This may help them to further decide for those least frequent clothes to either give to friend or make a donation for charity.
Value proposition and practical concept
Nowadays RFID technology is becoming more mature and common. The usage of RFID tag has become very common and even printable using a printer. Also, the RFID reader module become cheaper and cheaper at the same time better performance. This can greatly reduce the set up cost of an inventory tracking system.
The system only require one time set up and one time registration of cloth, the rest of the process will be automated. Whenever user taking or putting in a cloth, it will be tracked automatically. Once the data is collected, it can be processed further and analyzed to give user suggestion on what to wear today, which cloth has been ignored etc.
This concept simply help user understand what their need and help them to save money for buying clothes or suggest them to make a better arrangement for their unused clothes (donate, exchange or sell). As a result, small investment bring user great saving.
The whole idea
Smart wardrobe idea has been around for many years, however a low cost and practical solution is not yet available in the market. This idea is implemented using a low cost RFID reader and IoT processing units, and integration of mobile app just simply make this idea easier to use and sync up with user’s daily life. It can further developed into a mobile wardrobe or a personal fashion manager.
The project will consist of 4 main components: user terminal (phone, pc, tablet), Raspberry Pi2, RFID reader, and Microsoft Azure. For first time registration, user will need to let RFID reader read the tag and a push notification will be shown inside user’s mobile phone application. User will need to key in further details about this cloths for example color, type, name, etc.
Once record is created, system will automatically track the item taking out or putting in from wardrobe. After consolidating data, a report will be generated and give user better idea of which cloth is most preferred or which is most unwanted.
The server (Raspberry pi 2 running on Windows 10Iot core) is running at your bedroom attached to an Arduino board connecting to UHF RFID module. All clothes hanging/storing inside wardrobe is attached an RFID tag on that. Whenever clothes is putting in or taking out from wardrobe, that will be tracked by RFID reader and arduino board. The sensor data will then send over to Raspberry pi 2. After processing the data, Raspberry Pi2 will then send the data to Azure SQL database (db shared with Universal app).
The Universal app system back end running on Microsoft Azure VM is able to support high traffic and allow users to register an account. Without setting up Raspberry PI and RFID, the app will act as normal digital wardrobe to help user manage their clothes on their phone/windows10 devices. The app will have the functionality to suggest user on which cloth to wear base on any scheduled event in the event planner, and also weather forecast.
Once wardrobe data is sync up with universal app, the app will further show user which cloth is having highest frequency of wearing and which one has least frequency. If there is any cloth has been ignored for more than one year, app will then suggest user to wear it, sell it or donate.
For future development, data stored inside cloud may further being processed by machine learning algorithm in order to understand user’s preference and habit then suggest user what to wear base on event (pull from device’s calendar) or weather (pull from weather forecast). The app will also suggest user to donate, exchange or sell the unwanted clothes.
I’m using Arduino UNO to collect data from JT-2850 UHF RFID reader module. The reader module using universal asynchronous Receiveer/transmiter (UART) communication. Connect TX pin on RFID module to RX pin on Arduino UNO, and connect TX pin on Arduino UNO to RX pin on RFID module as the schematic below:
Before the module is connected, Arduino UNO need to connect to your PC and upload the Arduino Code attached here for Arduino UNO to keep sending read command over to RFID module, at the same time write the data returned back to USB port.
Once the setup on Arduino UNO is done, the next thing is to make Raspberry Pi2 able to read data transmitted from Arduino UNO and make further processing.
Raspberry Pi setup:- The Background App running at Windows IoT core
I deployed this background app into Raspberry Pi2 running Windows IoT core, the source code can be found under my GitHub Repository (under SmartWardrobeBackgroundApp folder).
Take note of capability setting under the Package.appxmanifest file as the app need to access USB port. The capability setting should include this:
<Capabilities> <Capability Name=”internetClient” /><DeviceCapability Name=”serialcommunication”> <Device Id=”any”><Function Type=”name:serialPort”/> </Device></DeviceCapability> </Capabilities>
The background app will first look for Arduino UNO, make the connection and start receiving data from Arduino UNO. Once an array of RFID data is received, the background app will compare the RFID list with existing RFIDs stored under Azure SQL database through web API. If the RFID list length is same as RFID list stored under Azure SQL database, It means that all the clothes are stored back to wardrobe. The Web API functions will then look for all clothes with status = “-1” (took out before) and update the “1”(put back). At the same time, a new activity record will be added into SQL database to store the rfid, status, and time.
If RFID list in database is longer than RFID list read, that means a cloth has been taken out. The cloth record will be updated with status “-1” and frequency +1, at the same time an activity record with rfid, status, and time will be added.
If RFID list read by UHF RFID module is longer than existing RFID list in database, that means a new cloth is going to register into system. The Web API will then create a new record with the new RFID tag value and time. At the same time send push notification to mobile application to notify user to complete the entry, by inserting image, cloth name, color and type. Once user finished the entry, the new cloth will be traced by the system and record the wearing frequency.
Web API server set up and Software Development
I’m using 3 services provided by Microsoft Azure. The web API server as a Asp.NET web application is hosted under smartwardrobe.azurewebsites.net. The clothes details and reader data are stored inside Azure SQL database server: smartwardrobe1.database.windows.net. While the third services I used is the notification hub under service bus. The notification hub may help me to send push notification to mobile app or Windows Universal app. The notification hub service is running at: https://smartwardrobe.servicebus.windows.net/notification. For notification hub setup you may refer here: https://azure.microsoft.com/en-us/documentation/articles/notification-hubs-android-get-started/
The Azure environment setup:
The web api together with database setup is deployed using Visual studio 2015, it is a MVC base RESTful API. But frankly, I’ve failed to configure PUT and DELETE method on Azure Web (sorry for my poor knowledge, I’m not able to solve this by submission deadline, azure web service default setting is not allow those method and while i tried to call, it returned “HTTP Error 405 method not allowed”). The RESTful API currently support GET and POST method only.
The project under smartwardrobe folder in github repository https://github.com/seeyouu87/smartwardrobe is using MVC with Entity Framework. So if you have downloaded the code, remember to run Enable-Migrations and Add-Migration command in your nuget console before you try to run in local debug mode. You may follow this guide: https://msdn.microsoft.com/en-sg/data/jj591621.aspx
After tested the code, if you feel like deploy it onto azure web API server, you may follow this tutorial http://docs.asp.net/en/latest/tutorials/publish-to-azure-webapp-using-vs.html and make sure you checked the “Execute Code First migrations (run on application start)” before you clicked the published button:
After you have clicked “Publish” button, Visual Studio 2015 will launch your default browser once the website is published. And you will then try to make a simple GET call (/api/clothes) to see result. It should look similar to the following screen shot:
Mobile APP development
The mobile application serve as a client terminal in order for user to update their cloth detail, get suggestion, manage their clothes inside wardrobe. This project currently only Android application is available. Mobile app for other platform is in progress.
The workflow on mobile app started from push notification which notify user regarding the new cloth is added. User will need to click on the notification and continue on app.
User is required to fill in the details of the cloth from mobile app, once completed, the cloth will be listed on dashboard with frequency of wearing showing on top right corner.
Here is the flow chart of creating new cloth
Upon created a new cloth, system will monitor the frequency of wearing of new cloth, it will then send a random notification for user to take care on those clothes have been ignored for long time.
This android mobile app is currently in progress, there are more features will be coming in due course.
Source: Smart Wardrobe