Edit: This auto start script is now included in the WeatherFlow PiConsole download. Follow the Auto-Run instructions on the GitHub page (GitHub - peted-davis/WeatherFlow_PiConsole: Raspberry Pi Python console for WeatherFlow Tempest and Smart Home Weather Stations) to get setup.
Hi @eric, I’ve been having a look at autostart options and think I have a solution. If you’re willing to test it, details are below.
Navigate to the WeatherFlow PiConsole directory:
cd ~/wfpiconsole/
Make a new file called WeatherFlowPiConsole.service
nano WeatherFlowPiConsole.service
Copy this into the new file (this assumes you have the Console installed to the default location and are using the default ‘Pi’ user)
[Unit]
Description=WeatherFlow PiConsole
After=network.target
[Service]
ExecStart=/usr/bin/python3 -u main.py
WorkingDirectory=/home/pi/wfpiconsole
StandardOutput=inherit
StandardError=inherit
Restart=no
User=pi
[Install]
WantedBy=multi-user.target
Copy this file into /etc/systemd/system
as root
sudo cp WeatherFlowPiConsole.service /etc/systemd/system/WeatherFlowPiConsole.service
Start the service using
sudo systemctl start WeatherFlowPiConsole.service
If the console boots and everything is working, kill the Python task and set the service to start automatically at reboot
sudo systemctl stop WeatherFlowPiConsole.service
sudo systemctl enable WeatherFlowPiConsole.service
Reboot the Pi and wait for it to auto-start. I have told the service that an internet connection needs to be present before it can start, so there should be no problems with the screen not being ready. Let me know how you get on, and if it works I will add the .service file to the next release.