-
Notifications
You must be signed in to change notification settings - Fork 14
/
updateWeatherSenseWireless.sql
180 lines (149 loc) · 5.56 KB
/
updateWeatherSenseWireless.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
-- phpMyAdmin SQL Dump
-- TimeStamp fix
alter table AQI433MHZ change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp();
alter table Generic change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp();
alter table IndoorTHSensors change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp();
alter table SolarMax433MHZ change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp();
alter table TB433MHZ change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp();
alter table WeatherData change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp();
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 09, 2021 at 05:18 PM
-- Server version: 10.3.25-MariaDB-0+deb10u1
-- PHP Version: 7.3.19-1~deb10u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `WeatherSenseWireless`
--
-- --------------------------------------------------------
--
-- Table structure for table `AS433MHZ`
--
CREATE TABLE IF NOT EXISTS `AS433MHZ` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
`messageID` int(11) NOT NULL,
`deviceid` int(11) NOT NULL,
`protocolversion` int(11) NOT NULL,
`softwareversion` int(11) NOT NULL,
`weathersenseprotocol` int(11) NOT NULL,
`eqcount` int(11) NOT NULL,
`finaleq_si` float NOT NULL,
`finaleq_pga` float NOT NULL,
`instanteq_si` float NOT NULL,
`instanteq_pga` float NOT NULL,
`batteryvoltage` float NOT NULL,
`batterycurrent` float NOT NULL,
`loadvoltage` float NOT NULL,
`loadcurrent` float NOT NULL,
`solarvoltage` float NOT NULL,
`solarcurrent` float NOT NULL,
`auxa` int(11) NOT NULL,
`solarpresent` int(11) NOT NULL,
`aftershockpresent` int(11) NOT NULL,
`keepalivemessage` int(11) NOT NULL,
`lowbattery` int(11) NOT NULL,
`batterycharge` float NOT NULL,
`batterypower` float NOT NULL,
`loadpower` float NOT NULL,
`solarpower` float NOT NULL,
`test` text NOT NULL,
`testdescription` text NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- --------------------------------------------------------
--
-- Table structure for table `SkyCamPictures`
--
CREATE TABLE IF NOT EXISTS `SkyCamPictures` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
`messageID` int(11) NOT NULL DEFAULT -1,
`cameraID` varchar(10) NOT NULL,
`picturename` varchar(100) NOT NULL,
`picturesize` int(11) NOT NULL,
`resends` int(11) NOT NULL,
`resolution` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- --------------------------------------------------------
--
-- Table structure for table `SkyCamSensors`
--
CREATE TABLE IF NOT EXISTS `SkyCamSensors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
`cameraID` varchar(11) NOT NULL,
`messageID` int(11) NOT NULL,
`softwareversion` int(11) NOT NULL,
`messagetype` int(11) NOT NULL,
`rssi` int(11) NOT NULL,
`internaltemperature` float NOT NULL,
`internalhumidity` int(11) NOT NULL,
`batteryvoltage` float NOT NULL,
`batterycurrent` float NOT NULL,
`loadvoltage` float NOT NULL,
`loadcurrent` float NOT NULL,
`solarvoltage` float NOT NULL,
`solarcurrent` float NOT NULL,
`batterypower` float NOT NULL,
`loadpower` float NOT NULL,
`solarpower` float NOT NULL,
`gndrreboots` int(11) DEFAULT 0,
`batterycharge` float DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `RAD433MHZ`
--
CREATE TABLE IF NOT EXISTS `RAD433MHZ` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(),
`messageID` int(11) NOT NULL,
`deviceid` int(11) NOT NULL,
`protocolversion` int(11) NOT NULL,
`softwareversion` int(11) NOT NULL,
`weathersenseprotocol` int(11) NOT NULL,
`CPM` int(11) NOT NULL,
`nSVh` int(11) NOT NULL,
`uSVh` float NOT NULL,
`uSVh24Hour` float NOT NULL,
`batteryvoltage` float NOT NULL,
`batterycurrent` float NOT NULL,
`loadvoltage` float NOT NULL,
`loadcurrent` float NOT NULL,
`solarvoltage` float NOT NULL,
`solarcurrent` float NOT NULL,
`auxa` int(11) NOT NULL,
`keepalivemessage` int(11) NOT NULL,
`lowbattery` int(11) NOT NULL,
`solarpresent` int(11) NOT NULL,
`radiationpresent` int(11) NOT NULL,
`batterycharge` float NOT NULL,
`batterypower` float NOT NULL,
`loadpower` float NOT NULL,
`solarpower` float NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;