fix: sync and fetch temperatures
changes: - add sync command to synchronize device sensor information with remote servers - fix fetch functions to get temperatures
This commit is contained in:
@ -10,13 +10,13 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
DeviceID string `json:"device_id"`
|
||||
DeviceName string `json:"device_name"`
|
||||
DeviceLocation string `json:"device_location"`
|
||||
TemperatureLogfile string `json:"temperature_logfile"`
|
||||
HumidityLogfile string `json:"humiditiy_logfile"`
|
||||
Remotes []*Remote `json:"remotes"`
|
||||
Sensors []*Sensor `json:"sensors"`
|
||||
DeviceID string `json:"device_id"`
|
||||
DeviceName string `json:"device_name"`
|
||||
DeviceLocation string `json:"device_location"`
|
||||
TemperatureLogfile string `json:"temperature_logfile"`
|
||||
HumidityLogfile string `json:"humiditiy_logfile"`
|
||||
Remotes []*Remote `json:"remotes"`
|
||||
Sensors []*stypes.Sensor `json:"sensors"`
|
||||
}
|
||||
|
||||
func (c *Config) ToJSON() (string, error) {
|
||||
@ -56,8 +56,3 @@ type Remote struct {
|
||||
Registered bool `json:"remote_registered"`
|
||||
Enabled bool `json:"remote_enabled"`
|
||||
}
|
||||
|
||||
type Sensor struct {
|
||||
RemoteSensor *stypes.Sensor `json:"sensor"`
|
||||
Enabled bool `json:"sensor_enabled"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user