WeatherFlow PiConsole - Archive

I just got it running on windows, needed to follow the kivy install instructions here:
https://kivy.org/doc/stable/installation/installation-windows.html

and also had to install numpy

1 Like

Good to hear! And thanks for letting me know about Numpy. Iā€™d forgotten it would be missing on Windows initially.

Unfortunately the console wonā€™t look its best on Windows, and will be somewhat stretched in the vertical. If you like it, Iā€™d recommend getting a Raspberry pi instead!

2 Likes

No probs, it actually doesnā€™t look too stretched at all

Did run into another issue though, and just created a pull request to fix it.
Guessing no-one else in the Southern Hemisphere had tested it.

Yea just seen that - thanks! Itā€™s a wayward line of PHP code that I forgot to delete when converting the routines to Python. Iā€™ll accept the pull request and release it with the next version.

Glad everything else seems to be working though. I certainly never tested in the Southern Hemisphere, so do let me know if you come across anything else weird.

2 Likes

@peter

Got it running on the Pi directly. Good stuff. Thanks for step by step instructions.

Couple of notes.

When performing all the steps in the instructions there are a couple of lines that have a tick mark at the end of the string. I was copying and pasting each step and those tripped me up for a few minutes. Not a big deal, just an FYI.

Example - also see Step 6
image

When running on the RPi was getting an exception when the Window.size was being set. Turns out that RPi only supports Full Screen (which did work). I found out that using Open GL allows for Kivy Windowed Mode.

Running on the RPi

Next up is to set things up on the little monitorā€¦

4 Likes

Now running on the RPi Touch screen.
Interesting had to switch back to native driver vs the Open GL one.
With the Open GL driver RPi would boot but screen goes blank, will have to research that one.

image

1 Like

Hello Peter

just installed your script and Iā€™m also plaged with ghost devices (as tester I more then once killed a few things :slight_smile:
station ID 3531

KeyError: 'device_type'

When I go to the other hub I get another error message
station ID 3695

KeyError: 'countryCode'

Once you can push the fix out, let me know

thanks for all the work

2 Likes

Love this app, already have a request from my boss to build one for his WF.
Thanks for your work on this one Peter.

2 Likes

Sigh - living close to Seattle has advantages. Ordered a pi3+ before noon, delivered and booted before dinner. I think I met my Fitbit steps for the day going back+forth to the front door muttering ā€œā€¦is it here yetā€¦ā€ :slight_smile:

4 Likes

That is fast. I will order another have it by Thursdayā€¦LOL

@patrick.mussner and @eric Just released a new version with a workaround for orphaned devices. You should now be able to get your consoles up and running.

@vertigok Iā€™ve incorporated you bug fix in Sager.py into the new release. Thanks very much!

@mao, thanks for spotting the issues in README.md. That should all be fixed now. Iā€™ve also come across the same behaviour re. full screen and Window.size when running with the different OpenGL drivers on the Raspberry Pi. As the code is designed for the touchscreen and therefore needs the native driver rather than the Open GL one, Iā€™ve added a small workaround to cope with the Window.size exception.

@eric, I canā€™t recreate the KeyError: 'countryCode' you get for station 3695. Can you download the update and let me know is this is still happening?

Thanks all!

2 Likes

Living close to SparkFun is a double edged sword. The good is I can go get anything I need. The bad is I can go get anything I want.

6 Likes

edit : got it to work. Made me a new account with geonames as the one I had (very old) seems to have problems (used the url from your code and filled in the details and it gave an error account level). Now it runs. Letā€™s explore :slight_smile:
thanks Peter

this is the full start log from terminal, whatever station I choose I still have that language problem.
could it be that the pi being set to french France is making a problem ??
Have used raps-config to set GB_us but still same

pi@WF_console:~/WeatherFlow $ python3 main.py
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_18-09-16_0.txt
[INFO ] [Kivy ] v1.11.0.dev0, git-038acbf, 20180915
[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-16 17:01:58+0200 [-] Log opened.
2018-09-16 17:02:00+0200 [-] Traceback (most recent call last):
2018-09-16 17:02:00+0200 [-] File ā€œmain.pyā€, line 1720, in
2018-09-16 17:02:00+0200 [-] WeatherFlowPyConsole().run()
2018-09-16 17:02:00+0200 [-] File ā€œmain.pyā€, line 219, in init
2018-09-16 17:02:00+0200 [-] self.System[ā€˜Countryā€™] = Data[ā€˜countryCodeā€™]
2018-09-16 17:02:00+0200 [-] KeyError: ā€˜countryCodeā€™

I think it is this part of your code but hell Iā€™m no coder so the fix ???

# Determine country of Station
                Template = 'http://api.geonames.org/countryCode?lat={}&lng={}&username={}&type=json'
                URL = Template.format(self.System['Lat'],self.System['Lon'],self.System['GeoNamesKey'])
                Data = requests.get(URL).json()
                self.System['Country'] = Data['countryCode']
2 Likes

Perfect! I thought something with Geonames may have been the issue. Happy exploring!

Once it is stable enough, I can translate to Dutch and French if you ever go local :wink:

waiting for the full European version in CĀ° en km/h etc :slight_smile:
Looks nice already as is

again thanks for the hard work

4 Likes

:+1:
works perfectly!!!

3 Likes

IMG_4100

3 Likes

Thanks for the feedback and updates.

After a little more then 24 hours I have a half frozen screen

all WF data is updating but the touch part is dead, I canā€™t open the forecast/sun-moon/ nor CC part anymore
Also the forecast top left in the circle is showing forecast unavailable when the other fields are populated
no reaction at all from the touch screen.
Any idea what could have crashed, canā€™t find trace in the logs (for as much I digged)
Any idea where to look for any log ???

seems the service for the touchscreen died somehow ā€¦
Wonā€™t reboot for now as it may help if it stays in this state to debug.

1 Like

Hi @eric, ā€œForecast unavailableā€ is an easy fix. I forgot to make an icon for ā€œWindyā€ conditions so it just defaulted to ā€œForecast Unavailableā€. Iā€™ll push a fix for that soon.

As for the frozen screen, that seems a little more complex and is not behavior I have observed. Can you SSH into your Pi? The logs should be in ~/.kivy/logs. If there is nothing interesting in there, I would use SSH to kill the console and see if you can use touch to interface with the base Raspbian GUI. If you canā€™t, my instinct would be that something deeper in the Pi than the console has gone haywire, especially given that the console is happily updating still. Perhaps reboot and see if the touch comes back? If it does I guess start the console again and see if the problem occurs again? Sorry I canā€™t be more helpful for this one!