Compare commits

..

No commits in common. "ff78898683a7926cddbd7e3784976d6e4546094f" and "8c4c3cb78ebc02b533be29b33ed95a63bfd3630c" have entirely different histories.

7 changed files with 12 additions and 32 deletions

4
Cargo.lock generated
View file

@ -1155,7 +1155,7 @@ dependencies = [
[[package]]
name = "homekit-controller"
version = "0.6.2"
version = "0.5.5"
dependencies = [
"chacha20poly1305",
"ed25519-dalek",
@ -1178,7 +1178,7 @@ dependencies = [
[[package]]
name = "homekit-exporter"
version = "0.6.2"
version = "0.6.1"
dependencies = [
"chrono",
"clap",

View file

@ -1,6 +1,6 @@
[package]
name = "homekit-controller"
version = "0.6.2"
version = "0.5.5"
edition = "2021"
license = "Apache-2.0"
description = "Partial implementation of the HomeKit controller protocol"

View file

@ -311,17 +311,15 @@ impl DeviceConnection {
self.characteristics_request(true),
)
.await
.map_err(|_| HomekitError::Timeout)
.flatten_result()
{
Ok(r) => Ok(r),
Err(e) => {
Ok(r) => r,
Err(_) => {
log::warn!(
"{}failed to update characteristics: {e:?}",
"{}failed to update characteristics",
formatted_name(&self.name)
);
self.socket = None;
Err(e)
Err(HomekitError::Timeout)
}
}
}
@ -434,24 +432,6 @@ pub enum HomekitError {
NoData,
}
trait FlattenResult {
type T;
type E;
fn flatten_result(self) -> Result<Self::T, Self::E>;
}
impl<T, E> FlattenResult for Result<Result<T, E>, E> {
type T = T;
type E = E;
fn flatten_result(self) -> Result<Self::T, Self::E> {
match self {
Ok(v) => v,
Err(e) => Err(e),
}
}
}
#[derive(Debug, Error)]
pub enum ConnectionError {
#[error("http")]

View file

@ -686,7 +686,7 @@ impl From<CharacteristicTypeInner> for CharacteristicType {
fn from(value: CharacteristicTypeInner) -> Self {
match value {
CharacteristicTypeInner::Unknown(v) => {
log::debug!("unknown characteristic type: {v}");
log::info!("unknown characteristic type: {v}");
Self::Unknown
}
CharacteristicTypeInner::AccessControlLevel => Self::AccessControlLevel,
@ -1206,7 +1206,7 @@ impl From<ServiceTypeInner> for ServiceType {
fn from(value: ServiceTypeInner) -> Self {
match value {
ServiceTypeInner::Unknown(v) => {
log::debug!("unknown service type: {v}");
log::info!("unknown service type: {v}");
Self::Unknown
}
ServiceTypeInner::AccessControl => Self::AccessControl,

View file

@ -1,6 +1,6 @@
[package]
name = "homekit-exporter"
version = "0.6.2"
version = "0.6.1"
edition = "2021"
license = "Apache-2.0"
description = "Prometheus exporter for HomeKit sensors"

View file

@ -1,7 +1,7 @@
# Maintainer: Alex Janka <alex@alexjanka.com>
pkgname=homekit-logger
pkgver=0.6.2
pkgver=0.6.1
pkgrel=1
pkgdesc="Prometheus exporter for HomeKit sensors"
arch=('x86_64' 'aarch64')

View file

@ -7,7 +7,7 @@ StartLimitIntervalSec=0
Type=simple
Restart=always
RestartSec=10s
Environment="RUST_LOG=warn,mdns=off"
Environment="RUST_LOG=error,warn,mdns=off,homekit_controller::pairing_data::characteristics=off"
Environment="LOG_TIMESTAMP=false"
ExecStart=/usr/bin/homekit-exporter watch