firmware upgrades: minor docs and ui cleanup
This commit is contained in:
parent
843121632d
commit
d16319f2a9
|
@ -32,5 +32,7 @@ With that being said, it should work fairly well to provide a command line inter
|
|||
- **port scan to find offline (no call home) bridges on LAN**
|
||||
- see gif above for demonstration
|
||||
- config will automatically save when a bridge connection is established
|
||||
- **trigger firmware updates for bridge and lights manually**
|
||||
- e.g: `upgrade`
|
||||
---
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package cli
|
|||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/amimof/huego"
|
||||
|
@ -26,7 +27,11 @@ func cmdFirmwareUpdate(br *ziggy.Bridge, args []string) error {
|
|||
if resp, err = br.UpdateConfig(&huego.Config{SwUpdate2: huego.SwUpdate2{CheckForUpdate: true}}); err == nil {
|
||||
log.Info().Msgf("response: %v", resp)
|
||||
} else {
|
||||
log.Warn().Msgf("failed to issue update command: %v", err)
|
||||
if strings.Contains(err.Error(), "devicetype") {
|
||||
log.Debug().Msgf("non-consequential error response: %v", err)
|
||||
} else {
|
||||
log.Warn().Msgf("failed to issue update command: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
ctx, cancel := watchUpdateStatus(br, 5*time.Minute)
|
||||
|
|
|
@ -35,7 +35,7 @@ type Config struct {
|
|||
// SwUpdate contains information related to software updates. Deprecated in 1.20
|
||||
type SwUpdate struct {
|
||||
CheckForUpdate bool `json:"checkforupdate,omitempty"`
|
||||
DeviceTypes DeviceTypes `json:"devicetypes"`
|
||||
DeviceTypes DeviceTypes `json:"devicetypes,omitempty"`
|
||||
UpdateState uint8 `json:"updatestate,omitempty"`
|
||||
Notify bool `json:"notify,omitempty"`
|
||||
URL string `json:"url,omitempty"`
|
||||
|
|
Loading…
Reference in New Issue