Giter Site home page Giter Site logo

openhasp_meteofrance's Introduction

openHASP_meteofrance

French weather reports on openHASP, independent from Home Assistant.

It is made for a 480 x 320 display, in landscape mode, like on a SC01-Plus. You will need PSRam.

It is comprised of:

  • a section of pages.jsonl
  • weather icon images files
  • a python script that feeds the openHASP plate via MQTT, and is to be run every x minutes. It will replace all weather data on each pass.

Provided pages

The weather info pages are in the files/pages_section.jsonl file. Integrate that in your own pages.jsonl file. The provided pages are:

  • main page: weather now, overal today, overall tomorrow, rain in next hour, and weather for the next 8 hours:

page2

  • week overview page: overall info for the next 8 days:

page3

  • N pages, 1 per day, each with quarter-day overview (N = configurable via NR_DAYS_DETAIL in the send_weather.py file):

page4

The pages must be consecutive, and in that order. If you change the page numbers, you must also adapt the setting START_PAGE in the send_weather.py file.

You will also need to upload the files/p*.bin weather icons to your device.

The feed script

See send_weather.py.

It is to be run regularly (by cron for example). The following is required:

  • python 3
  • python lib dependencies:
python3 -m pip install meteofrance-api
python3 -m pip install paho-mqtt

See the variable at the top of the file for configurables, the most important being:

MQTTSERVER = "192.168.4.20"
CITY = "Paris"
PLATE_NAME = "plate01"
START_PAGE = 2
NR_DAYS_DETAIL = 4

If you change CITY, START_PAGE or NR_DAYS_DETAIL, you will of course need to adapt the contents of the jsonl.

How to get new images

  • get the SVG files from meteofrance via python3 svg2png.py
  • then transform the img/p*.png files to bin files:
    • I did that on line, following the indications on ther openHASP site. Just be aware that the online tool can only handle about 12 files at a time.
    • put the resulting bin files in /files
    • upload the bin files to the device

openhasp_meteofrance's People

Contributors

hb020 avatar

Stargazers

PeriniDev avatar  avatar tobozo avatar Vincent M avatar  avatar

Watchers

 avatar PeriniDev avatar

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.