Features
Authentication
Authentication is integrated so that the Smart Pot functionalities are available only with logging-in in advance.
- http_routes.auth.login()
Logs in a user. — parameters:
in: body name: body schema:
- required:
username
password
- properties:
- username:
type: string description: the login name for the user
- password:
type: string description: the password for the user
- responses:
- 200:
description: user logged in succesfully.
- 403:
description: there is no user with that username and password.
- 422:
description: required parameters not supplied.
- http_routes.auth.logout()
Logs out the current user. — responses:
- 200:
description: user logged out succesfully.
- 403:
description: user is not authenticated.
- http_routes.auth.register()
Registers a new user. — parameters:
in: body name: body schema:
- required:
username
password
- properties:
- username:
type: string description: the login name for the new user
- password:
type: string description: the password for the new user
- responses:
- 200:
description: user registered succesfully.
- 403:
description: there is already an user with that username
- 422:
description: required parameters not supplied.
Plant Characteristics Setting
Manages setting the plant species, as the needed amount of water differs based on the plant.
- http_routes.characteristics.set()
Sets the characteristics of the plant. — parameters:
in: body name: body schema:
- required:
ideal_humidity
ideal_temperature
- properties:
- ideal_humidity:
type: number description: the ideal humidity for the plant
- ideal_temperature:
type: number description: the ideal temperature for the plant
- responses:
- 200:
description: everything went fine.
- 403:
description: user is not authenticated.
- 422:
description: required parameters not supplied.
Temperature Monitoring
Temperature endpoint
- http_routes.temperature.set()
Sets the temperature level. — parameters:
in: body name: body schema:
- required:
degrees
- properties:
- degrees:
type: number description: the number of degrees to set to
- responses:
- 200:
description: everything went fine.
- 403:
description: user is not authenticated.
- 422:
description: degrees not supplied.
Humidity Monitoring
Humidity endpoint
- http_routes.humidity.set()
Sets the humidity level. — parameters:
in: body name: body schema:
- required:
value
- properties:
- value:
type: number description: the humidity level
- responses:
- 200:
description: everything went fine.
- 403:
description: user is not authenticated.
- 422:
description: value not supplied.
Manual Watering
Smart Pots also provides a manual watering functionality.
Endpoint force_water - when called, proceeds to water the plant with a specified value/ amount of water.
- http_routes.force_water.force_water()
Waters the plant immediately. — parameters:
in: body name: body schema:
- required:
value
- properties:
- value:
type: number description: the quantity of water
- responses:
- 200:
description: everything went fine.
- 403:
description: user is not authenticated.
- 422:
description: value not supplied.
Watering Statistics
Endpoint returning plot showing the watering history.
- http_routes.plot.plot()
Plots the water quantities over the last week divided by hours. — responses:
- 200:
description: everything went fine.
- 403:
description: user is not authenticated.
- http_routes.plot.plot_humidity()
Plots the humidity over the last week. — responses:
- 200:
description: everything went fine.
- 403:
description: user is not authenticated.
- http_routes.plot.plot_temperature()
Plots the temperature over the last week. — responses:
- 200:
description: everything went fine.
- 403:
description: user is not authenticated.
Automatic Watering
The smart pot acts as the “publisher” - constantly broadcasting the amount of water that should be provided to the plant.