A set of distributed sensors that can gather metrics about your plants.
- ESP32: Measure plant metrics and use HTTP requests to relay these to a DB
- Micropython as the runtime on the ESP32
- Raspberry Pi: Host NodeRED to act as an interface between local network and internet
- Ansible to manage the RPi
- NodeRED: Run on Pi in local network to wire together the ESP32 sensors with APIs and DBs
- HomeAssistant: Run on Pi in local network to orchestrate and display information about IoT devices in the home
- InfluxDB: Time-series database to aggregate and serve the plant metrics
- OracleCloud: Provide a free-tier VM for container deployments
- Docker/Docker-Compose: Run container based software
- Get the ip of the raspi on your network
- SSH in with the standard user
pi
and pwraspberry
- Create a new user
sudo useradd $NEWUSER
- Add that new user to the sudo group `sudo usermod -aG sudo $NEWUSER``
- Allow the user to execute sudo commands without password:
sudo visudo -f /etc/sudoers.d/$NEWUSER_nopasswd
- change all to NOPASSWD
- Logout, log in as new user check that it works (no password prompt):
sudo ls
- Create a new ssh-key to login to the pi:
ssh-keygen -t rsa
- Copy the key to the pi:
ssh-copy-id $KEY [email protected]
- SSH to the pi with key to see that it works:
ssh -i $KEY [email protected]
- Similarly ansible should now be usable with this key to execute commands on the pi