shelly-proxy/shelly1.go

59 lines
1.8 KiB
Go

package main
type ShellyStatus1 struct {
Wifi ShellyWifiStatus1 `json:"wifi_sta"`
Cloud ShellyCloudStatus1 `json:"cloud"`
Mqtt ShellyMqttStatus1 `json:"mqtt"`
Time string `json:"time"`
Serial int `json:"serial"`
HasUpdate bool `json:"has_update"`
MAC string `json:"mac"`
Relays []ShellyRelaysStatus1 `json:"relays"`
Meters []ShellyMetersStatus1 `json:"meters"`
Temperature float32 `json:"temperature"`
OverTemperature bool `json:"overtemperature"`
Update ShellyUpdateStatus1 `json:"update"`
RamTotal int `json:"ram_total"`
RamFree int `json:"ram_free"`
FsSize int `json:"fs_size"`
FsFree int `json:"fs_free"`
Uptime int `json:"uptime"`
}
type ShellyWifiStatus1 struct {
Connected bool `json:"connected"`
SSID string `json:"ssid"`
IP string `json:"ip"`
RSSI int `json:"rssi"`
}
type ShellyCloudStatus1 struct {
Enabled bool `json:"enabled"`
Connected bool `json:"connected"`
}
type ShellyMqttStatus1 struct {
Connected bool `json:"connected"`
}
type ShellyRelaysStatus1 struct {
IsOn bool `json:"ison"`
HasTimer bool `json:"has_timer"`
Overpower bool `json:"overpower"`
}
type ShellyMetersStatus1 struct {
Power float32 `json:"power"`
IsValid bool `json:"is_valid"`
Timestamp int `json:"timestamp"`
Counters []float32 `json:"counters"`
Total int `json:"total"`
}
type ShellyUpdateStatus1 struct {
Status string `json:"status"`
HasUpdate bool `json:"has_update"`
NewVersion string `json:"new_version"`
OldVersion string `json:"old_version"`
}