another zzzz upgrade
donât freeze on that shelf ⌠and thanks to do the job to help understand how our behaviour pushed climate to the edge for human life.
Just updated, everything is working including auto start now. Thanks
Sounds like an amazing and important trip youâre about to embark on. Have a great time!
Changes are likely, but weâll do our best to avoid breaking anything!
I had hoped to release Version 3 of the console with a customizable layout before I left, but time has just run out. Iâll get on it when I am back though
@peter Just started using PiConsole, and I love it so far! A few questions/feature requests, and my apologies if they have been addressed before.
- Until the Breathe unit is released (if ever?), can we take the Indoor temp displays off/replace them with something?
- Rather than having the lightning panel replace the rainfall panel, can it replace something like the Sun/Moon or the Forecast Panel? During thunderstorms, I think it is important to see both lightning and rainfall.
Thanks for your hard work! This program is awesome. Enjoy Antartica and stay warm!
@connorkeef Thanks for checking out the PiConsole and Iâm glad to hear you like it
This is exactly the functionality that will come with Version 3 of the console. The layout is going to be completely customisable, so you can arrange the different panels in whatever order you want, and define the primary/secondary panels of your choice. I was hoping to get this released before I left, but time has just run out.
I will have a look at allowing the indoor temperature to be hidden if the user wishes in Version 3 as well. Version 3 will also have the code in place to allow a second Air unit to be used as the indoor sensor as well. I know there are lots of other products that could provide the indoor temperature, but I am not too keen to incorporated them into the main code as I will never be able to test them all. That being said, if you have the know how do feel free to hack the code if you have a specific sensor you want to include. I can provide pointers if needs be.
Cheers.
Ok, another (probably simple) problem. Iâm trying to get through the key entry routine and Iâm getting the belowâŚ
Traceback (most recent call last):
File âmain.pyâ, line 23, in
configCreate.create_ini()
File â/home/pi/wfpiconsole/lib/configCreate.pyâ, line 73, in create_ini
write_keyValue(Config,section,key,Default[section][key])
File â/home/pi/wfpiconsole/lib/configCreate.pyâ, line 326, in write_keyValue
Value = GeoNames[âgeonamesâ][0][âcountryCodeâ]
KeyError: âgeonamesâ
Presumably this is because it doesnât like my geonames key (??) I registered for it and (I think) itâs supposed to be the user name? I also tried the code for my town and that didnât seem to work either? Does anybody know the format that the key is supposed to be in?
Hi @scott.ferguson, thanks for checking out the PiConsole and sorry you are running into issues! I have no idea why it didnât install the packaging module first time around. Both the install
function and update
function process the required packages in the same manner, so itâs weird it didnât get picked up the first time around!
As for your second problem, I donât think the issue is with your username per se. The code is falling over because nothing is being returned in the API request to Geonames. When you type your username into the prompt, make sure there are no quotation marks or anything. The API can be a bit flaky, so if you havenât tried already, try running the console for the first time again. If it still errors, would you mind sharing your station ID (so I can get your lat/long) and your Geonames username so I can dig a bit deeper? The console only needs the Geonames API the first time it is run, so this shouldnât present a problem in the long run.
Hi Peter,
Station ID 11101
Geonames ID gwarrior4u (all smalls)
Itâs funny because it gets the lat and long and the rest of the location information in there, itâs just failing on the geonames part.
Scott
Hi Scott, I see the problem:
{"status":{"message":"user account not enabled to use the free webservice. Please enable it on your account page: https://www.geonames.org/manageaccount ","value":10}}
After you have registered for Geonames, you need to go to your account page and activate the Free Web Services. You should be able to do that at this link: GeoNames, and then you should be good to go. Let me know how you get on.
Well, another step. I re-read the directions and it says you have to activate the web services via a link at the bottom of the page. (I activated from the email and i thought I was done). So, got past THAT hurdle.
Now, weâve got another challengeâŚ
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - RuntimeError: bâCould not initialize EGLâ
File â/usr/local/lib/python3.7/dist-packages/kivy/core/init.pyâ, line 71, in core_select_lib
cls = cls()
File â/usr/local/lib/python3.7/dist-packages/kivy/core/window/window_sdl2.pyâ, line 152, in init
super(WindowSDL, self).init()
File â/usr/local/lib/python3.7/dist-packages/kivy/core/window/init.pyâ, line 981, in init
self.create_window()
File â/usr/local/lib/python3.7/dist-packages/kivy/core/window/window_sdl2.pyâ, line 290, in create_window
self.get_gl_backend_name())
File âkivy/core/window/_window_sdl2.pyxâ, line 224, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window
File âkivy/core/window/_window_sdl2.pyxâ, line 74, in kivy.core.window._window_sdl2._WindowSDL2Storage.die
[INFO ] [Text ] Provider: sdl2
2019-10-24 11:30:20-0400 [-] Log opened.
[CRITICAL] [App ] Unable to get a Window, abort.
pi@raspb4:~/wfpiconsole $
thoughts?
lol
And success You have to start the console from the desktop (it seems), not via the command line. I still need to go do the thing with the screen to keep windows from doing the top bar, but then I think Iâm good.
Thanks for your patience! Itâs been a while since Iâve done pi stuff, Iâm a little rusty.
Scott
Great! Glad to hear youâve got it working. Sorry for all the niggly issues. I still havenât worked out why the console wonât start via the command line (I assume via SSH?) on a Raspberry Pi 4. I expect it is probably something way outside my control though⌠If you want to access the Pi 4 remotely, VNC should work. I will add a note pointing this out in the instructions on Github. Let me know if you run into any more issues. Iâm around for a couple more weeks!
Working great! It stops fine from the command line (I am using SSH), but seems to only start via the text console on the pi desktop. I have it set to auto-start, so practically I can unplug the keyboard and mouse from the pi and just reboot it via ssh when I went to restart the screen. I did some time nuttery stuff with ntp, but beyond that, looks like itâs done!
I may get ambitious and see if I can learn enough python to get the inside air to do the inside temps, looking through the code trying to fix the other issues youâve done a VERY good job documenting what the modules do, so should be doable. One of these days
Hope you have a great time on the ice! Which station are you going to?
Scott
I spoke too soon! If you add export DISPLAY=":0.0"
to your .bashrc file using this command: echo 'export DISPLAY=":0.0"' >> .bashrc
(make sure you are in your home directory first by typing cd
), you should then be able to start the console from the SSH command line. Not sure why I didnât try this before! Just be aware though that if you close the SSH connection, the console will stop running. VNC has the benefit that this wonât happen.
Feel free to hack around the code, but just a heads up that this functionality will be introduced with Version 3 of the console. I had hoped to release this before I left, but time has run out.
We are going to be passing through McMurdo, but most of the season is going to be spent in the deep field on Thwaites ice shelf.
Iâd never used VNC before, itâs pretty cool. The WFpiconsole looks really on my mac! Screen is off only a little bit, but the graphics are pretty perfect.
Irridium works on ice shelves
Scott
I would like to use a BME280 sensor to provide indoor temp and RH. I have the python library to read the data. Could you explain where the code is to read and display this? I couldnât find a reference in main.py. Thanks.
Hi @timothyebuchanan, unfortunately the PiConsole was never designed to read data from your BME280 sensor so you wonât find any reference in main.py. The changes @peter.jeffery.nz made to the code to display indoor temperature are entirely his own. Hopefully heâll be willing to share them with you.
Hi Timothy,
Sorry for the slow response. Iâve been working overseas for an extend period and did not have access to my Weatherflow files.
Its been a while and have not made the changes to Peterâs latest versions. This was the code I added to the main.py back in V1.6.
# Indoor Temp and RH via SHT31
import smbus
import time
bus = smbus.SMBus(1)
bus.write_i2c_block_data(0x45, 0x2C, [0x06])
time.sleep(0.5)
# SHT31 address, 0x45(69)
shtdata = bus.read_i2c_block_data(0x45, 0x00, 6)
# Convert the data
shttemp = shtdata[0] * 256 + shtdata[1]
bTemp = str('{0:.1f}'.format((-45 + (175 * shttemp / 65535.0))))
bHumidity = str('{0:.0f}'.format(100 * (shtdata[3] * 256 + shtdata[4]) / 65535.0))
self.Breathe['Temp'] = bTemp, ' [sup]o[/sup]C'
self.Breathe['MinTemp'] = bHumidity, ' %RH'
I think I also make some minor changes to the .kv file
Be aware that the BME280 has self-heating. The temperature will read a degree or so high, but you could correct for it.
Thanks, Peter. Where in the python code would I place the three lines to read the data and then store it as Temp and MinTemp?