You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
148 lines
7.1 KiB
148 lines
7.1 KiB
package weather
|
|
|
|
import "time"
|
|
|
|
type AmbientService interface {
|
|
Event(uint64) (*AmbientEntry, error)
|
|
AddEvent(*AmbientEntry) (*AmbientEntry, error)
|
|
UpdateEvent(*AmbientEntry) error
|
|
DeleteEvent(*AmbientEntry) error
|
|
}
|
|
|
|
type AmbientEntry struct {
|
|
ID uint64
|
|
MAC string `schema:"MAC"`
|
|
DateUTC time.Time `schema:"dateutc"`
|
|
WindDir int `schema:"winddir"`
|
|
WindSpeedMPH float32 `schema:"windspeedmph"`
|
|
WindGustMPH float32 `schema:"windgustmph"`
|
|
WindGustDir int `schema:"windgustdir"`
|
|
MaxDailyGust float32 `schema:"maxdailygust"`
|
|
WindSpdMPH_Avg2m float32 `schema:"windspdmph_avg2m"`
|
|
WindDir_Avg2m int `schema:"winddir_avg2m"`
|
|
WindSpdMPH_Avg10m float32 `schema:"windspdmph_avg10m"`
|
|
WindDir_Avg10m int `schema:"winddir_avg10m"`
|
|
WindGustMPH_Interval int `schema:"windgustmph_interval"`
|
|
Humidity int `schema:"humidity"`
|
|
Humidity1 int `schema:"humidity1"`
|
|
Humidity2 int `schema:"humidity2"`
|
|
Humidity3 int `schema:"humidity3"`
|
|
Humidity4 int `schema:"humidity4"`
|
|
Humidity5 int `schema:"humidity5"`
|
|
Humidity6 int `schema:"humidity6"`
|
|
Humidity7 int `schema:"humidity7"`
|
|
Humidity8 int `schema:"humidity8"`
|
|
Humidity9 int `schema:"humidity9"`
|
|
Humidity10 int `schema:"humidity10"`
|
|
HumidityIn int `schema:"humidityin"`
|
|
TempF float32 `schema:"tempf"`
|
|
Temp1F float32 `schema:"temp1f"`
|
|
Temp2F float32 `schema:"temp2f"`
|
|
Temp3F float32 `schema:"temp3f"`
|
|
Temp4F float32 `schema:"temp4f"`
|
|
Temp5F float32 `schema:"temp5f"`
|
|
Temp6F float32 `schema:"temp6f"`
|
|
Temp7F float32 `schema:"temp7f"`
|
|
Temp8F float32 `schema:"temp8f"`
|
|
Temp9F float32 `schema:"temp9f"`
|
|
Temp10F float32 `schema:"temp10f"`
|
|
TempInF float32 `schema:"tempinf"`
|
|
HourlyRainIn float32 `schema:"hourlyrainin"`
|
|
DailyRainIn float32 `schema:"dailyrainin"`
|
|
Last24HourRainIn float32 `schema:"24hourrainin"`
|
|
WeeklyRainIn float32 `schema:"weeklyrainin"`
|
|
MonthlyRainIn float32 `schema:"monthlyrainin"`
|
|
YearlyRainIn float32 `schema:"yearlyrainin"`
|
|
EventRainIn float32 `schema:"eventrainin"`
|
|
TotalRainIn float32 `schema:"totalrainin"`
|
|
BaromRelIn float32 `schema:"baromrelin"`
|
|
BaromAbsIn float32 `schema:"baromabsin"`
|
|
UV int `schema:"uv"`
|
|
SolarRadiation float32 `schema:"solarradiation"`
|
|
CO2 int `schema:"co2"`
|
|
PM25 int `schema:"pm25"`
|
|
PM25_24H float32 `schema:"pm25_24h"`
|
|
PM25_In int `schema:"pm25_in"`
|
|
PM25_In_24H float32 `schema:"pm25_in_24h"`
|
|
PM10_In int `schema:"pm10_in"`
|
|
PM10_In_24H float32 `schema:"pm10_in_24h"`
|
|
CO2_In int `schema:"co2_in"`
|
|
CO2_In_24H float32 `schema:"co2_in_24h"`
|
|
PM_In_Temp float32 `schema:"pm_in_temp"`
|
|
PM_in_Humidity int `schema:"pm_in_humidity"`
|
|
Relay1 bool `schema:"relay1"`
|
|
Relay2 bool `schema:"relay2"`
|
|
Relay3 bool `schema:"relay3"`
|
|
Relay4 bool `schema:"relay4"`
|
|
Relay5 bool `schema:"relay5"`
|
|
Relay6 bool `schema:"relay6"`
|
|
Relay7 bool `schema:"relay7"`
|
|
Relay8 bool `schema:"relay8"`
|
|
Relay9 bool `schema:"relay9"`
|
|
Relay10 bool `schema:"relay10"`
|
|
SoilTemp1 float32 `schema:"soiltemp1"`
|
|
SoilTemp2 float32 `schema:"soiltemp2"`
|
|
SoilTemp3 float32 `schema:"soiltemp3"`
|
|
SoilTemp4 float32 `schema:"soiltemp4"`
|
|
SoilTemp5 float32 `schema:"soiltemp5"`
|
|
SoilTemp6 float32 `schema:"soiltemp6"`
|
|
SoilTemp7 float32 `schema:"soiltemp7"`
|
|
SoilTemp8 float32 `schema:"soiltemp8"`
|
|
SoilTemp9 float32 `schema:"soiltemp9"`
|
|
SoilTemp10 float32 `schema:"soiltemp10"`
|
|
SoilHum1 int `schema:"soilhum1"`
|
|
SoilHum2 int `schema:"soilhum2"`
|
|
SoilHum3 int `schema:"soilhum3"`
|
|
SoilHum4 int `schema:"soilhum4"`
|
|
SoilHum5 int `schema:"soilhum5"`
|
|
SoilHum6 int `schema:"soilhum6"`
|
|
SoilHum7 int `schema:"soilhum7"`
|
|
SoilHum8 int `schema:"soilhum8"`
|
|
SoilHum9 int `schema:"soilhum9"`
|
|
SoilHum10 int `schema:"soilhum10"`
|
|
Leak1 bool `schema:"leak1"`
|
|
Leak2 bool `schema:"leak2"`
|
|
Leak3 bool `schema:"leak3"`
|
|
Leak4 bool `schema:"leak4"`
|
|
Lightning_Time time.Time `schema:"lightning_time"`
|
|
Lightning_Day int `schema:"lightning_day"`
|
|
Lightning_Distance float32 `schema:"lightning_distance"`
|
|
BattOut bool `schema:"battout"`
|
|
BattIn bool `schema:"battin"`
|
|
Batt1 bool `schema:"batt1"`
|
|
Batt2 bool `schema:"batt2"`
|
|
Batt3 bool `schema:"batt3"`
|
|
Batt4 bool `schema:"batt4"`
|
|
Batt5 bool `schema:"batt5"`
|
|
Batt6 bool `schema:"batt6"`
|
|
Batt7 bool `schema:"batt7"`
|
|
Batt8 bool `schema:"batt8"`
|
|
Batt9 bool `schema:"batt9"`
|
|
Batt10 bool `schema:"batt10"`
|
|
BattR1 bool `schema:"battr1"`
|
|
BattR2 bool `schema:"battr2"`
|
|
BattR3 bool `schema:"battr3"`
|
|
BattR4 bool `schema:"battr4"`
|
|
BattR5 bool `schema:"battr5"`
|
|
BattR6 bool `schema:"battr6"`
|
|
BattR7 bool `schema:"battr7"`
|
|
BattR8 bool `schema:"battr8"`
|
|
BattR9 bool `schema:"battr9"`
|
|
BattR10 bool `schema:"battr10"`
|
|
Batt_25 bool `schema:"batt_25"`
|
|
Batt_25In bool `schema:"batt_25in"`
|
|
BatLeak1 bool `schema:"batleak1"`
|
|
BatLeak2 bool `schema:"batleak2"`
|
|
BatLeak3 bool `schema:"batleak3"`
|
|
BatLeak4 bool `schema:"batleak4"`
|
|
Batt_Lightning bool `schema:"batt_lightning"`
|
|
BattSM1 bool `schema:"battsm1"`
|
|
BattSM2 bool `schema:"battsm2"`
|
|
BattSM3 bool `schema:"battsm3"`
|
|
BattSM4 bool `schema:"battsm4"`
|
|
BattRain bool `schema:"battrain"`
|
|
BattCO2 bool `schema:"batt_co2"`
|
|
StationType string `schema:"stationtype"`
|
|
PASSKEY string `schema:"passkey"`
|
|
}
|