About: Washy

You only need to open for example facebook messenger and search for Washy. Then you can start a conversation with our bot washy by typing for example 'I want to wash tomorrow'. The bot replies with all possible time slots for the requested day allowing you to choose your preferred slot, that gets reserved immediately by washy for you. He even reminds you 10 minutes prior to your reserved time so that you have plenty of time to get to the washroom by sending you a sms via Twilio. Now you only need to grab your laundry and go to the washroom. When you reach the machine, the system checks via face recognition if you are indeed the person who reserved this machine for this time. If this is the case you can fill the machine and start washing!

Tags:
Javascript C# Washing Machines Face Recognition Microsoft Munich

Media:

README:

washyBackend

This is the Backend for the washy scheduling system for washing machines. It’s a basic NodeJS instance running Aeolus as a web framework.

Usage

To run this server locally you’ll need to have NodeJS and npm installed and run:

$ npm install
$ npm start

Running In Docker

This repo includes a Dockerfile. To run this inside docker simply use:

$ docker build -t washybackend .
$ docker run -p 8080:8080 washybackend

MongoDB

All the information required to connect to the database should be editable in dburl.js and can be changed to any other MongoDB instance.

To run a MongoDB instance in Docker we recommend:

$ docker run -p 27017:27017 -d mongo

API

Here is a simplified API reference

GET

/HelloWorld

returns “Hello” to confirms the server is running.

/user?{number|facebook|telegram}={id}

returns the object of a user corresponding any of the given services.

/times/{day-string}

returns all the possible timeslots for a given day

/conversation/{id}/state

returns all the state information stored by a bot conversation

POST

/reserve/{start-date}

will reserve a Machine with the start-date for 2 hours. If succesfull it will return the machine. If not it will return false.

/room/{id}/machine

Will add a machine to the room with the given id.

/room/{id}/identify?url={url}

Will check if the person in the image in the url has a reserved machine in the room with the given ID. If that’s the case it will return the name of the person. If not it will give a reason for failing.

/user/pic?{number|facebook|telegram}={id}&url={url}

Will reference the picture in url to the user and train the Faces API.

/users?name={name}&number={number}&[{facebook|telegram}={id}]

Will create a user with the name and the phone number and reference them to any other given service id’s.

PUT

/conversation/{id}/state?[date={date}|user={user}|state={state}]

Will store the date and or user and or state information to the state object for persistency in the Bot. It will only override the given attributes and none more.

/user/{number}?{facebook|telegram}={id}

Will associate any external service id to the user with the number number.