autowx2 icon indicating copy to clipboard operation
autowx2 copied to clipboard

Looking for working Autostart script for raspberrypi p3

Open v222008 opened this issue 5 years ago • 10 comments

script running well only run as root cd /home/pi/autowx2 and run manualy file autowx2.py

not works on start script

#!/bin/bash
cd /home/pi/autowx2/
python autowx2.py  &

or

/usr/bin/tmux new-session -d 'python /home/pi/autowx2/autowx2.py'

or

sudo nano /lib/systemd/system/autowx2.service

[Unit]
Description=autowx2
After=multi-user.target
[Service]
Restart=always
RestartSec=10
WorkingDirectory=/home/pi/autowx2
ExecStart=/usr/bin/python /home/pi/autowx2/autowx2.py
[Install]
WantedBy=multi-user.target

sudo chmod 644 /lib/systemd/system/autowx2.service
sudo systemctl daemon-reload
sudo systemctl enable autowx2.service
sudo systemctl start autowx2.service

v222008 avatar Jun 19 '20 10:06 v222008

Thanks for this report. What system do you use (and which version)? (answer like "raspbian installed a week ago" will do :) )

filipsPL avatar Jun 19 '20 12:06 filipsPL

Ok) my system is

root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux
root@raspberrypi:/home/pi#

1st method is successful when it runs manually is

/usr/bin/tmux new-session -d 'python /home/pi/autowx2/autowx2.py'

in other cases the main file autowx2.py is started but modules scripts (like in /autowx2/modules ) are not executed.. they are executed but do not read variables

2020-06-17 19:14  !! Recording ●    NOAA-19 :: 2020-06-17 19:00 to 2020-06-17 19:15, dur: 14:45, max el. 47°; azimuth: 260° (WSW←↙) f=137100000Hz; Decoding: modules/noaa/noaa.sh  
/home/pi/autowx2/
Kiev
fileNameCore=20200617-1900_NOAA-19
start=1592409650
duration=37
peak=47
azimuth=260
sample= ???
wavrate= ???
dongleIndex= ???
enchancements= ???

must be the
fileNameCore=20200621-0823_NOAA-19
start=1592717003
duration=722
peak=52
freq=137100000
wavrate=11025
dongleIndex=0
enchancements=ZA
**** ZA
**** MCIR-precip
**** HVC
**** MSA
**** therm
**** HVCT-precip
**** NO

p.s.

and in my case the web works correctly with the settings

#wwwDir=baseDir + 'var/www/' wwwDir='/var/www/wx/'

#wwwRootPath="/" wwwRootPath=""

and last one) can't overcome the problem with double "//" it is not critical for scripts but sensitive for formatting web pages

wxmap -T NOAA-15 -a -H /home/pi/autowx2//var/tle/all.txt -o -p 0 -O 904 -L 49.441/24.944/270 1592718627 /var/www/wx/recordings//noaa//img/2020/06/21//20200621-0850_NO

Thank you for your attention)

v222008 avatar Jun 21 '20 06:06 v222008

I am having the same issue with my Pi. It starts ok but the scripts don't work correctly. I don't get any images except the neat map. If I log in and run from the command line, there is no issue

thecivvie avatar Oct 24 '20 18:10 thecivvie

I am having the same issue with my Pi. It starts ok but the scripts don't work correctly. I don't get any images except the neat map. If I log in and run from the command line, there is no issue

Can you please upload or see something strange in the log??

SA7BNT avatar Oct 25 '20 12:10 SA7BNT

Seeing nothing in the logs. Unless I log into the Pi and leave it connected , it runs ok. If I started it automatically at boot time it only generates the NO jpg file.

thecivvie avatar Oct 30 '20 18:10 thecivvie

From a failed grab log: /home/pi/autowx2/ RenvyleWeather fileNameCore=20201030-1812_NOAA-19 satellite=NOAA-19 peak=73 freq=137100000 dongleIndex=0 **** MCIR-precip **** HVC **** MSA **** therm **** HVCT-precip **** NO **** MCIR-precip **** MSA **** therm Fri 30 Oct 18:27:18 GMT 2020 /home/pi/autowx2/

the previous log was: 3:31, max el. 25°; azimuth: 54° (NE↗) f=137100000Hz; Decoding: modules/noaa/noaa.sh
RenvyleWeather fileNameCore=20201030-1632_NOAA-19 satellite=NOAA-19 start=1604075556 peak=25 azimuth=54 freq=137100000 wavrate=11025 dongleIndex=0 **** MCIR-precip **** HVC **** MSA **** therm **** HVCT-precip **** NO **** MCIR-precip **** HVC **** MSA **** therm **** HVCT-precip **** NO Fri 30 Oct 16:49:48 GMT 2020 /home/pi/autowx2/ RenvyleWeather Fri, 30 Oct 2020 16:49:49 +0000 0

thecivvie avatar Oct 30 '20 18:10 thecivvie

Still not finding it easy to start automatically

SA7BNT Your autowx2 is not updating

thecivvie avatar Nov 24 '20 08:11 thecivvie

Still not finding it easy to start automatically

SA7BNT Your autowx2 is not updating

Hey @thecivvie not updating?? How do you mean? If i looking at my autowx2 all is running fine

SA7BNT avatar Nov 24 '20 09:11 SA7BNT

It is showing the last update as the 21st no images since Screenshot 2020-11-24 at 12 16 11

thecivvie avatar Nov 24 '20 12:11 thecivvie

@thecivvie damm!! Restarted. Thanks for info

SA7BNT avatar Nov 24 '20 12:11 SA7BNT