Skip to content

Commit

Permalink
Features, Updates, and Cleanup
Browse files Browse the repository at this point in the history
Added
- Display Mode.
- Twilight CSS Theme.
- Upload WU data to a Generic Server and WeatherPoly Documentation

Changed
- Migrated core CSS into base.css, minify, and minor cleanup.
- Documentation Updates.
- Loading Icons.

Fixed
- W3 HTML Formatting.
  • Loading branch information
maxwellpower committed Dec 1, 2018
1 parent 94f51f5 commit 178246e
Show file tree
Hide file tree
Showing 36 changed files with 1,601 additions and 976 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- Display Mode.
- Twilight CSS Theme.
- Upload WU data to a Generic Server and WeatherPoly Documentation

### Changed
- Migrated core CSS into base.css, minor cleanup.
- Documentation Updates.
- Loading Icons.

### Fixed
- W3 HTML Formatting.

## [[2.6.1]](https://www.acuparse.com/releases/v2-6-1/) - 2018-11-13
### Fixed
Expand Down
35 changes: 24 additions & 11 deletions README.md
Expand Up @@ -2,7 +2,7 @@
## AcuRite®‎ Access/smartHUB and IP Camera Data Processing, Display, and Upload.
### See it in action @ [ghwx.ca](https://www.ghwx.ca)

Acuparse is a PHP/MySQL program that captures, stores, and displays weather data from an AcuRite®‎ 5n1/Atlas weather station and tower sensors, via your Access/smartHUB. It uploads weather data to Weather Underground, Weathercloud, PWS Weather, and CWOP. It also processes and stores images from a local network camera for display and uploads to Weather Underground.
Acuparse is a PHP/MySQL program that captures, stores, and displays weather data from an AcuRite®‎ 5-in-1/Atlas weather station and tower sensors, via your Access/smartHUB. It uploads weather data to Weather Underground, Weathercloud, PWS Weather, and CWOP. It also processes and stores images from a local network camera for display and uploads to Weather Underground.

Built for weather geeks and designed to be clean, simple, and mobile friendly. It uses a minimal UI with a focus on data, not flashy graphics. Designed to compliment MyAcuRite and other 3rd party's sites and tools.

Expand All @@ -13,8 +13,9 @@ Users currently having trouble sending updates to Weather Underground should fin
# Features:
* **Your weather data belongs to you, stored on your OWN server.**
* Display live camera images, send them to Weather Underground, and link from other sites.
* Uploads weather data from your 5N1, Atlas, or Tower sensors to external providers.
* Uploads weather data from your 5-in-1/Atlas and Tower sensors to external providers.
* Customize barometer readings.
* Light and Dark Themes.
* Display data in both ℉ and ℃. Selectable default.
* Multiple tower sensors; public or private.
* Multiple admin or regular user accounts.
Expand All @@ -34,8 +35,23 @@ Users currently having trouble sending updates to Weather Underground should fin
* Reports can be run against the database. Open issues for custom report requests and tag them with the reports tag. phpMyAdmin is an excellent tool for advanced manual reporting on your station.
* Charts and Graphing.
* Since this is available at most external weather sites.
* Multiple Access/smartHUB/5n1/Atlas sensors
* The current framework is built around a single Access/smartHUB and 5N1/Atlas sensor.
* Multiple Access/smartHUB/5-in-1/Atlas sensors
* The current framework is built around a single Access/smartHUB and 5-in-1/Atlas sensor.

# Additional Outputs:
The primary user interface uses AJAX to pull the most recent HTML formatted data every minute.

Acuparse includes a Display mode for better viewing while in full-screen.
* Display Mode: `http(s)://<yourip/domain>/display`
* Force light theme: `http(s)://<yourip/domain>/display?light`
* Force dark theme: `http(s)://<yourip/domain>/display?dark`

Additionally, you can request Bootstrap 4 formatted HTML, a JSON array, or plain text formatted for watermarking.

* HTML: `http(s)://<yourip/domain>/?weather`
* Archive HTML: `http(s)://<yourip/domain>/archive?html`
* JSON: `http(s)://<yourip/domain>/?json`
* Plain Text: `http(s)://<yourip/domain>/?cam`

# Installation:
**Requires LAMP stack. Some PHP, Apache, and GNU/Linux experience recommended.**
Expand All @@ -45,7 +61,7 @@ See [docs/INSTALL.md](https://acuparse.github.io/acuparse/INSTALL) for detailed

Installing on a fresh instance of a Debian based OS is the only officially supported and tested install method.

Acuparse can also, in theory, be run locally on a Raspberry Pi(Raspbian) or similar configuration. Some installer modifications might be required if not using a supported OS.
Acuparse can, **in theory**, be run locally on a Raspberry Pi(Raspbian). Some installer modifications might be required, if not using a supported OS.

**Access Users**

Expand All @@ -72,7 +88,7 @@ Detailed upgrade instructions for significant releases will be published in the
* Connect to your site to complete the update.

# Donations:
If you like Acuparse, you can support my work and the project by buying me a coffee!
If you like Acuparse, please support the project by buying me a coffee!

<a href="https://www.buymeacoffee.com/maxp" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>

Expand All @@ -83,15 +99,12 @@ Acuparse is open-source software. Released with an AGPL-3.0+ license. It also us

See [LICENSE](LICENSE) for more details.

## Commercial Licence:
A commercial licence without any AGPL restrictions is also available. Visit [acuparse.com/commercial](https://www.acuparse.com/commercial) for details.

# Support and Discussion:
Support for the core application/bugs handled using [GitHub Issues](https://github.com/acuparse/acuparse/issues).
Support for the core application/bugs is handled via [GitHub Issues](https://github.com/acuparse/acuparse/issues).

For everything else, join the [Users Mailing List](https://lists.acuparse.com/listinfo/users).

If you require advanced assistance, consider a commercial licence/support.
If you require advanced assistance, consider [commercial licencing and support](https://www.acuparse.com/commercial).

# Release Notes:

Expand Down
17 changes: 16 additions & 1 deletion cron/cron.php
Expand Up @@ -94,7 +94,7 @@
}
}

// Using tower data
// Using Tower Data
if ($config->upload->sensor->external === 'tower' && $config->upload->sensor->archive === false) {
$sensor = $config->upload->sensor->id;
$result = mysqli_fetch_assoc(mysqli_query($conn,
Expand Down Expand Up @@ -206,6 +206,21 @@
}
}
}

// Build Generic WU Based Update
if ($config->upload->generic->enabled === true) {
$genericQueryUrl = $config->upload->generic->url . '?ID=' . $config->upload->generic->id . '&PASSWORD=' . $config->upload->generic->password;
$genericQuery = '&dateutc=' . $utcDate . '&tempf=' . $data->tempF . '&winddir=' . $data->windDEG . '&winddir_avg2m=' . $data->windDEG_avg2 . '&windspeedmph=' . $data->windSmph . '&windspdmph_avg2m=' . $data->windSmph_avg2 . '&baromin=' . $data->pressure_inHg . '&humidity=' . $data->relH . '&dewptf=' . $data->dewptF . '&rainin=' . $data->rainIN . '&dailyrainin=' . $data->rainTotalIN_today;
$genericQueryStatic = '&softwaretype=' . ucfirst($appInfo->name) . '&action=updateraw';
$genericQueryResult = file_get_contents(htmlspecialchars($genericQueryUrl . $genericQuery . $genericQueryStatic));
// Save to DB
mysqli_query($conn,
"INSERT INTO `generic_updates` (`query`,`result`) VALUES ('$genericQuery', '$genericQueryResult')");
if ($config->debug->logging === true) {
// Log it
syslog(LOG_DEBUG, "(EXTERNAL)[GENERIC]: Query = $genericQuery | Result = $genericQueryResult");
}
}
} // Nothing has changed
else {
$lastUpdate = mysqli_fetch_assoc(mysqli_query($conn,
Expand Down
18 changes: 8 additions & 10 deletions docs/INSTALL.md
Expand Up @@ -109,14 +109,6 @@ View your syslog to see the data flowing through your system and to look for any

* `tail -f /var/log/syslog`

## Data Display:
The primary user interface uses AJAX to pull the most recent HTML formatted data every minute.

Aside from the primary interface, you can also pull the bootstrap formatted HTML data or a JSON array, for use in outside applications.

* JSON: `http://<yourip/domain>/?json`
* HTML: `http://<yourip/domain>/?weather`

# Database Trimming:
Readings get stored in multiple temporary database tables. This temporary data should be cleaned up regularly to avoid ballooning the database.
When the external updater runs, it archives the most recent readings to the archive table for later use.
Expand Down Expand Up @@ -153,8 +145,8 @@ Detailed instructions for each available in docs/external.
> **Notice:** Disable updating of Weather Underground from your Access/smartHUB/MyAcuRite. Watch your syslog for the response from MyAcuRite.
## Master Sensor:
By default Acuparse will use the 5N1/Atlas sensor to upload data to external sites. To upload data from a tower, change the Master Temp/Humidity Sensor.
Changing the sensor sends those readings externally instead of the 5N1/Atlas data. You can also choose to use the tower readings for the data archive or use the readings from the 5N1/Atlas.
By default Acuparse will use the 5-in-1/Atlas sensor to upload data to external sites. To upload data from a tower, change the Master Temp/Humidity Sensor.
Changing the sensor sends those readings externally instead of the 5-in-1/Atlas data. You can also choose to use the tower readings for the data archive or use the readings from the 5-in-1/Atlas.

# MyAcuRite Responses:

Expand Down Expand Up @@ -241,3 +233,9 @@ Recaptcha loads on the authentication and contact forms, as well as, when reques
* Sign up for a reCAPTCHA account at [google.com/recaptcha](https://www.google.com/recaptcha).
* Select Invisible reCAPTCHA when registering your new site.
* Enter your site key and secret in your site settings.

# Debug Server
You can send MyAcuRite readings to an external debug server. To enable, manually edit `src/usr/config.php`.
* Find Debug, Server, Show and change it to true.

The debug tab will now appear in your system settings.
20 changes: 20 additions & 0 deletions docs/external/generic/WeatherPoly.md
@@ -0,0 +1,20 @@
# WeatherPoly Upload

https://github.com/bpaauwe/WeatherPoly

Using the generic uploader, readings can be sent to WeatherPoly.

## Configuration:
* Change enabled to true
* Configure the URL with your Polyglot's IP/Host and the port number.

## Mappings:
* temperature-main = tempf
* temperature-dewpoint = dewptf
* humidiy-main = humidity
* pressure-sealevel = baromin
* wind-windspeed = windspeedmph
* wind-winddir = winddir
* wind-avgwindspeed = windspdmph_avg2m
* rain-rate = rainin
* rain-daily = dailyrainin
3 changes: 3 additions & 0 deletions docs/index.md
Expand Up @@ -20,3 +20,6 @@
[PWS Weather](external/PWS)

[CWOP](external/CWOP)

## Generic
[WeatherPoly](external/generic/WeatherPoly)
38 changes: 38 additions & 0 deletions src/fcn/updater/2_x/2_7.php
@@ -0,0 +1,38 @@
<?php
/**
* Acuparse - AcuRite®‎ Access/smartHUB and IP Camera Data Processing, Display, and Upload.
* @copyright Copyright (C) 2015-2018 Maxwell Power
* @author Maxwell Power <max@acuparse.com>
* @link http://www.acuparse.com
* @license AGPL-3.0+
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this code. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* File: src/fcn/updater/2_7.php
* 3.0 Update Tasks
*/

switch ($config->version->app) {
// Update from 2.6.1-release
case '2.6.1-release':
$config->debug->server->show = false;
$config->upload->generic->enabled = false;
$config->upload->generic->id = '';
$config->upload->generic->password = '';
$config->upload->generic->url = '';
$config->version->app = '2.7.0-release';
$notes .= '<li><strong>' . $config->version->app . '</strong> - ' . 'Numerous changes, see CHANGELOG.md for details.</li>';
}

0 comments on commit 178246e

Please sign in to comment.