Broadly speaking this is my overall use case:The Raspbeery pi will take the measurements. The Contabo (Ubuntu) server will use these measurements and formulate the rainfall, and make it available for consumption onto the internet (Example: Web page, API, SMS Telegram Bot)
Something must be built to check if the Raspberry Pi is up and running, and user (me) alerted when not able to be reached.
In future more more sensor data can be added.
This is my solution for the Raspberry Pi:
- SQLite database to store the tips.
- Command line program (aka sensorDeamon) that will be systemded to listen and save the tips to the db.
- The SensorDeamon will also send out an alert that a tip has occurred.
- An nginx hosted API to give remote access to the SQLite data.
- An nginx hosted API that will listen for alerts.
- On receiving an alert it will go and retrieve all data since last retrieval from the RPi.
- Do the calculations, and store data in Postgres database.
- Make this data available via:
- SMS (Send me an alert when it starts raining)
- Web (So I am other people can view the info and history)
- API (Other systems can query my data)
- Telegram (Get alerts and stats via telegram
- I would have loved to have done something for Whats app, but there is no public API available for it.
- sensorpi just holds the whole solution in one place.
- configs folder will contain the configuration settings for:
- sensordaemon, and
- This will allow me to put the source code onto git without revealing my private passwords and settings.
- Since the database only exists on the Pi and I dont have a dev I will put the database script in a sub folder and shell file for me to recreate it as needed.
- sensordeamon wfolder will contain the command line app that listens to the tips.
- webapi will allow remote access (from the Ubuntu server) to my database.