WeatherFlow PiConsole - Archive

So now at the end of the day I tried the “Shutdown” button, which always stopped the whole Pi.

Unfortunately it just “crashes” into the OS Pi and in a moment the WF PiConsole starts up again…

Do you know what the problem is ?

I get that same error, this time Key Error: Millard Park
I do not have more than 1 station, can I just remove the code for that station name request? or would you like to find the bug still?
Forgot to add, I am one of the few that you helped get up and running on the Laptop Pi. But, like I said, update went well and all else works but that Menu

Update: If I remove the Station Name, I do not get the error of the console closing after hitting Menu, it stays on the screen

In the dropdown for station under the Menu, it shows my station name that I originally had, the Fritz Weather Station. If I select it and the Station number, the menu still pops up, until I close console and reopen it, then Menu crashes console to close again. As long as I have no nbame there, it works

hi @peter , Yes I am using a PI4, so that would explain it. Regards Paul

Hi @peter , yes it is giving the same image as per the link. Last night when I did the update it was still showing the northern hemisphere picture, but that might have just because of the upgrade procedure. I will keep an eye on it and let you know if anything else pops up. Regards Paul

. . . Important Discovery . . .

The Shutdown" Button does not cause a “Shutdown” and “Reboot” Button does not cause a “Reboot” of ‘wfpiconsole’

Touching the “Menu” Button in the lower right of the display brings up this screen. . .

It used to be. . .upon touching the “Shutdown” Button. . .would cause ‘wfpiconsole’ to gracefully end / terminate all running processes at which time the screen would go blank. . . allowing for a power turnoff at the isobar surge protector box. Good Night ‘wfpiconsole’ ! I could then turn it off at the end of the night because while asleep. . .my eyes are closed and I don’t need to see the display anyway.

However. . .now . .upon touching the “Shutdown” Button (and the “Reboot” Button for that matter) . . .the ‘wfpiconsole’ does NOT gracefully “Shut down”. Rather. . .it goes to this screen. . .

This then forces me to sudo shutdown -h now but I would really prefer that the “Shutdown” Button to handle that operation for me (like it used to) because when typing. . .I have then bring up that little tiny on-screen keyboard in order to type the sudo shutdown -h now command. THAT then readies ‘wfpiconsole’ to be powered off for the night.

Bottom Line is. . I really do miss the functionality of the “Shutdown” Button. Same goes for “Reboot” — those Buttons were very Handy . . .USEFUL.

@storm_tracker and @padamec - my bad! I forgot to test the Reboot and Shutdown buttons before the release. It was a simple fix though, so they will be back in the next version (hopefully within a day or two)

2 Likes

Hi @fritz614, can you send me the contents of your wfpiconsole.ini file in a private message? That will help me troubleshoot this issue for you

Thank you very much @Peter, the Shutdown button is really important to me.

I always manually shutdown the console in a controlled way before it will automatically disconnect power later (night or absence). Otherwise the SD card probably wouldn’t last after some time.

In this context, I want to ask if it is possible to send some command to the console over LAN to automatically shut it down? I would welcome this for the possibility of automatically shutdown it from the home automation system.

1 Like

@Pcarr-AU and @jzsjr, OK I have done some more digging into this issue, and it seems to be particularly associated with a Pi4 attached to the 7 inch touchscreen (possibly with a mouse attached) and interference between touches and mouse clicks.

There is an option in wfpiconsole.ini that allows you to toggle the cursor on and off. I have added a fix to the code that means when the cursor is toggled off, the mouse input is completely disabled and this should stop the interference.

So firstly, can you both open wfpiconsole.ini and make sure the Cursor key under [Display] is set to 0. Then run the following command to download the latest beta version of the PiConsole

wfpiconsole beta

Once that process has completed, start the console again with wfpiconsole start and let me know if that has fixed the issue

Peter
It initially worked but then I changed the time from 24 hour to 12 and it knocked me out again.

Traceback (most recent call last):
File “/home/pi/wfpiconsole/main.py”, line 516, in
wfpiconsole().run()
File “/home/pi/.local/lib/python3.9/site-packages/kivy/app.py”, line 950, in run
runTouchApp()
File “/home/pi/.local/lib/python3.9/site-packages/kivy/base.py”, line 582, in runTouchApp
EventLoop.mainloop()
File “/home/pi/.local/lib/python3.9/site-packages/kivy/base.py”, line 347, in mainloop
self.idle()
File “/home/pi/.local/lib/python3.9/site-packages/kivy/base.py”, line 391, in idle
self.dispatch_input()
File “/home/pi/.local/lib/python3.9/site-packages/kivy/base.py”, line 342, in dispatch_input
post_dispatch_input(*pop(0))
File “/home/pi/.local/lib/python3.9/site-packages/kivy/base.py”, line 308, in post_dispatch_input
wid.dispatch(‘on_touch_up’, me)
File “kivy/_event.pyx”, line 709, in kivy._event.EventDispatcher.dispatch
File “/home/pi/.local/lib/python3.9/site-packages/kivy/uix/behaviors/button.py”, line 179, in on_touch_up
self.dispatch(‘on_release’)
File “kivy/_event.pyx”, line 705, in kivy._event.EventDispatcher.dispatch
File “kivy/_event.pyx”, line 1248, in kivy._event.EventObservers.dispatch
File “kivy/_event.pyx”, line 1172, in kivy._event.EventObservers._dispatch
File “/home/pi/.local/lib/python3.9/site-packages/kivy/uix/settings.py”, line 571, in _set_option
self.value = instance.text
File “kivy/properties.pyx”, line 498, in kivy.properties.Property.set
File “kivy/properties.pyx”, line 545, in kivy.properties.Property.set
File “kivy/properties.pyx”, line 600, in kivy.properties.Property.dispatch
File “kivy/_event.pyx”, line 1248, in kivy._event.EventObservers.dispatch
File “kivy/_event.pyx”, line 1154, in kivy._event.EventObservers._dispatch
File “/home/pi/.local/lib/python3.9/site-packages/kivy/uix/settings.py”, line 323, in on_value
panel.set_value(self.section, self.key, value)
File “/home/pi/.local/lib/python3.9/site-packages/kivy/uix/settings.py”, line 665, in set_value
settings.dispatch(‘on_config_change’,
File “kivy/_event.pyx”, line 705, in kivy._event.EventDispatcher.dispatch
File “kivy/_event.pyx”, line 1248, in kivy._event.EventObservers.dispatch
File “kivy/_event.pyx”, line 1172, in kivy._event.EventObservers._dispatch
File “/home/pi/.local/lib/python3.9/site-packages/kivy/app.py”, line 1158, in _on_config_change
self.dispatch(‘on_config_change’, *largs[1:])
File “kivy/_event.pyx”, line 709, in kivy._event.EventDispatcher.dispatch
File “/home/pi/wfpiconsole/main.py”, line 286, in on_config_change
astro.Format(self.CurrentConditions.Astro, self.config, ‘Sun’)
AttributeError: type object ‘astro’ has no attribute ‘Format’
pi@raspberrypi:~ $

Peter
I went into settings again and changed some of the primary and secondary square around without incident. Changed the inside temperature to be on and then back off without incident but then changed the time back to 24 hour and it once again kicked me out.
Jim

@padamec - I would suggest adding the power on/off button to your Pi. I find it very useful.

If you use Raspbian stretch 2017.08.16 or newer, all that is required is to add a line to /boot/config.txt:

dtoverlay=gpio-shutdown,gpio_pin=3

Make sure to reboot after adding this line. Then, if you connect a pushbutton between GPIO3 and GND (pin 5 and 6 on the 40-pin header), you can let your raspberry shutdown and startup using this button.

A lot more details and alternate ways to implement a shutdown (or reboot) button can be found at the link below.

https://gist.github.com/lbussy/9e81cbcc617952f1250e353bd42e7775

I understand that on newer versions of the OS this may be the default configuration.

Dan

1 Like

Good spot! That’s a bug I managed to let slip through. I’ll fix it in the next version. You can change the time format manually in the .ini file if you want to in the meantime

@Peter. . .just ran wfpiconsole beta . . . but now. . .none of the 4 buttons on the bottom respond to touch. Now at Critical Juncture. . . .Cannot shutdown the console what-so-ever except to do a Fatal Hard Crash by killing the power head-on and running the risk of destroying the SD card.

image

:cry: :cry: :cry: why do updates always cause sooooo many issues! If you plug in a keyboard you can stop the console with ctrl-c. If you have to power cycle there is a chance the SD will fry, but it is pretty small (I’ve done it enough times without it happening!) I’ve clearly gone and broken Pi3s while trying to fix for Pi4s. You can run wfpiconsole update to get back to the stable version and I will keep trying to fix things

If I choose to Bail out of the display as seen above. . .is there a way to UNdo the beta? In other words. . .revert back to the previous version (v22.3.1) and just accept the fact that I should not use the Shutdown or Reboot buttons.

I don’t wanna fry that SD card. . .but otherwise my display is locked to what we see above. " If you plug in a keyboard you can stop the console with `ctrl-c ". But can’t plug a kybd into the console because the Console is stranded! I can’t Bail out of the display w/o doing a complete unplug of the power. . .hence SD Card High Risk.

Yep, just run wfpiconsole update and it will move you back to the stable v22.3.1

Guess I’ll just have to cut the power and take my chances – eh?

Yea, I’m sorry! I didn’t mean to lock you out :joy:

Just cut the power. . .waited for 2 mins. . .then turned isobar surge protector (switch) back on. Just re-ran ‘wfpiconsole uppdate’

WeatherFlow PiConsole update complete!

Just ran ‘wfpiconsole start’. Display is present. . .but the buttons on the bottom still do not respond to touch. Same situation as above. The display is locked and can not get to anything. Hence have no way to go back to the “Menu” screen to see what version it is.