SimpleCV for images Python3
psutil tweepy certifi
Add to crontab:
- A pi zero WH
- Micro USB cable, which you might already have
- Case for the pi zero WH to protect from weather
- Solar panel with USB output
- Camera module (TODO: link)
- if pi will be deployed without WiFi access
- dongle for SIM card
- Sim card and data plan
- dongle for SIM card
- Connect camera to pi
sudo raspi-config
and enable camera in 'Interfacing Options'
- create Github account (ideally new one just for the bot)
- setup ssh
- Clone repo
- Add config.json with list {"consumer_key", "consumer_secret", "access_token", "access_token_secret"}
- Get DeepAI account and API-key
- Connect stick
- check with
lsusb
that Huawei Stick is detected sudo apt install usb-modeswitch usb-modeswitch-data
- https://tutorials-raspberrypi.com/raspberry-pi-gsm-module-mobile-internet-lte-3g-umts/
This is only necessary when 3G is used.
- Install noip2 (TODO: how?)
- https://www.blackmoreops.com/2020/11/18/how-to-install-the-noip2-on-ubuntu-and-run-via-systemd-systemctl-noip-dynamic-update-client/
- type
crontab -e
and add:
@reboot sleep 300 && cd /home/pi/solarBot/; git pull
@reboot /home/pi/solarBot/venv/bin/python3 /home/pi/solarBot/tweet.py --boot
@reboot /home/pi/solarBot/venv/bin/python3 /home/pi/solarBot/tweet.py --image
@reboot /home/pi/solarBot/venv/bin/python3 /home/pi/solarBot/increase-wakeup.py
*/10 * * * * /home/pi/solarBot/venv/bin/python3 /home/pi/solarBot/tweet.py &
*/5 * * * * /home/pi/solarBot/venv/bin/python3 /home/pi/solarBot/increase-uptime.py
- the first line sets ip address
- the second line tweets after reboot