Announcements & Updates

installed, see if it survives the midnight hour :parrot:

4 Likes

Thanks Peter, v1.5 installed, i give you feedback if i found bugs…

1 Like

Oh, I see you leave out the decimal at the daily rain.
What a shame :expressionless:

I can bring that back. I was probably a bit over zealous on the formatting!

Rain needs three decimal places.

2 Likes

That’s true for inches. For centimetres there should only be 2 decimal places, and for millimetres only 1 decimal place. More than that and I think you are probably implying an accuracy greater than what the sensor is capable of (+/- 0.2 mm/hr).

Here is a sample of the UDP data from the Hub. It’s to 6 decimal places. This is one munute readings in millimeters.

Capture

Yikes! That I did not expect. Surely the SKY cannot resolve a micro-meter (10^-6) of rainfall in one minute?

Edit: I guess it maybe that no rounding is done to the raw rain accumulation value that is calculated by the SKY/Hub and output via UDP or sent to the WF servers. I assume once it reaches the servers they round it appropriately for the accuracy of the instrument before displaying it on the app/web page or sending it back out via websocket or API. Perhaps @dsj can comment?

Yes, the haptic sensor can detect very tiny amounts of vibration that translate to very tiny amounts of rain. Just remember: precision and accuracy are two different things!

We do not round it on the server side, since it can be useful for unit conversion and derived parameters to keep the original precision (even though 0.000001 mm is rather ridiculous). However, the precision is limited by our apps, which round to 0.01 inches or 0.1 mm. This results in the apps displaying some non-zero rain as “0.00 inches” or “0.0 mm”, but that’s pretty rare. We will likely add a qualitative label like “trace” in future builds.

3 Likes

I’m precisely inaccurate at times.

I’m dealing with that exact item this morning.

5 Likes

Impressive! Turns out the sensor is even better than I thought then.

I think with the PiConsole I am going to follow the same convention as on the apps, just curtailing the decimal places as needed if space becomes limited (the screen after all is quite tight on space). “trace” is an interesting idea for small amounts of rain. What would be the absolute minimum rain accumulation that could be distinguished from zero?

The minimum would be 0.000001 mm but I seriously doubt we would ever see that reported. I am using

rain > 0 and rain < 0.001 = “Trace” for inches.

mm would be .1

1 Like

I’m trying to find where the Version # information is stored? I upgraded a few days back, and I’m not sure if I got ver 1.4 or 1.5 ??

can anyone HELP?

1 Like

open WeatherFlowPiConsole.ini and it’s on the last line :slight_smile:

2 Likes

weird situation this morning

The console died last night (no error logs as usual)

but this morning no way to get it start so back in terminal and launch manually, now I get this error

 python3 main.py 
[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_18-11-04_1.txt
[INFO   ] [Kivy        ] v1.11.0.dev0, git-038acbf, 20180915
[INFO   ] [Python      ] v3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516]
[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-11-04 08:53:06+0100 [-] 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-11-04 08:53:10+0100 [-] Starting factory <__main__.WeatherFlowClientFactory object at 0x706d6b70>
[INFO   ] [Base        ] Leaving application in progress...
[INFO   ] [Support     ] Shutting down twisted reactor
2018-11-04 08:53:12+0100 [-] Traceback (most recent call last):
2018-11-04 08:53:12+0100 [-]   File "main.py", line 2067, in <module>
2018-11-04 08:53:12+0100 [-]     WeatherFlowPiConsole().run()
2018-11-04 08:53:12+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/app.py", line 826, in run
2018-11-04 08:53:12+0100 [-]     runTouchApp()
2018-11-04 08:53:12+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 502, in runTouchApp
2018-11-04 08:53:12+0100 [-]     EventLoop.window.mainloop()
2018-11-04 08:53:12+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 92, in mainloop
2018-11-04 08:53:12+0100 [-]     self._mainloop()
2018-11-04 08:53:12+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 87, in _mainloop
2018-11-04 08:53:12+0100 [-]     EventLoop.idle()
2018-11-04 08:53:12+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 337, in idle
2018-11-04 08:53:12+0100 [-]     Clock.tick()
2018-11-04 08:53:12+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/clock.py", line 581, in tick
2018-11-04 08:53:12+0100 [-]     self._process_events()
2018-11-04 08:53:12+0100 [-]   File "kivy/_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
2018-11-04 08:53:12+0100 [-]   File "kivy/_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
2018-11-04 08:53:12+0100 [-]   File "kivy/_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
2018-11-04 08:53:12+0100 [-]   File "kivy/_clock.pyx", line 167, in kivy._clock.ClockEvent.tick
2018-11-04 08:53:12+0100 [-]   File "main.py", line 1839, in SagerForecast
2018-11-04 08:53:12+0100 [-]     self.Sager['Dial'] = Sager.DialSetting(self.Sager)
2018-11-04 08:53:12+0100 [-]   File "/home/pi/wfpiconsole/Sager.py", line 476, in DialSetting
2018-11-04 08:53:12+0100 [-]     elif pw == "Clear":
2018-11-04 08:53:12+0100 [-] UnboundLocalError: local variable 'pw' referenced before assignment
1 Like

Hi @eric, I’m struggling to recreate this error even if I use your station number in the .ini file. The error comes from the METAR API call in the Sager forecast routine, and I imagine it might be happening because the API call is not returning a complete METAR report. Can you try running the code again and let me know what happens? I think there might have been a server issue this morning that was bricking the API call and hence the console. I should add some code to make sure the console can survive the API call failing!

just tested it again, no more errors so that seems indeed a remote problem. Guess you need to add a control routine to intercept the error and just set zero values instead a crash

3 Likes

Thanks –

OH well. I overwrite that file (with my previous version) before even running!

New release (v1.6) of the WeatherFlow PiConsole. Lots of under the hood changes including:

  • Fixed bug in wind rose animation at the 360/0 degree discontinuity
  • Improved formatting of variables
  • Improved conversion of units
  • Prevent console from crashing if METAR report is incomplete
  • Prevent console from crashing if countryCode is undefined

I wouldn’t recommend overwriting the .ini file with a previous version after an update. Just copy across the API keys, as if I make any changes (including the version number which will eventually be used for an “update available” notification), you’ll miss out on everything.

Peter:

I just updated to version 1.6 and can’t seem to get it up and running … I do get a Kivy screen up but get the following log.
EDIT: this installation was installed in a different path - my previous version (unknown ver 1.?) is still working fine.

pi@pyconsole:~/wfpiconsole16 $ python3 main.py[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_18-11-08_7.txt
[INFO   ] [Kivy        ] v1.11.0.dev0, git-038acbf, 20180904
[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-11-08 10:14:30-0500 [-] Log opened.
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event0
[INFO   ] [HIDInput    ] Read event from </dev/input/event0>
[INFO   ] [Base        ] Start application main loop
[INFO   ] [Support     ] Starting twisted reactor
[INFO   ] [HIDMotionEvent] using <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '>
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range ABS X position is 0 - 800
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range ABS Y position is 0 - 480
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range position X is 0 - 800
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range position Y is 0 - 480
2018-11-08 10:14:39-0500 [-] Starting factory <__main__.WeatherFlowClientFactory object at 0x705cdeb0>
2018-11-08 10:14:43-0500 [WeatherFlowClientProtocol,client] Unhandled Error
	Traceback (most recent call last):
	  File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 103, in callWithLogger
	    return callWithContext({"system": lp}, func, *args, **kw)
	  File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 86, in callWithContext
	    return context.call({ILogContext: newCtx}, func, *args, **kw)
	  File "/usr/local/lib/python3.5/dist-packages/twisted/python/context.py", line 122, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "/usr/local/lib/python3.5/dist-packages/twisted/python/context.py", line 85, in callWithContext
	    return func(*args,**kw)
	--- <exception caught here> ---
	  File "/usr/local/lib/python3.5/dist-packages/twisted/internet/_threadedselect.py", line 276, in _doReadOrWrite
	    why = getattr(selectable, method)()
	  File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 243, in doRead
	    return self._dataReceived(data)
	  File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 249, in _dataReceived
	    rval = self.protocol.dataReceived(data)
	  File "/usr/local/lib/python3.5/dist-packages/autobahn/twisted/websocket.py", line 131, in dataReceived
	    self._dataReceived(data)
	  File "/usr/local/lib/python3.5/dist-packages/autobahn/websocket/protocol.py", line 1175, in _dataReceived
	    self.consumeData()
	  File "/usr/local/lib/python3.5/dist-packages/autobahn/websocket/protocol.py", line 1187, in consumeData
	    while self.processData() and self.state != WebSocketProtocol.STATE_CLOSED:
	  File "/usr/local/lib/python3.5/dist-packages/autobahn/websocket/protocol.py", line 1553, in processData
	    fr = self.onFrameEnd()
	  File "/usr/local/lib/python3.5/dist-packages/autobahn/websocket/protocol.py", line 1675, in onFrameEnd
	    self._onMessageEnd()
	  File "/usr/local/lib/python3.5/dist-packages/autobahn/twisted/websocket.py", line 159, in _onMessageEnd
	    self.onMessageEnd()
	  File "/usr/local/lib/python3.5/dist-packages/autobahn/websocket/protocol.py", line 627, in onMessageEnd
	    self._onMessage(payload, self.message_is_binary)
	  File "/usr/local/lib/python3.5/dist-packages/autobahn/twisted/websocket.py", line 162, in _onMessage
	    self.onMessage(payload, isBinary)
	  File "main.py", line 51, in onMessage
	    self.factory._app.WebsocketDecodeMessage(Message)
	  File "main.py", line 335, in WebsocketDecodeMessage
	    self.WebsocketObsAir(Msg)
	  File "main.py", line 434, in WebsocketObsAir
	    FeelsLike = self.FeelsLike(Temp,Humidity,WindSpd)
	  File "main.py", line 768, in FeelsLike
	    elif TempF[0] >= 80 and RH >= 40:
	builtins.TypeError: unorderable types: list() >= int()
	
2018-11-08 10:14:43-0500 [-] Client connection lost .. retrying ..
2018-11-08 10:14:43-0500 [WeatherFlowClientProtocol,client] <twisted.internet.tcp.Connector object at 0x705d7130> will retry in 60 seconds
2018-11-08 10:14:43-0500 [-] Stopping factory <__main__.WeatherFlowClientFactory object at 0x705cdeb0>
^C[INFO   ] [Base        ] Leaving application in progress...
[INFO   ] [Support     ] Stopping twisted threads
[INFO   ] [Support     ] Shutting down twisted reactor
2018-11-08 10:15:20-0500 [-] Traceback (most recent call last):
2018-11-08 10:15:20-0500 [-]   File "main.py", line 2097, in <module>
2018-11-08 10:15:20-0500 [-]     WeatherFlowPiConsole().run()
2018-11-08 10:15:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/app.py", line 826, in run
2018-11-08 10:15:20-0500 [-]     runTouchApp()
2018-11-08 10:15:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 502, in runTouchApp
2018-11-08 10:15:20-0500 [-]     EventLoop.window.mainloop()
2018-11-08 10:15:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 92, in mainloop
2018-11-08 10:15:20-0500 [-]     self._mainloop()
2018-11-08 10:15:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 87, in _mainloop
2018-11-08 10:15:20-0500 [-]     EventLoop.idle()
2018-11-08 10:15:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 353, in idle
2018-11-08 10:15:20-0500 [-]     window.dispatch('on_draw')
2018-11-08 10:15:20-0500 [-]   File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
2018-11-08 10:15:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/__init__.py", line 1343, in on_draw
2018-11-08 10:15:20-0500 [-]     self.render_context.draw()
2018-11-08 10:15:20-0500 [-] KeyboardInterrupt