diff --git a/Arduino/Sensors/Sensors.ino b/Arduino/Sensors/Sensors.ino index 6eaa9b1..c7b45ec 100644 --- a/Arduino/Sensors/Sensors.ino +++ b/Arduino/Sensors/Sensors.ino @@ -20,7 +20,7 @@ ESP8266WiFiMulti WiFiMulti; BME280I2C bme; const byte codes[] = {0x01 ,0x03 ,0x00 ,0x00 ,0x00 ,0x02 ,0xC4 ,0x0B}; -const char server[] PROGMEM = "http://2.233.91.82/weather/api/station?data=%d|%d|%f|%f|%f"; +const char server[] PROGMEM = "http://2.233.91.82/weather/api/station?data=capaccio|%d|%d|%f|%f|%f"; byte values[2][20]; SoftwareSerial sensor(SERIAL_RO, SERIAL_DI); diff --git a/Circuits/SensorsPCB.fzz b/Circuits/SensorsPCB.fzz index 6b1f385..b6f6e73 100644 Binary files a/Circuits/SensorsPCB.fzz and b/Circuits/SensorsPCB.fzz differ diff --git a/Web/deploy.sh b/Web/deploy.sh deleted file mode 100644 index a677687..0000000 --- a/Web/deploy.sh +++ /dev/null @@ -1 +0,0 @@ -rsync -rlvz --delete --exclude "tmp" --exclude "config.php" -e "ssh -p2222" ./api/ dslak@2.233.91.82:/var/www/weather/api/ diff --git a/Web/weather/.vscode/extensions.json b/Web/weather/.vscode/extensions.json deleted file mode 100644 index 77b3745..0000000 --- a/Web/weather/.vscode/extensions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 - "recommendations": ["angular.ng-template"] -} diff --git a/Web/weather/.vscode/launch.json b/Web/weather/.vscode/launch.json deleted file mode 100644 index 740e35a..0000000 --- a/Web/weather/.vscode/launch.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "ng serve", - "type": "pwa-chrome", - "request": "launch", - "preLaunchTask": "npm: start", - "url": "http://localhost:4200/" - }, - { - "name": "ng test", - "type": "chrome", - "request": "launch", - "preLaunchTask": "npm: test", - "url": "http://localhost:9876/debug.html" - } - ] -} diff --git a/Web/weather/.vscode/tasks.json b/Web/weather/.vscode/tasks.json deleted file mode 100644 index a298b5b..0000000 --- a/Web/weather/.vscode/tasks.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558 - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "start", - "isBackground": true, - "problemMatcher": { - "owner": "typescript", - "pattern": "$tsc", - "background": { - "activeOnStart": true, - "beginsPattern": { - "regexp": "(.*?)" - }, - "endsPattern": { - "regexp": "bundle generation complete" - } - } - } - }, - { - "type": "npm", - "script": "test", - "isBackground": true, - "problemMatcher": { - "owner": "typescript", - "pattern": "$tsc", - "background": { - "activeOnStart": true, - "beginsPattern": { - "regexp": "(.*?)" - }, - "endsPattern": { - "regexp": "bundle generation complete" - } - } - } - } - ] -} diff --git a/Web/weather/deploy.sh b/Web/weather/deploy.sh new file mode 100644 index 0000000..97fc66f --- /dev/null +++ b/Web/weather/deploy.sh @@ -0,0 +1 @@ +rsync -rlvz --delete --exclude "config.php" -e "ssh -p2222" ./dist/weather/ dslak@2.233.91.82:/var/www/weather/ diff --git a/Web/weather/src/api/get_data.php b/Web/weather/src/api/get_data.php index 5cc681d..1dd267c 100644 --- a/Web/weather/src/api/get_data.php +++ b/Web/weather/src/api/get_data.php @@ -5,8 +5,9 @@ $conn = @mysqli_connect($CONF['DB']['HOST'], $CONF['DB']['USER'], $CONF['DB']['PASS'], 'weather')or die("CONNECTION ERROR"); $day = $_GET['day']; +$spot = $_GET['spot']; -$q = mysqli_query($conn, "SELECT * FROM `data` WHERE `date` LIKE '$day%'"); +$q = mysqli_query($conn, "SELECT * FROM `data` WHERE `date` LIKE '$day%' AND `spot` = '$spot'"); if($q) { diff --git a/Web/weather/src/api/station.php b/Web/weather/src/api/station.php index 3e5bd7f..4422569 100644 --- a/Web/weather/src/api/station.php +++ b/Web/weather/src/api/station.php @@ -6,7 +6,7 @@ $conn = @mysqli_connect($CONF['DB']['HOST'], $CONF['DB']['USER'], $CONF['DB']['P $data = explode('|',$_GET['data']); -$query = "INSERT INTO `data` VALUES(NULL, NOW(), ".$data[0].", ".$data[1].", ".$data[2].", ".$data[3].", ".$data[4].")"; +$query = "INSERT INTO `data` VALUES(NULL, '".$data[0]."', NOW(), ".$data[1].", ".$data[2].", ".$data[3].", ".$data[4].", ".$data[4].")"; if(mysqli_query($conn, $query)) { http_response_code(200); diff --git a/Web/weather/src/app/app-layout/app-layout.component.html b/Web/weather/src/app/app-layout/app-layout.component.html deleted file mode 100644 index f08ea58..0000000 --- a/Web/weather/src/app/app-layout/app-layout.component.html +++ /dev/null @@ -1 +0,0 @@ -
app-layout works!
diff --git a/Web/weather/src/app/app-layout/app-layout.component.scss b/Web/weather/src/app/app-layout/app-layout.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/Web/weather/src/app/app-layout/app-layout.component.spec.ts b/Web/weather/src/app/app-layout/app-layout.component.spec.ts deleted file mode 100644 index a40dd41..0000000 --- a/Web/weather/src/app/app-layout/app-layout.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { AppLayoutComponent } from './app-layout.component'; - -describe('AppLayoutComponent', () => { - let component: AppLayoutComponent; - let fixture: ComponentFixture