Git Product home page Git Product logo

weatherpi_tft's People

Contributors

lovebootcaptain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

weatherpi_tft's Issues

Az touch weather station.

A few of us are having issues with the az touch weather station but we have no response or fix. Seems it randomly works and currently was working fine for me until we had a powercut.

I followed his instructions again and now it gets stuck hear.
20220819_185305

locale.Error: unsupported locale setting in Python3.5.2 window7

hi @LoveBootCaptain ,
i saw your project by twitter, and at the same i see this project here.i'm a beginner in python,too. So i try to build this project. And i encounter an error:

Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\WeatherPi_TFT-master\WeatherPi_TFT.py", line 16, in <module>
    locale.setlocale(locale.LC_ALL, locale.getdefaultlocale())
  File "D:\Python35\lib\locale.py", line 594, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

i dont know where is wrong.However,i annotate return _setlocale(category, locale) in "D:\Python35\lib\locale.py", line 594
and the error is gone
But there is a new error:

Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\WeatherPi_TFT-master\WeatherPi_TFT.py", line 637, in <module>
    loop()
  File "C:\Users\Administrator\Desktop\WeatherPi_TFT-master\WeatherPi_TFT.py", line 602, in loop
    Update.run()
  File "C:\Users\Administrator\Desktop\WeatherPi_TFT-master\WeatherPi_TFT.py", line 410, in run
    Update.update_json()
  File "C:\Users\Administrator\Desktop\WeatherPi_TFT-master\WeatherPi_TFT.py", line 212, in update_json
    config = json.loads(config_data)
  File "D:\Python35\lib\json\__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "D:\Python35\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "D:\Python35\lib\json\decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 3 column 1 (char 59)

i have no idea about it...

PS: i can get defaultlocale by locale.getdefaultlocale():

>>> locale.getdefaultlocale()
('zh_CN', 'cp936')

Do you have a idea?

libSDL and framebuffer display

I have a Raspberry Pi 3 Model B v1.2 running the latest (32-bit) version of Raspberry Pi OS:

Linux raspberrypi 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux

and Python 3.7.3. For a display, I have a SPI-attached ILI9341-based TFT LCD panel, specifically this one:

http://www.lcdwiki.com/3.2inch_SPI_Module_ILI9341_SKU:MSP3218

that I do have working with a dtoverlay, creating /dev/fb1 upon which I can render images (via fbi) or play movies (via mplayer).

Pulling the latest WeatherPi_TFT, however, I cannot get it to display on /dev/fb1. Instead, it always ends up rendering on the HDMI display (/dev/fb0). The same is true for other Python programs that make use of pygame and rely, as WeatherPi_TFT appears to, upon the environment variables $SDL_FBDEV and $SDL_VIDEODRIVER to "direct" libSDL to make use of a framebuffer directly.

Googling around about the issue, I came across this posting from early 2019 on the Raspberry Pi forums:

Issue using Python3/pygame to output to /dev/fb1 targeting a 2.8" TFT screen
https://www.raspberrypi.org/forums/viewtopic.php?t=234087

In a follow-up post, that author states the following:

Why not using pygame/SDL1.2.x as instructed in many forums and the adafruit TFT manual?

First, it doesn't work, at all. I have tried a gazillion versions of libsdl and its dependencies and they all failed consistently. I've tried forcing some libsdl versions downgrades, same with pygame version, just to try to get back to what the software was when my TFT screen was released (~2014). Then I aslo tried switching to C and handle SDL2 primitives directly.

Furthermore, SDL1.2 is getting old and I believe it is bad practice to build new code on top of old one. That said, I am still using pygame-1.9.4...

So why not SDL2? Well, they have stopped (or are about to stop) supporting framebuffers. I have not tried their alternative to framebuffers, EGL, as it got more complex the further I digged and it did not look too engaging (so old it felt like necro-browsing). Any fresh help or advice on that would be greatly appreciated BTW.

I was wondering if you had any insights into this matter? Have you tried WeatherPi_TFT under the latest Raspberry Pi OS? Do you know if libSDL is indeed deprecating / dropping support for framebuffers?

I ask since I would like to get WeatherPi_TFT working on my RPi3, as well as figure out what changes are necessary for my small project (kodi_panel) to make use of /dev/fb1.

Thanks!

Update Wiki and remove redundant readme informations

Wiki should be updated by me

  • RaspbianOS has issues - write a warning to use "buster"
  • raspberry website moved some toutorials, update links
  • install instructions should be updated
  • remove redundant and somtimes old readme information and link to wiki instead

after a reboot the TFT cannot start the Weahter UI

hi,
after a reboot the UI for weather forecast is not starting - no icons displayed - AZ Touch TFT Display remains dark.

I can see all messages during startup, but when the UI shall start, nothing happens .

I have had the same issue 4 weeks ago: After several reboots the UI was starting again - everything seemed to work as usual...until yesterday.

Now I don't wont to wait for a miracle and that's why I kindly ask for your support. I haven't done any operating system upgrades because I have red this may have conflicts with the UI.

I would appreciate any kind of feedback and help. I did a look into the logfiles, but I was unable to find something helpful. Additional I tried to restart Weather TFT: sudo sh ./WeatherPiTFT.sh restart

[....] Stopping system WeatherPiTFT daemon:start-stop-daemon: warning: failed to kill 444: No such process
No process in pidfile '/var/run/WeatherPiTFT.pid' found running; none killed.
failed!
[ ok ] Starting system WeatherPiTFT daemon:.

Pygame version

In the readme you state pygame version 2.0.0.dev8 is required but in the requirements.txt is
pygame~=2.0.0.dev8. Which is it? If that version is indeed required, using pip won't work as the latest version I see on PyPI is 1.9.6.
Needless to say my python installation is a wreck trying to figure out all the things that went wrong after following this installation guide.

Problems with Python3.7 and

Hi,
I want to use your weather station code but when I try to start the code under Python 3.7 I will get an error - see attached picture.

grafik

Localisation is set to UTF-8 and 'de' for Germany.
What can I do?

Thx for your help

Not working for me

Hello I have tired this project on Raspi 0W2 and I have no idea what I'm doing wrong, it is just not working. I did follow the instuctions and I did try it many many times with headless and desktop version of OS and I have failed. Please help if possible.

What if Weatherbit doesn't support my city?

Hello Everyone,

I got the kit for building the AZ Touch PI-Zero weather station. All the installation procedures went fine.

However, what if Weatherbit doesn't support the city where I am? I live in Novi Sad, Serbia, and I can't get weather info from Weatherbit. To be honest, I couldn't fid PIN codes for Serbia.

If I use the default configuration (Berlin, Germany) everything runs smooth. For instance, at the moment, I see on the display the information for Berlin. Actually, I'm writing this paragraph just to keep it clear that it's not a problem with configuration, Weatherbit API, hardware, and so on.

After saying this, my question is, is there support to other weather backend service?

Thanks!

Problem with Python 3

I've set up and updated a fresh new Raspbian. Then followed the instructions exactly.

My hardware is a Pi4 with an official 7 inch touchscreen.

I start the WeatherPiTFT service first and then the script but unfortunately the following error message:

pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "/home/pi/WeatherPi_TFT/./WeatherPiTFT.py", line 68, in <module> config = json.loads(config_data) File "/usr/lib/python3.9/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.9/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 18 column 29 (char 429)

Solved.....

Wrong postal code.
I live in Saxony / Germany (04425 in Germany)
If the zip code begins with a 0 then the zip code must be in "" in config.json.

WeatherPi_TFT.py uses CrLf instead of LF

The code does not run as a service, the file needs to be converted to use LF.

Current behavior:
$ sudo service WeatherPiTFT restart
$ sudo service WeatherPiTFT status
● WeatherPiTFT.service - LSB: WeatherPiTFT
Loaded: loaded (/etc/init.d/WeatherPiTFT; generated)
Active: active (exited) since Sat 2020-05-09 11:59:16 CEST; 10s ago
Docs: man:systemd-sysv-generator(8)
Process: 1266 ExecStart=/etc/init.d/WeatherPiTFT start (code=exited, status=0/SUCCESS)

Mai 09 11:59:16 piwetter systemd[1]: Starting LSB: WeatherPiTFT...
Mai 09 11:59:16 piwetter WeatherPiTFT[1266]: Starting system WeatherPiTFT daemon:.
Mai 09 11:59:16 piwetter systemd[1]: Started LSB: WeatherPiTFT.

Flickering Screen & wrong alignment

I have followed all the steps and it works. But the screen keeps disappearing. Maybe I'm missing something am still relatively new to the Raspberry Pi

Not showing up on screen?

I have followed all the instructions on how to install WeatherPi_TFT but when i start the service nothing happens. The screen is still just on the command line prompt. I am using a generic ili9341 display with a raspberry pi 0 with Jessie minimal.
Any help would be appreciated!

AZ-Touch Pi0 with Kernel >5.4

Hello,
maybe i am making a mistake i don´t get, but i is it possible that the external display from the AZ-Touch Pi0 does not work with the current kernel version?

I tried several times to set the system up acccording to the readme and everything works fine (display has power, weatherdisplay on hdmi works well, variables are set properly....), except it does not show up on the external displayl.

I would be thankful for any hint.

regards
Matthias

fbcon not available

tried to run WeatherPiTFT but i get the output:

File "WeatherPiTFT.py", line 118, in
pygame.display.init()
pygame.error: fbcon not available

The file '/lib/lsb/init-functions' does not exist.

hello, I am new to python and I am interested in your project, but I am facing following errors : The file '/lib/lsb/init-functions' does not exist.
python error
I don't know what's the problem. By the way, I am currently living and working in china and I don't have language issue.

WeatherPiTFT.py locale.Error: unsupported locale setting

Hi Captain

Have tried everything.
But unable to get the python script to recognise the file LC_ALL.

get this error
pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "/media/pi/rootfs/home/pi/WeatherPi_TFT/WeatherPiTFT.py", line 85, in
locale.setlocale(locale.LC_ALL, (config['LOCALE']['ISO'], 'UTF-8'))
File "/usr/lib/python3.7/locale.py", line 604, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

/etc/default/locale contains the following.

LC_ALL=en_GB.UTF-8
LANG=en_GB

I have read both closed items
#6

and

#1

I am in the UK.
also if i try to set my postal code in the config.json
Uk uses alpha numeric postal codes...
mine is SO302SX, the script errors.
Can you please advise what i am doing wrong.

Many thanks

Perhaps I should add I am using a Raspberry pi 0 W. with San Disk Ultra PLUS 32GB memory.
I have tried Reformatting the card and reloading the image using RASPI Imager several times. I am using Putty SSH to edit.
@LoveBootCaptain

modularisation of the app

in order to do some more development in this project i want to rewrite the app and modularize the code

Conversion of Current Wind Speed from m/s to mph

Hi there,
I'm new to GitHub so am not sure if this is the best way to raise a bug report. In my understanding wind speed from Weatherbit.IO comes as m/s, which to convert to km/h you need to multiply by 3.6, similarly to convert from m/s to mph you need to multiply by 2.24, so in WeatherPiTFT.py the following line, line #731
wind_speed = wind_speed * 3.6 if METRIC else wind_speed
perhaps should be something like
wind_speed = wind_speed * 3.6 if METRIC else wind_speed * 2.2

BTW I love your work on this project,
g0ods.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.