Weatherstation proxy to Weather Underground
Original code posted here: https://community.home-assistant.io/t/weather-station-and-weather-underground-work-around/204443 Modified to use with Fedora Linux
$ sudo dnf install httpd php
$ sudo systemctl enable httpd
$ sudo systemctl start httpd
You will need to create the directory /var/www/html/weatherstation and change the owner to yourself
$ sudo mkdir /var/www/html/weatherstation
$ sudo chown <you>:<you> /var/www/html/weatherstation
$ cd /var/www/html
$ got clone [email protected]:darrylb123/weatherstation.git
$ sudo firewall-cmd --permanent --add-service=http
$ sudo firewall-cmd --permanent --add-service=https
$ composer require php-mqtt/client
Configure the ip address of your proxy instead of weatherunderground. This will differ with each weather station YMMV
# cd /var/log/audit
# grep php-fpm audit.log | audit2allow -a -M fix
# semodule -i fix.pp
You will need to do this several times as the script progresses until all the SELinux restrictions are removed Run a tail on the PHP error log until the permission denied errors stop
$ sudo tail -f /var/log/php-fpm/www-error.log