/// <summary> /// This will set the sensor's LoRa Tx power to ll dBs. /// </summary> private static async Task SetTxPower(string sensorId) { Console.WriteLine("Test /api/sensor/set-lora-tx-power"); Console.WriteLine("Set LoRa Tx Power to 11 (y/n)?"); string input = Console.ReadLine(); if (input == "y" || input == "Y") { try { // Sample JSON to send. Payload is between 1 and 30 inclusinve (integer) JObject json = new JObject { ["sensorId"] = sensorId, ["payload"] = 11 }; Console.WriteLine("Sending set LoRa Tx Power..."); await SensorApi.SetLoraTxPower(json.ToString()); Console.WriteLine("Set LoRa Tx Power sent" + "\n"); } catch (Exception ex) { Console.WriteLine("Method Error: " + ex.Message + "\n"); } } }