WeatherFlow PiConsole - Archive

Yes I get this message every time. See previous post for photo of message.

Try instead of ā€˜sudo apt-get updateā€™, ā€˜sudo apt-get update --allow-releaseinfo-changeā€™ or try ā€˜sudo apt updateā€™. Probably the first one will work and youā€™ll only have to do it once since the suite changed to ā€˜oldstableā€™.

1 Like

That appears to have worked. Itā€™s doing a boatload of updates now. Thanks!

Typically you would want to google for the ā€œE:ā€ (error) line message which would point you straight to the solution that others already answered. Just chiming in for the next person who runs into it.

Hi, sorry in advance if this has been answered in the thread already but Iā€™m not finding a similar issue so far. Iā€™ve recently updated my Raspberry Pi 3b to the latest version of PiConsole (4.0.4 I think, was coming from an earlier 3.x.x version) and have run into a start/autostart issue. PiConsole no longer autostarts and the only way to start it is from terminal with ā€œsudo wfpiconsole startā€. This starts the console however if the SSH session or terminal session is closed on the Raspberry Pi 3b the PiConsole closes.

Last line when starting the PiConsole is ā€œWebsocket connection openā€

Running sudo wfpiconsole autostart-enable indicates successful completion but the console does not start at the end of this nor does it start automatically on reboot.

The Pi 3b OS is buster, OS is updating ok otherwise.

Nothing jumps out at me in the log file.

Any pointers on where to look to resolve this please?

Since you did a major upgrade

I guess you just have to apply this again for the autostart.

Try running all the commands without sudo at the front. This may well be messing everything up as it is changing the user that is calling the command. If sudo is required, it is handled by the wfpiconsole function.

You probably need to re-enable the autostart functionality, so just run wfpiconsole autostart-enable (without sudo) as @eric said.

Thank you Peter. I ended up re-running the wfpiconsole update command without sudo as trying to start or autostart-enable was generating an error without sudo. Once the update completed without using sudo wfpiconsole autostart-enable without sudo worked ok as well and the console started again and autostarts ok now too on reboot. Thank you for the help and the great weather console

@peter, thanks for all of your hard work! Itā€™s great to see you incorporate user feedback into the PiConsole.

1 Like

Updated to 4.0.3 from 4.0.2 without any major issue. I had to update Python from 3.5 to 3.7 manually but other than its running great! :+1:

1 Like

@peter
Thank you Petr, after the update everything is fine :+1: :blush:

2 Likes

@peter

EDIT: Nevermind ā€¦ I did my own troubleshooting. was able to replicate the trouble on my Windows 10 PC install, by copying the entire (suspect)wfpiconsole folder over to it. **
I then did the reverse, copied my working 4.0.3 AIR/SKY system to the Tempest system. Modified the .ini file to reflect the TEMPEST hardware, and itā€™s now working fine. I assume there was a corruption during the update?? Anyway ALL is good now. Sorry for any false alarm.

Thanks again, for your work on this. I canā€™t say that enough.
/EDIT]

updated both my setups ā€¦ one SKY/AIR & the other Tempest

The one setup for Tempest - I get no longer get an Outdoor temp display - LARGE reading. This continues after launchā€¦and running.

2021-02-15 08:56:56-0500 [-] AttributeError: 'bytes' object has no attribute 'encode'
2021-02-15 08:56:56-0500 [-] Exception ignored in: 'kivy.core.text._text_sdl2._get_font'
2021-02-15 08:56:56-0500 [-] AttributeError: 'bytes' object has no attribute 'encode'
2021-02-15 08:56:56-0500 [-] AttributeError: 'bytes' object has no attribute 'encode'
2021-02-15 08:56:56-0500 [-] Exception ignored in: 'kivy.core.text._text_sdl2._get_font'
2021-02-15 08:56:56-0500 [-] AttributeError: 'bytes' object has no attribute 'encode'
2021-02-15 08:56:56-0500 [-] AttributeError: 'bytes' object has no attribute 'encode'
2021-02-15 08:56:56-0500 [-] Exception ignored in: 'kivy.core.text._text_sdl2._get_font'
2021-02-15 08:56:56-0500 [-] AttributeError: 'bytes' object has no attribute 'encode'
2021-02-15 08:56:56-0500 [-] AttributeError: 'bytes' object has no attribute 'encode'
2021-02-15 08:56:56-0500 [-] Exception ignored in: 'kivy.core.text._text_sdl2._get_font'
2021-02-15 08:56:56-0500 [-] AttributeError: 'bytes' object has no attribute 'encode'
2021-02-15 08:56:56-0500 [-] AttributeError: 'bytes' object has no attribute 'encode'
2021-02-15 08:56:56-0500 [-] Exception ignored in: 'kivy.core.text._text_sdl2._get_font'

image
{Edit: noticed itā€™s ALL those LARGE Fonts}

Great! Glad you managed to get it fixed. Sorry it broke though. Sounds like something got corrupted unfortunately. Can you run as test for me? Make a backup of the working folder and then try running the update command again. Nothing should change, but it would be interesting to know if the bug/corruption happens again. It it does, I will investigate and you can roll back to your backed up version.

I had done that prior to my other efforts. It stated no update required - or something to that effect.

That makes sense as the current and latest version numbers match. If you run the update again now though on the working version, does the console still run afterwards? Just trying to work out if the update command will always break your installation

Ok, did that ā€¦and itā€™s running fine ā€¦

  [i] Latest version of WeatherFlow PiConsole: v4.0.3
  [i] Installed version of WeatherFlow PiConsole: v4.0.3
  [āœ“] Versions match: No update required

  =============================================
  WeatherFlow PiConsole update complete!
  Restart the console with: 'wfpiconsole start'
  or 'wfpiconsole autostart-enable'
  =============================================

I do have another question, I canā€™t seem to be able to ā€˜startā€™ wfpiconsole the way I used to, from an SSH connection. Itā€™s starts fine - however itā€™s linked to that connection. So if I close that connection, it kills the wfpiconsole process. I tried appending ā€˜&ā€™ to the end of wfpiconsole start & , to no avail. Is there a way to start from SSH without this consequence?

Iā€™ve been doing a sudo reboot, as my work around.

[Edit; this is unrelated to the UPDATE, this condition has been going on for awhile. Iā€™m referring back in the version 3.x days.]

Glad to hear it is running fine. Hopefully this was just a one off.

In my understanding this is always the expected behaviour of an SSH tunnel. Iā€™m very surprised you ever managed to get it to keep the process running in the past. You could always set up an VNC connection rather than an SSH connection as that shares the actual desktop of the Pi, or you could look into the SSH screen command. I have never tired this, but it essentially detaches a ā€˜screenā€™ from the SSH tunnel that will stay running when the tunnel is closed. I donā€™t know how this will work with GUI applications, however.

Use the screen command

The screen command launches a terminal in the background which can be detached from and then reconnected to. This is especially useful when you log in to the system remotely. You can start a screen, kick off a command, detach from the screen, and log out. You can then log in later and reattach to the screen and see the program running.

Huh?

OK, let me go back and see if I have my original scripts I used. The auto start feature was hit or miss for me; (back then) so I used two scripts ā€œstart_console.shā€ & ā€œstop_console.shā€ instead of wfpiconsole start/stop. If I still have them - Iā€™ll see how they worked. Perhaps Iā€™ll go back to using them if they do.

Thanksā€¦

[EDIT Here they areā€¦ & they do still work! :grin:

pi@pyconsole2:~/_Scripts $ cat start_console
#!/bin/bash
sudo systemctl start wfpiconsole.service
exit

pi@pyconsole2:~/_Scripts $ cat stop_console
#!/bin/bash
sudo systemctl stop wfpiconsole.service
exit

]

Those commands are more or less identical to wfpiconsole autostart-enable and wfpiconsole autostart-disable. They work because they start a background service that doesnā€™t require keeping the terminal/session running. If you run the enable command after the update from your SSH connection, the console should start and remain running once youā€™ve closed the ssh tunnel.