v0.14.2-connectivity

This commit is contained in:
Mateusz Gruszczyński
2026-09-15 10:02:49 +02:00
parent 2fd7e47eb9
commit c3f6e773f8
41 changed files with 1295 additions and 108 deletions
+6
View File
@@ -614,6 +614,12 @@ impl GreeCloudProvider {
.ok_or_else(|| anyhow!("GREE Cloud MQTT is disconnected"))
}
pub async fn probe_mqtt(&self, settings: &GreeCloudSettings, devices: &[Device]) -> Result<u64> {
self.ensure_connected(settings, devices).await?;
let session = self.current_session().await?;
session.mqtt.ping_round_trip().await
}
pub async fn ensure_connected(&self, settings: &GreeCloudSettings, devices: &[Device]) -> Result<()> {
if !settings.enabled {
bail!("GREE Cloud is disabled");