WeatherFlow PiConsole - Archive

ahhh ok… I limited to one decimal place. However it made little or no difference they are still different. I did take a quick look at Peter’s code - it appears he just does a flat conversion to the value in the JSON data value. * 0.0295301
image

if you are factoring in the elevation I would have to probably input ‘0’ in for elevation, for the math to be apples to apples?

In ArchiveSW you should have:

Hub: 4.0
Air: 1.8
Sky: 4.0

No worries! I’m following with interest to see where the issue is and whether I have a bug in the PiConsole as well.

3 Likes

This conversion is being applied to a sea level corrected pressure, not the raw value that comes from the JSON message.

	# CALCULATE SEA LEVEL PRESSURE FROM AMBIENT PRESSURE AND STATION ELEVATION
	# --------------------------------------------------------------------------
	def SeaLevelPressure(self,Pres):

		# Extract required meteorological fields
		Psta = Pres[0]

		# Define required constants
		P0 = 1013.25
		Rd = 287.05
		GammaS = 0.0065
		g = 9.80665
		Elev = float(self.config['Station']['Elevation']) + float(self.config['Station']['OutdoorHeight'])
		T0 = 288.15

		# Calculate sea level pressure
		SLP = Psta * (1 + ((P0/Psta)**((Rd*GammaS)/g)) * ((GammaS*Elev)/T0))**(g/(Rd*GammaS))

		# Return Sea Level Pressure
		return [SLP,'mb','{:.1f}'.format(SLP)]

Thank you @peter, very kind of you.

I suspect your conversation is correct and that you are pulling the data from the REST API. I depend solely on the user entering the correct data.

I use meters to one decimal as any further precision is silly.

1 Like

OK, didn’t see that in my quick look.

Well, I tried setting my value in @GaryFunk 's app (panel config) and it did ‘fix’ the difference.

Oh well, all other parameters seem to be exactly the same except for Pressure. ?

2 Likes

Great. So now the Pressure should match each and every time.

1 Like

I can’t speak for Peter but I think he appreciates those that are running both applications, as I do. It helps both of us check and improve our applications. And this helps all of us as we move forward with understanding our own weather. It also helps advance the Smart Weather Station.

Thank you, Peter.

2 Likes

Absolutely. My thoughts exactly. I think both applications are brilliant at what they do (I’m probably biased here :stuck_out_tongue:), and they are both helping to enhance the Smart Weather Station ecosystem. I don’t ever see them as direct competitors, and one day when I get some time, will definitely set up ArchiveSW to archive my data :smiley:. I also want to see how easy it is to output daily text files from the ArchiveSW database.

2 Likes

Well Guys … That did it working as a Team - you solved ‘My’ problem!

image

Thanks again for you’re hard work as always.

I think the thing that made the difference was that I was’nt paying attention to the Hub height - not even thinking that factored in as I assumed there was no sensors in it to be considered. I had it set for 0 (zero).

now all is well :blush:
image

2 Likes

ArchiveSW will always be limited in its functions by the requirement of being 100% self contained.

PiConsole has the ability to call on unlimited web services by design.

Each provides much of the same data yet each provides different services. Each compliments the other and provides checks against the other.

Peter and I win by helping and following the other.

2 Likes

Thank you, Tom. We both appreciate your help.

:+1: :ok_hand:

I’m getting an external sensor today that I ordered. ( DS18B20 ) I’ll be attempting to get that working in the next few days. :neutral_face:

I’ve already got a few of these DH22 laying around from projects - in a different life.
image
I kinda like the idea of having the indoor temp on screen as well. I do like the DS18B20 - as it has the long wire lead locating it far enough away from any heat source (like the Rpi & monitor) to affect the ambient indoor temp.

1 Like

I like the DS18B20 as you can link several together. I have at least one in every room so I can monitor the temperature throughout my house. Someday I’ll tie that into my HVAC system and be able to control the vent I. every room.

1 Like

Some more progress. I’ve now integrated the Ecobee thermostat data into the PiConsole display - it’s optional, so if you want it you specify during setup that you want to use it, and then go through an auth dance with the ecobee device. However, once that is done once, I keep the access and refresh tokens so that we can keep getting the data.

Right now I’m pulling temperature, humidity and desired min/max temp settings from the thermostat and displaying it. If the heating system is on, the current indoor temp is displayed in orange; if the cooling system is on, the current temperature is displayed in blue, and if neither is on, it’s displayed in white.

Here’s a screenshot of it (heat is running):

Note that I left things in for the Breathe device when it arrives, but for me I thought this would be a fun integration. I haven’t bothered to fix the buttons at the bottom on my mac, because they’re good enough and it was turning into a PITA.

And here’s a pic of my Pi (heat is not running):

2 Likes

I still need to take a look at the config update code, but once I’m done with that I think it should be close to ready to push.

Gary,
Fixed the pressure with your recommended settings for my station
Must not have saved them before. Thanks!
ArchiveSW = 30.165
PiConsole = 30.166

1 Like

It’s good to know you have it fixed. So my guess is
Hub height: 316.0
Sky height: 4.3
Air height: 2.4

Now if I can convince WeatherFlow to store the elevation and height to only 1 decimal.

1 Like

For those of you (probably only me, but oh well) who want to integrate their Ecobee smart thermostat data (currently only temperature, heat point, cool point and humidity) into the Weatherflow PiConsole display, I’ve published my changes (temporarily) at GitHub - andy-cooper/WeatherFlow_PiConsole: Raspberry Pi Python console for WeatherFlow Tempest and Smart Home Weather Stations. Instructions for the upgrade are included in the README.md file. I’ve also created a pull request for @peter who can decide if he wants to incorporate the changes into the official version or not.

In addition to those changes, for those who want to run on a Mac, I’ve fixed the scaling of most items (modulo the bottom 4 buttons that still look, umm, suboptimal) so that you can successfully run it on a Mac with a retina display.

3 Likes

@peter

having trouble getting my wfpiconsoles up. They keep choking on launch.

pi@pyconsole:~/wfpiconsole $ python3 main.py
[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_19-03-02_4.txt
[INFO   ] [Kivy        ] v1.11.0.dev0, git-b0befbe, 20190128
[INFO   ] [Python      ] v3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516]
[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
[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
2019-03-02 12:14:17-0500 [-] Log opened.
[INFO   ] [GL          ] NPOT texture support is available
2019-03-02 12:14:19-0500 [-] Starting factory <__main__.WeatherFlowClientFactory object at 0x706ce410>
[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   ] [MTD         ] </dev/input/event0> range position Y is 0 - 480
[INFO   ] [HIDMotionEvent] using <FT5406 memory based driver>
[INFO   ] [MTD         ] </dev/input/event0> range touch major is 0 - 0
[INFO   ] [HIDMotionEvent] <FT5406 memory based driver> range ABS X position is 0 - 800
[INFO   ] [MTD         ] </dev/input/event0> range touch minor is 0 - 0
[INFO   ] [HIDMotionEvent] <FT5406 memory based driver> range ABS Y position is 0 - 480
[INFO   ] [MTD         ] </dev/input/event0> range pressure is 0 - 255
[INFO   ] [HIDMotionEvent] <FT5406 memory based driver> range position X is 0 - 800
[INFO   ] [MTD         ] </dev/input/event0> axes invertion: X is 0, Y is 0
[INFO   ] [HIDMotionEvent] <FT5406 memory based driver> range position Y is 0 - 480
[INFO   ] [MTD         ] </dev/input/event0> rotation set to 0
[INFO   ] [Base        ] Leaving application in progress...
[INFO   ] [Support     ] Stopping twisted threads
[INFO   ] [Support     ] Shutting down twisted reactor
2019-03-02 12:14:20-0500 [-] Traceback (most recent call last):
2019-03-02 12:14:20-0500 [-]   File "main.py", line 2394, in <module>
2019-03-02 12:14:20-0500 [-]     wfpiconsole().run()
2019-03-02 12:14:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/app.py", line 855, in run
2019-03-02 12:14:20-0500 [-]     runTouchApp()
2019-03-02 12:14:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 502, in runTouchApp
2019-03-02 12:14:20-0500 [-]     EventLoop.window.mainloop()
2019-03-02 12:14:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 92, in mainloop
2019-03-02 12:14:20-0500 [-]     self._mainloop()
2019-03-02 12:14:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 87, in _mainloop
2019-03-02 12:14:20-0500 [-]     EventLoop.idle()
2019-03-02 12:14:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 337, in idle
2019-03-02 12:14:20-0500 [-]     Clock.tick()
2019-03-02 12:14:20-0500 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/clock.py", line 581, in tick
2019-03-02 12:14:20-0500 [-]     self._process_events()
2019-03-02 12:14:20-0500 [-]   File "kivy/_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
2019-03-02 12:14:20-0500 [-]   File "kivy/_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
2019-03-02 12:14:20-0500 [-]   File "kivy/_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
2019-03-02 12:14:20-0500 [-]   File "kivy/_clock.pyx", line 167, in kivy._clock.ClockEvent.tick
2019-03-02 12:14:20-0500 [-]   File "main.py", line 2018, in SagerForecast
2019-03-02 12:14:20-0500 [-]     self.Sager['Dial'] = sager.DialSetting(self.Sager)
2019-03-02 12:14:20-0500 [-]   File "/home/pi/wfpiconsole/lib/sager.py", line 47, in DialSetting
2019-03-02 12:14:20-0500 [-]     ccode = METAR['clouds'][0]['code']
2019-03-02 12:14:20-0500 [-] TypeError: string indices must be integers
Error in sys.excepthook:

Original exception was:
pi@pyconsole:~/wfpiconsole $