The Smart Pots do not connect directly to the internet. Instead they use Bluetooth Low Energy (BLE) to communicate with a central hub. The central hub is connected to WiFi and offers an API for the Smart Pot App. In this guide, the setup of the central hub is described.
The following components are needed for the central node.
- Raspberry Pi Zero W
- An SD card with a capacity of at least one gigabyte.
Hereinafter we will refer to the components as "Pi" and "SD", respectively.
-
Install Raspberry Pi OS Lite on the SD using the Raspberry Pi Imager.
-
Create an empty
sshfile on thebootpartition of the SD.touch ssh
-
Create a file called
wpa_supplicant.confon the boot partition of the SD with the following contents.country=YOUR_COUNTY_CODE ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev network={ ssid="YOUR_NETWORK_NAME" psk="YOUR_PASSWORD" key_mgmt=WPA-PSK }
Replace
YOUR_NETWORK_NAMEandYOUR_PASSWORDwith the SSID and password of your WiFi network andYOUR_COUNTY_CODEwith the 2-digit county code of your country (e.g.,DE). -
Put the SD into the Pi.
To verify that the installation was successful, you can now power up the Pi, wait for it to boot and connect via SSH using the following command.
ssh pi@raspberrypiThe default password of the pi user is raspberry.
Follow the guide in the next section to change the Pi's default configuration.
Connect to the Pi via SSH as described above and open the configuration tool by typing the following command.
sudo raspi-configIn the configuration tool, makes the following changes.
-
In
System Options > Passwordassign a new password to thepiuser. Changing the password is recommended for security reasons. -
In
System Options > Hostnamechange the Pi's hostname tosmart-pot-hub. Changing the hostname is required for the App to connect to the API.
Optionally, change other settings, then close the configuration tool and reboot the Pi by typing the following command.
sudo reboot nowOnce the Pi has rebooted, use the new hostname to open an SSH session.
ssh pi@smart-pot-hub-
Connect to the Pi via SSH as described above, clone this repository via Git or download the code as a zip file and extract it in the home directory of the
piuser. Now the following files and directories should exist./home/pi/smart-pot-hub ├── README.md ├── smartpot └── toolDuring development the
./tool/upload.shscript can be used to upload the code from your local machine to the Pi. -
Change into the root directory of the repository and run the installation script to download dependencies.
cd /home/pi/smart-pot-hub ./tool/install.sh -
Confirm that the Smart Pot Hub service was installed and started successfully by typing the following command.
sudo systemctl status smart-pot-hub.service
The Smart Pot Hub is licensed under the MIT license agreement. See the LICENSE file for details.