|
|
|
@ -272,13 +272,25 @@ namespace IoTCenter.Controllers
|
|
|
|
|
|
|
|
|
|
public IActionResult NodeSwitchOn(string connectionId, string node)
|
|
|
|
|
{
|
|
|
|
|
this.Power(connectionId, new string[] { node }, "On", o => o.Name.Contains("开关"));
|
|
|
|
|
this.Power(connectionId, new string[] { node }, "On", o => o.Name.Contains("一路开关"));
|
|
|
|
|
return Json(ApiResponse.AsyncSuccess());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IActionResult NodeSwitchOff(string connectionId, string node)
|
|
|
|
|
{
|
|
|
|
|
this.Power(connectionId, new string[] { node }, "Off", o => o.Name.Contains("开关"));
|
|
|
|
|
this.Power(connectionId, new string[] { node }, "Off", o => o.Name.Contains("一路开关"));
|
|
|
|
|
return Json(ApiResponse.AsyncSuccess());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IActionResult NodeSwitch3On(string connectionId, string node)
|
|
|
|
|
{
|
|
|
|
|
this.Power(connectionId, new string[] { node }, "On", o => o.Name.Contains("三路开关"));
|
|
|
|
|
return Json(ApiResponse.AsyncSuccess());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IActionResult NodeSwitch3Off(string connectionId, string node)
|
|
|
|
|
{
|
|
|
|
|
this.Power(connectionId, new string[] { node }, "Off", o => o.Name.Contains("三路开关"));
|
|
|
|
|
return Json(ApiResponse.AsyncSuccess());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|