From 9160403b992696a81a9dc9015d7a9b1dc458c182 Mon Sep 17 00:00:00 2001 From: Alex X Date: Sat, 11 May 2024 06:35:28 +0300 Subject: [PATCH] Fix device_id and device_private for HomeKit config --- internal/hass/hass.go | 2 +- internal/homekit/homekit.go | 11 +++++------ internal/rtsp/rtsp.go | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/internal/hass/hass.go b/internal/hass/hass.go index 76ffc89d..61113959 100644 --- a/internal/hass/hass.go +++ b/internal/hass/hass.go @@ -21,7 +21,7 @@ import ( func Init() { var conf struct { API struct { - Listen string `json:"listen"` + Listen string `yaml:"listen"` } `yaml:"api"` Mod struct { Config string `yaml:"config"` diff --git a/internal/homekit/homekit.go b/internal/homekit/homekit.go index 868b51e3..bfe3e971 100644 --- a/internal/homekit/homekit.go +++ b/internal/homekit/homekit.go @@ -22,12 +22,11 @@ import ( func Init() { var cfg struct { Mod map[string]struct { - Pin string `json:"pin"` - Name string `json:"name"` - DeviceID string `json:"device_id"` - DevicePrivate string `json:"device_private"` - Pairings []string `json:"pairings"` - //Listen string `json:"listen"` + Pin string `yaml:"pin"` + Name string `yaml:"name"` + DeviceID string `yaml:"device_id"` + DevicePrivate string `yaml:"device_private"` + Pairings []string `yaml:"pairings"` } `yaml:"homekit"` } app.LoadConfig(&cfg) diff --git a/internal/rtsp/rtsp.go b/internal/rtsp/rtsp.go index e4d3e55f..4cb8421f 100644 --- a/internal/rtsp/rtsp.go +++ b/internal/rtsp/rtsp.go @@ -21,7 +21,7 @@ func Init() { Username string `yaml:"username" json:"-"` Password string `yaml:"password" json:"-"` DefaultQuery string `yaml:"default_query" json:"default_query"` - PacketSize uint16 `yaml:"pkt_size"` + PacketSize uint16 `yaml:"pkt_size" json:"packet_size"` } `yaml:"rtsp"` }