v0.14.2-connectivity
This commit is contained in:
1 parent
2fd7e47eb9
commit
c3f6e773f8
41 files changed
+1295
-108
No files matched your search
@@ -88,6 +88,16 @@ fn default_cloud_region() -> String {
|
||||
fn default_cloud_poll_interval_seconds() -> u64 {
|
||||
60
|
||||
}
|
||||
|
||||
fn default_ping_interval_seconds() -> u64 {
|
||||
60
|
||||
}
|
||||
fn default_ping_sample_count() -> u32 {
|
||||
3
|
||||
}
|
||||
fn default_cloud_metrics_interval_seconds() -> u64 {
|
||||
300
|
||||
}
|
||||
fn default_influx_version() -> String {
|
||||
"2".into()
|
||||
}
|
||||
|
||||
@@ -40,6 +40,27 @@ pub struct HaReading {
|
||||
pub temperature: f64,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct NetworkReading {
|
||||
pub id: i64,
|
||||
/// Stable endpoint id: local device id or a controller-level Cloud service id.
|
||||
pub target_id: String,
|
||||
/// `device` for Local/LAN units, `cloud_service` for REST/MQTT diagnostics.
|
||||
pub target_kind: String,
|
||||
pub timestamp: DateTime<Utc>,
|
||||
/// Mean successful round-trip latency for this probe batch.
|
||||
pub latency_ms: Option<f64>,
|
||||
/// Mean absolute difference between consecutive successful RTT samples.
|
||||
pub jitter_ms: Option<f64>,
|
||||
/// Failed probes divided by all probes, in percent (0..100).
|
||||
pub packet_loss_pct: f64,
|
||||
pub sample_count: u32,
|
||||
pub successful_samples: u32,
|
||||
/// `local_udp`, `cloud_rest` or `cloud_mqtt`.
|
||||
pub source: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct EventLog {
|
||||
pub id: i64,
|
||||
|
||||
@@ -10,6 +10,13 @@ pub struct GreeCloudSettings {
|
||||
pub password: String,
|
||||
#[serde(default = "default_cloud_poll_interval_seconds")]
|
||||
pub polling_interval_seconds: u64,
|
||||
/// Periodic Cloud REST/MQTT quality measurements for History. Disabled by default.
|
||||
#[serde(default)]
|
||||
pub connectivity_metrics_enabled: bool,
|
||||
#[serde(default = "default_cloud_metrics_interval_seconds")]
|
||||
pub connectivity_metrics_interval_seconds: u64,
|
||||
#[serde(default = "default_ping_sample_count")]
|
||||
pub connectivity_metrics_sample_count: u32,
|
||||
/// Random, non-personal installation identifier used in the HTTP User-Agent.
|
||||
#[serde(default)]
|
||||
pub installation_id: String,
|
||||
@@ -31,6 +38,9 @@ impl Default for GreeCloudSettings {
|
||||
username: String::new(),
|
||||
password: String::new(),
|
||||
polling_interval_seconds: default_cloud_poll_interval_seconds(),
|
||||
connectivity_metrics_enabled: false,
|
||||
connectivity_metrics_interval_seconds: default_cloud_metrics_interval_seconds(),
|
||||
connectivity_metrics_sample_count: default_ping_sample_count(),
|
||||
installation_id: String::new(),
|
||||
account_id: "default".into(),
|
||||
last_successful_contact: None,
|
||||
@@ -47,6 +57,13 @@ pub struct RuntimeSettings {
|
||||
pub zone_interval_seconds: u64,
|
||||
pub discovery_timeout_ms: u64,
|
||||
pub discovery_broadcast: String,
|
||||
/// Background Local/LAN round-trip quality worker.
|
||||
#[serde(default = "default_true")]
|
||||
pub ping_metrics_enabled: bool,
|
||||
#[serde(default = "default_ping_interval_seconds")]
|
||||
pub ping_interval_seconds: u64,
|
||||
#[serde(default = "default_ping_sample_count")]
|
||||
pub ping_sample_count: u32,
|
||||
/// Global seasonal mode. Zones follow this by default. Values: cool/heat/off; off pauses house-level thermostat control.
|
||||
#[serde(default = "default_house_mode")]
|
||||
pub house_mode: String,
|
||||
|
||||
@@ -10,6 +10,12 @@ pub struct GreeSettings {
|
||||
pub zone_interval_seconds: u64,
|
||||
pub discovery_timeout_ms: u64,
|
||||
pub discovery_broadcast: String,
|
||||
#[serde(default = "default_true")]
|
||||
pub ping_metrics_enabled: bool,
|
||||
#[serde(default = "default_ping_interval_seconds")]
|
||||
pub ping_interval_seconds: u64,
|
||||
#[serde(default = "default_ping_sample_count")]
|
||||
pub ping_sample_count: u32,
|
||||
pub suppress_device_beep: bool,
|
||||
pub compressor_protection_enabled: bool,
|
||||
pub compressor_protection_seconds: u64,
|
||||
@@ -23,6 +29,12 @@ pub struct GreeCloudSettingsUpdate {
|
||||
#[serde(default)]
|
||||
pub password: Option<String>,
|
||||
pub polling_interval_seconds: u64,
|
||||
#[serde(default)]
|
||||
pub connectivity_metrics_enabled: bool,
|
||||
#[serde(default = "default_cloud_metrics_interval_seconds")]
|
||||
pub connectivity_metrics_interval_seconds: u64,
|
||||
#[serde(default = "default_ping_sample_count")]
|
||||
pub connectivity_metrics_sample_count: u32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -32,6 +44,9 @@ pub struct GreeCloudSettingsView {
|
||||
pub username: String,
|
||||
pub password_configured: bool,
|
||||
pub polling_interval_seconds: u64,
|
||||
pub connectivity_metrics_enabled: bool,
|
||||
pub connectivity_metrics_interval_seconds: u64,
|
||||
pub connectivity_metrics_sample_count: u32,
|
||||
pub installation_id: String,
|
||||
pub account_id: String,
|
||||
pub last_successful_contact: Option<DateTime<Utc>>,
|
||||
|
||||
Reference in new issue
Block a user