Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for working Autostart script for raspberrypi p3 #98

Open
v222008 opened this issue Jun 19, 2020 · 10 comments
Open

Looking for working Autostart script for raspberrypi p3 #98

v222008 opened this issue Jun 19, 2020 · 10 comments

Comments

@v222008
Copy link

v222008 commented Jun 19, 2020

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

@filipsPL
Copy link
Owner

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

@v222008
Copy link
Author

v222008 commented Jun 21, 2020

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)

@thecivvie
Copy link

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

@SA7BNT
Copy link
Contributor

SA7BNT commented Oct 25, 2020

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??

@thecivvie
Copy link

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
Copy link

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
Copy link

Still not finding it easy to start automatically

SA7BNT Your autowx2 is not updating

@SA7BNT
Copy link
Contributor

SA7BNT commented Nov 24, 2020

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

@thecivvie
Copy link

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

@SA7BNT
Copy link
Contributor

SA7BNT commented Nov 24, 2020

@thecivvie damm!! Restarted. Thanks for info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants