Progress I made this week:
- I fixed the bug for MQTT communication from the web app to the RPi. When the user clicks on switches on the web app, the web app sends on/off command to the RPi through MQTT. Below is the page where the users can control the actuators:
Zara and I worked together to make the water pump successfully get turned on/off when user control the switch. The other actuators will be integrated in the future. - I integrated web scraped data with the web app. I saved all the plant names and image urls to the database so that all the plant species can be displayed in the AddPlantPage. However, details about the ideal plant care conditions are stored in the database only when user selects that species (this is to ensure that database doesn’t store unnecessary data). Below is the page where users can name their plant and select the species:
After the user add their plant, the ideal plant care conditions are now stored in the database and are shown to the user like this:
The user’s plant information now gets saved in the database and are displayed on the home page (name, health status, species, and its cute image) - I made sensor data get displayed on the homepage as charts. To ensure the database does not contain too much data, I set it up so that the oldest sensor data gets deleted once it goes beyond 1440 limit (The data gets stored every 1 minute, and we aim to display the past 24 hours of sensor data. 60/min * 24 hours = 1440 sets of data) The home page now only displays temperature and humidity charts, but the other sensor charts will be added in the future.
Websockets (django channels) were used to update the chart based on the real-time sensor data. Sensor data charts get updated every 1 minute, and health status gets updated every 24 hours.
I’m on schedule.
Deliverables for the next week:
- implement auto-scheduling feature
- activate plant detection for ML classification on webapp
- integrate API for plant identification on webapp
- add more sensors and actuators that can work with web app
- start exploring deployment (probably on RPi)
- start integrating Twilio API