Weird! Sounds like some glitch on the server. Glad you are up and running now though.
Yeah working like a âchampâ
Another small request⌠Could you provide instructions on the best way to auto start main.py in the installation instructions as an optional feature?
Iâve tried several ways suggested from a Google search without success. ?? (rc.local, .bashrc etcâŚ)
Didnât try crond yetâŚ
Iâm sure most users will have their Rpi dedicated to this task once itâs up and running smoothly.
Crontab is probably the best. It will restart it on reboot.
You could also install PM2 and let it keep it running.
I will have a look into this. It is not something I have done before, so will take some experimenting. I am away next week but will update the instructions as soon as I can.
I was able to get an auto start upon âbootâ using cron.
But it is abit of a kuldge ⌠sorta. I was always told if it works itâs perfect!
created a shell script âwx.shâ in /home/pi
#!/bin/bash
cd WeatherFlow
python3 main.py
exit
then used crontab -e
and added this line at the end.
@reboot sudo /home/pi/wx.sh
EDIT:
the only trouble Iâve got with this is trying to end the program⌠the normal Ctrl-C doesnât work, nor does the touchscreen respond - to touch. like trying to get the credits pop-up active.
my only way to stop it is to SSH in and kill the process - (without pulling the plug! always a no no)
EDIT2:
Slight change âremoved sudoâ from the Cron entry ; now the touchscreen responds, but still canât exit with Ctrl-C.
Use ctrl/break or ctrl/pause
That makes sense. If you use sudo to run the code, Kivy (the GUI python module) will use a config file belonging to the root user. This config file will not have been modified to make the touchscreen work.
Also, are you sure you need the bash script? Wouldnât something like
@reboot python3 /home/pi/WeatherFlow/main.py
work quite happily?
Running the bash script wonât work because when you ctrl-c it is telling it to stop the bash script, not they py code.
Iâll give it a try thanks!
Linux is not from my planet.
Thanks for the update.
Installed and running again.
tried ⌠@reboot python3 /home/pi/WeatherFlow/main.py
didnât work ???
I like the dimming ideas, once I get things running will see what others came up for a dimming solution.
Hmmmm not sure then Iâm afraid⌠I can have a look into this when I am back, but if you are keen to experiment sooner, perhaps try something like this: https://www.raspberrypi.org/documentation/linux/usage/systemd.md
Thanks Peter âŚ
itâs really not a big deal - I have it auto starting working fine using my sh script. Itâs just interrupting execution that is an issue. Which is really NOT an issue once this project has been finalized.
Perhaps at some point there will be a âpop-up screenâ option to shutdown or reboot the Rpi from the touchscreen.
Ideally there wonât be a need to have a mouse/keyboard plugged in. Doing a power âoffâ shutdown on a Rpi, is never recommended - having an option to shutdown/reboot would be nice in the future
And if this is not possible thatâs OK too.
.EDIT: (Thanks for the info link) I followed the information on setting up a Service and it works ⌠fine. (stopping execution remains an issue - without SSHâing in)
EDIT2: I have a solution for my immediate needs⌠Iâm using an iOS app called âSimplePiâ allows reboot/shutdown remotely via a SSH - GUI app interface. Works rather nicely!
@peter why did i get this error when running âStep 2: Upgrade the Python 3 version of Pipâ?
/usr/bin/python3: No module named pip
I have install the latest stretch-lite version and iâm connect to the rpi with ssh
You probably didnât install the python3 variant of pip initiallyâŚ
I think on raspbian you want âapt-get install python3-pipâ to get that, unless thereâs a particular reason the os version isnât good enough.
Hi @patrick.mussner, Iâm afraid itâs because you have installed the lite version of Rasbian rather than the full version. The lite version is missing many of the packages (like pip) required to install the PiConsole, and also does not include a desktop environment. For this reason the instructions assume you have the full version of Rasbian.
Unless you know what you are doing, and are happy to install the desktop environment (GUIDE: Raspbian Lite with RPD/LXDE/XFCE/MATE/i3/Openbox/X11 GUI - Raspberry Pi Forums), I highly encourage you to use the full version of Rasbian.
Edit: just looked at the instructions on the Github page and apologies for not making it completely clear you need the full version of Rasbian. Iâll update the instructions accordingly.
Thanks @peter i have follow step by step your instructions, but i have the follow error:
pi@raspberrypi:~/WeatherFlow $ python3 main.py
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_18-09-11_6.txt
[INFO ] [Kivy ] v1.11.0.dev0, git-038acbf, 20180911
[INFO ] [Python ] v3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170124]
[INFO ] [Factory ] 195 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Window ] Provider: egl_rpi
[INFO ] [GL ] Using the âOpenGL ES 2â graphics system
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <bâOpenGL ES 2.0â>
[INFO ] [GL ] OpenGL vendor <bâBroadcomâ>
[INFO ] [GL ] OpenGL renderer <bâVideoCore IV HWâ>
[INFO ] [GL ] OpenGL parsed version: 2, 0
[INFO ] [GL ] Shading version <bâOpenGL ES GLSL ES 1.00â>
[INFO ] [GL ] Texture max size <2048>
[INFO ] [GL ] Texture max units <8>
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Text ] Provider: sdl2
2018-09-11 21:34:23+0200 [-] Log opened.
2018-09-11 21:34:24+0200 [-] Traceback (most recent call last):
2018-09-11 21:34:24+0200 [-] File âmain.pyâ, line 1712, in
2018-09-11 21:34:24+0200 [-] WeatherFlowPyConsole().run()
2018-09-11 21:34:24+0200 [-] File âmain.pyâ, line 180, in init
2018-09-11 21:34:24+0200 [-] Type = Dev[âdevice_typeâ]
2018-09-11 21:34:24+0200 [-] KeyError: âdevice_typeâ
where is the error?
What firmware revision do you have everywhere ?