Import end devices (JSON) via console (RX1 delay = 1s)

I’m trying to import my devices via the console using this reference JSON File Reference | The Things Stack for LoRaWAN

[
  {
    "ids": {
      "device_id": "eui-aabbccddeeffaabb",
      "dev_eui": "aabbccddeeffaabb",
      "join_eui": "xxxxxxxxxxxxxxxx"
    },
    "name": "test 01",
    "lorawan_version": "MAC_V1_0_2",
    "lorawan_phy_version": "PHY_V1_0_2_REV_B",
    "frequency_plan_id": "EU_863_870",
    "supports_join": true,
    "root_keys": {
      "app_key": {
        "key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    },
    "mac_settings": {
      "rx1_delay": "1"
    }
  },
  {
    "ids": {
      "device_id": "eui-aa11bb22cc33dd44",
      "dev_eui": "aa11bb22cc33dd44",
      "join_eui": "xxxxxxxxxxxxxxxx"
    },
    "name": "test 02",
    "lorawan_version": "MAC_V1_0_2",
    "lorawan_phy_version": "PHY_V1_0_2_REV_B",
    "frequency_plan_id": "EU_863_870",
    "supports_join": true,
    "root_keys": {
      "app_key": {
        "key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    },
    "mac_settings": {
      "rx1_delay": "1"
    }
  }
]

It works, but I would like to set the RX1 delay = 1s. For some reason I keep getting 5s. I have also tried to use desired-rx1-delay = 1, but then I get the following error

{
  "code": 3,
  "message": "error:pkg/rpcmiddleware/validator:field_mask_paths (forbidden path(s) in field mask)",
  "details": [
    {
      "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
      "namespace": "pkg/rpcmiddleware/validator",
      "name": "field_mask_paths",
      "message_format": "forbidden path(s) in field mask",
      "attributes": {
        "forbidden_paths": [
          "mac_settings.desired-rx1-delay"
        ]
      },
      "correlation_id": "7e6a733d45fd428c85de2d5bfd10c3a8",
      "code": 3
    }
  ]
}

I know I can do it via CLI, but I would prefer if I could it working this way instead. Does anybody know why it is not working for me?

I think TTN v3 needs to make it easy for us to change rx1 delay. I’ve tried changing the desired-rx1-delay using the CLI but TTN v3 seems to ignore my setting and continue with a 5 sec rx1-delay. Is this a bug?

I managed to solve it by using desired.rx1_delay = 1 instead.

Nice. How did you override the option? I tried using the CLI but TTN v3 is not obeying the settings that I’ve made.

You can use this command for CLI

ttn-lw-cli end-devices set --mac-settings.desired-rx1-delay RX_DELAY_5

Thanks. Turned out my problem was diagnosed with other fault.