WeatherFlow PiConsole - Archive

I have issues, after some time the console like stalls

touch screen works, It is still showing it’s screen but it doesn’t update anymore, it froze at some point or data is not received/processed anymore

not to sure where to look for eventual debug data … stock install, nothing else running on it except smpd that is working since I can get the data in librenms on another server so rpi is running ok,

:roll_eyes:

1 Like

Hmmmm OK… Is the clock still ticking on the console and are the little status circles red or green?

I guess one of the problems with the autostart method I put together is I have no idea where the logs go either! Can I suggest you restart the console manually from a terminal, and let’s wait until it freezes/stalls again. Then hopefully we’ll have some output in the terminal that we can use to debug. I’ve certainly had it running for at least a week without issues, so something fishy must be going on!

Unfortunately I am also going to be away again from tomorrow so support might be hard. I’ll try my best!

both circles are red, tiles still turn back and forth …
killed the process and launched it manually, not sure I’ll see it crash before I go to bed, will do it again tomorrow

And as said no hurry for this, I know it is a project that needs time to mature and the fun is this period, debugging :wink:

2 Likes

look what I could catch, no error or message in terminal
it flickers from normal image and then the square and then back to normal and then like 20 secs normal and then back to this …

2 Likes

Weird!! So the wind rose arrow is a small png image, with the wind direction telling the code which image to load (there are 360 separate images). I couldn’t work out how to draw and animate the triangle natively in the GUI python module. The black square looks as if it can’t find the right image, but then I’d expect to see an error in the log saying exactly that. Do you notice anything weird with the rapid update wind direction as it flickers?

I’ve never seen this before, so I am going to have to have a more detailed look into it when I’m back.

@eric is Great at finding issues. One of my premier testers.

3 Likes

I think I found why it had this weird issue yesterday evening (my evening)

kill all processes main.py and just wait … not long after the console auto starts again …
Normal behaviour as the pi checks if the service is running … since I killed it, it did it’s job relaunching it.

This explains that yesterday it launched it most probably at +/- the same time I launched it manually … hence we have 2 instances running (can’t for 100% sure say this was the case, but it could explain the weird screen behaviour as 2 instances update it, or at least try)

I found the console working this morning when I killed the process yesterday evening just before going to zzzz → made me wonder during coffee sipping how that started till coffee started to have some effect on that big empty cavity upstairs …

did a test and killed all main.py and waited …not very long → console back up …

edit

pushed the pi to commit the error, basically I think you would need to include some code to check your file isn’t already running to avoid this kind of situations to happen with weird behaviour. This might not explain the dead duck situation from a few posts back though

30

2 Likes

The autostart function works great on my Pi!
Thanks

@peter
have you planned to integrate the lightning indicator in your console?

1 Like

The same happens to me if my Internet connection fails briefly (more than one minute) or my external IP address has changed.

I have seen that issue as well. Also the pressure graph has done a similar repaint issue as well.

Also I did have the app lock up - I started it on Monday am @work and let it run all week - it stopped responding Thursday am.

Are there any logs associated with the app?

I tend to confirm this as my ip changed about 20 mins ago and the console is sitting there and both circles are red …

2 Likes

24 hours later and my internet connection changed IP and again console is now sitting dead … both circles red.

Ok, there is clearly something going on here that I need to investigate when I get home. For me the Websocket has always been able to reconnect when the internet goes down, but looks like changing IPs is not handled well.

As for the autostart code always restarting, try changing Restart=always to Restart=no. That should stop it restarting when the code falls over.

In the meantime can you try and run it by manually starting the code in the terminal. It’ll be good to see what logs you are getting, and with the autostart I don’t know where the logs go (I’ll find out when I am back!)
Cheers!

1 Like

If you start the console manually, the log will be printed to the terminal. I need to investigate where they go if you use the autostart service, but I am not currently at home to do this.

If you’re having troubles, it would be useful if you could run the code manually for the time being so you can share the log output.

Yes - definitely on the road map. Probably some sort of pop-up when lightning is detected. It’s not something I see a lot of where I am based hence it not being included for the start.

Will set to manual tomorrow evening 15 mins before the IP will change, can’t simulate it so I’ll let do it as normal

3 Likes

No major issues, just one lock up and the occasional screen refresh black boxes.

Tomorrow, will start it up manually.

1 Like

I had to upgrade my firewall so I launched the console manually (after taking out the service and rebooted)
Launched it, then upgraded my USG and let do, both circles are red, and nothing in terminal came up except the lines for start

pi@WF_console:~/WeatherFlow $ python3 main.py 
[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_18-09-24_1.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 <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
2018-09-24 17:31:56+0200 [-] Log opened.
[INFO   ] [GL          ] NPOT texture support is available
Unable to connect to X server
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event0
[INFO   ] [MTD         ] Read event from </dev/input/event0>
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event0
[INFO   ] [HIDInput    ] Read event from </dev/input/event0>
[INFO   ] [Base        ] Start application main loop
[INFO   ] [MTD         ] </dev/input/event0> range position X is 0 - 800
[INFO   ] [Support     ] Starting twisted reactor
[INFO   ] [HIDMotionEvent] using <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '>
[INFO   ] [MTD         ] </dev/input/event0> range position Y is 0 - 480
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range ABS X position is 0 - 800
[INFO   ] [MTD         ] </dev/input/event0> range touch major is 0 - 0
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range ABS Y position is 0 - 480
[INFO   ] [MTD         ] </dev/input/event0> range touch minor is 0 - 0
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range position X is 0 - 800
[INFO   ] [MTD         ] </dev/input/event0> range pressure is 0 - 255
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range position Y is 0 - 480
[INFO   ] [MTD         ] </dev/input/event0> axes invertion: X is 0, Y is 0
[INFO   ] [MTD         ] </dev/input/event0> rotation set to 0
2018-09-24 17:32:00+0200 [-] Starting factory <__main__.WeatherFlowClientFactory object at 0x7061ea50>


this is what came up when manually stopping the script

7:32:00+0200 [-] Starting factory <__main__.WeatherFlowClientFactory object at 0x7061ea50>
^C[INFO   ] [Base        ] Leaving application in progress...
[INFO   ] [Support     ] Stopping twisted threads
[INFO   ] [Support     ] Shutting down twisted reactor
2018-09-24 18:02:25+0200 [-] Traceback (most recent call last):
2018-09-24 18:02:25+0200 [-]   File "main.py", line 1722, in <module>
2018-09-24 18:02:25+0200 [-]     WeatherFlowPyConsole().run()
2018-09-24 18:02:25+0200 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/app.py", line 826, in run
2018-09-24 18:02:25+0200 [-]     runTouchApp()
2018-09-24 18:02:25+0200 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 502, in runTouchApp
2018-09-24 18:02:25+0200 [-]     EventLoop.window.mainloop()
2018-09-24 18:02:25+0200 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 92, in mainloop
2018-09-24 18:02:25+0200 [-]     self._mainloop()
2018-09-24 18:02:25+0200 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 87, in _mainloop
2018-09-24 18:02:25+0200 [-]     EventLoop.idle()
2018-09-24 18:02:25+0200 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 337, in idle
2018-09-24 18:02:25+0200 [-]     Clock.tick()
2018-09-24 18:02:25+0200 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/clock.py", line 553, in tick
2018-09-24 18:02:25+0200 [-]     current = self.idle()
2018-09-24 18:02:25+0200 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/clock.py", line 533, in idle
2018-09-24 18:02:25+0200 [-]     usleep(1000000 * sleeptime)
2018-09-24 18:02:25+0200 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/clock.py", line 717, in usleep
2018-09-24 18:02:25+0200 [-]     _usleep(microseconds, self._sleep_obj)
2018-09-24 18:02:25+0200 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/clock.py", line 445, in _usleep
2018-09-24 18:02:25+0200 [-]     _libc_usleep(int(microseconds))
2018-09-24 18:02:25+0200 [-] KeyboardInterrupt

the kivi logs contain exactly the same …

will relaunch manually now and let it do, see what happens when the IP changes…

1 Like

Hmmmm… Did the circles turn green and then red, or did they stay red right from the start? In other words, did the console load any data at all?