Update to network version 9.0.114

This commit is contained in:
2025-04-14 12:03:26 +02:00
parent 73d68d5ac1
commit bce4a5bdfd
16 changed files with 685 additions and 225 deletions

View File

@@ -27,20 +27,21 @@ type SettingRadioAi struct {
Key string `json:"key"`
AutoAdjustChannelsToCountry bool `json:"auto_adjust_channels_to_country"`
Channels6E []int `json:"channels_6e,omitempty"` // [1-9]|[1-2][0-9]|3[3-9]|[4-5][0-9]|6[0-1]|6[5-9]|[7-8][0-9]|9[0-3]|9[7-9]|1[0-1][0-9]|12[0-5]|129|1[3-4][0-9]|15[0-7]|16[1-9]|1[7-8][0-9]|19[3-9]|2[0-1][0-9]|22[0-1]|22[5-9]|233
ChannelsNa []int `json:"channels_na,omitempty"` // 34|36|38|40|42|44|46|48|52|56|60|64|100|104|108|112|116|120|124|128|132|136|140|144|149|153|157|161|165|169
ChannelsNg []int `json:"channels_ng,omitempty"` // 1|2|3|4|5|6|7|8|9|10|11|12|13|14
CronExpr string `json:"cron_expr,omitempty"`
Default bool `json:"default"`
Enabled bool `json:"enabled"`
ExcludeDevices []string `json:"exclude_devices,omitempty"` // ([0-9a-z]{2}:){5}[0-9a-z]{2}
HtModesNa []int `json:"ht_modes_na,omitempty"` // ^(20|40|80|160)$
HtModesNg []int `json:"ht_modes_ng,omitempty"` // ^(20|40)$
Optimize []string `json:"optimize,omitempty"` // channel|power
Radios []string `json:"radios,omitempty"` // na|ng
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
UseXy bool `json:"useXY"`
AutoAdjustChannelsToCountry bool `json:"auto_adjust_channels_to_country"`
Channels6E []int `json:"channels_6e,omitempty"` // [1-9]|[1-2][0-9]|3[3-9]|[4-5][0-9]|6[0-1]|6[5-9]|[7-8][0-9]|9[0-3]|9[7-9]|1[0-1][0-9]|12[0-5]|129|1[3-4][0-9]|15[0-7]|16[1-9]|1[7-8][0-9]|19[3-9]|2[0-1][0-9]|22[0-1]|22[5-9]|233
ChannelsBlacklist []SettingRadioAiChannelsBlacklist `json:"channels_blacklist,omitempty"`
ChannelsNa []int `json:"channels_na,omitempty"` // 34|36|38|40|42|44|46|48|52|56|60|64|100|104|108|112|116|120|124|128|132|136|140|144|149|153|157|161|165|169
ChannelsNg []int `json:"channels_ng,omitempty"` // 1|2|3|4|5|6|7|8|9|10|11|12|13|14
CronExpr string `json:"cron_expr,omitempty"`
Default bool `json:"default"`
Enabled bool `json:"enabled"`
ExcludeDevices []string `json:"exclude_devices,omitempty"` // ([0-9a-z]{2}:){5}[0-9a-z]{2}
HtModesNa []int `json:"ht_modes_na,omitempty"` // ^(20|40|80|160)$
HtModesNg []int `json:"ht_modes_ng,omitempty"` // ^(20|40)$
Optimize []string `json:"optimize,omitempty"` // channel|power
Radios []string `json:"radios,omitempty"` // na|ng
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
UseXy bool `json:"useXY"`
}
func (dst *SettingRadioAi) UnmarshalJSON(b []byte) error {
@@ -85,6 +86,33 @@ func (dst *SettingRadioAi) UnmarshalJSON(b []byte) error {
return nil
}
type SettingRadioAiChannelsBlacklist struct {
Channel int `json:"channel,omitempty"` // [1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-9]|2[0-1][0-9]|22[0-1]|22[5-9]|233
ChannelWidth int `json:"channel_width,omitempty"` // 20|40|80|160|240|320
Radio string `json:"radio,omitempty"` // na|ng|6e
}
func (dst *SettingRadioAiChannelsBlacklist) UnmarshalJSON(b []byte) error {
type Alias SettingRadioAiChannelsBlacklist
aux := &struct {
Channel emptyStringInt `json:"channel"`
ChannelWidth emptyStringInt `json:"channel_width"`
*Alias
}{
Alias: (*Alias)(dst),
}
err := json.Unmarshal(b, &aux)
if err != nil {
return fmt.Errorf("unable to unmarshal alias: %w", err)
}
dst.Channel = int(aux.Channel)
dst.ChannelWidth = int(aux.ChannelWidth)
return nil
}
func (c *Client) getSettingRadioAi(ctx context.Context, site string) (*SettingRadioAi, error) {
var respBody struct {
Meta meta `json:"meta"`