Code Monkey home page Code Monkey logo

piweatherrock's Introduction

PiWeatherRock

GitHub PyPI

PiWeatherRock displays local weather on (almost) any screen you connect to a Raspberry Pi. It also works on other platforms, including macOS.

More information about the project and full documentation can be found at https://piweatherrock.technicalissues.us. Be sure to check out the getting started guide under the documentation link there for instruction on how to set everything up.

Release process

  • edit version.py according to the types of changes made
  • edit requirements.txt if needed
  • python3 setup.py sdist bdist_wheel
  • tar tzf dist/piweatherrock-*.tar.gz
  • twine check dist/*
  • [optional] twine upload --repository-url https://test.pypi.org/legacy/ dist/*
  • twine upload dist/*
  • Create a git tag and push it

piweatherrock's People

Contributors

deepcore2 avatar deyspandan avatar genebean avatar metamma 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

Watchers

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

piweatherrock's Issues

Ran into a snag installing on Raspbian 8

I had the previous Weather.com version running for years. For some reason, the Weather.com API is no longer working, so I looked for an alternative.

Found this app developed by the developer of my previous app, so I gave it a try.

I followed instructions and the install died

I see quite a few notices that the app is intended to run on Raspbian 10. I have Raspbian 8. So maybe that is my problem.

Probably not a bug, but I can't seem to change the "bug" label

IMG_8311

Include Severe Weather Alerts

Is your feature request related to a problem? Please describe.
It is challenging to get a complete picture of the weather forecast without including alerts from the weather provider.

Describe the solution you'd like
I would be great if the alerts section of DarkSky (or whatever provider comes next) could be parsed and included in the same box as the other 'additional info' like wind, humidity, and the umbrella reminder. My specific preference would be that the umbrella reminder is replaced with a severe weather alert if that is present. DarkSky has a JSON blob that shows how this stanza exists when present. https://darksky.net/dev/docs#forecast-request

"alerts": [
          {
            "title": "Flood Watch for Mason, WA",
            "time": 1509993360,
            "expires": 1510036680,
            "description": "...FLOOD WATCH REMAINS IN EFFECT THROUGH LATE MONDAY NIGHT...\nTHE FLOOD WATCH CONTINUES FOR\n* A PORTION OF NORTHWEST WASHINGTON...INCLUDING THE FOLLOWING\nCOUNTY...MASON.\n* THROUGH LATE FRIDAY NIGHT\n* A STRONG WARM FRONT WILL BRING HEAVY RAIN TO THE OLYMPICS\nTONIGHT THROUGH THURSDAY NIGHT. THE HEAVY RAIN WILL PUSH THE\nSKOKOMISH RIVER ABOVE FLOOD STAGE TODAY...AND MAJOR FLOODING IS\nPOSSIBLE.\n* A FLOOD WARNING IS IN EFFECT FOR THE SKOKOMISH RIVER. THE FLOOD\nWATCH REMAINS IN EFFECT FOR MASON COUNTY FOR THE POSSIBILITY OF\nAREAL FLOODING ASSOCIATED WITH A MAJOR FLOOD.\n",
            "uri": "http://alerts.weather.gov/cap/wwacapget.php?x=WA1255E4DB8494.FloodWatch.1255E4DCE35CWA.SEWFFASEW.38e78ec64613478bb70fc6ed9c87f6e6"
          },

Describe alternatives you've considered
For now, my solution to this will be to script the collection of this alert blob and alert on it off-box.

Metric Display

Any way to get this to display temperatures/values in metric?

Add On bitcoin Current price?

I was wondering if you would be interested in adding in the current Bitcoin Price to the main screen above where it says if we need an umbrella or not? or maybe on the screen with the sunset or sunrise.

Here is some code but i'm unsure where or exactly how to add this with out breaking the weather station.

:-)
(source https://realpython.com/python-bitcoin-ifttt/)

BITCOIN_API_URL = 'https://api.coinmarketcap.com/v1/ticker/bitcoin/'

def get_latest_bitcoin_price():
response = requests.get(BITCOIN_API_URL)
response_json = response.json()
# Convert the price to a floating point number
return float(response_json[0]['price_usd'])

Modularize code

The code in weather.py is too complex and needs to be broken out into additional files.

Sent with GitHawk

Dual screen on Pi4

when running PiWeatherRock on my Pi4 with dual screens it appears split between both screens, is there a way for it only to be seen on 1 screen so i can use the second screen for other uses?

Create PyPI package

Currently, installation and upgrades are all git-based. Creating a PyPI package would greatly simplify the process for users and would be a first step towards packaging this project for Debian.

What to do after installation?

Sorry for such a noob question, but I am trying to get PiWeatherRock displays on the LCD screen of my Rasp Pi 1 Model B (Buster Lite). I have done the config and ran the installation, but nothing happens on my CLI screen on the LCD (HDMI port is not used).

I checked the status of PiWeatherRock in systemctl, and here it gets confusing to me:

  • I checked the status from the terminal screen on the LCD, it said .../weather.py (code=exited, status=1/FAILURE) . Yet when I check from my computer through SSH, the service active (running), and the failure line is not there.
  • A few moments later, the reversal happened between the terminal and SSH

What obvious thing that I am missing here?

Impossible to install now

Congratulations! In trying to "automate" the install process from the old step-by-step version which I had zero issues with, this is now a complete and impossible mess to install.

Following "Option 1" (the steps of which no longer reflect current Puppet documentation) results in errors on Bolt's end and attempting "Option 2" just results in madness as it's very poorly documented.

Oddly enough, a separate project based upon this one is actually easier to install and would actually work if it wasn't crashing all the time on a required "Holfuy" API key that is currently impossible get just to obtain wind data, none of which is actually covered in the vast majority of the United States.

That project is:

https://github.com/ciprian288/PiWeatherRock-Windguru-Holfuy

Now, as for actually replacing Dark Sky API with something else, look at https://github.com/alexander0042/pirateweather as it seems to be a completely drop-in replacement for Dark Sky's soon-to-be-defunct API and was created just for instances like this where devs using Dark Sky can easily jump over to it.

For now it looks like I'm going to have to find an ancient version of PiWeatherRock, install it, and then edit the code myself to use the new PirateWeather API so my Pi display that's been working flawlessly for many years continues to work still.

Any Raspberry Pi project that requires the installation of additional software - like Puppet - on a completely separate PC is a huge no-go when things like Ansible exist that can be easily installed and run on the Pi itself, which Puppet cannot.
I can't think of a single dev or MSP shop I've ever seen - and I've seen a lot of them - that uses Puppet. They all use Ansible.
I recommend learning and implementing Ansible if you're not going to create a deb package for PiWeatherRock.

I apologize if this sounds harsh but trying to following your instructions to get this re-installed has just wasted hours of my valuable time, time which could have been better spent just updating the old code itself to implement PirateWeather API calls.

Error while installing Puppetlabs.

On install I get the following error;

Describe the bug
Notice: Installing -- do not interrupt ...
/etc/puppet/modules
└─┬ camptocamp-systemd (v2.8.0)
├─┬ puppetlabs-inifile (v4.1.0)
│ └── puppetlabs-translate (v2.1.0)
└── puppetlabs-stdlib (v6.2.0)
Error: Could not parse for environment production: Syntax error at ':'; expected '}' at /home/pi/PiWeatherRock/setup.pp:64 on node wx.opto22.com
Error: Could not parse for environment production: Syntax error at ':'; expected '}' at /home/pi/PiWeatherRock/setup.pp:64 on node wx.opto22.com

What's your setup?
pi@raspberrypi:~/PiWeatherRock $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

How are you trying to launch the program?
Program fails to install. Have not got to launching since the install fails.

To Reproduce
Steps to reproduce the behavior:

  1. Run the following command; pi@raspberrypi:~/PiWeatherRock $ sudo ./install.sh wx
  2. See error

Expected behavior
I expected the puppet install script to run cleanly.

Language adjustment, especially in German and text size adjustment

It would be a nice feature if you could adapt texts in weather.py to German (or other languages). For example date, times of day and days of the week. A simple adjustment of the text size would also be ingenious, so that texts on the info screen and also in the feels like, wind, humidity window could be adjusted accordingly.

Libraries will not load

sudo apt-get install libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev
libsdl-mixer1.2-dev libjpeg-dev libportmidi-dev libtimedate-perl
pip install -r requirements.txt

Error code could not find any packages is displayed:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libsdl-image1.2-devlibsdl-mixer1.2-dev
E: Couldn't find any package by glob 'libsdl-image1.2-devlibsdl-mixer1.2-dev'
E: Couldn't find any package by regex 'libsdl-image1.2-devlibsdl-mixer1.2-dev'

Any idea as to what the problem is?

Package as Flatpak

Is your feature request related to a problem? Please describe.
Installation is overly complicated right now. Project/application discoverability could also be better

Describe the solution you'd like
Since this was started, Flatpak has become a mainstream option. I want to look at utilizing it as the primary means of distribution and installation

Describe alternatives you've considered

  • The current pip and puppet bolt method
  • Source based

Create Debian package

Once #23 is complete, wrapping the remaining installation steps in a Debian package would greatly reduce the setup complexity.

Internet Weather Station is not shown on 320x240 display

Hello everybody!

Unfortunately, I'm almost desperate again.
Get this message with the command (sudo python weather.py):
Traceback (most recent call last):
File "weather.py", line 825, in
if my_disp.get_forecast() is False:
File "weather.py", line 274, in get_forecast
config.UNITS)
TypeError: forecast() takes at most 3 arguments (4 given)

Or with the command (python3. weather.py):

pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "weather.py", line 815, in
my_disp = my_display()
File "weather.py", line 236, in init
pygame.display.init()
pygame.error: Unable to open a console terminal

The 2 files are in the attachment as a zipped file!
Can someone help me please? Thank you very much!!!

files.zip

Recenter current temp

After adding the F / C to the current temperature the text no longer looks centered.

Possible fix: sum all character widths before determining initial x

Sent with GitHawk

Add error handling

Currently things crash if the internet is down or if the api is unreachable

No suitable video driver found!

Hi
I try to test this code but have this error
any one can help me?

(
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Driver: x11 failed.
Driver: fbcon failed.
Driver: directfb failed.
Driver: svgalib failed.
Traceback (most recent call last):
File "weather.py", line 726, in
my_disp = my_display()
File "weather.py", line 158, in init
raise Exception('No suitable video driver found!')
Exception: No suitable video driver found!
)

Display gets stuck on info mode?

Really loving this app, exactly what I was looking for on my Pi with a 3.5 screen. I've noticed that the app switches to the info screen (usually accessed by hitting the "i" key) unprompted and seems to stay there until another key is pressed, or at least, way longer than I feel like it should. I don't know if it would revert on its own but I waited about 5 minutes before VNC-ing and hitting the D key to get back to the daily display. Perhaps this is intentional?

This is on a Pi 3, Raspbian 10 (buster).

Key to switch to main screen

Usage section of instructions say that "w" takes you to main screen. It does not.

Code in Weather.py suggests that:

"d" takes you to the main daily screen.
"h" takes you to the main hourly screen
etc

Perhaps the instructions can be edited

PiWeatherRock not working

Hi!

The original Weather Station stopped working for me as well.

I tried installing this on a fresh install of Buster, i followed all the steps, but nothing happens.

I ran sudo systemctl status PiWeatherRock and got the following:

Is there anything I can try? Thanks!

● PiWeatherRock.service - PiWeatherRock Service
Loaded: loaded (/etc/systemd/system/PiWeatherRock.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2020-01-26 06:13:44 EST; 4s ago
Process: 11186 ExecStart=/usr/bin/python3 /home/pi/PiWeatherRock/weather.py (code=exited, status=1/FAILURE)
Main PID: 11186 (code=exited, status=1/FAILURE)

Install error

Project-level configuration in bolt.yaml is deprecated if using bolt-project.yaml. Transport config should be set in inventory.yaml, all other config should be set in bolt-project.yaml.
Started on weather.local...
Failed on weather.local:
The task failed with exit code 1 and no stdout, but stderr contained:
Too many arguments.
Failed on 1 target: weather.local

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.