Former-commit-id: 6b97b4e71ecda7176392e2e5aab68d5cdded2ede
TangShanKaiPing
wanggang 6 years ago
parent ca9ac44450
commit 0690425149

@ -746,11 +746,6 @@ namespace FBeeService
}
else if (clusterId == ClusterId.alarm)
{
//0x0011有烟雾泄露且电压正常
//0x0010无烟雾泄露且电压正常
//0x0018无烟雾泄露且电压偏低
//0x0019有烟雾泄露电压偏低
device.Warning = BitConverter.ToInt16(props[0x0080]);
var bitArray = new BitArray(props[0x0080]);
device.IsWarning = bitArray[0];
@ -772,16 +767,29 @@ namespace FBeeService
}
else if (clusterId == ClusterId.voltage)
{
//device.Voltage = BitConverter.ToInt16(props[0x0020]);
//device.PM25 = BitConverter.ToInt16(props[0x0021]);
//device.PM10 = BitConverter.ToInt16(props[0x003e]);
device.Voltage = props[0x21][0] / 2f;
}
if (device.DeviceId == 0x0163)
{
if (props.ContainsKey(0x400a))
{
device.IRVersion = BitConverter.ToString((props[0x400a].Skip(3).Take(6).ToArray())).Replace("-", "").ToLower();
var irdata = props[0x400a];
if (irdata.Length == 10)
{
device.IRVersion = BitConverter.ToString((props[0x400a].Skip(3).Take(6).ToArray())).Replace("-", "").ToLower();
}
else
{
var irtype = BitConverter.ToInt16(irdata.Skip(9).Take(2).ToArray());
if (irtype == 0x0082)
{
var irDeviceType = irdata.Skip(11).First();
if (irDeviceType == 0x01)
{
var keyCode = BitConverter.ToInt16(irdata.Skip(12).Take(2).ToArray());
}
}
}
}
}
deviceRepo.SaveChanges();

@ -134,6 +134,11 @@
<label>开:<input name="power" type="radio" value="2" class="ajax" /></label>
<label>关:<input name="power" type="radio" value="1" class="ajax" /></label>
</fieldset>
</form>
<form action="/ir/control">
<input type="hidden" name="sn" value="@item.Sn" />
<input type="hidden" name="id" value="@item.IEEE" />
<input type="hidden" name="power" value="2" />
<fieldset>
<legend>模式</legend>
<label>制冷:<input name="pattern" type="radio" value="0" class="ajax" /></label>
@ -160,7 +165,7 @@
</fieldset>
</form>
<h2>电视:</h2>
<form action="/ir/control">
<form action="/ir/test">
<input type="hidden" name="sn" value="@item.Sn" />
<input type="hidden" name="id" value="@item.IEEE" />
<input type="hidden" name="type" value="2" />

Loading…
Cancel
Save