Updating version number to: v22.12.2
Traceback (most recent call last):
File "main.py", line 521, in <module>
wfpiconsole().run()
File "/home/pi/.local/lib/python3.7/site-packages/kivy/app.py", line 950, in run
runTouchApp()
File "/home/pi/.local/lib/python3.7/site-packages/kivy/base.py", line 582, in runTouchApp
EventLoop.mainloop()
File "/home/pi/.local/lib/python3.7/site-packages/kivy/base.py", line 347, in mainloop
self.idle()
File "/home/pi/.local/lib/python3.7/site-packages/kivy/base.py", line 387, in idle
Clock.tick()
File "/home/pi/.local/lib/python3.7/site-packages/kivy/clock.py", line 733, in tick
self.post_idle(ts, self.idle())
File "/home/pi/.local/lib/python3.7/site-packages/kivy/clock.py", line 776, in post_idle
self._process_events()
File "kivy/_clock.pyx", line 616, in kivy._clock.CyClockBase._process_events
File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events
File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events
File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
File "/home/pi/wfpiconsole/lib/status.py", line 200, in get_device_status
self.status_data['tempest_status'] = device_status
UnboundLocalError: local variable 'device_status' referenced before assignment
This fixed my issue too.
@mike11, @hjalmar and @tempest19, I am just working on a fix for this now. It is because your Tempests are running in a special battery saving mode that I was not aware of: https://community.tempest.earth/t/20-second-wind-sampling/19412
@peter I just ran the update at 15:00 UTC. . .everything went smoothly; mine is now on v22.5.1 and I saw the Package Installer popup window in color. . .very cool. . .never saw that before. Iâm sure everything will be Just Fine from here on out.
Updated. We are getting a ton of storms here in Florida so will know pretty quickly if there are any issues.
Again, thank you for the awesome support! We appreciate it!
Update v22.5.1 Bug Find!
Discovered a bug (anomaly) with the latest version. Upon going into Menu in far right corner. . .then choosing âStationâ at the bottom left (just to the right of âSystemâ). . .and changing to another Tempest (or WFSKY / WFAIR) to get the times that the high and low temperatures occurred for the day. . .then Returning back to the original Station as in the profile. . .the console generates a red " ! " next to the year (first image below). In the actual Menu screen (second image below) the Station status shows âErrorâ in red. . .even though I have chosen âBackyardâ as the station selected. This will NOT self-correct once the actual station in the profile has been chosen. The only way to correct this is to: Menu | Exit go back to the pi@wfpiconsole command prompt and type âwfpiconsole startâ to invoke/restart console back to what it should be.
@peter I think I found the problem . . it was on MY end. . .not on your end or the update. I had the incorrect (old) Data Authorization token keys on file with WF. I swapped around (shell-gamed) a couple of devices here recently and completely forgot to delete the old tokens and REcreate (generate) new ones. Went into the 'wfpiconcole.ini" file and updated the master station (Backyard) with the newly created token. I switched stations in the console a couple of times and did not see the â!â or âErrorâ for the Station status. . .so it was the token issue on my end.
Thank you very much @Peter, everything is running as it should.
Update v22.5.1 works perfectly
Glad you managed to get everything working again. Is there an issue with the sunrise and sunset times? From your screenshots it looks like the sun shouldnât have set yet (at 7:06 pm), but the Solar | UV panel is showing that it is night time already. Happy to look into this if you think there is an issue
I just reinstalled RPI buster and WFPiConsole and after installation it manually runs without issue but after boot with autostart-enable the GUI loads but no data other than the forecast loads.
I will keep an extra eye on this. As of 16:45 UTC today 23 May. . .
the sunrise occurred at 5:58 AM CDT (Central Daylight Time). . .and sunset will be at 8:42 PM CDT. For sunrise / sunset. . .with CDT vs CST. . .the times occur an hour Later than they would as opposed to âaccording to the sunâ [CST].
When you reboot your Pi and the console autostarts, can you share the contents of the wfpiconsole.log
file which you will find in the main directory ~\wfpiconsole
. If everything runs fine when started manually, it should work fine when auto-starting. Hopefully the log file may show why this is not happening
Here is the contents of the log file:
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_22-05-23_68.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/home/pi/.local/lib/python3.7/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Config ] Verifying station details
[INFO ] [Factory ] 184 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 <gl>
[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
[INFO ] [GL ] NPOT texture support is available
Exception in thread Websocket:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/usr/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "service/websocket.py", line 27, in <module>
import websockets
ModuleNotFoundError: No module named 'websockets'
[INFO ] [ProbeSysfs ] device match: /dev/input/event5
[INFO ] [MTD ] Read event from </dev/input/event5>
[INFO ] [ProbeSysfs ] device match: /dev/input/event10
[INFO ] [MTD ] Read event from </dev/input/event10>
[INFO ] [ProbeSysfs ] device match: /dev/input/event1
[INFO ] [MTD ] Read event from </dev/input/event1>
[INFO ] [ProbeSysfs ] device match: /dev/input/event8
[INFO ] [MTD ] Read event from </dev/input/event8>
[INFO ] [ProbeSysfs ] device match: /dev/input/event6
[INFO ] [MTD ] Read event from </dev/input/event6>
[INFO ] [ProbeSysfs ] device match: /dev/input/event4
[INFO ] [MTD ] Read event from </dev/input/event4>
[INFO ] [ProbeSysfs ] device match: /dev/input/event2
[INFO ] [MTD ] Read event from </dev/input/event2>
[INFO ] [ProbeSysfs ] device match: /dev/input/event0
[INFO ] [MTD ] Read event from </dev/input/event0>
[INFO ] [ProbeSysfs ] device match: /dev/input/event9
[INFO ] [MTD ] Read event from </dev/input/event9>
[INFO ] [ProbeSysfs ] device match: /dev/input/event7
[INFO ] [MTD ] Read event from </dev/input/event7>
[INFO ] [ProbeSysfs ] device match: /dev/input/event5
[INFO ] [HIDInput ] Read event from </dev/input/event5>
[INFO ] [ProbeSysfs ] device match: /dev/input/event10
[INFO ] [HIDInput ] Read event from </dev/input/event10>
[INFO ] [ProbeSysfs ] device match: /dev/input/event1
[INFO ] [HIDInput ] Read event from </dev/input/event1>
[INFO ] [ProbeSysfs ] device match: /dev/input/event8
[INFO ] [HIDInput ] Read event from </dev/input/event8>
[INFO ] [ProbeSysfs ] device match: /dev/input/event6
[INFO ] [HIDInput ] Read event from </dev/input/event6>
[INFO ] [ProbeSysfs ] device match: /dev/input/event4
[INFO ] [HIDInput ] Read event from </dev/input/event4>
[INFO ] [ProbeSysfs ] device match: /dev/input/event2
[INFO ] [HIDInput ] Read event from </dev/input/event2>
[INFO ] [ProbeSysfs ] device match: /dev/input/event0
[INFO ] [HIDInput ] Read event from </dev/input/event0>
[INFO ] [ProbeSysfs ] device match: /dev/input/event9
[INFO ] [HIDInput ] Read event from </dev/input/event9>
[INFO ] [ProbeSysfs ] device match: /dev/input/event7
[INFO ] [HIDInput ] Read event from </dev/input/event7>
[INFO ] [Base ] Start application main loop
[INFO ] [MTD ] </dev/input/event5> range position X is 0 - 0
[INFO ] [MTD ] </dev/input/event10> range position X is 0 - 799
[INFO ] [MTD ] </dev/input/event5> range position Y is 0 - 0
[INFO ] [MTD ] </dev/input/event10> range position Y is 0 - 479
[INFO ] [MTD ] </dev/input/event1> range position X is 0 - 0
[INFO ] [MTD ] </dev/input/event8> range position X is 0 - 0
[INFO ] [MTD ] </dev/input/event5> range touch major is 0 - 0
[INFO ] [MTD ] </dev/input/event6> range position X is 0 - 0
[INFO ] [MTD ] </dev/input/event10> range touch major is 0 - 0
[INFO ] [MTD ] </dev/input/event4> range position X is 0 - 0
[INFO ] [MTD ] </dev/input/event1> range position Y is 0 - 0
[INFO ] [MTD ] </dev/input/event2> range position X is 0 - 0
[INFO ] [MTD ] </dev/input/event8> range position Y is 0 - 0
[INFO ] [MTD ] </dev/input/event0> range position X is 0 - 0
[INFO ] [MTD ] </dev/input/event5> range touch minor is 0 - 0
[INFO ] [MTD ] </dev/input/event9> range position X is -350 - 350
[INFO ] [MTD ] </dev/input/event6> range position Y is 0 - 0
[INFO ] [MTD ] </dev/input/event7> range position X is 0 - 0
[INFO ] [MTD ] </dev/input/event10> range touch minor is 0 - 0
[INFO ] [HIDMotionEvent] using <Das Keyboard 5Q RGB Mechanical Keyboard Consumer Control
Here is the log with executing wfpiconsole start (which runs normally):
[e[1;32mINFOe[0m ] [Logger ] Record log in /root/.kivy/logs/kivy_22-05-23_14.txt
[e[1;32mINFOe[0m ] [Kivy ] v2.0.0
[e[1;32mINFOe[0m ] [Kivy ] Installed at "/root/.local/lib/python3.7/site-packages/kivy/__init__.py"
[e[1;32mINFOe[0m ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0]
[e[1;32mINFOe[0m ] [Python ] Interpreter at "/usr/bin/python3"
[e[1;32mINFOe[0m ] [Config ] Verifying station details
[e[1;32mINFOe[0m ] [Factory ] 186 symbols loaded
[e[1;32mINFOe[0m ] [Image ] Providers: img_tex, img_dds, img_sdl2 (img_pil, img_ffpyplayer ignored)
[e[1;32mINFOe[0m ] [Window ] Provider: egl_rpi
[e[1;32mINFOe[0m ] [GL ] Using the "OpenGL ES 2" graphics system
[e[1;32mINFOe[0m ] [GL ] Backend used <gl>
[e[1;32mINFOe[0m ] [GL ] OpenGL version <b'OpenGL ES 2.0'>
[e[1;32mINFOe[0m ] [GL ] OpenGL vendor <b'Broadcom'>
[e[1;32mINFOe[0m ] [GL ] OpenGL renderer <b'VideoCore IV HW'>
[e[1;32mINFOe[0m ] [GL ] OpenGL parsed version: 2, 0
[e[1;32mINFOe[0m ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'>
[e[1;32mINFOe[0m ] [GL ] Texture max size <2048>
[e[1;32mINFOe[0m ] [GL ] Texture max units <8>
[e[1;32mINFOe[0m ] [Window ] virtual keyboard not allowed, single mode, not docked
[e[1;32mINFOe[0m ] [Text ] Provider: sdl2
[e[1;32mINFOe[0m ] [GL ] NPOT texture support is available
[e[1;32mINFOe[0m ] [Websocket ] 2022-05-23 10:13:50 - Opening connection
[e[1;32mINFOe[0m ] [ProbeSysfs ] device match: /dev/input/event10
[e[1;32mINFOe[0m ] [HIDInput ] Read event from </dev/input/event10>
[e[1;32mINFOe[0m ] [Base ] Start application main loop
[e[1;32mINFOe[0m ] [HIDMotionEvent] using <raspberrypi-ts
Ok, thatâs useful. Can you share the contents of your wfpiconsole.service
file?
I assume you are not adding sudo
in front of any of the wfpiconsole
commands (like wfpiconsole autostart-enable
)? It looks like the console might be auto-starting as the root user, which isnât going to work
Here is the wfpiconsole.service file:
[Unit]
Description=WeatherFlow PiConsole
Wants=network-online.target
After=network-online.target
StartLimitInterval=100
StartLimitBurst=5
[Service]
Restart=always
Environment=DISPLAY=:0
ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/python3 -u main.py
WorkingDirectory=/home/pi/wfpiconsole/
StandardOutput=file:/home/pi/wfpiconsole/wfpiconsole.log
StandardError=file:/home/pi/wfpiconsole/wfpiconsole.log
User=pi
[Install]
WantedBy=multi-user.target
Ok, if you run wfpiconsole autostart-enable
from the terminal, does the console start and show data from your Tempest?
No the forecast data is the only thing loaded. The other data fields are just -.
wfpiconsole start
wfpiconsole autostart-enable
OK, let me have a look into this. As a quick fix, if you run
sudo python3 -m pip install websockets
in a terminal, does that fix the autostart issue?
Itâs already installed:
sudo python3 -m pip install websockets
Looking in indexes: Simple index, piwheels - Simple index
Requirement already satisfied: websockets in /root/.local/lib/python3.7/site-packages (10.1)
WARNING: Running pip as the ârootâ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages â Python 3.12.0 documentation