- Install latest operating system: "Raspbian Bullseye or next new version - with desktop and recommended software" https://www.raspberrypi.org/downloads/raspbian/
- Change password for acces from "raspberry" to own
- Enabling in raspi-config SSH, I²C
- Install OSPy using Git
A setup file has been provided to help you setting up your environment to contain all required packages. This setup also helps you in case you want to run the program as a service (on Raspbian). Go to the folder where the setup.py file is located (cd OSPy) (Clean installation)
sudo apt-get update
and follow the procedures
sudo apt-get upgrade
and follow the procedures
for Python 3
sudo python3 setup.py install
and follow the procedures of the script
(This option does support automatic updating.) Ensure git is installed (and the git executable is in your path) Use git to clone:
git clone -b master https://github.com/martinpihrt/OSPy
Next use step "Setup"
Using Git, without system update plugin if plugin not work. Go to the folder where the run.py file is located (cd OSPy)
sudo git config core.filemode false
sudo git reset --hard
sudo git pull
(This option does not support automatic updating.)
- Download a copy of the program from Github
- Extract the contents to a location of your choice
sudo apt-get install certbot
sudo certbot certonly --standalone -d your_domain_name
sudo certbot renew
sudo cp /etc/letsencrypt/live/your.domain.com/fullchain.pem /home/pi/OSPy/ssl
sudo cp /etc/letsencrypt/live/your.domain.com/privkey.pem /home/pi/OSPy/ssl
sudo service ospy restart
Notice: Before starting the certification service, make sure that you have correctly configured your NAT network router (redirecting external port 443 to Raspberry Pi's internal IP address 80 for certification service.) After the certificate is generated, it is necessary to route your port to the OSPy port in the router (the default OSPy port is 8080). The certification service is trying to use a connection using IP version 6. If we do not use IPV6 (we do not have a router set for IPV6, or do not want to use IPV6 for any other reason), we must disable the use of IPV6 addreses in Raspberry Pi!
sudo nano /etc/modprobe.d/ipv6.conf
Add to file.
alias net-pf-10 off
options ipv6 disable_ipv6=1
And next restart.
If "Use Own HTTPS access" is selected in OSPy options, file: fullchain.pem and privkey.pem must You insert to folder ssl in OSPy location. For manual generating certificate example:
sudo openssl req -new -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out fullchain.pem -keyout privkey.pem
Warning: OSPy must be next restarted.
and follow enabling I²C bus
and reboot OS system
The OSPy system is currently in three languages: English, Czech, Slovak. For other languages and step by step, how to use is typed in MD file Any user who joins the "OSPy" project is welcome! Translation of strings into other languages is not demanding (using the Poedit)
OSPy can be controlled and monitored using HTTP GET commands. With the addition of available plugins OSPy can communicate with other systems via MQTT. OSPy can also issue Linux shell commands when a station is turned on or off. This is useful for controlling wireless remote devices and for I²C relay hats and boards. The Blinker package that is shipped with OSPy sends messages to other Python modules such as plugins to report changes in status. See the signaling examples file in OSPy's plugins folder for examples.
OSPy allows to read data from wireless sensors (ESP32, ESP8266...) Docs
This controller allows you to select a program stored in the OSPy on the LCD display and start it with the button. The controller is connected to the home Wi-Fi network. We do not even need a mobile phone or a computer to quickly select programs. We will use this miniature controller. Docs
OpenSprinkler Py (OSPy) Interval Program Creative Commons Attribution-ShareAlike 3.0 license
Full credit goes to Dan for his generous contributions in porting the microcontroller firmware to Python.
- The program makes use of web.py (http://webpy.org) for the web interface.
- The program makes use of cmarkgfm (https://github.com/theacodes/cmarkgfm) to render the help pages written in GitHub flavored markdown (Python 3+).
- The program makes use of OpenStreetMap (https://www.openstreetmap.org) to convert locations into coordinates.
- The program makes use of Stormglass API (https://stormglass.io/) for weather information.
- The program makes use Blinker (https://pythonhosted.org/blinker/) package that is shipped with OSPy sends messages to other Python modules such as plugins to report changes in status.
- The program makes use Arduino (https://arduino.cc) ESP32, Atmega328 and more HW boards pro OSPy aditional sensors, water tank monitor.