Skip to content

Commit

Permalink
Merge branch 'beta' of https://github.com/sosprz/nettemp into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
techfreak committed May 20, 2016
2 parents ea57bad + b91981c commit 45b3eb2
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
9 changes: 0 additions & 9 deletions install/db/update.sh

This file was deleted.

3 changes: 3 additions & 0 deletions install/run.sh
Expand Up @@ -23,3 +23,6 @@ source install/perms/perms.sh
source install/crontab/crontab.sh
source install/services/services.sh

if [[ "$SENDSTATS" == "yes" ]]; then
php-cgi -q install/stats/stats.php
fi
6 changes: 6 additions & 0 deletions install_nettemp
Expand Up @@ -72,6 +72,12 @@ if [ $exitstatus2 = 0 ]; then
APCUPS=yes
fi

whiptail --backtitle "Nettemp.pl" --title "Nettemp installer" --yesno "Do You want send anonymous stats to stats.nettemp.pl" 8 78
exitstatus3=$?
if [ $exitstatus3 = 0 ]; then
SENDSTATS=yes
fi

}

start
Expand Down
4 changes: 2 additions & 2 deletions modules/tools/nettemp.schema
Expand Up @@ -50,7 +50,7 @@ CREATE TABLE gpio (
temp_run TEXT,
trigger_source type TEXT, tout1 type TEXT, tout2 type TEXT, tout3 type TEXT, tout4 type TEXT, tout5 type TEXT, tout6 type TEXT, tout7 type TEXT, tout8 type TEXT, tout9 type TEXT, tout10 type TEXT, tout11 type TEXT, tout12 type TEXT, tout13 type TEXT, tout14 type TEXT, tout15 type TEXT, tout16 type TEXT, tout17 type TEXT, tout18 type TEXT, tout19 type TEXT, tout20 type TEXT, tout21 type TEXT, tout22 type TEXT, tout23 type TEXT, tout24 type TEXT, tout25 type TEXT, tout26 type TEXT, tout27 type TEXT, tout28 type TEXT, tout29 type TEXT, tout30 type TEXT, control type TEXT, control_run type TEXT, trigger_delay type TEXT, trigger_con type TEXT, tel_num1 type TEXT, tel_num2 type TEXT, tel_num3 type TEXT, tel_any type TEXT, tel_at type TEXT, temp_source1 type TEXT, temp_source2 type TEXT, temp_source3 type TEXT, temp_source4 type TEXT, temp_source5 type TEXT, temp_source6 type TEXT, temp_source7 type TEXT, temp_source8 type TEXT, temp_source9 type TEXT, temp_source10 type TEXT, elec_divider type TEXT, water_divider type TEXT, gas_divider type TEXT, elec_run type TEXT, water_run type TEXT, gas_run type TEXT, elec_debouncing type TEXT, water_debouncing type TEXT, gas_debouncing type TEXT, fnum type TEXT, state type TEXT, map_pos type NUM, map_num type NUM, map type NUM, position type NUM, display_name type TEXT, control_on_map type TEXT, day_zone2s type TEXT, day_zone2e type TEXT, day_zone3s type TEXT, day_zone3e type TEXT, moment_time type TEXT);
CREATE TABLE i2c (id INTEGER PRIMARY KEY,name TEXT, addr UNIQUE);
CREATE TABLE meteo (id INTEGER PRIMARY KEY, temp TEXT, latitude TEXT, height TEXT, pressure TEXT, humid TEXT, onoff TEXT);
CREATE TABLE meteo (id INTEGER PRIMARY KEY, temp TEXT, latitude TEXT, height TEXT, pressure TEXT, humid TEXT, onoff TEXT, normalized TEXT);
CREATE TABLE newdev (id INTEGER PRIMARY KEY,list UNIQUE, type type TEXT, device type TEXT, i2c type TEXT, usb type TEXT, gpio type TEXT, ip type TEXT);
CREATE TABLE relays (id INTEGER PRIMARY KEY,list UNIQUE, name type TEXT, ip type TEXT, delay type TEXT, rom type TEXT, type type TEXT);
CREATE TABLE settings (
Expand Down Expand Up @@ -106,7 +106,7 @@ CREATE TABLE sensors (
ip type TEXT,
device type TEXT,
lcd type TEXT,
method type TEXT, tmp_5ago type TEXT, adj type TEXT, charts type TEXT, remote type TEXT, i2c type TEXT, minmax type TEXT, sum type TEXT, map_pos type NUM, map_num type NUM, position INTEGER DEFAULT 1, map type NUM, ch_group type NUM, display_name type TEXT, transparent_bkg type TEXT, background_color TEXT, background_low TEXT, background_high TEXT, font_color TEXT, font_size TEXT, jg TEXT);
method type TEXT, tmp_5ago type TEXT, adj type TEXT, charts type TEXT, remote type TEXT, i2c type TEXT, minmax type TEXT, sum type TEXT, map_pos type NUM, map_num type NUM, position INTEGER DEFAULT 1, map type NUM, ch_group type NUM, display_name type TEXT, transparent_bkg type TEXT, background_color TEXT, background_low TEXT, background_high TEXT, font_color TEXT, font_size TEXT, jg TEXT, current TEXT);
CREATE TABLE usb (id INTEGER PRIMARY KEY, dev TEXT, device UNIQUE);
CREATE TABLE statistics (id INTEGER PRIMARY KEY, agreement TEXT, nick TEXT, location TEXT, sensor_temp TEXT);
CREATE TABLE g_func (id INTEGER PRIMARY KEY, position INTEGER DEFAULT 1, sensor TEXT, sensor2 TEXT, onoff TEXT, value TEXT, op TEXT, hyst TEXT, source TEXT, gpio TEXT, w_profile TEXT);
Expand Down
2 changes: 1 addition & 1 deletion status/Meteo.class.php
Expand Up @@ -92,7 +92,7 @@ function getSilaGrawitacji()

function getTemperaturaZnormalizowana()
{
return $this->tz;
return $this->temp_znormalizowana;
}

function getCisnienieZnormalizowane()
Expand Down
2 changes: 1 addition & 1 deletion status/meteo_status.php
Expand Up @@ -14,7 +14,7 @@

if ( $onoff == "on") {

require("status/Meteo.class.php");
require_once("status/Meteo.class.php");
$meteo=new Meteo();
$sila_grawitacji=$meteo->getSilaGrawitacji();//9.780313*(pow(1+0.005324*SIN($szerokosc),2)-0.0000058*pow(SIN(2*$szerokosc),2)-0.000003085*$wysokosc);
$temp_znormalizowana=$meteo->getTemperaturaZnormalizowana();//((2*($temperatura+273.15))+((0.6*$wysokosc)/100))/2;
Expand Down
1 change: 1 addition & 0 deletions status/sensor_status.php
Expand Up @@ -135,6 +135,7 @@
?>
>
<?php
require_once("Meteo.class.php");
$m=new Meteo();
echo number_format($m->getCisnienieZnormalizowane(),2,'.','').' hPa npm';
?>
Expand Down

0 comments on commit 45b3eb2

Please sign in to comment.