diff options
| author | xengineering <me@xengineering.eu> | 2026-03-26 17:48:09 +0100 |
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2026-03-26 17:48:09 +0100 |
| commit | a965777d436f3bd68686e3b33066459c7ed5a01c (patch) | |
| tree | 958f4e62fa3489b7f306e243fbf78d0776a8b48d /config.go | |
| parent | 4bc67b734dc8c90dd4679877e8825da32e67b7eb (diff) | |
| parent | 5c7284640a6f0ddc0aa80178d5a3b91a5123b6c8 (diff) | |
| download | sia-server-a965777d436f3bd68686e3b33066459c7ed5a01c.tar sia-server-a965777d436f3bd68686e3b33066459c7ed5a01c.tar.zst sia-server-a965777d436f3bd68686e3b33066459c7ed5a01c.zip | |
Merge branch 'tp-link'
This adds support for the TP-Link HS100 Wi-Fi plugs.
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -52,10 +52,18 @@ type ShellyConfig struct { type ShellyConfigs []ShellyConfig +type TPLinkConfig struct { + ID string `json:"id"` + IP string `json:"ip"` +} + +type TPLinkConfigs []TPLinkConfig + type StartupConfig struct { MQTT MQTTConfig `json:"mqtt"` Homematic HomematicConfig `json:"homematic"` Shelly ShellyConfigs `json:"shelly"` + TPLink TPLinkConfigs `json:"tplink"` } func (sc StartupConfig) String() string { @@ -132,6 +140,13 @@ func (sc StartupConfig) Validate() error { } } + for _, tplink := range sc.TPLink { + ip := net.ParseIP(tplink.IP) + if ip == nil { + return fmt.Errorf("Failed to parse IP address '%s'.", tplink.IP) + } + } + return nil } |
