Giter Site home page Giter Site logo

ktrue / cu-hws Goto Github PK

View Code? Open in Web Editor NEW
23.0 7.0 13.0 4.11 MB

Home Weather Station website template for Cumulus (WeeWX, WeatherCat too)

License: Other

HTML 0.16% PHP 81.56% Hack 0.23% CSS 18.04%
cumulus weather-station weather-website cumulus-mx php cumulus-software cumulus-mx-software weather34-template home-weather-station weathercat

cu-hws's Introduction

Home Weather Station weather website template for Cumulus/Cumulus MX

NOTE - not recommended for new installs

I've placed this distribution on limited future maintenance, so this is not recommended for new installations. For an all-in-one dashboard, I highly recommend Wim's PWSdashboard from https://pwsdashboard.com/ It supports a variety of weather software types and is fully maintained.

K. True - 17-Mar-2023

NOTE - Graphs are partially operational - 19-May-2019

On 18-May-2019, weatherunderground.com discontinued the data query for CSV data for day/month/year that is used by the graphs for temperature/humidity, barometer, wind, solar/uv, and rain.
I've coded a shim to get the PWS WU/TWC API to provide daily (today) and last-7-days JSON data and save in the CSV format expected by the graph programs. New weekly*.php graphs are now linked on the index page, along with the today*.php graphs. The yearly graphs are no longer available as the WU/TWC API does not provide that data as a query.

YOU MUST have a valid WU/TWC API Key to use the graph displays

Introduction

This repository contains the current version of Brian Underdown's Home Weather Station weather website template set. Brian's main website is https://weather34.com/homeweatherstation/index.html In January, 2019, Brian has asked others to distribute/maintain his code for other weather station software, and is only supporting Meteobridge/Meteobridge NANO-SD versions of the HWS template.

Brian has produced an interesting design timeline of Historic (2014-2019) Weather34 template set at https://weather34.com/homeweatherstation/weather34timeline/weather34timeline.html.

This version requires Cumulus software (either Cumulus 1.9.4 Windows or Cumulus MX) for data feeds for the conditions from your personal weather station. Cumulus and Cumulus MX software is available from the Cumulus Wiki at https://cumuluswiki.org/a/Software Cumulus 1.9.4 is not maintained but still functional on Windows systems. Cumulus MX is supported and maintained by Mark Crossley at https://github.com/mcrossley/CumulusMX

Any weather software that produces a Cumulus-style realtime.txt formatted conditions file can also use this template. Both WeeWX and WeatherCat now have this capability.

A live sample of this distribution is viewable at https://hws.saratoga-weather.org/index.php

Setup

  • Setup Cumulus/CumulusMX to upload realtime.txt to your weather website.
  • Download the .zip of the distribution.
  • Unzip to the document root of your website.
  • Browse to http://your.website/easyweathersetup.php
  • There is no initial password when the page prompts the first time -- just press LOGIN to enter the page.
  • IMPORTANT set a password in the screen for future use -- your browser can remember it. This will make future updates reasonably secure so only you can do the updates to the configuration.
  • Make setting entries in the easyweathersetup.php page and SAVE. The next time you run it, use the password you set in the step above.
  • Repeat running easyweathersetup.php until the main screen appears as you like it.

Diagnostics

A new utility diags.php was added to the distribution. It is useful for checking the installation of the CU-HWS template and showing (safely) the current settings.php/settings1.php file contents for debugging. Note: the entries for $password, $db_user, $db_pass are replaced with '********' to avoid unwanted disclosure of private information.

  • run diags.php?show=info on your website to show the key info about the CU-HWS installation and required PHP function status
  • run diags.php?show=settings on your website to safely show the current settings.php and settings1.php contents

License

Copyright (c) 2016-2018 by Brian Underdown (https://weather34.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Template”), to deal in the Template without restriction, including without limitation the rights to, can use, can not copy without prior permission, can modify for personal use, can use and publish for personal use ,can not distribute without prior permission, can not sublicense without prior permission, and can not sell copies of the Template, and subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Template.

THE TEMPLATE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE TEMPLATE OR THE USE OR OTHER DEALINGS IN THE TEMPLATE.

Attribution-NonCommercial 4.0 International based on a work at https://weather34.com/homeweatherstation

Non-Cumulus versions Available

Alternative versions listed below are not maintained by weather34 in any way -- only the Cumulus version receives css updates

Brian's note

A note from Brian 2-Jan-2019 (quoted from here):

Features and appearance may vary across these versions and requests for additions should go to the individual maintaining these.. there are two other versions not quite ready for release but are based on using the Rasperry Pi.

The only supported (by weather34) versions are Meteobridge and the current running beta for Meteobridge NANO-SD. These versions are rich in features and additional features are added when time permits (a lot was added to the beta version in December 2018 it now supports 150 types of data variables, whole array of chart data for those with lots historical data with more to come).

The current Meteobridge NANO-SD beta version has lots of historical options and almanac pop ups for various data. You will also find a version maintained by Meteobridge developer (Boris) built into the NANO-SD product which doesn't require a web server as it merely runs inside the Meteobridge NANO-SD control panel.

Updates from Brian (weather34) - 13-Jan-2019

These changes are basically direct from Meteobridge version as both Cumulus and Meteobridge use nigh on identical structure and require no major time consuming modifications, just direct file replacement. This basically brings the same visual layout up-to date as seen in Meteobridge versions.

  • indoortemperature.php
  • homeindoor.php
  • css folder - all (2) .css files updated, multiple .svg icons also
  • index.php (added new logo for Davis option)
  • img folder *new davis svg icon (designedfor.svg designed by weather34 was removed)
  • weather34uvsolar.php
  • solaruvds.php
  • rainfall-year-month.php
  • max-mintemp.php
  • max-minwind.php

Also a .gitignore file was added to the distribution to help prevent clobbering your settings/data from your station on a future 'git pull' operation.

cu-hws's People

Contributors

ktrue avatar matsa avatar saratogawx 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cu-hws's Issues

airqualitymodule.php not showing color circle on all browsers

On some browsers, the color circle behind the face image does not show.
Looking at the HTML generated shows HTML errors (unclosed ) that when closed with a /> screws up all the formatting for the module.
Looks like HTML relies on quirks-mode to render. Needs to be massaged to produce proper HTML.

sun3.php browser issue

Ken
Users reporting that sun3.php not working correctly on Firefox and Safari (including ios versions). The small solid circle representing the passage of the sun does not show. Seemingly only working with Chrome.

I have been able to replicate the problem as reported.

Flag of Switzerland

Hello! I come from French-speaking Switzerland, so I use the language fr. I wish I could use the flag of Switzerland. That would be cool. Please take note of my request. And thank you for the good job !
Sylvie
ch.zip

diags.php, suppress API keys in output

Hi Ken,
diags.php is a great check-up and debug tool but I'm not sure if showing API keys in the settings printout is a good idea? While hijacked API keys may not be a major issue (or an issue at all) I still believe these should be treated as sensitive/personal information.

Thanks for your awesome work on CU-HWS.

Really nice You have taken care of the Cumulus version of Weather34 !!

Have done some PR:s and have some more issues which I can’t really handle …
1/ Had some problem with translated text from language files and then discovered that in every lang.xx.php There are 2, two, positions of ”$lang['Windspeed’]” ??
2/ Changing language doesn’t work as it used to. Just some headings are changing compared to the old codebase we use in http://vader.domsten.nu
3/ sun1.php and sun2.php have hardcoded text instead of using $lang[xx]. I tried to change but couldn’t handle it. Some tip ?
/Mats

Soucis ccs

HI KEN

a little css concern on the dark theme I joined you a screenshoot
Best regards,

FireShot Capture 066 - Station Météo de   Vars, CH, FR - www meteo16-vars com

Provision for weeWx and Weather Cat

Hi Ken,

"if (preg_match('|weewx/realtime|',$livedata))" etc.....

We may have to find another way of looking at this. Because weeWX is very flexible in the way in which users setup, the realtime.txt file might not be in the ../weewx/realtime.txt path. You would not believe some of the complex path structures that some people use.

An alternative suggestion would be to use a variable to identify the source. The format selection field in settings is now rather academic because it will always be cumulus in this template so could be fixed as a non configurable default in the background. This will release the field to be associated with the $swversion (as in livedata.php) variable to select either Cumulus, weeWX or WeatherCat to determine the logo. Currently this variable is hard coded as "Cumulus" in livedata.php

What do you think?

Barometer module broken with WeeWX realtime.txt

Some time yesterday afternoon, the barometer module suddenly corrupted (see attached screenshot). This was only with a 'live' realtime.txt file. On reverting to the demo realtime file the problem corrected. A clean install of the template failed to correct.

CU-HWS has been jogging along for weeks without a problem. There has been no change to the extension that generates the realtime file from WeeWX or indeed WeeWX itself. I have tried for hours to correct but it has defeated me.

Screen shot and a 'real' realtime file attached.
IMG_0003
realtime.zip

heat index notification

in barometer.php the notifications are here at the foot of page

the anyToC( should be placed before the $weather["heat_index"]

change
if(anyToC($notifications=='yes' && $weather["heat_index"])>=30){?>

to

if($notifications=='yes' && anyToC($weather["heat_index"])>=30){?>

outlookds bug

HI kent, there is a bug on the statistics there is that% for precipitation there is no digit.
Best regards,
fireshot capture 35 - station meteo de vars ch fr - http___meteo-vars fr_index php

max-mintemp.php doesn’t work as intended

Hi !
After the latest update, max-mintemp.php doesn’t work as intended, check picture.

How will You handle PR:s on GitHub versus updates from Brian on the same source ?

Shall I help with language handling in sun1.php? According to the text in setup it is the universal one.
Miss the footer $personalmessage, from settings1.php, in index.php. Can I add it? Check picture.

max_min_temp
/Mats

Graphique

HI,

there are always worries with WU
graphics often have problems,
as they are stuck since at 4am ...
BestRegards,
FireShot Capture 077 - Station Météo de   Vars, CH, FR - www meteo16-vars com

Language switching and translations

The current CU version does not switch DarkSky language automatically.

Some blocks have non-translated text.

This issue is opened to provide tracking as the fixes are worked up.

Something has been changed in the JSON of the V2

There may have been a change in the structure of the JSON in V2. I would have corrected it like this.

` // ******* Direct values ******* //

        $cumulus[2] = $wlJson->sensors[0]->data[0]->temp;
        $cumulus[3] = $wlJson->sensors[0]->data[0]->hum;
        $cumulus[4] = $wlJson->sensors[0]->data[0]->dew_point;                              // Dewpoint
        $cumulus[5] = $wlJson->sensors[0]->data[0]->wind_speed_last;                        // Used by W34 for trend calc. Wind this moment
        $cumulus[6] = $wlJson->sensors[0]->data[0]->wind_speed_avg_last_10_min;             // Wind 10 min avg
        $cumulus[7] = $wlJson->sensors[0]->data[0]->wind_dir_last;                          // Wind direction
        $cumulus[8] = $wlJson->sensors[0]->data[0]->rain_rate_last_in;                      // Rain rate in/h
        $cumulus[9] = $wlJson->sensors[0]->data[0]->rainfall_last_24_hr_in;                 // Rain in inches(in)
        $cumulus[10] = $wlJson->sensors[1]->data[0]->bar_absolute;                          // Pressure inches
        $cumulus[13] = "mph";                                                               // Windspeed unit 
        $cumulus[14] = "F";                                                                 // Temp unit
        $cumulus[15] = "in";                                                                // Pressure unit
        $cumulus[16] = "in";                                                                // Rain unit
        $cumulus[19] = $wlJson->sensors[0]->data[0]->rainfall_monthly_in;                   // Rain acc. Month inches
        $cumulus[20] = $wlJson->sensors[0]->data[0]->rainfall_year_in;                      // Rain acc. Year  
        $cumulus[22] = $wlJson->sensors[2]->data[0]->temp_in;                               // Inside temp
        $cumulus[23] = $wlJson->sensors[2]->data[0]->hum_in;                                // Inside humidity
        $cumulus[24] = $wlJson->sensors[0]->data[0]->wind_chill;                            // Wind chill
        $cumulus[40] = $wlJson->sensors[0]->data[0]->wind_speed_avg_last_10_min;            // Windgust avg. 10 min`

weather underground charts

think today was the end of use for their history data . however correct me if im wrong but all sites i have including your demo shows failed or blank charts . being thats its a feature if the cumulus version it may need a solution to use mysql to use going forward.brian

BUG rainfall

HI KEN, I'm doing a screenshot of the rains I always worry is multiplied by 10 actually weird

FireShot Capture 064 - Station Météo de   Vars, CH, FR - www meteo16-vars com

Darksky and metar updates

Ken,
Getting multiple issues of darksky and metar stalling on updates. Unsure why as many including mine working fine. Have eliminated permissions / groups / user being the cause

Bug Métar

HI Ken,

I just found a little bug on the metar file

Best regards,

Emmanuel

fireshot capture 47 - station meteo de vars ch fr - http___www meteo16-vars com_

New wunderground API => weather.com

Hi !
Don't know if You seen the new documentation on the coming API
https://docs.google.com/document/d/1eKCnKXI9xnoMGRRzOL1xPCBihNV2rOet08qpE_gArAY/edit
(Funny IBM is using Google docs)
The worst thing is that You just get 7 days of History....
Do You and Brian had any discussions about this ? The SQL solution is pretty complex for "simple" users.
The API community thread https://apicommunity.wunderground.com/weatherapi/topics/weather-underground-api-update.
/Mats

Change Forecast service

Hi all, I wanted to know how to change the forecast, on the home page, from Aerisweather to Wunderground. thanks for the support Andrea

Latest updates

Ken,

Re-forked your master this morning to capture all your updates. There seems to be a problem. See screenshot.
screenshot 1

I then tried a download zip from your master several times. The same thing happened. I have seen this happen before which was caused by a CSS problem.

Ian

Presentation support for comma-decimal numbers

The enhancement would be to have a switch setting inside setting1.php to control the display format of all numbers as either period-decimal (n.n) or comma-decimal (n,n) on all displays.

Soucis css

HI Ken

I think there is a concern about IE and Edge

when you ask him for the black theme he stays blank

it's since you worked on css.

Bizarre.

Best regards,

Emmanuel

Bug

worries about the heat index
FireShot Capture 069 - Station Météo de   Vars, CH, FR - meteo16-vars com

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.