WeatherFlow PiConsole - Archive

Hi, I was successfully able to install wfpiconsole on a rpi running Buster… Didn’t see any errors anywhere along the process… However when I try to run the configuration process, when I get to the Station ID part, I get this:

Please enter your Station ID (required): xxxx
Please enter your outdoor Air module ID (required): xxxxxx
Please enter your outdoor Sky module ID (required): xxxxxxx
Station ID not recognised. Please re-enter your Station ID (required):

I pulled my station ID and module IDs from the Status page, as per the docs, but the script doesn’t seem to like them… I can see my stations with current data on smartweather.weatherflow.com so I don’t think the issue is there… Any thoughts on where to look for problems?

thanks

Can you say what you exactly fed the script as station, air and sky id ??
as you can see from the xx, the length is not the same between station id and device id … (4 versus 6 digits)

Sorry… I’m a little paranoid by default… :slight_smile:
7920 26758 26759

I’m not 100% sure but did you set your station private ??

If so, I think the script can’t get your data (being set private)
Try to toggle off the private setting and see if it works.

Yep. Setting it to public fixes that issue… Thanks.

1 Like

Hi @jtw! Thanks for checking out the console, and I’m glad you have manged to get up and running with @eric 's help (thanks!). Unfortunately WF do not provide a way yet for third party applications to access data from private stations - even if it is the station owner that wants access. As soon as they provide a way, I’ll update the wfpiconsole.

2 Likes

Hi Peter sorry for the delay, finally had a chance today to have another go and the updated version is working perfectly. Thank you so much! Ordered a screen and case, looking forward to having a play :slightly_smiling_face:

Great! Glad to hear it :smiley: . Let me know if you run into any issues.

Hi Peter,

Should the console run a Pi4? The script installed without errors on a fresh copy of Buster. I’m using a monitor (1280x1024). Error below when trying to start.

pi@raspberrypi:~ $ wfpiconsole start
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_19-07-13_6.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at “/usr/local/lib/python3.7/dist-packages/kivy/init.py”
[INFO ] [Python ] v3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.2.0]
[INFO ] [Python ] Interpreter at “/usr/bin/python3”
[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

  • failed to add service - already in use?

BTW v2.9 is running fine on my Windows PC.

Thanks, Peter

Hi Peter, there is no reason why it shouldn’t run on the Pi4. The problem though is that due to the increased processing power and RAM on the the Pi4 it comes with a new graphics engine, and this is likely causing the issues that you are seeing. Unfortunately, I don’t have a Pi4 to test the code on.

There are a couple things to try though that will help me with the troubleshooting. Firstly, can you start an instance of Python in a terminal window on the Pi4 by using the command python3. Once python starts, can you copy and paste these commands in order:

import platform
print(platform.system())
print(platform.machine())
print(platform.platform())

The last three commands should print an output to the terminal. Can you let me know what it prints? Once you’ve finished, you can close the python interpreter with the command exit().

Then can you open the file main.py in the wfpiconsole directory and comment out lines 22 and 23 and lines 219 and 220. Lines 22 and 23 should read this:

if platform.system() == 'Linux' and 'arm' in platform.machine():
	os.environ['KIVY_GL_BACKEND'] = 'gl'

and lines 219 and 220 should read this:

if 'arm' not in platform.machine():
	Window.size = (800,480)

Comment them out by putting a # at the start of each line. Save the file and then try and run the console again. Let me know what you see this time.
Cheers!

Hi Peter,

Output from the code:

import platform
print(platform.system())
Linux
print(platform.machine())
armv7l
print(platform.platform())
Linux-4.19.57-v7l±armv7l-with-debian-10.0

I tried commenting out lines 22/23 and 219/220 but still the same error.

I have limited knowledge of Python but fluked it by googling.
if platform.system() == ‘Linux’ and ‘arm’ in platform.machine():
os.environ[‘KIVY_WINDOW’] = ‘sdl2’
and need remove “not” to get window to size correct only my larger monitor.
if ‘arm’ in platform.machine():
Window.size = (800,480)

For me its not necessary to run on a Pi4, its just that I had one so thought I would try.

Thanks, Peter

Thanks for letting me know the output and for info on how you managed to make it work. I’ll try make the logic in the code cleverer so it can tell whether it is running on a Pi4. I may need to come back to you to ask you to try out a couple more things. Cheers!

Finally got everything I needed to build the PiConsole. install when very smooth. Great job on this.

Great! Glad you like it. Let me know if you see any issues.

did the upgrade

  1. allowed it to update other packages and it went square. As I have weewx on the same pi it started to update the script but your script doesn’t bring back on screen a question asked by weewx during it’s upgrade to retain or use another config file, hence it hung. Simple solution, open another terminal and do a usual apt-get update/upgrade to finish weewx update

  2. next run to finish your scripts, upgrade it showed a pip upgrade, did it

  3. all done and running …

cheers

I am also trying to run this on a Pi4. Thanks to peter.jeffery.nz I was able to get the console to display by making the code changes. I am new to this … and I haven’t figured out a good way to search this forum, so, I may have missed this … but, the wfpiconsole display is not centered on the display, and, I have not figured out how to center it. Since it looks shifted up in the display, the top part of the display is not visible. This is mostly an annoyance, but, when I go into settings, some of the things on there are not easy to get at. Is there a way to get this to center properly?

Lou

weird you still have the launch bar down the screen, usually that is hidden when the console runs (in my case anyway).

you might need to fiddle the window size in the code to make up for the lower bar …(880,460 or lower …to test

Also, are you using the Official touchscreen?

Edit: The new graphics engine on the Pi4 may actually mean you need to set the console to run full screen instead of giving it a specific size.

There is a section in the code on lines 219-220 that would originally have read:

if 'arm' not in platform.machine():
    Window.size = (800,480)

Try and change this to

if 'arm' in platform.machine():
    Window.fullscreen = True

and let me know what you see.

Well … with either

if ‘arm’ not in platform.machine():
Window.size = (800,480)

or

if ‘arm’ in platform.machine():
Window.fullscreen = True

the screen looks the same … stretched so that both the top and bottom are off the screen (and some things are overlaying each other).

The “launch bar” was showing because I had moved it to the bottom of the screen so that the issue was more apparent (i.e., the console screen looked like it was shifted upward). To get what I posted before, I had to make the change that peter.jeffery.nz had posted earlier (removing the “not” in

if ‘arm’ not in platform.machine():
Window.size = (800,480)
)

I hope I am making sense :slight_smile: .

And, yes, I am using the official touchscreen.

Thanks,

Lou

Hi Lou, sorry you’re having these problems! I’ve tried to avoid having to buy a Pi4 as I don’t personally need one, but I think it is time I went out and got one. It seems like the new graphics engine is playing havoc with the console! Please bear with me though - it might take a week or two.

In the meantime, it would be interesting to know what screen resolution your Pi is reporting. It should be 800x480, but perhaps something odd is going on. Can you open a terminal and start an instance of python using the command python3? Then copy and paste each line below in turn. The last two lines should print an output to the screen. Can you let me know what you get? Cheers!

import Tkinter
root = Tkinter.Tk()
print(root.winfo_screenwidth())
print(root.winfo_screenheight())