wxr
2024-05-07 f16fd06aa226e9f97a27858624d4ea7cf8975d25
HDL_ON/Entity/Function/Function.cs
@@ -76,7 +76,8 @@
                DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 当地时区
                return startTime.AddMilliseconds(Convert.ToDouble(time_stamp)).ToString("s");
            }
            catch {
            catch
            {
                return DateTime.MinValue.ToString("s");
            }
        }
@@ -455,7 +456,8 @@
        public bool collect = false;
        private bool _online;
        public bool online {
        public bool online
        {
            get
            {
                if (spk == SPK.AirSwitchP3|| spk == SPK.ElectricalTvHisense)
@@ -642,7 +644,8 @@
            new System.Threading.Thread(() =>
            {
                if (spk == SPK.GroupControl) {
                if (spk == SPK.GroupControl)
                {
                    var groupControl = FunctionList.List.groupControls.Find((obj) => obj.sid == sid);
                    if (collect)
                    {
@@ -672,7 +675,8 @@
                        collect = !collect;
                        IMessageCommon.Current.ShowErrorInfoAlter(result);
                    });
                } else
                }
                else
                {
                    Application.RunOnMainThread(() =>
                    {
@@ -927,7 +931,8 @@
                            continue;
                        }
                    }
                }else if (spk == SPK.GroupControl)
                }
                else if (spk == SPK.GroupControl)
                {
                    sFunc.type = "5";
                }
@@ -1046,15 +1051,25 @@
                            {
                                vv = 26;
                            }
                            sFunc.status.Add(new SceneFunctionStatus() {
                            sFunc.status.Add(new SceneFunctionStatus()
                            {
                                UintString = attr.unit,
                                key = attr.key, value = Convert.ToInt32(vv).ToString(), max = attr.max, min = attr.min }) ;
                                key = attr.key,
                                value = Convert.ToInt32(vv).ToString(),
                                max = attr.max,
                                min = attr.min
                            });
                        }
                        else
                        {
                            sFunc.status.Add(new SceneFunctionStatus() {
                            sFunc.status.Add(new SceneFunctionStatus()
                            {
                                UintString = attr.unit,
                                key = attr.key, value = attr.curValue.ToString(), max = attr.max, min = attr.min });
                                key = attr.key,
                                value = attr.curValue.ToString(),
                                max = attr.max,
                                min = attr.min
                            });
                        }
                        break;
                }
@@ -1707,7 +1722,8 @@
                try
                {
                    return Convert.ToByte(loopId, 16);
                } catch
                }
                catch
                {
                    return 0;
                }
@@ -1736,7 +1752,7 @@
        /// <summary>
        /// 大华摄像头
        /// </summary>
        //public const string IpCam_Imou = "security.ipcam.imou";
        public const string IpCam_Imou = "security.ipcam.imou";
        /// <summary>
        /// 机械手
        /// </summary>
@@ -1770,14 +1786,37 @@
        
        /// <summary>
        /// 猫眼(旧spk)
        /// </summary>
        public const string Peephole = "peephole";
        /// <summary>
        /// 猫眼(新spk 暂时没用)
        /// </summary>
        //public const string PeepholeEz = "security.peephole.ez";
        /// <summary>
        /// 萤石视频门锁
        /// </summary>
        public const string VideoDoorLock = "security.door.ezviz";
        /// <summary>
        /// 萤石摄像头
        /// </summary>
        public const string Ev_Ipcam = "security.ipcam.ez";
        /// <summary>
        /// 影音中控
        /// </summary>
        public const string AvZkAiks = "av.zk.aiks";
       
        /// <summary>
        /// 萤石视频门锁spk列表
        /// </summary>
        /// <returns></returns>
        public static List<string> GetVideoDoorLockSPKList()
        {
            var list = new List<string>();
            list.Add(VideoDoorLock);
            return list;
        }
      
      
        /// <summary>
@@ -1793,6 +1832,16 @@
            return list;
        }
        /// <summary>
        /// 萤石摄像头spk列表
        /// </summary>
        /// <returns></returns>
        public static List<string> GetEvIpcamSPKList()
        {
            var list = new List<string>();
            list.Add(Ev_Ipcam);
            return list;
        }
     
        #region 灯光
        /// <summary>
@@ -1961,6 +2010,14 @@
        #region 能源
        /// <summary>
        /// 逆变器
        /// </summary>
        public const string Inverter = "energy.inverter";
        /// <summary>
        /// 三相逆变器
        /// </summary>
        public const string InverterRst = "energy.inverter_rst";
        /// <summary>
        /// 能源模块
        /// </summary>
        public const string EnergyStandard = "energy.standard";