This project is a fork from Stawen's Okovision project which is no longer updated.
I wanted to update a function that would not work in PHP8 on Raspberry Pi. Making the cron not getting back the proper info from the boiler. I ended up also fixing other bugs, and will maybe add more in the future.
This project is made for Okofen firmware V2 & V3 with HTTP connection.
I will try explain you how to connect and have the tool ready to run with my setup, an OKOFEN Pellematic Compact.
Be careful, if you already have a web server, this might break it.
sudo wget https://raw.githubusercontent.com/Domotrique/okovision_2023/master/install/Okovision_2023_for_Linux.sh && sudo chmod +x Okovision_2023_for_Linux.sh && sudo ./Okovision_2023_for_Linux.sh && sudo rm -f Okovision_2023_for_Linux.sh
sudo apt-get -y install mariadb-server
sudo mysql -e "CREATE USER 'okouser'@'localhost' IDENTIFIED BY 'okopass';"
sudo mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'okouser'@'localhost' ;"
sudo apt-get -y install apache2
sudo systemctl enable apache2
sudo apt update
sudo apt-get -y install php8.2 php8.2-cli php8.2-common
sudo apt-get -y install php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl php8.2-gd php8.2-mbstring php8.2-intl php8.2-zip
cd /var/www/
sudo wget https://github.com/domotrique/okovision_2023/archive/master.zip
sudo unzip master.zip
sudo mv okovision_2023-master/ okovision/
sudo rm master.zip
sudo chown www-data:www-data -R okovision/
sudo cp /var/www/okovision/install/099-okovision.conf /etc/apache2/sites-available/.
sudo a2ensite 099-okovision.conf
sudo a2dissite 000-default
sudo service apache2 reload
sudo crontab -e
Select NANO if asked and add the following line at the end of the file.
22 */1 * * * cd /var/www/okovision; /usr/bin/php -f cron.php
This last command will retrieve data from the okofen every hour, 22 minutes past the hour (this is 10 min after the CSV is generated on the Okofen) and update the welcome page. You can then hit CTRL+X then Y and then ENTER key.
You obviously need to have your boiler connected to your network (mine is connected via the network card in the door).
Then enable check what is your boiler IP in the Main Menu --> Generalities --> IP Config. My IP is 192.168.1.97.
N.B. I strongly advise that you assign a static IP for your boiler in your network router setup.
You can also check your login and password for the Okofen app if you need to pilot your system from outside home by going down in the IP Config menu.
You can double check that you have the same options here as well (in fact you don't need JSON active normally):
Now if you go check the following webpage http://YOUR_BOILER_IP_ADDRESS/logfiles/pelletronic/
, you should see something like this:
If you see this page, you've done the hardest part!
You can now open a web browser and go to your server address, which is probably http://localhost:80
Next, I invite you to check the very well explained documentation from @stawen here
If you see something not working as expected, please create an issue and I will try to have a look as soon as possible.