diff --git a/vendors/milesight-iot/gs-series/gs601/gs601-codec.json b/vendors/milesight-iot/gs-series/gs601/gs601-codec.json index e2a8822..16a0971 100644 --- a/vendors/milesight-iot/gs-series/gs601/gs601-codec.json +++ b/vendors/milesight-iot/gs-series/gs601/gs601-codec.json @@ -1,200 +1,1184 @@ { "version": "1.0.0", - "bytes": "", "object": [ { - "id": "tsl_version", - "name": "TSL Version", - "value": "", + "id": "alarm_deactivation_enable", + "name": "Threshold Alarm Release", + "value": "1", "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 6, - "bacnet_type": "character_string_value_object", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "product_name", - "name": "Product Name", - "value": "", + "id": "alarm_reporting_times", + "name": "Alarm Reporting Times", + "value": "1", "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 32, - "bacnet_type": "character_string_value_object", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 1000 + ], + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "product_pn", - "name": "Product PN", + "id": "buzzer", + "name": "Buzzer", "value": "", "unit": "", "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 32, - "bacnet_type": "character_string_value_object", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Normal" + }, + { + "value": 1, + "name": "Triggered" + } + ], + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "product_sn", - "name": "Product SN", - "value": "", + "id": "buzzer_button_stop_enable", + "name": "Stop Buzzer", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "version.hardware_version", - "name": "Hardware Version", - "value": "", + "id": "buzzer_enable", + "name": "Buzzer Enable", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 6, - "bacnet_type": "character_string_value_object", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "version.firmware_version", - "name": "Firmware Version", - "value": "", + "id": "buzzer_silent_time", + "name": "Buzzer Silence Time", + "value": "15", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 0, + 1440 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES" + }, + { + "id": "buzzer_sleep.item_1.enable", + "name": "Hibernate Period 1(Hibernate Period)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "buzzer_sleep.item_1.start_time", + "buzzer_sleep.item_1.end_time" + ] }, { - "id": "oem_id", - "name": "OEM ID", - "value": "", + "id": "buzzer_sleep.item_1.end_time", + "name": "End Time(Hibernate Period)", + "value": "480", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 0, + 1439 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "buzzer_sleep.item_1.enable", + "buzzer_sleep.item_1.start_time" + ] + }, + { + "id": "buzzer_sleep.item_1.start_time", + "name": "Start Time(Hibernate Period)", + "value": "420", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 0, + 1439 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "buzzer_sleep.item_1.enable", + "buzzer_sleep.item_1.end_time" + ] + }, + { + "id": "buzzer_sleep.item_2.enable", + "name": "Hibernate Period 2(Hibernate Period)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 2, - "bacnet_type": "character_string_value_object", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "buzzer_sleep.item_2.start_time", + "buzzer_sleep.item_2.end_time" + ] }, { - "id": "product_frequency_band", - "name": "Product Frequency Band", + "id": "buzzer_sleep.item_2.end_time", + "name": "End Time(Hibernate Period)", + "value": "1140", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 0, + 1439 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "buzzer_sleep.item_2.enable", + "buzzer_sleep.item_2.start_time" + ] + }, + { + "id": "buzzer_sleep.item_2.start_time", + "name": "Start Time(Hibernate Period)", + "value": "1080", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 0, + 1439 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "buzzer_sleep.item_2.enable", + "buzzer_sleep.item_2.end_time" + ] + }, + { + "id": "buzzer_sleep.type", + "name": "Number(Hibernate Period)", "value": "", "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "Hibernate Period" + }, + { + "value": 2, + "name": "Hibernate Period" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "celsius_temperature", + "name": "Celsius Temperature", + "value": "", + "unit": "°C", "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "daylight_saving_time.daylight_saving_time_offset", + "name": "DST Bias(Daylight Saving Time)", + "value": "60", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 0, + 120 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.enable", + "name": "Daylight Saving Time(Daylight Saving Time)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.end_hour_min", + "name": "Time(Daylight Saving Time)", + "value": "0", + "unit": "min", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT16", + "values": [ + { + "value": 0, + "name": "00:00" + }, + { + "value": 60, + "name": "01:00" + }, + { + "value": 120, + "name": "02:00" + }, + { + "value": 180, + "name": "03:00" + }, + { + "value": 240, + "name": "04:00" + }, + { + "value": 300, + "name": "05:00" + }, + { + "value": 360, + "name": "06:00" + }, + { + "value": 420, + "name": "07:00" + }, + { + "value": 480, + "name": "08:00" + }, + { + "value": 540, + "name": "09:00" + }, + { + "value": 600, + "name": "10:00" + }, + { + "value": 660, + "name": "11:00" + }, + { + "value": 720, + "name": "12:00" + }, + { + "value": 780, + "name": "13:00" + }, + { + "value": 840, + "name": "14:00" + }, + { + "value": 900, + "name": "15:00" + }, + { + "value": 960, + "name": "16:00" + }, + { + "value": 1020, + "name": "17:00" + }, + { + "value": 1080, + "name": "18:00" + }, + { + "value": 1140, + "name": "19:00" + }, + { + "value": 1200, + "name": "20:00" + }, + { + "value": 1260, + "name": "21:00" + }, + { + "value": 1320, + "name": "22:00" + }, + { + "value": 1380, + "name": "23:00" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day" + ] + }, + { + "id": "daylight_saving_time.end_month", + "name": "Month(Daylight Saving Time)", + "value": "11", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "Jan." + }, + { + "value": 2, + "name": "Feb." + }, + { + "value": 3, + "name": "Mar." + }, + { + "value": 4, + "name": "Apr." + }, + { + "value": 5, + "name": "May" + }, + { + "value": 6, + "name": "Jun." + }, + { + "value": 7, + "name": "Jul." + }, + { + "value": 8, + "name": "Aug." + }, + { + "value": 9, + "name": "Sep." + }, + { + "value": 10, + "name": "Oct." + }, + { + "value": 11, + "name": "Nov." + }, + { + "value": 12, + "name": "Dec." + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.end_week_day", + "name": "Week(Daylight Saving Time)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "Mon." + }, + { + "value": 2, + "name": "Tues." + }, + { + "value": 3, + "name": "Wed." + }, + { + "value": 4, + "name": "Thurs." + }, + { + "value": 5, + "name": "Fri." + }, + { + "value": 6, + "name": "Sat." + }, + { + "value": 7, + "name": "Sun." + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.end_week_num", + "name": "Number of Week(Daylight Saving Time)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "1st" + }, + { + "value": 2, + "name": "2nd" + }, + { + "value": 3, + "name": "3rd" + }, + { + "value": 4, + "name": "4th" + }, + { + "value": 5, + "name": "last" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.start_hour_min", + "name": "Time(Daylight Saving Time)", + "value": "0", + "unit": "min", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT16", + "values": [ + { + "value": 0, + "name": "00:00" + }, + { + "value": 60, + "name": "01:00" + }, + { + "value": 120, + "name": "02:00" + }, + { + "value": 180, + "name": "03:00" + }, + { + "value": 240, + "name": "04:00" + }, + { + "value": 300, + "name": "05:00" + }, + { + "value": 360, + "name": "06:00" + }, + { + "value": 420, + "name": "07:00" + }, + { + "value": 480, + "name": "08:00" + }, + { + "value": 540, + "name": "09:00" + }, + { + "value": 600, + "name": "10:00" + }, + { + "value": 660, + "name": "11:00" + }, + { + "value": 720, + "name": "12:00" + }, + { + "value": 780, + "name": "13:00" + }, + { + "value": 840, + "name": "14:00" + }, + { + "value": 900, + "name": "15:00" + }, + { + "value": 960, + "name": "16:00" + }, + { + "value": 1020, + "name": "17:00" + }, + { + "value": 1080, + "name": "18:00" + }, + { + "value": 1140, + "name": "19:00" + }, + { + "value": 1200, + "name": "20:00" + }, + { + "value": 1260, + "name": "21:00" + }, + { + "value": 1320, + "name": "22:00" + }, + { + "value": 1380, + "name": "23:00" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.start_month", + "name": "Month(Daylight Saving Time)", + "value": "3", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "Jan." + }, + { + "value": 2, + "name": "Feb." + }, + { + "value": 3, + "name": "Mar." + }, + { + "value": 4, + "name": "Apr." + }, + { + "value": 5, + "name": "May" + }, + { + "value": 6, + "name": "Jun." + }, + { + "value": 7, + "name": "Jul." + }, + { + "value": 8, + "name": "Aug." + }, + { + "value": 9, + "name": "Sep." + }, + { + "value": 10, + "name": "Oct." + }, + { + "value": 11, + "name": "Nov." + }, + { + "value": 12, + "name": "Dec." + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.start_week_day", + "name": "Week(Daylight Saving Time)", + "value": "7", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "Mon." + }, + { + "value": 2, + "name": "Tues." + }, + { + "value": 3, + "name": "Wed." + }, + { + "value": 4, + "name": "Thurs." + }, + { + "value": 5, + "name": "Fri." + }, + { + "value": 6, + "name": "Sat." + }, + { + "value": 7, + "name": "Sun." + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.start_week_num", + "name": "Number of Week(Daylight Saving Time)", + "value": "2", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "1st" + }, + { + "value": 2, + "name": "2nd" + }, + { + "value": 3, + "name": "3rd" + }, + { + "value": 4, + "name": "4th" + }, + { + "value": 5, + "name": "last" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] }, { "id": "device_status", "name": "Device Status", + "value": "1", + "unit": "", + "access_mode": "R", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Off" + }, + { + "value": 1, + "name": "On" + } + ], + "bacnet_type": "binary_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "execute_tvoc_self_clean", + "name": "TVOC Self-Cleaning", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "fahrenheit_temperature", + "name": "Fahrenheit Temperature", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "humidity", + "name": "Humidity", + "value": "", + "unit": "%", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 100 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT" + }, + { + "id": "humidity_alarm.type", + "name": "Alarm Type(Humidity Alarm)", "value": "", "unit": "", "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "off" }, - { "value": 1, "name": "on" } + { + "value": 0, + "name": "Humidity Collection Error" + }, + { + "value": 1, + "name": "Humidity Out of The Low Range" + }, + { + "value": 2, + "name": "Humidity Out of The High Range" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "humidity_calibration_settings.calibration_value", + "name": "Calibration Value(Humidity Calibration Settings)", + "value": "0", + "unit": "%", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -100, + 100 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [ + "humidity_calibration_settings.enable" + ] + }, + { + "id": "humidity_calibration_settings.enable", + "name": "Humidity Calibration(Humidity Calibration Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "humidity_calibration_settings.calibration_value" + ] + }, + { + "id": "led_status", + "name": "LED Indicator", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "lorawan_class", - "name": "LoRaWAN Class Type", - "value": "", + "id": "lorawan_configuration_settings.mode", + "name": "LoRaWAN Work Mode(LoRaWAN Settings)", + "value": "0", "unit": "", - "access_mode": "R", + "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "Class A" }, - { "value": 1, "name": "Class B" }, - { "value": 2, "name": "Class C" }, - { "value": 3, "name": "Class CtoB" } + { + "value": 0, + "name": "ClassA" + }, + { + "value": 1, + "name": "ClassB" + }, + { + "value": 2, + "name": "ClassC" + }, + { + "value": 3, + "name": "ClassC to B" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "battery", - "name": "Battery", - "value": "100", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "vaping_index", - "name": "Vaping Index", + "id": "occupancy_status", + "name": "Occupancy Status", "value": "", "unit": "", "access_mode": "R", - "data_type": "NUMBER", + "data_type": "ENUM", "value_type": "UINT8", - "range": [0, 100], - "bacnet_type": "analog_input_object", + "values": [ + { + "value": 0, + "name": "vacant" + }, + { + "value": 1, + "name": "occuppied" + } + ], + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "vaping_index_alarm.type", - "name": "Vaping Index Alarm (Type)", + "id": "oem_id", + "name": "OEM ID", "value": "", "unit": "", - "access_mode": "R", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "collection error" }, - { "value": 1, "name": "lower range error" }, - { "value": 2, "name": "over range error" }, - { "value": 16, "name": "alarm deactivation" }, - { "value": 17, "name": "alarm trigger" }, - { "value": 32, "name": "interference alarm deactivation" }, - { "value": 33, "name": "interference alarm trigger" } - ], - "bacnet_type": "multistate_value_object", + "access_mode": "RW", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "vaping_index_alarm.vaping_index", - "name": "Vaping Index Alarm (Vaping Index)", + "id": "pm_sensor_working_time", + "name": "PM Sensor Working Time", "value": "", "unit": "", "access_mode": "R", "data_type": "NUMBER", "value_type": "UINT8", - "range": [0, 100], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" @@ -207,87 +1191,200 @@ "access_mode": "R", "data_type": "NUMBER", "value_type": "UINT16", - "range": [0, 1000], + "range": [ + 0, + 1000 + ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 219, "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER" }, { - "id": "pm1_0_alarm.type", - "name": "PM1.0 Alarm (Type)", + "id": "pm1_0_alarm_settings.enable", + "name": "PM1.0 Threshold Alarm(PM1.0 Threshold Alarm)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pm1_0_alarm_settings.threshold_condition", + "pm1_0_alarm_settings.threshold_min", + "pm1_0_alarm_settings.threshold_max" + ] + }, + { + "id": "pm1_0_alarm_settings.threshold_condition", + "name": "Threshold Condition(PM1.0 Threshold Alarm)", "value": "", "unit": "", - "access_mode": "R", + "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "collection error" }, - { "value": 1, "name": "lower range error" }, - { "value": 2, "name": "over range error" }, - { "value": 16, "name": "alarm deactivation" }, - { "value": 17, "name": "alarm trigger" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "condition: xB" + }, + { + "value": 3, + "name": "condition: AB" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pm1_0_alarm_settings.enable", + "pm1_0_alarm_settings.threshold_min", + "pm1_0_alarm_settings.threshold_max" + ] }, { - "id": "pm1_0_alarm.pm1_0", - "name": "PM1.0 Alarm (PM1.0)", - "value": "", + "id": "pm1_0_alarm_settings.threshold_max", + "name": "Over(PM1.0 Threshold Alarm)", + "value": "0", "unit": "µg/m³", - "access_mode": "R", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT16", - "range": [0, 1000], - "bacnet_type": "analog_input_object", + "range": [ + 0, + 1000 + ], + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER" + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "pm1_0_alarm_settings.enable", + "pm1_0_alarm_settings.threshold_condition", + "pm1_0_alarm_settings.threshold_min" + ] }, { - "id": "pm2_5", - "name": "PM2.5", - "value": "", + "id": "pm1_0_alarm_settings.threshold_min", + "name": "Value A(PM1.0 Threshold Alarm)", + "value": "0", "unit": "µg/m³", - "access_mode": "R", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT16", - "range": [0, 1000], - "bacnet_type": "analog_input_object", + "range": [ + 0, + 1000 + ], + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER" + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "pm1_0_alarm_settings.enable", + "pm1_0_alarm_settings.threshold_condition", + "pm1_0_alarm_settings.threshold_max" + ] }, { - "id": "pm2_5_alarm.type", - "name": "PM2.5 Alarm (Type)", + "id": "pm1_0_alarm.type", + "name": "Alarm Type(PM1.0 Alarm)", "value": "", "unit": "", "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "collection error" }, - { "value": 1, "name": "lower range error" }, - { "value": 2, "name": "over range error" }, - { "value": 16, "name": "alarm deactivation" }, - { "value": 17, "name": "alarm trigger" } + { + "value": 0, + "name": "Collection Error" + }, + { + "value": 1, + "name": "Out of The Low Range" + }, + { + "value": 2, + "name": "Out of The High Range" + }, + { + "value": 16, + "name": "Threshold Alarm Release" + }, + { + "value": 17, + "name": "PM1.0 Threshold Alarm" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "pm2_5_alarm.pm2_5", - "name": "PM2.5 Alarm (PM2.5)", - "value": "", + "id": "pm1_0_calibration_settings.calibration_value", + "name": "Calibration Value(PM1.0 Calibration Settings)", + "value": "0", "unit": "µg/m³", - "access_mode": "R", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", - "range": [0, 1000], - "bacnet_type": "analog_input_object", + "value_type": "INT16", + "range": [ + -1000, + 1000 + ], + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER" + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "pm1_0_calibration_settings.enable" + ] + }, + { + "id": "pm1_0_calibration_settings.enable", + "name": "PM1.0 Calibration(PM1.0 Calibration Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pm1_0_calibration_settings.calibration_value" + ] }, { "id": "pm10", @@ -297,1263 +1394,1982 @@ "access_mode": "R", "data_type": "NUMBER", "value_type": "UINT16", - "range": [0, 1000], + "range": [ + 0, + 1000 + ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 219, "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER" }, { - "id": "pm10_alarm.type", - "name": "PM10 Alarm (Type)", + "id": "pm10_alarm_settings.enable", + "name": "PM10 Threshold Alarm(PM10 Threshold Alarm)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pm10_alarm_settings.threshold_condition", + "pm10_alarm_settings.threshold_min", + "pm10_alarm_settings.threshold_max" + ] + }, + { + "id": "pm10_alarm_settings.threshold_condition", + "name": "Threshold Condition(PM10 Threshold Alarm)", "value": "", "unit": "", - "access_mode": "R", + "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "collection error" }, - { "value": 1, "name": "lower range error" }, - { "value": 2, "name": "over range error" }, - { "value": 16, "name": "alarm deactivation" }, - { "value": 17, "name": "alarm trigger" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "condition: xB" + }, + { + "value": 3, + "name": "condition: AB" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pm10_alarm_settings.enable", + "pm10_alarm_settings.threshold_min", + "pm10_alarm_settings.threshold_max" + ] }, { - "id": "pm10_alarm.pm10", - "name": "PM10 Alarm (PM10)", - "value": "", + "id": "pm10_alarm_settings.threshold_max", + "name": "Over(PM10 Threshold Alarm)", + "value": "0", "unit": "µg/m³", - "access_mode": "R", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT16", - "range": [0, 1000], - "bacnet_type": "analog_input_object", + "range": [ + 0, + 1000 + ], + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER" + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "pm10_alarm_settings.enable", + "pm10_alarm_settings.threshold_condition", + "pm10_alarm_settings.threshold_min" + ] }, { - "id": "temperature", - "name": "Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", + "id": "pm10_alarm_settings.threshold_min", + "name": "Value A(PM10 Threshold Alarm)", + "value": "0", + "unit": "µg/m³", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [-20.0, 60.0], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "value_type": "UINT16", + "range": [ + 0, + 1000 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 219, + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "pm10_alarm_settings.enable", + "pm10_alarm_settings.threshold_condition", + "pm10_alarm_settings.threshold_max" + ] }, { - "id": "temperature_alarm.type", - "name": "Temperature Alarm (Type)", + "id": "pm10_alarm.type", + "name": "Alarm Type(PM10 Alarm)", "value": "", "unit": "", "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "collection error" }, - { "value": 1, "name": "lower range error" }, - { "value": 2, "name": "over range error" }, - { "value": 16, "name": "alarm deactivation" }, - { "value": 17, "name": "alarm trigger" }, - { "value": 32, "name": "burning alarm deactivation" }, - { "value": 33, "name": "burning alarm trigger" } + { + "value": 0, + "name": "Collection Error" + }, + { + "value": 1, + "name": "Out of The Low Range" + }, + { + "value": 2, + "name": "Out of The High Range" + }, + { + "value": 16, + "name": "Threshold Alarm Release" + }, + { + "value": 17, + "name": "Threshold Alarm" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "temperature_alarm.temperature", - "name": "Temperature Alarm (Temperature)", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [-20.0, 60.0], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "humidity", - "name": "Humidity", - "value": "", - "unit": "%", - "access_mode": "R", + "id": "pm10_calibration_settings.calibration_value", + "name": "Calibration Value(PM10 Calibration Settings)", + "value": "0", + "unit": "µg/m³", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [0.0, 100.0], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT" + "value_type": "INT16", + "range": [ + -1000, + 1000 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 219, + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "pm10_calibration_settings.enable" + ] }, { - "id": "humidity_alarm.type", - "name": "Humidity Alarm (Type)", - "value": "", + "id": "pm10_calibration_settings.enable", + "name": "PM10 Calibration(PM10 Calibration Settings)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "collection error" }, - { "value": 1, "name": "lower range error" }, - { "value": 2, "name": "over range error" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pm10_calibration_settings.calibration_value" + ] }, { - "id": "tvoc", - "name": "TVOC", + "id": "pm2_5", + "name": "PM2.5", "value": "", "unit": "µg/m³", "access_mode": "R", "data_type": "NUMBER", "value_type": "UINT16", - "range": [0, 2000], + "range": [ + 0, + 1000 + ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 219, "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER" }, { - "id": "tvoc_alarm.type", - "name": "TVOC Alarm (Type)", + "id": "pm2_5_alarm_settings.enable", + "name": "PM2.5 Threshold Alarm(PM2.5 Threshold Alarm)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pm2_5_alarm_settings.threshold_condition", + "pm2_5_alarm_settings.threshold_min", + "pm2_5_alarm_settings.threshold_max" + ] + }, + { + "id": "pm2_5_alarm_settings.threshold_condition", + "name": "Threshold Condition(PM2.5 Threshold Alarm)", "value": "", "unit": "", - "access_mode": "R", + "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "collection error" }, - { "value": 1, "name": "lower range error" }, - { "value": 2, "name": "over range error" }, - { "value": 16, "name": "alarm deactivation" }, - { "value": 17, "name": "alarm trigger" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "condition: xB" + }, + { + "value": 3, + "name": "condition: AB" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pm2_5_alarm_settings.enable", + "pm2_5_alarm_settings.threshold_min", + "pm2_5_alarm_settings.threshold_max" + ] }, { - "id": "tvoc_alarm.tvoc", - "name": "TVOC Alarm (TVOC)", - "value": "", + "id": "pm2_5_alarm_settings.threshold_max", + "name": "Over(PM2.5 Threshold Alarm)", + "value": "0", "unit": "µg/m³", - "access_mode": "R", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT16", - "range": [0, 2000], - "bacnet_type": "analog_input_object", + "range": [ + 0, + 1000 + ], + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER" + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "pm2_5_alarm_settings.enable", + "pm2_5_alarm_settings.threshold_condition", + "pm2_5_alarm_settings.threshold_min" + ] }, { - "id": "tamper_status", - "name": "Tamper Status", + "id": "pm2_5_alarm_settings.threshold_min", + "name": "Value A(PM2.5 Threshold Alarm)", + "value": "0", + "unit": "µg/m³", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 0, + 1000 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 219, + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "pm2_5_alarm_settings.enable", + "pm2_5_alarm_settings.threshold_condition", + "pm2_5_alarm_settings.threshold_max" + ] + }, + { + "id": "pm2_5_alarm.type", + "name": "Alarm Type(PM2.5 Alarm)", "value": "", "unit": "", "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "name": "normal", "value": 0 }, - { "name": "triggered", "value": 1 } + { + "value": 0, + "name": "Collection Error" + }, + { + "value": 1, + "name": "Out of The Low Range" + }, + { + "value": 2, + "name": "Out of The High Range" + }, + { + "value": 16, + "name": "Threshold Alarm Release" + }, + { + "value": 17, + "name": "PM2.5 Threshold Alarm" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "pm2_5_calibration_settings.calibration_value", + "name": "Calibration Value(PM2.5 Calibration Settings)", + "value": "0", + "unit": "µg/m³", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "INT16", + "range": [ + -1000, + 1000 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 219, + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "pm2_5_calibration_settings.enable" + ] }, { - "id": "tamper_status_alarm.type", - "name": "Tamper Status Alarm (Type)", - "value": "", + "id": "pm2_5_calibration_settings.enable", + "name": "PM2.5 Calibration(PM2.5 Calibration Settings)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 32, "name": "alarm deactivation" }, - { "value": 33, "name": "alarm trigger" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pm2_5_calibration_settings.calibration_value" + ] }, { - "id": "buzzer", - "name": "Buzzer", + "id": "product_sn", + "name": "SN", "value": "", "unit": "", "access_mode": "R", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { "name": "normal", "value": 0 }, - { "name": "triggered", "value": 1 } - ], - "bacnet_type": "multistate_value_object", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 16, + "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "occupancy_status", - "name": "Occupancy Status", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "id": "query_device_status", + "name": "Query Device Status", + "access_mode": "W", + "data_type": "BOOL", "value_type": "UINT8", - "values": [ - { "name": "vacant", "value": 0 }, - { "name": "occupied", "value": 1 } - ], - "bacnet_type": "multistate_value_object", + "unit": "", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] }, { - "id": "reporting_interval.unit", - "name": "Reporting Interval Unit", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", + "id": "reboot", + "name": "Reboot", + "access_mode": "W", + "data_type": "BOOL", "value_type": "UINT8", - "values": [ - { "name": "second", "value": 0 }, - { "name": "minute", "value": 1 } - ], - "bacnet_type": "multistate_value_object", + "unit": "", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] }, { - "id": "reporting_interval.seconds_of_time", - "name": "Reporting Interval", - "value": "600", - "unit": "s", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "range": [10, 64800], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": ["reporting_interval.unit"] + "id": "reconnect", + "name": "Network Reconnection", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] }, { "id": "reporting_interval.minutes_of_time", - "name": "Reporting Interval", + "name": "Reporting Interval(Reporting Interval)", "value": "10", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT16", - "range": [1, 1440], + "range": [ + 1, + 1440 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 72, "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["reporting_interval.unit"] + "reference": [ + "reporting_interval.unit" + ] }, { - "id": "temperature_unit", - "name": "Temperature Unit", - "value": "0", + "id": "reporting_interval.seconds_of_time", + "name": "Reporting Interval(Reporting Interval)", + "value": "600", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 10, + 64800 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "reporting_interval.unit" + ] + }, + { + "id": "reporting_interval.unit", + "name": "Reporting Interval Unit(Reporting Interval)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "name": "celsius", "value": 0 }, - { "name": "fahrenheit", "value": 1 } + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "led_status", - "name": "LED Indicator", + "id": "stop_buzzer_alarm", + "name": "Stop Buzzer", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "synchronize_time", + "name": "Time Synchronize", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "tamper_alarm_enable", + "name": "Tampering Alarm Enable", "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "buzzer_enable", - "name": "Buzzer Enable", - "value": "0", + "id": "tamper_status", + "name": "Tamper Status", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 0, + "name": "Normal" + }, + { + "value": 1, + "name": "Triggered" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "buzzer_sleep.item_1.enable", - "name": "Hibernate Period 1 (Enable)", - "value": "0", + "id": "tamper_status_alarm.type", + "name": "Alarm Type(Tamper Status)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 32, + "name": "Normal" + }, + { + "value": 33, + "name": "Triggered" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["buzzer_sleep.item_1.start_time", "buzzer_sleep.item_1.end_time"] + "reference": [] }, { - "id": "buzzer_sleep.item_1.start_time", - "name": "Hibernate Period 1 (Start Time)", - "value": "420", - "unit": "min", + "id": "temperature", + "name": "Temperature", + "value": "", + "unit": "°C", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "temperature_alarm_settings.celsius_threshold_max", + "name": "Celsius Value B(Temperature Threshold Alarm)", + "value": "0", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", - "range": [0, 1439], + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["buzzer_sleep.item_1.enable", "buzzer_sleep.item_1.end_time"] + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" + ] }, { - "id": "buzzer_sleep.item_1.end_time", - "name": "Hibernate Period 1 (End Time)", - "value": "480", - "unit": "min", + "id": "temperature_alarm_settings.celsius_threshold_min", + "name": "Celsius Value A(Temperature Threshold Alarm)", + "value": "0", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", - "range": [0, 1439], + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["buzzer_sleep.item_1.enable", "buzzer_sleep.item_1.start_time"] + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" + ] }, { - "id": "buzzer_sleep.item_2.enable", - "name": "Hibernate Period 2", + "id": "temperature_alarm_settings.enable", + "name": "Temperature Threshold Alarm(Temperature Threshold Alarm)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["buzzer_sleep.item_2.start_time", "buzzer_sleep.item_2.end_time"] + "reference": [ + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min", + "temperature_alarm_settings.threshold_max" + ] }, { - "id": "buzzer_sleep.item_2.start_time", - "name": "Start Time", - "value": "1080", - "unit": "min", + "id": "temperature_alarm_settings.fahrenheit_threshold_max", + "name": "Fahrenheit Value B(Temperature Threshold Alarm)", + "value": "32", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", - "range": [0, 1439], + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["buzzer_sleep.item_2.enable", "buzzer_sleep.item_2.end_time"] - }, - { - "id": "buzzer_sleep.item_2.end_time", - "name": "End Time", - "value": "1140", - "unit": "min", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" + ] + }, + { + "id": "temperature_alarm_settings.fahrenheit_threshold_min", + "name": "Fahrenheit Value A(Temperature Threshold Alarm)", + "value": "32", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", - "range": [0, 1439], + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["buzzer_sleep.item_2.enable", "buzzer_sleep.item_2.start_time"] + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" + ] }, { - "id": "buzzer_button_stop_enable", - "name": "Stop Buzzer", + "id": "temperature_alarm_settings.threshold_condition", + "name": "Threshold Condition(Temperature Threshold Alarm)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "condition: xB" + }, + { + "value": 3, + "name": "condition: AB" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_min", + "temperature_alarm_settings.threshold_max" + ] }, { - "id": "buzzer_silent_time", - "name": "Buzzer Silence Time", - "value": "15", - "unit": "min", + "id": "temperature_alarm_settings.threshold_max", + "name": "Value B(Temperature Threshold Alarm)", + "value": "0", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", - "range": [0, 1440], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES" - }, - { - "id": "tamper_alarm_enable", - "name": "Tampering Alarm Enable", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + "value_type": "FLOAT", + "range": [ + -20, + 60 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" + ] }, { - "id": "temperature_alarm_settings.enable", - "name": "Temperature Threshold Alarm", + "id": "temperature_alarm_settings.threshold_min", + "name": "Value A(Temperature Threshold Alarm)", "value": "0", - "unit": "", + "unit": "°C", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["temperature_alarm_settings.condition", "temperature_alarm_settings.threshold_min", "temperature_alarm_settings.threshold_max"] + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" + ] }, { - "id": "temperature_alarm_settings.condition", - "name": "Temperature Alarm Settings (Threshold Condition)", - "value": "0", + "id": "temperature_alarm.type", + "name": "Alarm Type(Temperature Alarm)", + "value": "", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "below", "value": 1 }, - { "name": "above", "value": 2 }, - { "name": "between", "value": 3 }, - { "name": "outside", "value": 4 } + { + "value": 0, + "name": "Collection Error" + }, + { + "value": 1, + "name": "Out of The Low Range" + }, + { + "value": 2, + "name": "Out of The High Range" + }, + { + "value": 16, + "name": "Threshold Alarm Release" + }, + { + "value": 17, + "name": "Threshold Alarm" + }, + { + "value": 32, + "name": "Burning alarm Release" + }, + { + "value": 33, + "name": "Burning Alarm" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["temperature_alarm_settings.enable", "temperature_alarm_settings.threshold_min", "temperature_alarm_settings.threshold_max"] + "reference": [] }, { - "id": "temperature_alarm_settings.threshold_min", - "name": "Temperature Alarm Settings (Threshold Min)", + "id": "temperature_calibration_settings.calibration_value", + "name": "Calibration Value(Temperature Calibration Settings)", "value": "0", "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", - "range": [-20.0, 60.0], + "range": [ + -80, + 80 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["temperature_alarm_settings.enable", "temperature_alarm_settings.condition", "temperature_alarm_settings.threshold_max"] + "reference": [ + "temperature_calibration_settings.enable" + ] }, { - "id": "temperature_alarm_settings.threshold_max", - "name": "Temperature Alarm Settings (Threshold Max)", + "id": "temperature_calibration_settings.celsius_calibration_value", + "name": "Celsius Calibration Value(Temperature Calibration Settings)", "value": "0", "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", - "range": [-20.0, 60.0], + "range": [ + -80, + 80 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["temperature_alarm_settings.enable", "temperature_alarm_settings.condition", "temperature_alarm_settings.threshold_min"] + "reference": [ + "temperature_calibration_settings.enable" + ] }, { - "id": "pm1_0_alarm_settings.enable", - "name": "PM1.0 Alarm Settings (Enable)", + "id": "temperature_calibration_settings.enable", + "name": "Temperature Calibration(Temperature Calibration Settings)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pm1_0_alarm_settings.enable", "pm1_0_alarm_settings.threshold_max"] + "reference": [ + "temperature_calibration_settings.calibration_value" + ] }, { - "id": "pm1_0_alarm_settings.threshold_max", - "name": "PM1.0 Alarm Settings (Threshold Max)", - "value": "0", - "unit": "µg/m³", + "id": "temperature_calibration_settings.fahrenheit_calibration_value", + "name": "Fahrenheit Calibration Value(Temperature Calibration Settings)", + "value": "32", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", - "range": [0, 1000], + "value_type": "FLOAT", + "range": [ + -112, + 176 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", - "reference": ["pm1_0_alarm_settings.enable", "pm1_0_alarm_settings.threshold_max"] + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_calibration_settings.enable" + ] }, { - "id": "pm2_5_alarm_settings.enable", - "name": "PM2.5 Threshold Alarm", + "id": "temperature_unit", + "name": "Temperature Unit", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 0, + "name": "℃" + }, + { + "value": 1, + "name": "℉" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pm2_5_alarm_settings.enable", "pm2_5_alarm_settings.threshold_max"] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "pm2_5_alarm_settings.threshold_max", - "name": "PM2.5 Alarm Settings (Threshold Max)", + "id": "time_zone", + "name": "Time Zone", "value": "0", - "unit": "µg/m³", + "unit": "min", "access_mode": "RW", + "data_type": "ENUM", + "value_type": "INT16", + "values": [ + { + "value": -720, + "name": "UTC-12(IDLW)" + }, + { + "value": -660, + "name": "UTC-11(SST)" + }, + { + "value": -600, + "name": "UTC-10(HST)" + }, + { + "value": -570, + "name": "UTC-9:30(MIT)" + }, + { + "value": -540, + "name": "UTC-9(AKST)" + }, + { + "value": -480, + "name": "UTC-8(PST)" + }, + { + "value": -420, + "name": "UTC-7(MST)" + }, + { + "value": -360, + "name": "UTC-6(CST)" + }, + { + "value": -300, + "name": "UTC-5(EST)" + }, + { + "value": -240, + "name": "UTC-4(AST)" + }, + { + "value": -210, + "name": "UTC-3:30(NST)" + }, + { + "value": -180, + "name": "UTC-3(BRT)" + }, + { + "value": -120, + "name": "UTC-2(FNT)" + }, + { + "value": -60, + "name": "UTC-1(CVT)" + }, + { + "value": 0, + "name": "UTC(WET)" + }, + { + "value": 60, + "name": "UTC+1(CET)" + }, + { + "value": 120, + "name": "UTC+2(EET)" + }, + { + "value": 180, + "name": "UTC+3(MSK)" + }, + { + "value": 210, + "name": "UTC+3:30(IRST)" + }, + { + "value": 240, + "name": "UTC+4(GST)" + }, + { + "value": 270, + "name": "UTC+4:30(AFT)" + }, + { + "value": 300, + "name": "UTC+5(PKT)" + }, + { + "value": 330, + "name": "UTC+5:30(IST)" + }, + { + "value": 345, + "name": "UTC+5:45(NPT)" + }, + { + "value": 360, + "name": "UTC+6(BHT)" + }, + { + "value": 390, + "name": "UTC+6:30(MMT)" + }, + { + "value": 420, + "name": "UTC+7(ICT)" + }, + { + "value": 480, + "name": "UTC+8(CT/CST)" + }, + { + "value": 540, + "name": "UTC+9(JST)" + }, + { + "value": 570, + "name": "UTC+9:30(ACST)" + }, + { + "value": 600, + "name": "UTC+10(AEST)" + }, + { + "value": 630, + "name": "UTC+10:30(LHST)" + }, + { + "value": 660, + "name": "UTC+11(VUT)" + }, + { + "value": 720, + "name": "UTC+12(NZST)" + }, + { + "value": 765, + "name": "UTC+12:45(CHAST)" + }, + { + "value": 780, + "name": "UTC+13(PHOT)" + }, + { + "value": 840, + "name": "UTC+14(LINT)" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES" + }, + { + "id": "tsl_version", + "name": "TSL Version", + "value": "", + "unit": "", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "tvoc", + "name": "TVOC", + "value": "", + "unit": "µg/m³", + "access_mode": "R", "data_type": "NUMBER", "value_type": "UINT16", - "range": [0, 1000], - "bacnet_type": "analog_value_object", + "range": [ + 0, + 2000 + ], + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", - "reference": ["pm2_5_alarm_settings.enable", "pm2_5_alarm_settings.threshold_max"] + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER" }, { - "id": "pm10_alarm_settings.enable", - "name": "PM10 Threshold Alarm", + "id": "tvoc_alarm_settings.enable", + "name": "TVOC Threshold Alarm(TVOC Threshold Alarm)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pm10_alarm_settings.enable", "pm10_alarm_settings.threshold_max"] + "reference": [ + "tvoc_alarm_settings.threshold_condition", + "tvoc_alarm_settings.threshold_min", + "tvoc_alarm_settings.threshold_max" + ] }, { - "id": "pm10_alarm_settings.threshold_max", - "name": "PM10 Alarm Settings (Threshold Max)", + "id": "tvoc_alarm_settings.threshold_condition", + "name": "Threshold Condition(TVOC Threshold Alarm)", + "value": "", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "condition: xB" + }, + { + "value": 3, + "name": "condition: AB" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_alarm_settings.enable", + "tvoc_alarm_settings.threshold_min", + "tvoc_alarm_settings.threshold_max" + ] + }, + { + "id": "tvoc_alarm_settings.threshold_max", + "name": "Over(TVOC Threshold Alarm)", "value": "0", "unit": "µg/m³", "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT16", - "range": [0, 1000], + "range": [ + 0, + 2000 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 219, "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", - "reference": ["pm10_alarm_settings.enable", "pm10_alarm_settings.threshold_max"] + "reference": [ + "tvoc_alarm_settings.enable", + "tvoc_alarm_settings.threshold_condition", + "tvoc_alarm_settings.threshold_min" + ] }, { - "id": "tvoc_alarm_settings.enable", - "name": "TVOC Threshold Alarm", + "id": "tvoc_alarm_settings.threshold_min", + "name": "Value A(TVOC Threshold Alarm)", "value": "0", - "unit": "", + "unit": "µg/m³", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 0, + 2000 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 219, + "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", + "reference": [ + "tvoc_alarm_settings.enable", + "tvoc_alarm_settings.threshold_condition", + "tvoc_alarm_settings.threshold_max" + ] + }, + { + "id": "tvoc_alarm.type", + "name": "Alarm Type(TVOC Alarm)", + "value": "", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 0, + "name": "Collection Error" + }, + { + "value": 1, + "name": "Out of The Low Range" + }, + { + "value": 2, + "name": "Out of The High Range" + }, + { + "value": 16, + "name": "Threshold Alarm Release" + }, + { + "value": 17, + "name": "Threshold Alarm" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["tvoc_alarm_settings.enable", "tvoc_alarm_settings.threshold_max"] + "reference": [] }, { - "id": "tvoc_alarm_settings.threshold_max", - "name": "TVOC Alarm Settings (Threshold Max)", + "id": "tvoc_calibration_settings.calibration_value", + "name": "Calibration Value(TVOC Calibration Settings)", "value": "0", "unit": "µg/m³", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", - "range": [0, 2000], + "value_type": "INT16", + "range": [ + -2000, + 2000 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 219, "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", - "reference": ["tvoc_alarm_settings.enable", "tvoc_alarm_settings.threshold_max"] + "reference": [ + "tvoc_calibration_settings.enable" + ] }, { - "id": "vaping_index_alarm_settings.enable", - "name": "Vaping Index Alarm Settings (Enable)", - "value": "1", + "id": "tvoc_calibration_settings.enable", + "name": "TVOC Calibration(TVOC Calibration Settings)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["vaping_index_alarm_settings.enable", "vaping_index_alarm_settings.threshold_max"] + "reference": [ + "tvoc_calibration_settings.calibration_value" + ] }, { - "id": "vaping_index_alarm_settings.threshold_max", - "name": "Vaping Index Alarm Settings (Threshold Max)", - "value": "5", + "id": "tvoc_raw_data_1.rmox_0", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "NUMBER", "value_type": "UINT8", - "range": [0, 100], - "bacnet_type": "analog_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["vaping_index_alarm_settings.enable", "vaping_index_alarm_settings.threshold_max"] + "reference": [ + "tvoc_raw_data_1.rmox_1" + ] }, { - "id": "alarm_reporting_times", - "name": "Alarm Reporting Times", - "value": "1", + "id": "tvoc_raw_data_1.rmox_1", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "UINT16", - "range": [1, 1000], - "bacnet_type": "analog_value_object", + "value_type": "UINT8", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_1.rmox_0" + ] }, { - "id": "alarm_deactivation_enable", - "name": "Threshold Alarm Release", - "value": "1", + "id": "tvoc_raw_data_10.etoh", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_10.tvoc" + ] }, { - "id": "temperature_calibration_settings.enable", - "name": "Temperature Calibration Settings (Enable)", - "value": "0", + "id": "tvoc_raw_data_10.tvoc", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["temperature_calibration_settings.calibration_value"] + "reference": [ + "tvoc_raw_data_10.etoh" + ] }, { - "id": "temperature_calibration_settings.calibration_value", - "name": "Temperature Calibration Settings (Calibration Value)", - "value": "0", - "unit": "°C", - "access_mode": "RW", + "id": "tvoc_raw_data_11.eco2", + "name": "TVOC Data( TVOC Data)", + "value": "", + "unit": "", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [-80.0, 80.0], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["temperature_calibration_settings.enable"] + "value_type": "UINT8", + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_11.rel_iaq" + ] }, { - "id": "humidity_calibration_settings.enable", - "name": "Humidity Calibration Settings (Enable)", - "value": "0", + "id": "tvoc_raw_data_11.rel_iaq", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["humidity_calibration_settings.calibration_value"] + "reference": [ + "tvoc_raw_data_11.eco2" + ] }, { - "id": "humidity_calibration_settings.calibration_value", - "name": "Humidity Calibration Settings (Calibration Value)", - "value": "0", - "unit": "%", - "access_mode": "RW", + "id": "tvoc_raw_data_2.rmox_2", + "name": "TVOC Data( TVOC Data)", + "value": "", + "unit": "", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [-100.0, 100.0], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": ["humidity_calibration_settings.enable"] + "value_type": "UINT8", + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_2.rmox_3" + ] }, { - "id": "pm1_0_calibration_settings.enable", - "name": "PM1.0 Calibration Settings (Enable)", - "value": "0", + "id": "tvoc_raw_data_2.rmox_3", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pm1_0_calibration_settings.calibration_value"] + "reference": [ + "tvoc_raw_data_2.rmox_2" + ] }, { - "id": "pm1_0_calibration_settings.calibration_value", - "name": "PM1.0 Calibration Settings (Calibration Value)", - "value": "0", - "unit": "µg/m³", - "access_mode": "RW", + "id": "tvoc_raw_data_3.rmox_4", + "name": "TVOC Data( TVOC Data)", + "value": "", + "unit": "", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "INT16", - "range": [-1000, 1000], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", - "reference": ["pm1_0_calibration_settings.enable"] + "value_type": "UINT8", + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_3.rmox_5" + ] }, { - "id": "pm2_5_calibration_settings.enable", - "name": "PM2.5 Calibration", - "value": "0", + "id": "tvoc_raw_data_3.rmox_5", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pm2_5_calibration_settings.calibration_value"] + "reference": [ + "tvoc_raw_data_3.rmox_4" + ] }, { - "id": "pm2_5_calibration_settings.calibration_value", - "name": "Calibration Value", - "value": "0", - "unit": "µg/m³", - "access_mode": "RW", + "id": "tvoc_raw_data_4.rmox_6", + "name": "TVOC Data( TVOC Data)", + "value": "", + "unit": "", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "INT16", - "range": [-1000, 1000], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", - "reference": ["pm2_5_calibration_settings.enable"] + "value_type": "UINT8", + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_4.rmox_7" + ] }, { - "id": "pm10_calibration_settings.enable", - "name": "PM10 Calibration Settings (Enable)", - "value": "0", + "id": "tvoc_raw_data_4.rmox_7", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pm10_calibration_settings.enable", "pm10_calibration_settings.calibration_value"] + "reference": [ + "tvoc_raw_data_4.rmox_6" + ] }, { - "id": "pm10_calibration_settings.calibration_value", - "name": "PM10 Calibration Settings (Calibration Value)", - "value": "0", - "unit": "µg/m³", - "access_mode": "RW", + "id": "tvoc_raw_data_5.rmox_8", + "name": "TVOC Data( TVOC Data)", + "value": "", + "unit": "", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "INT16", - "range": [-1000, 1000], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", - "reference": ["pm10_calibration_settings.enable", "pm10_calibration_settings.calibration_value"] + "value_type": "UINT8", + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_5.rmox_9" + ] }, { - "id": "tvoc_calibration_settings.enable", - "name": "TVOC Calibration", - "value": "0", + "id": "tvoc_raw_data_5.rmox_9", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["tvoc_calibration_settings.calibration_value"] + "reference": [ + "tvoc_raw_data_5.rmox_8" + ] }, { - "id": "tvoc_calibration_settings.calibration_value", - "name": "Calibration Value", - "value": "0", - "unit": "µg/m³", - "access_mode": "RW", + "id": "tvoc_raw_data_6.rmox_10", + "name": "TVOC Data( TVOC Data)", + "value": "", + "unit": "", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "INT16", - "range": [-2000, 2000], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 219, - "bacnet_unit_type": "UNITS_MICROGRAMS_PER_CUBIC_METER", - "reference": ["tvoc_calibration_settings.enable"] + "value_type": "UINT8", + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_6.rmox_11" + ] }, { - "id": "vaping_index_calibration_settings.enable", - "name": "Vaping Index Calibration Settings (Enable)", - "value": "0", + "id": "tvoc_raw_data_6.rmox_11", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["vaping_index_calibration_settings.calibration_value"] + "reference": [ + "tvoc_raw_data_6.rmox_10" + ] }, { - "id": "vaping_index_calibration_settings.calibration_value", - "name": "Vaping Index Calibration Settings (Calibration Value)", - "value": "0", + "id": "tvoc_raw_data_7.rmox_12", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "INT8", - "range": [-100, 100], - "bacnet_type": "analog_value_object", + "value_type": "UINT8", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["vaping_index_calibration_settings.enable"] + "reference": [ + "tvoc_raw_data_7.zmod4510_rmox_3" + ] }, { - "id": "time_zone", - "name": "Time Zone", + "id": "tvoc_raw_data_7.zmod4510_rmox_3", + "name": "TVOC Data( TVOC Data)", "value": "", "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "INT16", - "values": [ - { "value": -720, "name": "UTC-12" }, - { "value": -660, "name": "UTC-11" }, - { "value": -600, "name": "UTC-10" }, - { "value": -570, "name": "UTC-9:30" }, - { "value": -540, "name": "UTC-9" }, - { "value": -480, "name": "UTC-8" }, - { "value": -420, "name": "UTC-7" }, - { "value": -360, "name": "UTC-6" }, - { "value": -300, "name": "UTC-5" }, - { "value": -240, "name": "UTC-4" }, - { "value": -210, "name": "UTC-3:30" }, - { "value": -180, "name": "UTC-3" }, - { "value": -120, "name": "UTC-2" }, - { "value": -60, "name": "UTC-1" }, - { "value": 0, "name": "UTC" }, - { "value": 60, "name": "UTC+1" }, - { "value": 120, "name": "UTC+2" }, - { "value": 180, "name": "UTC+3" }, - { "value": 210, "name": "UTC+3:30" }, - { "value": 240, "name": "UTC+4" }, - { "value": 270, "name": "UTC+4:30" }, - { "value": 300, "name": "UTC+5" }, - { "value": 330, "name": "UTC+5:30" }, - { "value": 345, "name": "UTC+5:45" }, - { "value": 360, "name": "UTC+6" }, - { "value": 390, "name": "UTC+6:30" }, - { "value": 420, "name": "UTC+7" }, - { "value": 480, "name": "UTC+8" }, - { "value": 540, "name": "UTC+9" }, - { "value": 570, "name": "UTC+9:30" }, - { "value": 600, "name": "UTC+10" }, - { "value": 630, "name": "UTC+10:30" }, - { "value": 660, "name": "UTC+11" }, - { "value": 720, "name": "UTC+12" }, - { "value": 765, "name": "UTC+12:45" }, - { "value": 780, "name": "UTC+13" }, - { "value": 840, "name": "UTC+14" } - ], - "bacnet_type": "multistate_value_object", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "UINT8", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_7.rmox_12" + ] }, { - "id": "daylight_saving_time.daylight_saving_time_enable", - "name": "Daylight Saving Time", - "value": "0", + "id": "tvoc_raw_data_8.log_rcda", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "disable", "value": 0 }, - { "name": "enable", "value": 1 } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.daylight_saving_time_offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [ + "tvoc_raw_data_8.rhtr" + ] }, { - "id": "daylight_saving_time.daylight_saving_time_offset", - "name": "DST Bias", - "value": "60", - "unit": "min", - "access_mode": "RW", + "id": "tvoc_raw_data_8.rhtr", + "name": "TVOC Data( TVOC Data)", + "value": "", + "unit": "", + "access_mode": "R", "data_type": "NUMBER", "value_type": "UINT8", - "range": [0, 120], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["daylight_saving_time.daylight_saving_time_enable", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "tvoc_raw_data_8.log_rcda" + ] }, { - "id": "daylight_saving_time.start_month", - "name": "Month", - "value": "3", + "id": "tvoc_raw_data_9.iaq", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "ENUM", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "Jan.", "value": 1 }, - { "name": "Feb.", "value": 2 }, - { "name": "Mar.", "value": 3 }, - { "name": "Apr.", "value": 4 }, - { "name": "May", "value": 5 }, - { "name": "Jun.", "value": 6 }, - { "name": "Jul.", "value": 7 }, - { "name": "Aug.", "value": 8 }, - { "name": "Sep.", "value": 9 }, - { "name": "Oct.", "value": 10 }, - { "name": "Nov.", "value": 11 }, - { "name": "Dec.", "value": 12 } - ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.daylight_saving_time_enable", "daylight_saving_time.daylight_saving_time_offset", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [ + "tvoc_raw_data_9.temperature" + ] }, { - "id": "daylight_saving_time.start_week_num", - "name": "Number of Week", - "value": "2", + "id": "tvoc_raw_data_9.temperature", + "name": "TVOC Data( TVOC Data)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "ENUM", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "1st", "value": 1 }, - { "name": "2nd", "value": 2 }, - { "name": "3rd", "value": 3 }, - { "name": "4th", "value": 4 }, - { "name": "last", "value": 5 } - ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.daylight_saving_time_enable", "daylight_saving_time.daylight_saving_time_offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [ + "tvoc_raw_data_9.iaq" + ] }, { - "id": "daylight_saving_time.start_week_day", - "name": "Week", - "value": "7", + "id": "tvoc_raw_reporting_enable", + "name": "TVOC Raw Data Report", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "name": "Mon.", "value": 1 }, - { "name": "Tues.", "value": 2 }, - { "name": "Wed.", "value": 3 }, - { "name": "Thurs.", "value": 4 }, - { "name": "Fri.", "value": 5 }, - { "name": "Sat.", "value": 6 }, - { "name": "Sun.", "value": 7 } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.daylight_saving_time_enable", "daylight_saving_time.daylight_saving_time_offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "daylight_saving_time.start_hour_min", - "name": "Time", - "value": "0", - "unit": "min", - "access_mode": "RW", + "id": "vaping_index", + "name": "Vaping Index", + "value": "", + "unit": "", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "UINT16", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["daylight_saving_time.daylight_saving_time_enable", "daylight_saving_time.daylight_saving_time_offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "value_type": "UINT8", + "range": [ + 0, + 100 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "daylight_saving_time.end_month", - "name": "Month", - "value": "11", + "id": "vaping_index_alarm_settings.enable", + "name": "Vaping Threshold Alarm(Vaping Threshold Alarm)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "name": "Jan.", "value": 1 }, - { "name": "Feb.", "value": 2 }, - { "name": "Mar.", "value": 3 }, - { "name": "Apr.", "value": 4 }, - { "name": "May", "value": 5 }, - { "name": "Jun.", "value": 6 }, - { "name": "Jul.", "value": 7 }, - { "name": "Aug.", "value": 8 }, - { "name": "Sep.", "value": 9 }, - { "name": "Oct.", "value": 10 }, - { "name": "Nov.", "value": 11 }, - { "name": "Dec.", "value": 12 } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.daylight_saving_time_enable", "daylight_saving_time.daylight_saving_time_offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [ + "vaping_index_alarm_settings.threshold_condition", + "vaping_index_alarm_settings.threshold_min", + "vaping_index_alarm_settings.threshold_max" + ] }, { - "id": "daylight_saving_time.end_week_num", - "name": "Number of Week", - "value": "1", + "id": "vaping_index_alarm_settings.threshold_condition", + "name": "Threshold Condition(Vaping Threshold Alarm)", + "value": "", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "name": "1st", "value": 1 }, - { "name": "2nd", "value": 2 }, - { "name": "3rd", "value": 3 }, - { "name": "4th", "value": 4 }, - { "name": "last", "value": 5 } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "condition: xB" + }, + { + "value": 3, + "name": "condition: AB" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.daylight_saving_time_enable", "daylight_saving_time.daylight_saving_time_offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [ + "vaping_index_alarm_settings.enable", + "vaping_index_alarm_settings.threshold_min", + "vaping_index_alarm_settings.threshold_max" + ] }, { - "id": "daylight_saving_time.end_week_day", - "name": "Week", - "value": "1", + "id": "vaping_index_alarm_settings.threshold_max", + "name": "Over(Vaping Threshold Alarm)", + "value": "5", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "name": "Mon.", "value": 1 }, - { "name": "Tues.", "value": 2 }, - { "name": "Wed.", "value": 3 }, - { "name": "Thurs.", "value": 4 }, - { "name": "Fri.", "value": 5 }, - { "name": "Sat.", "value": 6 }, - { "name": "Sun.", "value": 7 } + "range": [ + 0, + 100 ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.daylight_saving_time_enable", "daylight_saving_time.daylight_saving_time_offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_hour_min"] + "reference": [ + "vaping_index_alarm_settings.enable", + "vaping_index_alarm_settings.threshold_condition", + "vaping_index_alarm_settings.threshold_min" + ] }, { - "id": "daylight_saving_time.end_hour_min", - "name": "Time", + "id": "vaping_index_alarm_settings.threshold_min", + "name": "Value A(Vaping Threshold Alarm)", "value": "0", - "unit": "min", + "unit": "", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["daylight_saving_time.daylight_saving_time_enable", "daylight_saving_time.daylight_saving_time_offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day"] - }, - { - "id": "reboot", - "name": "Reboot", - "value": "", - "unit": "", - "access_mode": "W", - "data_type": "BOOL", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + "range": [ + 0, + 100 ], - "bacnet_type": "binary_output_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "vaping_index_alarm_settings.enable", + "vaping_index_alarm_settings.threshold_condition", + "vaping_index_alarm_settings.threshold_max" + ] }, { - "id": "synchronize_time", - "name": "Synchronize Time", + "id": "vaping_index_alarm.type", + "name": "Alarm Type(Vaping Index Alarm)", "value": "", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "Collection Error" + }, + { + "value": 1, + "name": "Out of The Low Range" + }, + { + "value": 2, + "name": "Out of The High Range" + }, + { + "value": 16, + "name": "Threshold Alarm Release" + }, + { + "value": 17, + "name": "Threshold Alarm" + }, + { + "value": 32, + "name": "Vaping Interference Alarm Release" + }, + { + "value": 33, + "name": "Vaping Interference Alarm" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "query_device_status", - "name": "Query Device Status", - "value": "", + "id": "vaping_index_calibration_settings.calibration_value", + "name": "Calibration Value(Vaping Calibration Settings)", + "value": "0", "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "INT8", + "range": [ + -100, + 100 ], - "bacnet_type": "binary_output_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "vaping_index_calibration_settings.enable" + ] }, { - "id": "reconnect", - "name": "Reconnect", - "value": "", + "id": "vaping_index_calibration_settings.enable", + "name": "Vaping Calibration(Vaping Calibration Settings)", + "value": "0", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "vaping_index_calibration_settings.calibration_value" + ] }, { - "id": "stop_buzzer_alarm", - "name": "Stop Buzzer Alarm", + "id": "version.firmware_version", + "name": "Firmware Version(Product Version)", "value": "", "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 12, + "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "version.hardware_version" + ] }, { - "id": "execute_tvoc_self_clean", - "name": "Execute TVOC Self Clean", + "id": "version.hardware_version", + "name": "Hardware Version(Product Version)", "value": "", "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "version.firmware_version" + ] } ] -} +} \ No newline at end of file diff --git a/vendors/milesight-iot/gs-series/gs601/gs601-decoder.js b/vendors/milesight-iot/gs-series/gs601/gs601-decoder.js index 241b50e..41aa600 100644 --- a/vendors/milesight-iot/gs-series/gs601/gs601-decoder.js +++ b/vendors/milesight-iot/gs-series/gs601/gs601-decoder.js @@ -5,812 +5,1131 @@ * * @product GS601 */ -var RAW_VALUE = 0x01; /* eslint no-redeclare: "off" */ /* eslint-disable */ // Chirpstack v4 function decodeUplink(input) { - var decoded = milesightDeviceDecode(input.bytes); - return { data: decoded }; + var decoded = milesightDeviceDecode(input.bytes); + return { data: decoded }; } // Chirpstack v3 function Decode(fPort, bytes) { - return milesightDeviceDecode(bytes); + return milesightDeviceDecode(bytes); } // The Things Network function Decoder(bytes, port) { - return milesightDeviceDecode(bytes); + return milesightDeviceDecode(bytes); } /* eslint-enable */ function milesightDeviceDecode(bytes) { - var decoded = {}; - - var unknown_command = 0; - for (var i = 0; i < bytes.length; ) { - var command_id = bytes[i++]; - - switch (command_id) { - // attribute - case 0xdf: - decoded.tsl_version = readProtocolVersion(bytes.slice(i, i + 2)); - i += 2; - break; - case 0xde: - decoded.product_name = readString(bytes.slice(i, i + 32)); - i += 32; - break; - case 0xdd: - decoded.product_pn = readString(bytes.slice(i, i + 32)); - i += 32; - break; - case 0xdb: - decoded.product_sn = readHexString(bytes.slice(i, i + 8)); - i += 8; - break; - case 0xda: - decoded.version = {}; - decoded.version.hardware_version = readHardwareVersion(bytes.slice(i, i + 2)); - decoded.version.firmware_version = readFirmwareVersion(bytes.slice(i + 2, i + 8)); - i += 8; - break; - case 0xd9: - decoded.oem_id = readHexString(bytes.slice(i, i + 2)); - i += 2; - break; - case 0xd8: - decoded.product_frequency_band = readString(bytes.slice(i, i + 16)); - i += 16; - break; - case 0xee: - decoded.device_request = 1; - i += 0; - break; - case 0xc8: - decoded.device_status = readDeviceStatus(bytes[i]); - i += 1; - break; - case 0xcf: - // skip 1 byte - decoded.lorawan_class = readLoRaWANClass(bytes[i + 1]); - i += 2; - break; - - // telemetry - case 0x00: - decoded.battery = readUInt8(bytes[i]); - i += 1; - break; - case 0x01: - decoded.vaping_index = readUInt8(bytes[i]); - i += 1; - break; - case 0x02: - var vaping_index_alarm = {}; - var alarm_type = bytes[i]; - - vaping_index_alarm.type = readVapeIndexAlarmType(alarm_type); - if (alarm_type === 0x10 || alarm_type === 0x11) { - vaping_index_alarm.vaping_index = readUInt8(bytes[i + 1]); - decoded.vaping_index = readUInt8(bytes[i + 1]); - i += 2; - } else { - i += 1; - } - - decoded.vaping_index_alarm = vaping_index_alarm; - break; - case 0x03: - decoded.pm1_0 = readUInt16LE(bytes.slice(i, i + 2)); - i += 2; - break; - case 0x04: - var pm1_0_alarm = {}; - var alarm_type = bytes[i]; - - pm1_0_alarm.type = readPMAlarmType(alarm_type); - if (alarm_type === 0x10 || alarm_type === 0x11) { - pm1_0_alarm.pm1_0 = readUInt16LE(bytes.slice(i + 1, i + 3)); - decoded.pm1_0 = readUInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - } else { - i += 1; - } - - decoded.pm1_0_alarm = pm1_0_alarm; - break; - case 0x05: - decoded.pm2_5 = readUInt16LE(bytes.slice(i, i + 2)); - i += 2; - break; - case 0x06: - var pm2_5_alarm = {}; - var alarm_type = bytes[i]; - - pm2_5_alarm.type = readPMAlarmType(alarm_type); - if (alarm_type === 0x10 || alarm_type === 0x11) { - pm2_5_alarm.pm2_5 = readUInt16LE(bytes.slice(i + 1, i + 3)); - decoded.pm2_5 = readUInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - } else { - i += 1; - } - - decoded.pm2_5_alarm = pm2_5_alarm; - break; - case 0x07: - decoded.pm10 = readUInt16LE(bytes.slice(i, i + 2)); - i += 2; - break; - case 0x08: - var pm10_alarm = {}; - var alarm_type = bytes[i]; - - pm10_alarm.type = readPMAlarmType(alarm_type); - if (alarm_type === 0x10 || alarm_type === 0x11) { - pm10_alarm.pm10 = readUInt16LE(bytes.slice(i + 1, i + 3)); - decoded.pm10 = readUInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - } else { - i += 1; - } - - decoded.pm10_alarm = pm10_alarm; - break; - case 0x09: - decoded.temperature = readInt16LE(bytes.slice(i, i + 2)) / 10; - i += 2; - break; - case 0x0a: - var temperature_alarm = {}; - var alarm_type = bytes[i]; - - temperature_alarm.type = readTemperatureAlarmType(alarm_type); - if (alarm_type === 0x10 || alarm_type === 0x11) { - temperature_alarm.temperature = readInt16LE(bytes.slice(i + 1, i + 3)) / 10; - decoded.temperature = readInt16LE(bytes.slice(i + 1, i + 3)) / 10; - i += 3; - } else { - i += 1; - } - - decoded.temperature_alarm = temperature_alarm; - break; - case 0x0b: - decoded.humidity = readUInt16LE(bytes.slice(i, i + 2)) / 10; - i += 2; - break; - case 0x0c: - var humidity_alarm = {}; - var alarm_type = bytes[i]; - - humidity_alarm.type = readHumidityAlarmType(alarm_type); - i += 1; - - decoded.humidity_alarm = humidity_alarm; - break; - case 0x0d: - decoded.tvoc = readUInt16LE(bytes.slice(i, i + 2)); - i += 2; - break; - case 0x0e: - var tvoc_alarm = {}; - var alarm_type = bytes[i]; - - tvoc_alarm.type = readTVOCAlarmType(alarm_type); - if (alarm_type === 0x10 || alarm_type === 0x11) { - tvoc_alarm.tvoc = readUInt16LE(bytes.slice(i + 1, i + 3)); - decoded.tvoc = readUInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - } else { - i += 1; - } - - decoded.tvoc_alarm = tvoc_alarm; - break; - case 0x0f: - decoded.tamper_status = readTamperStatus(bytes[i]); - i += 1; - break; - case 0x10: - var tamper_status_alarm = {}; - tamper_status_alarm.type = readTamperAlarmType(bytes[i]); - i += 1; - - decoded.tamper_status_alarm = tamper_status_alarm; - break; - case 0x11: - decoded.buzzer = readBuzzerStatus(bytes[i]); - i += 1; - break; - case 0x12: - decoded.occupancy_status = readOccupancyStatus(bytes[i]); - i += 1; - break; - case 0x20: - decoded.tvoc_raw_data_1 = {}; - decoded.tvoc_raw_data_1.rmox_0 = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_1.rmox_1 = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x21: - decoded.tvoc_raw_data_2 = {}; - decoded.tvoc_raw_data_2.rmox_2 = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_2.rmox_3 = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x22: - decoded.tvoc_raw_data_3 = {}; - decoded.tvoc_raw_data_3.rmox_4 = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_3.rmox_5 = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x23: - decoded.tvoc_raw_data_4 = {}; - decoded.tvoc_raw_data_4.rmox_6 = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_4.rmox_7 = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x24: - decoded.tvoc_raw_data_5 = {}; - decoded.tvoc_raw_data_5.rmox_8 = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_5.rmox_9 = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x25: - decoded.tvoc_raw_data_6 = {}; - decoded.tvoc_raw_data_6.rmox_10 = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_6.rmox_11 = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x26: - decoded.tvoc_raw_data_7 = {}; - decoded.tvoc_raw_data_7.rmox_12 = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_7.zmod4510_rmox_3 = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x27: - decoded.tvoc_raw_data_8 = {}; - decoded.tvoc_raw_data_8.log_rcda = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_8.rhtr = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x28: - decoded.tvoc_raw_data_9 = {}; - decoded.tvoc_raw_data_9.temperature = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_9.iaq = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x29: - decoded.tvoc_raw_data_10 = {}; - decoded.tvoc_raw_data_10.tvoc = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_10.etoh = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x2a: - decoded.tvoc_raw_data_11 = {}; - decoded.tvoc_raw_data_11.eco2 = readFloatLE(bytes.slice(i, i + 4)); - decoded.tvoc_raw_data_11.rel_iaq = readFloatLE(bytes.slice(i + 4, i + 8)); - i += 8; - break; - case 0x2b: - decoded.pm_sensor_working_time = readUInt32LE(bytes.slice(i, i + 4)); - i += 4; - break; - - // config - case 0x60: - var time_unit = readUInt8(bytes[i]); - decoded.reporting_interval = {}; - decoded.reporting_interval.unit = readTimeUnitType(time_unit); - if (time_unit === 0) { - decoded.reporting_interval.seconds_of_time = readUInt16LE(bytes.slice(i + 1, i + 3)); - } else if (time_unit === 1) { - decoded.reporting_interval.minutes_of_time = readUInt16LE(bytes.slice(i + 1, i + 3)); - } - i += 3; - break; - case 0x61: - decoded.temperature_unit = readTemperatureType(bytes[i]); - i += 1; - break; - case 0x62: - decoded.led_status = readEnableStatus(bytes[i]); - i += 1; - break; - case 0x63: - decoded.buzzer_enable = readEnableStatus(bytes[i]); - i += 1; - break; - case 0x64: - var index = readUInt8(bytes[i]); - var buzzer_sleep = {}; - buzzer_sleep.enable = readEnableStatus(bytes[i + 1]); - buzzer_sleep.start_time = readUInt16LE(bytes.slice(i + 2, i + 4)); - buzzer_sleep.end_time = readUInt16LE(bytes.slice(i + 4, i + 6)); - i += 6; - decoded.buzzer_sleep = decoded.buzzer_sleep || {}; - decoded.buzzer_sleep["item_" + index] = buzzer_sleep; - break; - case 0x65: - decoded.buzzer_button_stop_enable = readEnableStatus(bytes[i]); - i += 1; - break; - case 0x66: - decoded.buzzer_silent_time = readUInt16LE(bytes.slice(i, i + 2)); - i += 2; - break; - case 0x67: - decoded.tamper_alarm_enable = readEnableStatus(bytes[i]); - i += 1; - break; - case 0x68: - decoded.tvoc_raw_reporting_enable = readEnableStatus(bytes[i]); - i += 1; - break; - case 0x69: - decoded.temperature_alarm_settings = {}; - decoded.temperature_alarm_settings.enable = readEnableStatus(bytes[i]); - decoded.temperature_alarm_settings.condition = readThresholdCondition(bytes[i + 1]); - decoded.temperature_alarm_settings.threshold_min = readInt16LE(bytes.slice(i + 2, i + 4)) / 10; - decoded.temperature_alarm_settings.threshold_max = readInt16LE(bytes.slice(i + 4, i + 6)) / 10; - i += 6; - break; - case 0x6a: - decoded.pm1_0_alarm_settings = {}; - decoded.pm1_0_alarm_settings.enable = readEnableStatus(bytes[i]); - // decoded.pm1_0_alarm_settings.condition = readThresholdCondition(bytes[i + 1]); - // decoded.pm1_0_alarm_settings.threshold_min = readInt16LE(bytes.slice(i + 2, i + 4)); - decoded.pm1_0_alarm_settings.threshold_max = readInt16LE(bytes.slice(i + 4, i + 6)); - i += 6; - break; - case 0x6b: - decoded.pm2_5_alarm_settings = {}; - decoded.pm2_5_alarm_settings.enable = readEnableStatus(bytes[i]); - // decoded.pm2_5_alarm_settings.condition = readThresholdCondition(bytes[i + 1]); - // decoded.pm2_5_alarm_settings.threshold_min = readInt16LE(bytes.slice(i + 2, i + 4)); - decoded.pm2_5_alarm_settings.threshold_max = readInt16LE(bytes.slice(i + 4, i + 6)); - i += 6; - break; - case 0x6c: - decoded.pm10_alarm_settings = {}; - decoded.pm10_alarm_settings.enable = readEnableStatus(bytes[i]); - // decoded.pm10_alarm_settings.condition = readThresholdCondition(bytes[i + 1]); - // decoded.pm10_alarm_settings.threshold_min = readInt16LE(bytes.slice(i + 2, i + 4)); - decoded.pm10_alarm_settings.threshold_max = readInt16LE(bytes.slice(i + 4, i + 6)); - i += 6; - break; - case 0x6d: - decoded.tvoc_alarm_settings = {}; - decoded.tvoc_alarm_settings.enable = readEnableStatus(bytes[i]); - // decoded.tvoc_alarm_settings.condition = readThresholdCondition(bytes[i + 1]); - // decoded.tvoc_alarm_settings.threshold_min = readInt16LE(bytes.slice(i + 2, i + 4)); - decoded.tvoc_alarm_settings.threshold_max = readInt16LE(bytes.slice(i + 4, i + 6)); - i += 6; - break; - case 0x6e: - decoded.vaping_index_alarm_settings = {}; - decoded.vaping_index_alarm_settings.enable = readEnableStatus(bytes[i]); - // decoded.vaping_index_alarm_settings.condition = readThresholdCondition(bytes[i + 1]); - // decoded.vaping_index_alarm_settings.threshold_min = readUInt8(bytes[i + 2]); - decoded.vaping_index_alarm_settings.threshold_max = readUInt8(bytes[i + 3]); - i += 4; - break; - case 0x6f: - decoded.alarm_reporting_times = readUInt16LE(bytes.slice(i, i + 2)); - i += 2; - break; - case 0x70: - decoded.alarm_deactivation_enable = readEnableStatus(bytes[i]); - i += 1; - break; - case 0x71: - decoded.temperature_calibration_settings = {}; - decoded.temperature_calibration_settings.enable = readEnableStatus(bytes[i]); - decoded.temperature_calibration_settings.calibration_value = readInt16LE(bytes.slice(i + 1, i + 3)) / 10; - i += 3; - break; - case 0x72: - decoded.humidity_calibration_settings = {}; - decoded.humidity_calibration_settings.enable = readEnableStatus(bytes[i]); - decoded.humidity_calibration_settings.calibration_value = readInt16LE(bytes.slice(i + 1, i + 3)) / 10; - i += 3; - break; - case 0x73: - decoded.pm1_0_calibration_settings = {}; - decoded.pm1_0_calibration_settings.enable = readEnableStatus(bytes[i]); - decoded.pm1_0_calibration_settings.calibration_value = readInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - break; - case 0x74: - decoded.pm2_5_calibration_settings = {}; - decoded.pm2_5_calibration_settings.enable = readEnableStatus(bytes[i]); - decoded.pm2_5_calibration_settings.calibration_value = readInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - break; - case 0x75: - decoded.pm10_calibration_settings = {}; - decoded.pm10_calibration_settings.enable = readEnableStatus(bytes[i]); - decoded.pm10_calibration_settings.calibration_value = readInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - break; - case 0x76: - decoded.tvoc_calibration_settings = {}; - decoded.tvoc_calibration_settings.enable = readEnableStatus(bytes[i]); - decoded.tvoc_calibration_settings.calibration_value = readInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - break; - case 0x77: - decoded.vaping_index_calibration_settings = {}; - decoded.vaping_index_calibration_settings.enable = readEnableStatus(bytes[i]); - decoded.vaping_index_calibration_settings.calibration_value = readInt8(bytes[i + 1]); - i += 2; - break; - case 0xc6: - decoded.daylight_saving_time = {}; - decoded.daylight_saving_time.daylight_saving_time_enable = readEnableStatus(bytes[i]); - decoded.daylight_saving_time.daylight_saving_time_offset = readUInt8(bytes[i + 1]); - decoded.daylight_saving_time.start_month = readUInt8(bytes[i + 2]); - var start_day_value = readUInt8(bytes[i + 3]); - decoded.daylight_saving_time.start_week_num = (start_day_value >>> 4) & 0x07; - decoded.daylight_saving_time.start_week_day = start_day_value & 0x0f; - decoded.daylight_saving_time.start_hour_min = readUInt16LE(bytes.slice(i + 4, i + 6)); - decoded.daylight_saving_time.end_month = readUInt8(bytes[i + 6]); - var end_day_value = readUInt8(bytes[i + 7]); - decoded.daylight_saving_time.end_week_num = (end_day_value >>> 4) & 0x0f; - decoded.daylight_saving_time.end_week_day = end_day_value & 0x0f; - decoded.daylight_saving_time.end_hour_min = readUInt16LE(bytes.slice(i + 8, i + 10)); - i += 10; - break; - case 0xc7: - decoded.time_zone = readTimeZone(readInt16LE(bytes.slice(i, i + 2))); - i += 2; - break; - - // service - case 0x5f: - decoded.stop_buzzer_alarm = readYesNoStatus(1); - break; - case 0x5e: - decoded.execute_tvoc_self_clean = readYesNoStatus(1); - break; - case 0xb6: - decoded.reconnect = readYesNoStatus(1); - break; - case 0xb8: - decoded.synchronize_time = readYesNoStatus(1); - break; - case 0xb9: - decoded.query_device_status = readYesNoStatus(1); - break; - case 0xbe: - decoded.reboot = readYesNoStatus(1); - break; - // control frame - case 0xef: - var cmd_data = readUInt8(bytes[i]); - var cmd_result = (cmd_data >>> 4) & 0x0f; - var cmd_length = cmd_data & 0x0f; - var cmd_id = readHexString(bytes.slice(i + 1, i + 1 + cmd_length)); - var cmd_header = readHexString(bytes.slice(i + 1, i + 2)); - i += 1 + cmd_length; - - var response = {}; - response.result = readCmdResult(cmd_result); - response.cmd_id = cmd_id; - response.cmd_name = readCmdName(cmd_header); - - decoded.request_result = decoded.request_result || []; - decoded.request_result.push(response); - break; - case 0xfe: - decoded.frame = readUInt8(bytes[i]); - i += 1; - break; - default: - unknown_command = 1; - break; - } - - if (unknown_command) { - throw new Error("unknown command: " + command_id); - } - } + var decoded = {}; + var result = {}; + var history = []; + + var unknown_command = 0; + var counterObj = {}; + for (counterObj.i = 0; counterObj.i < bytes.length; ) { + var command_id = bytes[counterObj.i++]; + switch (command_id) { + case 0xfe: + decoded.check_order_reply = decoded.check_order_reply || {}; + decoded.check_order_reply.order = readUInt8(bytes, counterObj, 1); + break; + case 0xf4: + decoded.full_inspection_reply = decoded.full_inspection_reply || {}; + var full_inspection_reply_command = readUInt8(bytes, counterObj, 1); + if (full_inspection_reply_command == 0x00) { + decoded.full_inspection_reply.start_inspection = decoded.full_inspection_reply.start_inspection || {}; + // 0:success, 1:failed + decoded.full_inspection_reply.start_inspection.result = readUInt8(bytes, counterObj, 1); + } + if (full_inspection_reply_command == 0x01) { + decoded.full_inspection_reply.control = decoded.full_inspection_reply.control || {}; + // 0:success, 1:failed + decoded.full_inspection_reply.control.result = readUInt8(bytes, counterObj, 1); + } + if (full_inspection_reply_command == 0x02) { + decoded.full_inspection_reply.reading = decoded.full_inspection_reply.reading || {}; + decoded.full_inspection_reply.reading.length = readUInt16LE(bytes, counterObj, 2); + decoded.full_inspection_reply.reading.data = readBytes(bytes, counterObj, decoded.full_inspection_reply.reading.length); + } + if (full_inspection_reply_command == 0x03) { + decoded.full_inspection_reply.end_inspection = decoded.full_inspection_reply.end_inspection || {}; + // 0:success, 1:failed + decoded.full_inspection_reply.end_inspection.result = readUInt8(bytes, counterObj, 1); + } + break; + case 0xef: + decoded.ans = decoded.ans || []; + var ans_item = {}; + var bitOptions = readUInt8(bytes, counterObj, 1); + // 0:success, 1:unknow, 2:error order, 3:error passwd, 4:error read params, 5:error write params, 6:error read, 7:error write, 8:error read apply, 9:error write apply + ans_item.result = extractBits(bitOptions, 4, 8); + ans_item.length = extractBits(bitOptions, 0, 4); + ans_item.id = readCommand(bytes, counterObj, ans_item.length); + decoded.ans.push(ans_item); + break; + case 0xee: + decoded.all_configurations_request_by_device = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xcf: + decoded.lorawan_configuration_settings = decoded.lorawan_configuration_settings || {}; + var lorawan_configuration_settings_command = readUInt8(bytes, counterObj, 1); + if (lorawan_configuration_settings_command == 0x00) { + // 0:ClassA, 1:ClassB, 2:ClassC, 3:ClassC to B + decoded.lorawan_configuration_settings.mode = readUInt8(bytes, counterObj, 1); + } + break; + case 0xdf: + decoded.tsl_version = readProtocolVersion(readBytes(bytes, counterObj, 2)); + break; + case 0xdb: + decoded.product_sn = readHexString(bytes, counterObj, 8); + break; + case 0xda: + decoded.version = decoded.version || {}; + decoded.version.hardware_version = readHardwareVersion(readBytes(bytes, counterObj, 2)); + decoded.version.firmware_version = readFirmwareVersion(readBytes(bytes, counterObj, 6)); + break; + case 0xd9: + decoded.oem_id = readHexString(bytes, counterObj, 2); + break; + case 0x00: + decoded.battery = readUInt8(bytes, counterObj, 1); + break; + case 0x01: + decoded.vaping_index = readUInt8(bytes, counterObj, 1); + break; + case 0x02: + decoded.vaping_index_alarm = decoded.vaping_index_alarm || {}; + decoded.vaping_index_alarm.type = readUInt8(bytes, counterObj, 1); + if (decoded.vaping_index_alarm.type == 0x00) { + decoded.vaping_index_alarm.collection_error = decoded.vaping_index_alarm.collection_error || {}; + } + if (decoded.vaping_index_alarm.type == 0x01) { + decoded.vaping_index_alarm.lower_range_error = decoded.vaping_index_alarm.lower_range_error || {}; + } + if (decoded.vaping_index_alarm.type == 0x02) { + decoded.vaping_index_alarm.over_range_error = decoded.vaping_index_alarm.over_range_error || {}; + } + if (decoded.vaping_index_alarm.type == 0x10) { + decoded.vaping_index_alarm.alarm_deactivation = decoded.vaping_index_alarm.alarm_deactivation || {}; + decoded.vaping_index_alarm.alarm_deactivation.vaping_index = readUInt8(bytes, counterObj, 1); + decoded.vaping_index = decoded.vaping_index_alarm.alarm_deactivation.vaping_index; + } + if (decoded.vaping_index_alarm.type == 0x11) { + decoded.vaping_index_alarm.alarm_trigger = decoded.vaping_index_alarm.alarm_trigger || {}; + decoded.vaping_index_alarm.alarm_trigger.vaping_index = readUInt8(bytes, counterObj, 1); + decoded.vaping_index = decoded.vaping_index_alarm.alarm_trigger.vaping_index; + } + if (decoded.vaping_index_alarm.type == 0x20) { + decoded.vaping_index_alarm.interference_alarm_deactivation = decoded.vaping_index_alarm.interference_alarm_deactivation || {}; + } + if (decoded.vaping_index_alarm.type == 0x21) { + decoded.vaping_index_alarm.interference_alarm_trigger = decoded.vaping_index_alarm.interference_alarm_trigger || {}; + } + break; + case 0x03: + decoded.pm1_0 = readUInt16LE(bytes, counterObj, 2); + break; + case 0x04: + decoded.pm1_0_alarm = decoded.pm1_0_alarm || {}; + decoded.pm1_0_alarm.type = readUInt8(bytes, counterObj, 1); + if (decoded.pm1_0_alarm.type == 0x00) { + decoded.pm1_0_alarm.collection_error = decoded.pm1_0_alarm.collection_error || {}; + } + if (decoded.pm1_0_alarm.type == 0x01) { + decoded.pm1_0_alarm.lower_range_error = decoded.pm1_0_alarm.lower_range_error || {}; + } + if (decoded.pm1_0_alarm.type == 0x02) { + decoded.pm1_0_alarm.over_range_error = decoded.pm1_0_alarm.over_range_error || {}; + } + if (decoded.pm1_0_alarm.type == 0x10) { + decoded.pm1_0_alarm.alarm_deactivation = decoded.pm1_0_alarm.alarm_deactivation || {}; + decoded.pm1_0_alarm.alarm_deactivation.pm1_0 = readUInt16LE(bytes, counterObj, 2); + decoded.pm1_0 = decoded.pm1_0_alarm.alarm_deactivation.pm1_0; + } + if (decoded.pm1_0_alarm.type == 0x11) { + decoded.pm1_0_alarm.alarm_trigger = decoded.pm1_0_alarm.alarm_trigger || {}; + decoded.pm1_0_alarm.alarm_trigger.pm1_0 = readUInt16LE(bytes, counterObj, 2); + decoded.pm1_0 = decoded.pm1_0_alarm.alarm_trigger.pm1_0; + } + break; + case 0x05: + decoded.pm2_5 = readUInt16LE(bytes, counterObj, 2); + break; + case 0x06: + decoded.pm2_5_alarm = decoded.pm2_5_alarm || {}; + decoded.pm2_5_alarm.type = readUInt8(bytes, counterObj, 1); + if (decoded.pm2_5_alarm.type == 0x00) { + decoded.pm2_5_alarm.collection_error = decoded.pm2_5_alarm.collection_error || {}; + } + if (decoded.pm2_5_alarm.type == 0x01) { + decoded.pm2_5_alarm.lower_range_error = decoded.pm2_5_alarm.lower_range_error || {}; + } + if (decoded.pm2_5_alarm.type == 0x02) { + decoded.pm2_5_alarm.over_range_error = decoded.pm2_5_alarm.over_range_error || {}; + } + if (decoded.pm2_5_alarm.type == 0x10) { + decoded.pm2_5_alarm.alarm_deactivation = decoded.pm2_5_alarm.alarm_deactivation || {}; + decoded.pm2_5_alarm.alarm_deactivation.pm2_5 = readUInt16LE(bytes, counterObj, 2); + decoded.pm2_5 = decoded.pm2_5_alarm.alarm_deactivation.pm2_5; + } + if (decoded.pm2_5_alarm.type == 0x11) { + decoded.pm2_5_alarm.alarm_trigger = decoded.pm2_5_alarm.alarm_trigger || {}; + decoded.pm2_5_alarm.alarm_trigger.pm2_5 = readUInt16LE(bytes, counterObj, 2); + decoded.pm2_5 = decoded.pm2_5_alarm.alarm_trigger.pm2_5; + } + break; + case 0x07: + decoded.pm10 = readUInt16LE(bytes, counterObj, 2); + break; + case 0x08: + decoded.pm10_alarm = decoded.pm10_alarm || {}; + decoded.pm10_alarm.type = readUInt8(bytes, counterObj, 1); + if (decoded.pm10_alarm.type == 0x00) { + decoded.pm10_alarm.collection_error = decoded.pm10_alarm.collection_error || {}; + } + if (decoded.pm10_alarm.type == 0x01) { + decoded.pm10_alarm.lower_range_error = decoded.pm10_alarm.lower_range_error || {}; + } + if (decoded.pm10_alarm.type == 0x02) { + decoded.pm10_alarm.over_range_error = decoded.pm10_alarm.over_range_error || {}; + } + if (decoded.pm10_alarm.type == 0x10) { + decoded.pm10_alarm.alarm_deactivation = decoded.pm10_alarm.alarm_deactivation || {}; + decoded.pm10_alarm.alarm_deactivation.pm10 = readUInt16LE(bytes, counterObj, 2); + decoded.pm10 = decoded.pm10_alarm.alarm_deactivation.pm10; + } + if (decoded.pm10_alarm.type == 0x11) { + decoded.pm10_alarm.alarm_trigger = decoded.pm10_alarm.alarm_trigger || {}; + decoded.pm10_alarm.alarm_trigger.pm10 = readUInt16LE(bytes, counterObj, 2); + decoded.pm10 = decoded.pm10_alarm.alarm_trigger.pm10; + } + break; + case 0x09: + decoded.temperature = readInt16LE(bytes, counterObj, 2) / 10; + break; + case 0x0a: + decoded.temperature_alarm = decoded.temperature_alarm || {}; + decoded.temperature_alarm.type = readUInt8(bytes, counterObj, 1); + if (decoded.temperature_alarm.type == 0x00) { + decoded.temperature_alarm.collection_error = decoded.temperature_alarm.collection_error || {}; + } + if (decoded.temperature_alarm.type == 0x01) { + decoded.temperature_alarm.lower_range_error = decoded.temperature_alarm.lower_range_error || {}; + } + if (decoded.temperature_alarm.type == 0x02) { + decoded.temperature_alarm.over_range_error = decoded.temperature_alarm.over_range_error || {}; + } + if (decoded.temperature_alarm.type == 0x10) { + decoded.temperature_alarm.alarm_deactivation = decoded.temperature_alarm.alarm_deactivation || {}; + decoded.temperature_alarm.alarm_deactivation.temperature = readInt16LE(bytes, counterObj, 2) / 10; + decoded.temperature = decoded.temperature_alarm.alarm_deactivation.temperature; + } + if (decoded.temperature_alarm.type == 0x11) { + decoded.temperature_alarm.alarm_trigger = decoded.temperature_alarm.alarm_trigger || {}; + decoded.temperature_alarm.alarm_trigger.temperature = readInt16LE(bytes, counterObj, 2) / 10; + decoded.temperature = decoded.temperature_alarm.alarm_trigger.temperature; + } + if (decoded.temperature_alarm.type == 0x20) { + decoded.temperature_alarm.burning_alarm_deactivation = decoded.temperature_alarm.burning_alarm_deactivation || {}; + } + if (decoded.temperature_alarm.type == 0x21) { + decoded.temperature_alarm.burning_alarm_trigger = decoded.temperature_alarm.burning_alarm_trigger || {}; + } + break; + case 0x0b: + decoded.humidity = readUInt16LE(bytes, counterObj, 2) / 10; + break; + case 0x0c: + decoded.humidity_alarm = decoded.humidity_alarm || {}; + decoded.humidity_alarm.type = readUInt8(bytes, counterObj, 1); + if (decoded.humidity_alarm.type == 0x00) { + decoded.humidity_alarm.collection_error = decoded.humidity_alarm.collection_error || {}; + } + if (decoded.humidity_alarm.type == 0x01) { + decoded.humidity_alarm.lower_range_error = decoded.humidity_alarm.lower_range_error || {}; + } + if (decoded.humidity_alarm.type == 0x02) { + decoded.humidity_alarm.over_range_error = decoded.humidity_alarm.over_range_error || {}; + } + break; + case 0x0d: + decoded.tvoc = readUInt16LE(bytes, counterObj, 2); + break; + case 0x0e: + decoded.tvoc_alarm = decoded.tvoc_alarm || {}; + decoded.tvoc_alarm.type = readUInt8(bytes, counterObj, 1); + if (decoded.tvoc_alarm.type == 0x00) { + decoded.tvoc_alarm.collection_error = decoded.tvoc_alarm.collection_error || {}; + } + if (decoded.tvoc_alarm.type == 0x01) { + decoded.tvoc_alarm.lower_range_error = decoded.tvoc_alarm.lower_range_error || {}; + } + if (decoded.tvoc_alarm.type == 0x02) { + decoded.tvoc_alarm.over_range_error = decoded.tvoc_alarm.over_range_error || {}; + } + if (decoded.tvoc_alarm.type == 0x10) { + decoded.tvoc_alarm.alarm_deactivation = decoded.tvoc_alarm.alarm_deactivation || {}; + decoded.tvoc_alarm.alarm_deactivation.tvoc = readUInt16LE(bytes, counterObj, 2); + decoded.tvoc = decoded.tvoc_alarm.alarm_deactivation.tvoc; + } + if (decoded.tvoc_alarm.type == 0x11) { + decoded.tvoc_alarm.alarm_trigger = decoded.tvoc_alarm.alarm_trigger || {}; + decoded.tvoc_alarm.alarm_trigger.tvoc = readUInt16LE(bytes, counterObj, 2); + decoded.tvoc = decoded.tvoc_alarm.alarm_trigger.tvoc; + } + break; + case 0x0f: + // 0:Normal, 1:Triggered + decoded.tamper_status = readUInt8(bytes, counterObj, 1); + break; + case 0x10: + decoded.tamper_status_alarm = decoded.tamper_status_alarm || {}; + decoded.tamper_status_alarm.type = readUInt8(bytes, counterObj, 1); + if (decoded.tamper_status_alarm.type == 0x20) { + decoded.tamper_status_alarm.normal = decoded.tamper_status_alarm.normal || {}; + } + if (decoded.tamper_status_alarm.type == 0x21) { + decoded.tamper_status_alarm.trigger = decoded.tamper_status_alarm.trigger || {}; + } + break; + case 0x11: + // 0:Normal, 1:Triggered + decoded.buzzer = readUInt8(bytes, counterObj, 1); + break; + case 0x12: + // 0:vacant, 1:occuppied + decoded.occupancy_status = readUInt8(bytes, counterObj, 1); + break; + case 0x20: + decoded.tvoc_raw_data_1 = decoded.tvoc_raw_data_1 || {}; + decoded.tvoc_raw_data_1.rmox_0 = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_1.rmox_1 = readFloatLE(bytes, counterObj, 4); + break; + case 0x21: + decoded.tvoc_raw_data_2 = decoded.tvoc_raw_data_2 || {}; + decoded.tvoc_raw_data_2.rmox_2 = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_2.rmox_3 = readFloatLE(bytes, counterObj, 4); + break; + case 0x22: + decoded.tvoc_raw_data_3 = decoded.tvoc_raw_data_3 || {}; + decoded.tvoc_raw_data_3.rmox_4 = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_3.rmox_5 = readFloatLE(bytes, counterObj, 4); + break; + case 0x23: + decoded.tvoc_raw_data_4 = decoded.tvoc_raw_data_4 || {}; + decoded.tvoc_raw_data_4.rmox_6 = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_4.rmox_7 = readFloatLE(bytes, counterObj, 4); + break; + case 0x24: + decoded.tvoc_raw_data_5 = decoded.tvoc_raw_data_5 || {}; + decoded.tvoc_raw_data_5.rmox_8 = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_5.rmox_9 = readFloatLE(bytes, counterObj, 4); + break; + case 0x25: + decoded.tvoc_raw_data_6 = decoded.tvoc_raw_data_6 || {}; + decoded.tvoc_raw_data_6.rmox_10 = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_6.rmox_11 = readFloatLE(bytes, counterObj, 4); + break; + case 0x26: + decoded.tvoc_raw_data_7 = decoded.tvoc_raw_data_7 || {}; + decoded.tvoc_raw_data_7.rmox_12 = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_7.zmod4510_rmox_3 = readFloatLE(bytes, counterObj, 4); + break; + case 0x27: + decoded.tvoc_raw_data_8 = decoded.tvoc_raw_data_8 || {}; + decoded.tvoc_raw_data_8.log_rcda = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_8.rhtr = readFloatLE(bytes, counterObj, 4); + break; + case 0x28: + decoded.tvoc_raw_data_9 = decoded.tvoc_raw_data_9 || {}; + decoded.tvoc_raw_data_9.temperature = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_9.iaq = readFloatLE(bytes, counterObj, 4); + break; + case 0x29: + decoded.tvoc_raw_data_10 = decoded.tvoc_raw_data_10 || {}; + decoded.tvoc_raw_data_10.tvoc = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_10.etoh = readFloatLE(bytes, counterObj, 4); + break; + case 0x2a: + decoded.tvoc_raw_data_11 = decoded.tvoc_raw_data_11 || {}; + decoded.tvoc_raw_data_11.eco2 = readFloatLE(bytes, counterObj, 4); + decoded.tvoc_raw_data_11.rel_iaq = readFloatLE(bytes, counterObj, 4); + break; + case 0x2b: + decoded.pm_sensor_working_time = readUInt32LE(bytes, counterObj, 4); + break; + case 0xc9: + // 0:disable, 1:enable + decoded.random_key = readUInt8(bytes, counterObj, 1); + break; + case 0xc8: + // 0:Off, 1:On + decoded.device_status = readUInt8(bytes, counterObj, 1); + break; + case 0x60: + decoded.reporting_interval = decoded.reporting_interval || {}; + // 0:second, 1:min + decoded.reporting_interval.unit = readUInt8(bytes, counterObj, 1); + if (decoded.reporting_interval.unit == 0x00) { + decoded.reporting_interval.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.reporting_interval.unit == 0x01) { + decoded.reporting_interval.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + break; + case 0x61: + // 0:℃, 1:℉ + decoded.temperature_unit = readUInt8(bytes, counterObj, 1); + break; + case 0x67: + // 0:disable, 1:enable + decoded.tamper_alarm_enable = readUInt8(bytes, counterObj, 1); + break; + case 0x62: + // 0:disable, 1:enable + decoded.led_status = readUInt8(bytes, counterObj, 1); + break; + case 0x63: + // 0:disable, 1:enable + decoded.buzzer_enable = readUInt8(bytes, counterObj, 1); + break; + case 0x64: + decoded.buzzer_sleep = decoded.buzzer_sleep || {}; + var buzzer_sleep_type = readUInt8(bytes, counterObj, 1); + if (buzzer_sleep_type == 0x01) { + decoded.buzzer_sleep.item_1 = decoded.buzzer_sleep.item_1 || {}; + // 0:disable, 1:enable + decoded.buzzer_sleep.item_1.enable = readUInt8(bytes, counterObj, 1); + decoded.buzzer_sleep.item_1.start_time = readUInt16LE(bytes, counterObj, 2); + decoded.buzzer_sleep.item_1.end_time = readUInt16LE(bytes, counterObj, 2); + } + if (buzzer_sleep_type == 0x02) { + decoded.buzzer_sleep.item_2 = decoded.buzzer_sleep.item_2 || {}; + // 0:disable, 1:enable + decoded.buzzer_sleep.item_2.enable = readUInt8(bytes, counterObj, 1); + decoded.buzzer_sleep.item_2.start_time = readUInt16LE(bytes, counterObj, 2); + decoded.buzzer_sleep.item_2.end_time = readUInt16LE(bytes, counterObj, 2); + } + break; + case 0x65: + // 0:disable, 1:enable + decoded.buzzer_button_stop_enable = readUInt8(bytes, counterObj, 1); + break; + case 0x66: + decoded.buzzer_silent_time = readUInt16LE(bytes, counterObj, 2); + break; + case 0xc7: + decoded.time_zone = readInt16LE(bytes, counterObj, 2); + break; + case 0xc6: + decoded.daylight_saving_time = decoded.daylight_saving_time || {}; + // 0:disable, 1:enable + decoded.daylight_saving_time.enable = readUInt8(bytes, counterObj, 1); + decoded.daylight_saving_time.daylight_saving_time_offset = readUInt8(bytes, counterObj, 1); + // 1:Jan., 2:Feb., 3:Mar., 4:Apr., 5:May, 6:Jun., 7:Jul., 8:Aug., 9:Sep., 10:Oct., 11:Nov., 12:Dec. + decoded.daylight_saving_time.start_month = readUInt8(bytes, counterObj, 1); + var bitOptions = readUInt8(bytes, counterObj, 1); + // 1:1st, 2: 2nd, 3: 3rd, 4: 4th, 5: last + decoded.daylight_saving_time.start_week_num = extractBits(bitOptions, 4, 8); + // 1:Mon., 2:Tues., 3:Wed., 4:Thurs., 5:Fri., 6:Sat., 7:Sun. + decoded.daylight_saving_time.start_week_day = extractBits(bitOptions, 0, 4); + decoded.daylight_saving_time.start_hour_min = readUInt16LE(bytes, counterObj, 2); + // 1:Jan., 2:Feb., 3:Mar., 4:Apr., 5:May, 6:Jun., 7:Jul., 8:Aug., 9:Sep., 10:Oct., 11:Nov., 12:Dec. + decoded.daylight_saving_time.end_month = readUInt8(bytes, counterObj, 1); + var bitOptions = readUInt8(bytes, counterObj, 1); + // 1:1st, 2: 2nd, 3: 3rd, 4: 4th, 5: last + decoded.daylight_saving_time.end_week_num = extractBits(bitOptions, 4, 8); + // 1:Mon., 2:Tues., 3:Wed., 4:Thurs., 5:Fri., 6:Sat., 7:Sun. + decoded.daylight_saving_time.end_week_day = extractBits(bitOptions, 0, 4); + decoded.daylight_saving_time.end_hour_min = readUInt16LE(bytes, counterObj, 2); + break; + case 0x68: + // 0:disable, 1:enable + decoded.tvoc_raw_reporting_enable = readUInt8(bytes, counterObj, 1); + break; + case 0x69: + decoded.temperature_alarm_settings = decoded.temperature_alarm_settings || {}; + // 0:disable, 1:enable + decoded.temperature_alarm_settings.enable = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:condition: xB, 3:condition: AB + decoded.temperature_alarm_settings.threshold_condition = readUInt8(bytes, counterObj, 1); + decoded.temperature_alarm_settings.threshold_min = readInt16LE(bytes, counterObj, 2) / 10; + decoded.temperature_alarm_settings.threshold_max = readInt16LE(bytes, counterObj, 2) / 10; + break; + case 0x6a: + decoded.pm1_0_alarm_settings = decoded.pm1_0_alarm_settings || {}; + // 0:disable, 1:enable + decoded.pm1_0_alarm_settings.enable = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:condition: xB, 3:condition: AB + decoded.pm1_0_alarm_settings.threshold_condition = readUInt8(bytes, counterObj, 1); + decoded.pm1_0_alarm_settings.threshold_min = readInt16LE(bytes, counterObj, 2); + decoded.pm1_0_alarm_settings.threshold_max = readInt16LE(bytes, counterObj, 2); + break; + case 0x6b: + decoded.pm2_5_alarm_settings = decoded.pm2_5_alarm_settings || {}; + // 0:disable, 1:enable + decoded.pm2_5_alarm_settings.enable = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:condition: xB, 3:condition: AB + decoded.pm2_5_alarm_settings.threshold_condition = readUInt8(bytes, counterObj, 1); + decoded.pm2_5_alarm_settings.threshold_min = readInt16LE(bytes, counterObj, 2); + decoded.pm2_5_alarm_settings.threshold_max = readInt16LE(bytes, counterObj, 2); + break; + case 0x6c: + decoded.pm10_alarm_settings = decoded.pm10_alarm_settings || {}; + // 0:disable, 1:enable + decoded.pm10_alarm_settings.enable = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:condition: xB, 3:condition: AB + decoded.pm10_alarm_settings.threshold_condition = readUInt8(bytes, counterObj, 1); + decoded.pm10_alarm_settings.threshold_min = readInt16LE(bytes, counterObj, 2); + decoded.pm10_alarm_settings.threshold_max = readInt16LE(bytes, counterObj, 2); + break; + case 0x6d: + decoded.tvoc_alarm_settings = decoded.tvoc_alarm_settings || {}; + // 0:disable, 1:enable + decoded.tvoc_alarm_settings.enable = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:condition: xB, 3:condition: AB + decoded.tvoc_alarm_settings.threshold_condition = readUInt8(bytes, counterObj, 1); + decoded.tvoc_alarm_settings.threshold_min = readInt16LE(bytes, counterObj, 2); + decoded.tvoc_alarm_settings.threshold_max = readInt16LE(bytes, counterObj, 2); + break; + case 0x6e: + decoded.vaping_index_alarm_settings = decoded.vaping_index_alarm_settings || {}; + // 0:disable, 1:enable + decoded.vaping_index_alarm_settings.enable = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:condition: xB, 3:condition: AB + decoded.vaping_index_alarm_settings.threshold_condition = readUInt8(bytes, counterObj, 1); + decoded.vaping_index_alarm_settings.threshold_min = readUInt8(bytes, counterObj, 1); + decoded.vaping_index_alarm_settings.threshold_max = readUInt8(bytes, counterObj, 1); + break; + case 0x6f: + decoded.alarm_reporting_times = readUInt16LE(bytes, counterObj, 2); + break; + case 0x70: + // 0:disable, 1:enable + decoded.alarm_deactivation_enable = readUInt8(bytes, counterObj, 1); + break; + case 0x71: + decoded.temperature_calibration_settings = decoded.temperature_calibration_settings || {}; + // 0:disable, 1:enable + decoded.temperature_calibration_settings.enable = readUInt8(bytes, counterObj, 1); + decoded.temperature_calibration_settings.calibration_value = readInt16LE(bytes, counterObj, 2) / 10; + break; + case 0x72: + decoded.humidity_calibration_settings = decoded.humidity_calibration_settings || {}; + // 0:disable, 1:enable + decoded.humidity_calibration_settings.enable = readUInt8(bytes, counterObj, 1); + decoded.humidity_calibration_settings.calibration_value = readInt16LE(bytes, counterObj, 2) / 10; + break; + case 0x73: + decoded.pm1_0_calibration_settings = decoded.pm1_0_calibration_settings || {}; + // 0:disable, 1:enable + decoded.pm1_0_calibration_settings.enable = readUInt8(bytes, counterObj, 1); + decoded.pm1_0_calibration_settings.calibration_value = readInt16LE(bytes, counterObj, 2); + break; + case 0x74: + decoded.pm2_5_calibration_settings = decoded.pm2_5_calibration_settings || {}; + // 0:disable, 1:enable + decoded.pm2_5_calibration_settings.enable = readUInt8(bytes, counterObj, 1); + decoded.pm2_5_calibration_settings.calibration_value = readInt16LE(bytes, counterObj, 2); + break; + case 0x75: + decoded.pm10_calibration_settings = decoded.pm10_calibration_settings || {}; + // 0:disable, 1:enable + decoded.pm10_calibration_settings.enable = readUInt8(bytes, counterObj, 1); + decoded.pm10_calibration_settings.calibration_value = readInt16LE(bytes, counterObj, 2); + break; + case 0x76: + decoded.tvoc_calibration_settings = decoded.tvoc_calibration_settings || {}; + // 0:disable, 1:enable + decoded.tvoc_calibration_settings.enable = readUInt8(bytes, counterObj, 1); + decoded.tvoc_calibration_settings.calibration_value = readInt16LE(bytes, counterObj, 2); + break; + case 0x77: + decoded.vaping_index_calibration_settings = decoded.vaping_index_calibration_settings || {}; + // 0:disable, 1:enable + decoded.vaping_index_calibration_settings.enable = readUInt8(bytes, counterObj, 1); + decoded.vaping_index_calibration_settings.calibration_value = readInt8(bytes, counterObj, 1); + break; + case 0xbf: + decoded.reset = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xbe: + decoded.reboot = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xbd: + decoded.clear_historical_data = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xbc: + decoded.stop_historical_data_retrieval = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xbb: + decoded.retrieve_historical_data_by_time = decoded.retrieve_historical_data_by_time || {}; + decoded.retrieve_historical_data_by_time.time = readUInt32LE(bytes, counterObj, 4); + break; + case 0xba: + decoded.retrieve_historical_data_by_time_range = decoded.retrieve_historical_data_by_time_range || {}; + decoded.retrieve_historical_data_by_time_range.start_time = readUInt32LE(bytes, counterObj, 4); + decoded.retrieve_historical_data_by_time_range.end_time = readUInt32LE(bytes, counterObj, 4); + break; + case 0xb9: + decoded.query_device_status = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xb8: + decoded.synchronize_time = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xb7: + decoded.set_time = decoded.set_time || {}; + decoded.set_time.timestamp = readUInt32LE(bytes, counterObj, 4); + break; + case 0xb6: + decoded.reconnect = readOnlyCommand(bytes, counterObj, 0); + break; + case 0x5f: + decoded.stop_buzzer_alarm = readOnlyCommand(bytes, counterObj, 0); + break; + case 0x5e: + decoded.execute_tvoc_self_clean = readOnlyCommand(bytes, counterObj, 0); + break; + default: + unknown_command = 1; + break; + } + if (unknown_command) { + throw new Error('unknown command: ' + command_id); + } + } + + if (Object.keys(history).length > 0) { + result.history = history; + } else { + for (var k2 in decoded) { + if (decoded.hasOwnProperty(k2)) { + result[k2] = decoded[k2]; + } + } + } + + processTemperature(result); + + return result; +} + +function readOnlyCommand(bytes) { + return 1; +} - return decoded; +function readUnknownDataType(allBytes, counterObj, end) { + throw new Error('Unknown data type encountered. Please Contact Developer.'); +} + +function readBytes(allBytes, counterObj, end) { + var bytes = allBytes.slice(counterObj.i, counterObj.i + end); + counterObj.i += end; + return bytes; } function readProtocolVersion(bytes) { - var major = bytes[0] & 0xff; - var minor = bytes[1] & 0xff; - return "v" + major + "." + minor; + var major = bytes[0] & 0xff; + var minor = bytes[1] & 0xff; + return 'v' + major + '.' + minor; } function readHardwareVersion(bytes) { - var major = bytes[0] & 0xff; - var minor = bytes[1] & 0xff; - return "v" + major + "." + minor; + var major = bytes[0] & 0xff; + var minor = bytes[1] & 0xff; + return 'v' + major + '.' + minor; } function readFirmwareVersion(bytes) { - var major = bytes[0] & 0xff; - var minor = bytes[1] & 0xff; - var release = bytes[2] & 0xff; - var alpha = bytes[3] & 0xff; - var unit_test = bytes[4] & 0xff; - var test = bytes[5] & 0xff; - - var version = "v" + major + "." + minor; - if (release !== 0) version += "-r" + release; - if (alpha !== 0) version += "-a" + alpha; - if (unit_test !== 0) version += "-u" + unit_test; - if (test !== 0) version += "-t" + test; - return version; -} - -function readDeviceStatus(type) { - var device_status_map = { 0: "off", 1: "on" }; - return getValue(device_status_map, type); -} - -function readLoRaWANClass(type) { - var lorawan_class_map = { - 0: "Class A", - 1: "Class B", - 2: "Class C", - 3: "Class CtoB", - }; - return getValue(lorawan_class_map, type); + var major = bytes[0] & 0xff; + var minor = bytes[1] & 0xff; + var release = bytes[2] & 0xff; + var alpha = bytes[3] & 0xff; + var unit_test = bytes[4] & 0xff; + var test = bytes[5] & 0xff; + + var version = 'v' + major + '.' + minor; + if (release !== 0) version += '-r' + release; + if (alpha !== 0) version += '-a' + alpha; + if (unit_test !== 0) version += '-u' + unit_test; + if (test !== 0) version += '-t' + test; + return version; } -function readVapeIndexAlarmType(type) { - var vape_index_alarm_map = { - 0: "collection error", // 0x00 - 1: "lower range error", // 0x01 - 2: "over range error", // 0x02 - 16: "alarm deactivation", // 0x10 - 17: "alarm trigger", // 0x11 - 32: "interference alarm deactivation", // 0x20 - 33: "interference alarm trigger", // 0x21 - }; - return getValue(vape_index_alarm_map, type); +/* eslint-disable */ +function readUInt8(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + return bytes[0] & 0xff; } -function readPMAlarmType(type) { - var pm_alarm_map = { - 0: "collection error", // 0x00 - 1: "lower range error", // 0x01 - 2: "over range error", // 0x02 - 16: "alarm deactivation", // 0x10 - 17: "alarm trigger", // 0x11 - }; - return getValue(pm_alarm_map, type); +function readInt8(allBytes, counterObj, end) { + var ref = readUInt8(allBytes, counterObj, end); + return ref > 0x7f ? ref - 0x100 : ref; } -function readTemperatureAlarmType(type) { - var temperature_alarm_map = { - 0: "collection error", // 0x00 - 1: "lower range error", // 0x01 - 2: "over range error", // 0x02 - 16: "alarm deactivation", // 0x10 - 17: "alarm trigger", // 0x11 - 32: "burning alarm deactivation", // 0x20 - 33: "burning alarm trigger", // 0x21 - }; - return getValue(temperature_alarm_map, type); -} - -function readHumidityAlarmType(type) { - var humidity_alarm_map = { - 0: "collection error", // 0x00 - 1: "lower range error", // 0x01 - 2: "over range error", // 0x02 - }; - return getValue(humidity_alarm_map, type); -} - -function readTVOCAlarmType(type) { - var tvoc_alarm_map = { - 0: "collection error", // 0x00 - 1: "lower range error", // 0x01 - 2: "over range error", // 0x02 - 16: "alarm deactivation", // 0x10 - 17: "alarm trigger", // 0x11 - }; - return getValue(tvoc_alarm_map, type); -} - -function readTamperStatus(type) { - var tamper_status_map = { 0: "normal", 1: "triggered" }; - return getValue(tamper_status_map, type); -} - -function readTamperAlarmType(type) { - var tamper_alarm_map = { - 32: "alarm deactivation", // 0x20 - 33: "alarm trigger", // 0x21 - }; - return getValue(tamper_alarm_map, type); -} - -function readBuzzerStatus(type) { - var buzzer_status_map = { 0: "normal", 1: "triggered" }; - return getValue(buzzer_status_map, type); -} - -function readOccupancyStatus(type) { - var occupancy_status_map = { 0: "vacant", 1: "occupied" }; - return getValue(occupancy_status_map, type); -} - -function readTimeUnitType(type) { - var unit_map = { 0: "second", 1: "minute" }; - return getValue(unit_map, type); -} - -function readTemperatureType(type) { - var unit_map = { 0: "celsius", 1: "fahrenheit" }; - return getValue(unit_map, type); -} - -function readEnableStatus(status) { - var status_map = { 0: "disable", 1: "enable" }; - return getValue(status_map, status); -} - -function readYesNoStatus(type) { - var yes_no_map = { 0: "no", 1: "yes" }; - return getValue(yes_no_map, type); -} - -function readThresholdCondition(type) { - var condition_map = { 0: "disable", 1: "below", 2: "above", 3: "between", 4: "outside" }; - return getValue(condition_map, type); -} - -function readTimeZone(time_zone) { - var timezone_map = { "-720": "UTC-12", "-660": "UTC-11", "-600": "UTC-10", "-570": "UTC-9:30", "-540": "UTC-9", "-480": "UTC-8", "-420": "UTC-7", "-360": "UTC-6", "-300": "UTC-5", "-240": "UTC-4", "-210": "UTC-3:30", "-180": "UTC-3", "-120": "UTC-2", "-60": "UTC-1", 0: "UTC", 60: "UTC+1", 120: "UTC+2", 180: "UTC+3", 210: "UTC+3:30", 240: "UTC+4", 270: "UTC+4:30", 300: "UTC+5", 330: "UTC+5:30", 345: "UTC+5:45", 360: "UTC+6", 390: "UTC+6:30", 420: "UTC+7", 480: "UTC+8", 540: "UTC+9", 570: "UTC+9:30", 600: "UTC+10", 630: "UTC+10:30", 660: "UTC+11", 720: "UTC+12", 765: "UTC+12:45", 780: "UTC+13", 840: "UTC+14" }; - return getValue(timezone_map, time_zone); -} - -function readCmdResult(type) { - var result_map = { 0: "success", 1: "parsing error", 2: "order error", 3: "password error", 4: "read params error", 5: "write params error", 6: "read execution error", 7: "write execution error", 8: "read apply error", 9: "write apply error", 10: "associative error" }; - return getValue(result_map, type); -} - -function readCmdName(type) { - var name_map = { - 60: { level: 1, name: "reporting_interval" }, - 61: { level: 1, name: "temperature_unit" }, - 62: { level: 1, name: "led_status" }, - 63: { level: 1, name: "buzzer_enable" }, - 64: { level: 1, name: "buzzer_sleep" }, - 65: { level: 1, name: "buzzer_button_stop_enable" }, - 66: { level: 1, name: "buzzer_silent_time" }, - 67: { level: 1, name: "tamper_alarm_enable" }, - 68: { level: 1, name: "tvoc_raw_reporting_enable" }, - 69: { level: 1, name: "temperature_alarm_settings" }, - "6a": { level: 1, name: "pm1_0_alarm_settings" }, - "6b": { level: 1, name: "pm2_5_alarm_settings" }, - "6c": { level: 1, name: "pm10_alarm_settings" }, - "6d": { level: 1, name: "tvoc_alarm_settings" }, - "6e": { level: 1, name: "vaping_index_alarm_settings" }, - "6f": { level: 1, name: "alarm_reporting_times" }, - 70: { level: 1, name: "alarm_deactivation_enable" }, - 71: { level: 1, name: "temperature_calibration_settings" }, - 72: { level: 1, name: "humidity_calibration_settings" }, - 73: { level: 1, name: "pm1_0_calibration_settings" }, - 74: { level: 1, name: "pm2_5_calibration_settings" }, - 75: { level: 1, name: "pm10_calibration_settings" }, - 76: { level: 1, name: "tvoc_calibration_settings" }, - 77: { level: 1, name: "vaping_index_calibration_settings" }, - c6: { level: 1, name: "daylight_saving_time" }, - c7: { level: 1, name: "time_zone" }, - be: { level: 1, name: "reboot" }, - b6: { level: 0, name: "reconnect" }, - b8: { level: 0, name: "synchronize_time" }, - b9: { level: 0, name: "query_device_status" }, - "5f": { level: 0, name: "stop_buzzer_alarm" }, - "5e": { level: 0, name: "execute_tvoc_self_clean" }, - }; +function readUInt16LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var value = (bytes[1] << 8) + bytes[0]; + return value & 0xffff; +} - var data = name_map[type]; - if (data === undefined) return "unknown"; - return data.name; +function readInt16LE(allBytes, counterObj, end) { + var ref = readUInt16LE(allBytes, counterObj, end); + return ref > 0x7fff ? ref - 0x10000 : ref; } -/* eslint-disable */ -function readUInt8(bytes) { - return bytes & 0xff; -} - -function readInt8(bytes) { - var ref = readUInt8(bytes); - return ref > 0x7f ? ref - 0x100 : ref; -} - -function readUInt16LE(bytes) { - var value = (bytes[1] << 8) + bytes[0]; - return value & 0xffff; -} - -function readInt16LE(bytes) { - var ref = readUInt16LE(bytes); - return ref > 0x7fff ? ref - 0x10000 : ref; -} - -function readUInt32LE(bytes) { - var value = (bytes[3] << 24) + (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; - return (value & 0xffffffff) >>> 0; -} - -function readInt32LE(bytes) { - var ref = readUInt32LE(bytes); - return ref > 0x7fffffff ? ref - 0x100000000 : ref; -} - -function readFloat16LE(bytes) { - var bits = (bytes[1] << 8) | bytes[0]; - var sign = bits >>> 15 === 0 ? 1.0 : -1.0; - var e = (bits >>> 10) & 0x1f; - var m = e === 0 ? (bits & 0x3ff) << 1 : (bits & 0x3ff) | 0x400; - var f = sign * m * Math.pow(2, e - 25); - - var n = Number(f.toFixed(2)); - return n; -} - -function readFloatLE(bytes) { - var bits = (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; - var sign = bits >>> 31 === 0 ? 1.0 : -1.0; - var e = (bits >>> 23) & 0xff; - var m = e === 0 ? (bits & 0x7fffff) << 1 : (bits & 0x7fffff) | 0x800000; - var f = sign * m * Math.pow(2, e - 150); - return Number(f.toFixed(3)); -} - -function readString(bytes) { - var str = ""; - var i = 0; - var byte1, byte2, byte3, byte4; - while (i < bytes.length) { - byte1 = bytes[i++]; - if (byte1 <= 0x7f) { - str += String.fromCharCode(byte1); - } else if (byte1 <= 0xdf) { - byte2 = bytes[i++]; - str += String.fromCharCode(((byte1 & 0x1f) << 6) | (byte2 & 0x3f)); - } else if (byte1 <= 0xef) { - byte2 = bytes[i++]; - byte3 = bytes[i++]; - str += String.fromCharCode(((byte1 & 0x0f) << 12) | ((byte2 & 0x3f) << 6) | (byte3 & 0x3f)); - } else if (byte1 <= 0xf7) { - byte2 = bytes[i++]; - byte3 = bytes[i++]; - byte4 = bytes[i++]; - var codepoint = ((byte1 & 0x07) << 18) | ((byte2 & 0x3f) << 12) | ((byte3 & 0x3f) << 6) | (byte4 & 0x3f); - codepoint -= 0x10000; - str += String.fromCharCode((codepoint >> 10) + 0xd800); - str += String.fromCharCode((codepoint & 0x3ff) + 0xdc00); - } - } - return str; +function readUInt24LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); // 3 bytes expected + var value = (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; + return value & 0xffffff; } -function readHexString(bytes) { - var temp = []; - for (var idx = 0; idx < bytes.length; idx++) { - temp.push(("0" + (bytes[idx] & 0xff).toString(16)).slice(-2)); - } - return temp.join(""); +function readInt24LE(allBytes, counterObj, end) { + var ref = readUInt24LE(allBytes, counterObj, end); + return ref > 0x7fffff ? ref - 0x1000000 : ref; +} + +function readUInt32LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var value = (bytes[3] << 24) + (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; + return (value & 0xffffffff) >>> 0; } -function getValue(map, key) { - if (RAW_VALUE) return key; - var value = map[key]; - if (!value) value = "unknown"; - return value; +function readInt32LE(allBytes, counterObj, end) { + var ref = readUInt32LE(allBytes, counterObj, end); + return ref > 0x7fffffff ? ref - 0x100000000 : ref; } + +function readFloat16LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var bits = (bytes[1] << 8) | bytes[0]; + var sign = bits >>> 15 === 0 ? 1.0 : -1.0; + var e = (bits >>> 10) & 0x1f; + var m = e === 0 ? (bits & 0x3ff) << 1 : (bits & 0x3ff) | 0x400; + var f = sign * m * Math.pow(2, e - 25); + + var n = Number(f.toFixed(2)); + return n; +} + +function readFloatLE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var bits = (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; + var sign = bits >>> 31 === 0 ? 1.0 : -1.0; + var e = (bits >>> 23) & 0xff; + var m = e === 0 ? (bits & 0x7fffff) << 1 : (bits & 0x7fffff) | 0x800000; + var f = sign * m * Math.pow(2, e - 150); + return f; +} + +function readString(allBytes, counterObj, end) { + var str = ""; + var bytes = readBytes(allBytes, counterObj, end); + var i = 0; + var byte1, byte2, byte3, byte4; + while (i < bytes.length) { + byte1 = bytes[i++]; + if (byte1 <= 0x7f) { + str += String.fromCharCode(byte1); + } else if (byte1 <= 0xdf) { + byte2 = bytes[i++]; + str += String.fromCharCode(((byte1 & 0x1f) << 6) | (byte2 & 0x3f)); + } else if (byte1 <= 0xef) { + byte2 = bytes[i++]; + byte3 = bytes[i++]; + str += String.fromCharCode(((byte1 & 0x0f) << 12) | ((byte2 & 0x3f) << 6) | (byte3 & 0x3f)); + } else if (byte1 <= 0xf7) { + byte2 = bytes[i++]; + byte3 = bytes[i++]; + byte4 = bytes[i++]; + var codepoint = ((byte1 & 0x07) << 18) | ((byte2 & 0x3f) << 12) | ((byte3 & 0x3f) << 6) | (byte4 & 0x3f); + codepoint -= 0x10000; + str += String.fromCharCode((codepoint >> 10) + 0xd800); + str += String.fromCharCode((codepoint & 0x3ff) + 0xdc00); + } + } + return str.replace(/\u0000+$/g, ''); +} + +function readHexString(allBytes, counterObj, end) { + var temp = []; + var bytes = readBytes(allBytes, counterObj, end); + for (var idx = 0; idx < bytes.length; idx++) { + temp.push(("0" + (bytes[idx] & 0xff).toString(16)).slice(-2)); + } + return temp.join("").replace(/\u0000+$/g, ''); +} + +function readHexStringLE(allBytes, counterObj, end) { + var temp = []; + var bytes = readBytes(allBytes, counterObj, end); + for (var idx = bytes.length - 1; idx >= 0; idx--) { + temp.push(("0" + (bytes[idx] & 0xff).toString(16)).slice(-2)); + } + return temp.join("").replace(/\u0000+$/g, ''); +} + +function extractBits(byte, startBit, endBit) { + if (byte < 0 || byte > 0xffff) { + throw new Error("byte must be in range 0..65535"); + } + if (startBit >= endBit) { + throw new Error("invalid bit range"); + } + + var width = endBit - startBit; + var mask = (1 << width) - 1; + return (byte >>> startBit) & mask; +} + +function pickArrayItem(array, index, idName) { + for (var i = 0; i < array.length; i++) { + if (array[i][idName] === index) { + return array[i]; + } + } + + return {}; +} + +function insertArrayItem(array, item, idName) { + for (var i = 0; i < array.length; i++) { + if (array[i][idName] === item[idName]) { + array[i] = item; + return; + } + } + array.push(item); +} + +function readCommand(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var cmd = bytes + .map(function(b) { + var hex = b.toString(16); + return hex.length === 1 ? '0' + hex : hex; + }) + .join('') + .toLowerCase(); + + var map = cmdMap(); + for (var key in map) { + var xxs = []; + var isMatch = false; + if (key.length !== cmd.length) { + continue; + } + for (var i = 0; i < key.length; i += 2) { + var hexString = key.slice(i, i + 2); + var cmdString = cmd.slice(i, i + 2); + if (hexString === cmdString || hexString === 'xx') { + if (hexString === 'xx') { + xxs.push('.' + parseInt(cmdString, 16)); + } + isMatch = true; + continue; + } else { + isMatch = false; + break; + } + } + if (isMatch) { + var propertyId = map[key]; + if (propertyId.indexOf('._item') === -1) { + return propertyId; + } + var j = 0; + var result = propertyId.replace(/\._item/g, function() { + return xxs[j++]; + }); + return result; + } + } + return null; +} + +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; +} + +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; +} + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } + + current[parts[parts.length - 1]] = value; + return obj; +} + +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); +} + +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); +} + +function getAllLeafPaths(obj, prefix) { + var paths = []; + + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } + } + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; + +} + +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); +} + +function cmdMap() { + return { + "10": "tamper_status_alarm", + "11": "buzzer", + "12": "occupancy_status", + "20": "tvoc_raw_data_1", + "21": "tvoc_raw_data_2", + "22": "tvoc_raw_data_3", + "23": "tvoc_raw_data_4", + "24": "tvoc_raw_data_5", + "25": "tvoc_raw_data_6", + "26": "tvoc_raw_data_7", + "27": "tvoc_raw_data_8", + "28": "tvoc_raw_data_9", + "29": "tvoc_raw_data_10", + "60": "reporting_interval", + "61": "temperature_unit", + "62": "led_status", + "63": "buzzer_enable", + "64": "buzzer_sleep", + "65": "buzzer_button_stop_enable", + "66": "buzzer_silent_time", + "67": "tamper_alarm_enable", + "68": "tvoc_raw_reporting_enable", + "69": "temperature_alarm_settings", + "70": "alarm_deactivation_enable", + "71": "temperature_calibration_settings", + "72": "humidity_calibration_settings", + "73": "pm1_0_calibration_settings", + "74": "pm2_5_calibration_settings", + "75": "pm10_calibration_settings", + "76": "tvoc_calibration_settings", + "77": "vaping_index_calibration_settings", + "1020": "tamper_status_alarm.normal", + "1021": "tamper_status_alarm.trigger", + "6000": "reporting_interval.seconds_of_time", + "6001": "reporting_interval.minutes_of_time", + "6401": "buzzer_sleep.item_1", + "6402": "buzzer_sleep.item_2", + "fe": "request_check_order", + "f4": "request_full_inspection", + "f400": "request_full_inspection.start_inspection", + "f401": "request_full_inspection.control", + "f402": "request_full_inspection.reading", + "f403": "request_full_inspection.end_inspection", + "ef": "request_command_queries", + "ee": "all_configurations_request_by_device", + "cf": "lorawan_configuration_settings", + "cf00": "lorawan_configuration_settings.mode", + "df": "tsl_version", + "db": "product_sn", + "da": "version", + "d9": "oem_id", + "00": "battery", + "01": "vaping_index", + "02": "vaping_index_alarm", + "0200": "vaping_index_alarm.collection_error", + "0201": "vaping_index_alarm.lower_range_error", + "0202": "vaping_index_alarm.over_range_error", + "0210": "vaping_index_alarm.alarm_deactivation", + "0211": "vaping_index_alarm.alarm_trigger", + "0220": "vaping_index_alarm.interference_alarm_deactivation", + "0221": "vaping_index_alarm.interference_alarm_trigger", + "03": "pm1_0", + "04": "pm1_0_alarm", + "0400": "pm1_0_alarm.collection_error", + "0401": "pm1_0_alarm.lower_range_error", + "0402": "pm1_0_alarm.over_range_error", + "0410": "pm1_0_alarm.alarm_deactivation", + "0411": "pm1_0_alarm.alarm_trigger", + "05": "pm2_5", + "06": "pm2_5_alarm", + "0600": "pm2_5_alarm.collection_error", + "0601": "pm2_5_alarm.lower_range_error", + "0602": "pm2_5_alarm.over_range_error", + "0610": "pm2_5_alarm.alarm_deactivation", + "0611": "pm2_5_alarm.alarm_trigger", + "07": "pm10", + "08": "pm10_alarm", + "0800": "pm10_alarm.collection_error", + "0801": "pm10_alarm.lower_range_error", + "0802": "pm10_alarm.over_range_error", + "0810": "pm10_alarm.alarm_deactivation", + "0811": "pm10_alarm.alarm_trigger", + "09": "temperature", + "0a": "temperature_alarm", + "0a00": "temperature_alarm.collection_error", + "0a01": "temperature_alarm.lower_range_error", + "0a02": "temperature_alarm.over_range_error", + "0a10": "temperature_alarm.alarm_deactivation", + "0a11": "temperature_alarm.alarm_trigger", + "0a20": "temperature_alarm.burning_alarm_deactivation", + "0a21": "temperature_alarm.burning_alarm_trigger", + "0b": "humidity", + "0c": "humidity_alarm", + "0c00": "humidity_alarm.collection_error", + "0c01": "humidity_alarm.lower_range_error", + "0c02": "humidity_alarm.over_range_error", + "0d": "tvoc", + "0e": "tvoc_alarm", + "0e00": "tvoc_alarm.collection_error", + "0e01": "tvoc_alarm.lower_range_error", + "0e02": "tvoc_alarm.over_range_error", + "0e10": "tvoc_alarm.alarm_deactivation", + "0e11": "tvoc_alarm.alarm_trigger", + "0f": "tamper_status", + "2a": "tvoc_raw_data_11", + "2b": "pm_sensor_working_time", + "c9": "random_key", + "c8": "device_status", + "c7": "time_zone", + "c6": "daylight_saving_time", + "6a": "pm1_0_alarm_settings", + "6b": "pm2_5_alarm_settings", + "6c": "pm10_alarm_settings", + "6d": "tvoc_alarm_settings", + "6e": "vaping_index_alarm_settings", + "6f": "alarm_reporting_times", + "bf": "reset", + "be": "reboot", + "bd": "clear_historical_data", + "bc": "stop_historical_data_retrieval", + "bb": "retrieve_historical_data_by_time", + "ba": "retrieve_historical_data_by_time_range", + "b9": "query_device_status", + "b8": "synchronize_time", + "b7": "set_time", + "b6": "reconnect", + "5f": "stop_buzzer_alarm", + "5e": "execute_tvoc_self_clean" + }; +} +function processTemperature(decoded) { + var allTemperatureProperties = { + "temperature": { + "precision": 1 + }, + "temperature_alarm.alarm_deactivation.temperature": { + "precision": 1 + }, + "temperature_alarm.alarm_trigger.temperature": { + "precision": 1 + }, + "temperature_alarm_settings.threshold_min": { + "precision": 1 + }, + "temperature_alarm_settings.threshold_max": { + "precision": 1 + }, + "temperature_calibration_settings.calibration_value": { + "precision": 1 + } +}; + var leafPaths = getAllLeafPaths(decoded); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + if (hasPath(decoded, propertyId)) { + setPath(decoded, fahrenheitProperty, Number((getPath(decoded, propertyId) * 1.8 + 32).toFixed(allTemperatureProperties[newPropertyId].precision))); + setPath(decoded, celsiusProperty, Number(getPath(decoded, propertyId).toFixed(allTemperatureProperties[newPropertyId].precision))); + } + } + } + return decoded; +} \ No newline at end of file diff --git a/vendors/milesight-iot/gs-series/gs601/gs601-encoder.js b/vendors/milesight-iot/gs-series/gs601/gs601-encoder.js index 9c6817e..a4703e0 100644 --- a/vendors/milesight-iot/gs-series/gs601/gs601-encoder.js +++ b/vendors/milesight-iot/gs-series/gs601/gs601-encoder.js @@ -5,1063 +5,1442 @@ * * @product GS601 */ -var RAW_VALUE = 0x01; -var WITH_QUERY_CMD = 0x00; /* eslint no-redeclare: "off" */ /* eslint-disable */ // Chirpstack v4 function encodeDownlink(input) { - var encoded = milesightDeviceEncode(input.data); - return { bytes: encoded }; + var encoded = milesightDeviceEncode(input.data); + return { bytes: encoded }; } // Chirpstack v3 function Encode(fPort, obj) { - return milesightDeviceEncode(obj); + return milesightDeviceEncode(obj); } // The Things Network function Encoder(obj, port) { - return milesightDeviceEncode(obj); + return milesightDeviceEncode(obj); } /* eslint-enable */ function milesightDeviceEncode(payload) { - var encoded = []; - - if ("frame" in payload) { - encoded = encoded.concat(setFrame(payload.frame)); - } - if ("reporting_interval" in payload) { - var cmd_buffer = setReportingInterval(payload.reporting_interval); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("temperature_unit" in payload) { - var cmd_buffer = setTemperatureUnit(payload.temperature_unit); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("led_status" in payload) { - var cmd_buffer = setLedStatus(payload.led_status); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("buzzer_enable" in payload) { - var cmd_buffer = setBuzzerEnable(payload.buzzer_enable); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("buzzer_sleep" in payload) { - if ("item_1" in payload.buzzer_sleep) { - var cmd_buffer = setBuzzerSleepSettings(1, payload.buzzer_sleep.item_1); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("item_2" in payload.buzzer_sleep) { - var cmd_buffer = setBuzzerSleepSettings(2, payload.buzzer_sleep.item_2); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - } - if ("buzzer_button_stop_enable" in payload) { - var cmd_buffer = setBuzzerButtonStopEnable(payload.buzzer_button_stop_enable); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("buzzer_silent_time" in payload) { - var cmd_buffer = setBuzzerSilentTime(payload.buzzer_silent_time); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("tamper_alarm_enable" in payload) { - var cmd_buffer = setTamperAlarmEnable(payload.tamper_alarm_enable); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("tvoc_raw_reporting_enable" in payload) { - var cmd_buffer = setTvocRawReportingEnable(payload.tvoc_raw_reporting_enable); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("temperature_alarm_settings" in payload) { - var cmd_buffer = setTemperatureAlarmSettings(payload.temperature_alarm_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("pm1_0_alarm_settings" in payload) { - var cmd_buffer = setPM1AlarmSettings(payload.pm1_0_alarm_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("pm2_5_alarm_settings" in payload) { - var cmd_buffer = setPM25AlarmSettings(payload.pm2_5_alarm_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("pm10_alarm_settings" in payload) { - var cmd_buffer = setPM10AlarmSettings(payload.pm10_alarm_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("tvoc_alarm_settings" in payload) { - var cmd_buffer = setTVOCAlarmSettings(payload.tvoc_alarm_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("vaping_index_alarm_settings" in payload) { - var cmd_buffer = setVapingIndexAlarmSettings(payload.vaping_index_alarm_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("alarm_reporting_times" in payload) { - var cmd_buffer = setAlarmReportingTimes(payload.alarm_reporting_times); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("alarm_deactivation_enable" in payload) { - var cmd_buffer = setAlarmDeactivateEnable(payload.alarm_deactivation_enable); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("temperature_calibration_settings" in payload) { - var cmd_buffer = setTemperatureCalibrationSettings(payload.temperature_calibration_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("humidity_calibration_settings" in payload) { - var cmd_buffer = setHumidityCalibrationSettings(payload.humidity_calibration_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("pm1_0_calibration_settings" in payload) { - var cmd_buffer = setPM1CalibrationSettings(payload.pm1_0_calibration_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("pm2_5_calibration_settings" in payload) { - var cmd_buffer = setPM25CalibrationSettings(payload.pm2_5_calibration_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("pm10_calibration_settings" in payload) { - var cmd_buffer = setPM10CalibrationSettings(payload.pm10_calibration_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("tvoc_calibration_settings" in payload) { - var cmd_buffer = setTVOCCalibrationSettings(payload.tvoc_calibration_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("vaping_index_calibration_settings" in payload) { - var cmd_buffer = setVapingIndexCalibrationSettings(payload.vaping_index_calibration_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("time_zone" in payload) { - var cmd_buffer = setTimeZone(payload.time_zone); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("daylight_saving_time" in payload) { - var cmd_buffer = setDaylightSavingTimeSettings(payload.daylight_saving_time); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("reboot" in payload) { - encoded = encoded.concat(reboot()); - } - if ("synchronize_time" in payload) { - encoded = encoded.concat(synchronizeTime()); - } - if ("query_device_status" in payload) { - encoded = encoded.concat(queryDeviceStatus()); - } - if ("reconnect" in payload) { - encoded = encoded.concat(reconnect()); - } - if ("stop_buzzer_alarm" in payload) { - encoded = encoded.concat(stopBuzzerAlarm()); - } - if ("execute_tvoc_self_clean" in payload) { - encoded = encoded.concat(executeTVOCSelfClean()); - } - - return encoded; -} - -/** - * frame - * @param {number} frame values: (0: normal, 1: debug) - * @example { "frame": 0 } - */ -function setFrame(frame) { - var buffer = new Buffer(2); - buffer.writeUInt8(0xfe); - buffer.writeUInt8(frame); - return buffer.toBytes(); -} - -/** - * report interval - * @param {object} reporting_interval - * @param {number} reporting_interval.unit values: (0: second, 1: minute) - * @param {number} reporting_interval.seconds_of_time unit: second - * @param {number} reporting_interval.minutes_of_time unit: minute - * @example { "reporting_interval": { "unit": 0, "seconds_of_time": 300 } } - */ -function setReportingInterval(reporting_interval) { - var unit = reporting_interval.unit; - var seconds_of_time = reporting_interval.seconds_of_time; - var minutes_of_time = reporting_interval.minutes_of_time; - - var unit_map = { 0: "second", 1: "minute" }; - var unit_values = getValues(unit_map); - if (unit_values.indexOf(unit) === -1) { - throw new Error("reporting_interval.unit must be one of " + unit_values.join(", ")); - } - if (getValue(unit_map, unit) === 0 && (seconds_of_time < 10 || seconds_of_time > 64800)) { - throw new Error("reporting_interval.seconds_of_time must be between 10 and 64800 when reporting_interval.unit is 0"); - } - if (getValue(unit_map, unit) === 1 && (minutes_of_time < 1 || minutes_of_time > 1440)) { - throw new Error("reporting_interval.minutes_of_time must be between 1 and 1440 when reporting_interval.unit is 1"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x60); - buffer.writeUInt8(getValue(unit_map, unit)); - buffer.writeUInt16LE(getValue(unit_map, unit) === 0 ? seconds_of_time : minutes_of_time); - return buffer.toBytes(); -} - -/** - * temperature unit - * @param {number} temperature_unit values: (0: celsius, 1: fahrenheit) - * @example { "temperature_unit": 0 } - */ -function setTemperatureUnit(temperature_unit) { - var unit_map = { 0: "celsius", 1: "fahrenheit" }; - var unit_values = getValues(unit_map); - if (unit_values.indexOf(temperature_unit) === -1) { - throw new Error("temperature_unit must be one of " + unit_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x61); - buffer.writeUInt8(getValue(unit_map, temperature_unit)); - return buffer.toBytes(); -} - -/** - * led indicator - * @param {number} led_status values: (0: disable, 1: enable) - * @example { "led_status": 1 } - */ -function setLedStatus(led_status) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(led_status) === -1) { - throw new Error("led_status must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x62); - buffer.writeUInt8(getValue(enable_map, led_status)); - return buffer.toBytes(); -} - -/** - * buzzer enable - * @param {number} buzzer_enable values: (0: disable, 1: enable) - * @example { "buzzer_enable": 1 } - */ -function setBuzzerEnable(buzzer_enable) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(buzzer_enable) === -1) { - throw new Error("buzzer_enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x63); - buffer.writeUInt8(getValue(enable_map, buzzer_enable)); - return buffer.toBytes(); -} - -/** - * buzzer sleep settings - * @param {number} index - * @param {object} buzzer_sleep - * @param {number} buzzer_sleep.enable values: (0: disable, 1: enable) - * @param {number} buzzer_sleep.start_time unit: minute - * @param {number} buzzer_sleep.end_time unit: minute - * @example { "buzzer_sleep": { "item_1": { "enable": 1, "start_time": 0, "end_time": 1440 }, "item_2": { "enable": 1, "start_time": 0, "end_time": 1440 }} } - */ -function setBuzzerSleepSettings(index, buzzer_sleep) { - var enable = buzzer_sleep.enable; - var start_time = buzzer_sleep.start_time; - var end_time = buzzer_sleep.end_time; - - var index_values = [1, 2]; - if (index_values.indexOf(index) === -1) { - throw new Error("buzzer_sleep.item_1 or buzzer_sleep.item_2"); - } - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("buzzer_sleep.item_" + index + ".enable must be one of " + enable_values.join(", ")); - } - if (start_time < 0 || start_time > 1440) { - throw new Error("buzzer_sleep.item_" + index + ".start_time must be between 0 and 1440"); - } - if (end_time < 0 || end_time > 1440) { - throw new Error("buzzer_sleep.item_" + index + ".end_time must be between 0 and 1440"); - } - - var buffer = new Buffer(7); - buffer.writeUInt8(0x64); - buffer.writeUInt8(index); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt16LE(start_time); - buffer.writeUInt16LE(end_time); - return buffer.toBytes(); -} - -/** - * buzzer button stop enable - * @param {number} buzzer_button_stop_enable values: (0: disable, 1: enable) - * @example { "buzzer_button_stop_enable": 1 } - */ -function setBuzzerButtonStopEnable(buzzer_button_stop_enable) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(buzzer_button_stop_enable) === -1) { - throw new Error("buzzer_button_stop_enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x65); - buffer.writeUInt8(getValue(enable_map, buzzer_button_stop_enable)); - return buffer.toBytes(); -} - -/** - * buzzer silent time - * @param {number} buzzer_silent_time unit: minute, range: [0, 1440] - * @example { "buzzer_silent_time": 10 } - */ -function setBuzzerSilentTime(buzzer_silent_time) { - if (buzzer_silent_time < 0 || buzzer_silent_time > 1440) { - throw new Error("buzzer_silent_time must be between 0 and 1440"); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x66); - buffer.writeUInt16LE(buzzer_silent_time); - return buffer.toBytes(); -} - -/** - * tamper alarm enable - * @param {number} tamper_alarm_enable values: (0: disable, 1: enable) - * @example { "tamper_alarm_enable": 1 } - */ -function setTamperAlarmEnable(tamper_alarm_enable) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(tamper_alarm_enable) === -1) { - throw new Error("tamper_alarm_enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x67); - buffer.writeUInt8(getValue(enable_map, tamper_alarm_enable)); - return buffer.toBytes(); -} - -/** - * tvoc raw data report - * @param {number} tvoc_raw_reporting_enable values: (0: disable, 1: enable) - * @example { "tvoc_raw_reporting_enable": 1 } - */ -function setTvocRawReportingEnable(tvoc_raw_reporting_enable) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(tvoc_raw_reporting_enable) === -1) { - throw new Error("tvoc_raw_reporting_enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x68); - buffer.writeUInt8(getValue(enable_map, tvoc_raw_reporting_enable)); - return buffer.toBytes(); -} - -/** - * temperature alarm settings - * @param {object} temperature_alarm_settings - * @param {number} temperature_alarm_settings.enable values: (0: disable, 1: enable) - * @param {number} temperature_alarm_settings.condition values: (1: below, 2: above, 3: between, 4: outside) - * @param {number} temperature_alarm_settings.threshold_min unit: Celsius - * @param {number} temperature_alarm_settings.threshold_max unit: Celsius - * @example { "temperature_alarm_settings": { "enable": 1, "condition": 2, "threshold_min": 30, "threshold_max": 40 } } - */ -function setTemperatureAlarmSettings(temperature_alarm_settings) { - var enable = temperature_alarm_settings.enable; - var condition = temperature_alarm_settings.condition; - var threshold_min = temperature_alarm_settings.threshold_min; - var threshold_max = temperature_alarm_settings.threshold_max; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("temperature_alarm_settings.enable must be one of " + enable_values.join(", ")); - } - var condition_map = { 0: "disable", 1: "below", 2: "above", 3: "between", 4: "outside" }; - var condition_values = getValues(condition_map); - if (condition_values.indexOf(condition) === -1) { - throw new Error("temperature_alarm_settings.condition must be one of " + condition_values.join(", ")); - } - - var buffer = new Buffer(7); - buffer.writeUInt8(0x69); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt8(getValue(condition_map, condition)); - buffer.writeInt16LE(threshold_min * 10); - buffer.writeInt16LE(threshold_max * 10); - return buffer.toBytes(); -} - -/** - * pm1.0 alarm settings - * @param {object} pm1_0_alarm_settings - * @param {number} pm1_0_alarm_settings.enable values: (0: disable, 1: enable) - * @param {number} pm1_0_alarm_settings.threshold_max - * @example { "pm1_0_alarm_settings": { "enable": 1, "threshold_max": 40 } } - */ -function setPM1AlarmSettings(pm1_0_alarm_settings) { - var enable = pm1_0_alarm_settings.enable; - var threshold_max = pm1_0_alarm_settings.threshold_max; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("pm1_0_alarm_settings.enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(7); - buffer.writeUInt8(0x6a); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt8(0x02); // above - buffer.writeInt16LE(0x00); - buffer.writeInt16LE(threshold_max); - return buffer.toBytes(); -} - -/** - * pm2.5 threshold config - * @param {object} pm2_5_alarm_settings - * @param {number} pm2_5_alarm_settings.enable values: (0: disable, 1: enable) - * @param {number} pm2_5_alarm_settings.threshold_max - * @example { "pm2_5_alarm_settings": { "enable": 1, "condition": 2, "threshold_min": 30, "threshold_max": 40 } } - */ -function setPM25AlarmSettings(pm2_5_alarm_settings) { - var enable = pm2_5_alarm_settings.enable; - var threshold_max = pm2_5_alarm_settings.threshold_max; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("pm_2_5_alarm_settings.enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(7); - buffer.writeUInt8(0x6b); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt8(0x02); // above - buffer.writeInt16LE(0x00); - buffer.writeInt16LE(threshold_max); - return buffer.toBytes(); -} - -/** - * pm10 threshold config - * @param {object} pm10_alarm_settings - * @param {number} pm10_alarm_settings.enable values: (0: disable, 1: enable) - * @param {number} pm10_alarm_settings.threshold_max - * @example { "pm10_alarm_settings": { "enable": 1, "threshold_max": 40 } } - */ -function setPM10AlarmSettings(pm10_alarm_settings) { - var enable = pm10_alarm_settings.enable; - var threshold_max = pm10_alarm_settings.threshold_max; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("pm_10_alarm_settings.enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(7); - buffer.writeUInt8(0x6c); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt8(0x02); // above - buffer.writeInt16LE(0x00); - buffer.writeInt16LE(threshold_max); - return buffer.toBytes(); -} - -/** - * tvoc alarm settings - * @param {object} tvoc_alarm_settings - * @param {number} tvoc_alarm_settings.enable values: (0: disable, 1: enable) - * @param {number} tvoc_alarm_settings.threshold_max - * @example { "tvoc_alarm_settings": { "enable": 1, "threshold_max": 40 } } - */ -function setTVOCAlarmSettings(tvoc_alarm_settings) { - var enable = tvoc_alarm_settings.enable; - var threshold_max = tvoc_alarm_settings.threshold_max; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("tvoc_alarm_settings.enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(7); - buffer.writeUInt8(0x6d); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt8(0x02); // above - buffer.writeInt16LE(0x00); - buffer.writeInt16LE(threshold_max); - return buffer.toBytes(); -} - -/** - * vaping index alarm settings - * @param {object} vaping_index_alarm_settings - * @param {number} vaping_index_alarm_settings.enable values: (0: disable, 1: enable) - * @param {number} vaping_index_alarm_settings.threshold_max - * @example { "vaping_index_alarm_settings": { "enable": 1, "threshold_max": 4 } } - */ -function setVapingIndexAlarmSettings(vaping_index_alarm_settings) { - var enable = vaping_index_alarm_settings.enable; - var threshold_max = vaping_index_alarm_settings.threshold_max; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("vaping_index_alarm_settings.enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(5); - buffer.writeUInt8(0x6e); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt8(0x02); // above - buffer.writeUInt8(0x00); - buffer.writeUInt8(threshold_max); - return buffer.toBytes(); -} - -/** - * alarm reporting times - * @param {number} alarm_reporting_times range: [1, 1000] - * @example { "alarm_reporting_times": 10 } - */ -function setAlarmReportingTimes(alarm_reporting_times) { - if (alarm_reporting_times < 1 || alarm_reporting_times > 1000) { - throw new Error("alarm_reporting_times must be between 1 and 1000"); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x6f); - buffer.writeUInt16LE(alarm_reporting_times); - return buffer.toBytes(); + processTemperature(payload); + var encoded = []; + //0xfe + if ('request_check_order' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xfe); + if (payload.request_check_order.order < 0 || payload.request_check_order.order > 255) { + throw new Error('request_check_order.order must be between 0 and 255'); + } + buffer.writeUInt8(payload.request_check_order.order); + encoded = encoded.concat(buffer.toBytes()); + } + //0xf4 + if ('request_full_inspection' in payload) { + var buffer = new Buffer(); + if (isValid(payload.request_full_inspection.start_inspection)) { + buffer.writeUInt8(0xf4); + buffer.writeUInt8(0x00); + } + if (isValid(payload.request_full_inspection.control)) { + buffer.writeUInt8(0xf4); + buffer.writeUInt8(0x01); + if (payload.request_full_inspection.control.length < 0 || payload.request_full_inspection.control.length > 65535) { + throw new Error('request_full_inspection.control.length must be between 0 and 65535'); + } + buffer.writeUInt16LE(payload.request_full_inspection.control.length); + buffer.writeBytes(payload.request_full_inspection.control.data, payload.request_full_inspection.control.length, true); + } + if (isValid(payload.request_full_inspection.reading)) { + buffer.writeUInt8(0xf4); + buffer.writeUInt8(0x02); + buffer.writeUInt16LE(payload.request_full_inspection.reading.length); + buffer.writeBytes(payload.request_full_inspection.reading.data, payload.request_full_inspection.reading.length, true); + } + if (isValid(payload.request_full_inspection.end_inspection)) { + buffer.writeUInt8(0xf4); + buffer.writeUInt8(0x03); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0xef + if ('req' in payload) { + var buffer = new Buffer(); + var reqList = payload.req; + for (var idx = 0; idx < reqList.length; idx++) { + var req_command = reqList[idx]; + var pureNumber = []; + var formateStrParts = []; + + req_command.split('.').forEach(function(part) { + if (/^[0-9]+$/.test(part)) { + // padStart ES5 兼容 + var hex = Number(part).toString(16); + while (hex.length < 2) { hex = '0' + hex; } + pureNumber.push(hex); + formateStrParts.push('_item'); + } else { + formateStrParts.push(part); + } + }); + + var formateStr = formateStrParts.join('.'); + var hexString = cmdMap()[formateStr]; + + if (hexString && hexString.indexOf('xx') !== -1) { + var i = 0; + hexString = hexString.replace(/xx/g, function() { + return pureNumber[i++]; + }); + } + + if (hexString) { + var length = hexString.length / 2; + buffer.writeUInt8(0xef); + buffer.writeUInt8(length); + buffer.writeHexString(hexString, length, true); + } + } + encoded = encoded.concat(buffer.toBytes()); + } + //0xee + if ('all_configurations_request_by_device' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xee); + encoded = encoded.concat(buffer.toBytes()); + } + //0xcf + if ('lorawan_configuration_settings' in payload) { + var buffer = new Buffer(); + if (isValid(payload.lorawan_configuration_settings.mode)) { + buffer.writeUInt8(0xcf); + // 0:ClassA, 1:ClassB, 2:ClassC, 3:ClassC to B + buffer.writeUInt8(0x00); + // 0:ClassA, 1:ClassB, 2:ClassC, 3:ClassC to B + buffer.writeUInt8(payload.lorawan_configuration_settings.mode); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0xdb + if ('product_sn' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xdb); + buffer.writeHexString(payload.product_sn, 8); + encoded = encoded.concat(buffer.toBytes()); + } + //0xd9 + if ('oem_id' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xd9); + buffer.writeHexString(payload.oem_id, 2); + encoded = encoded.concat(buffer.toBytes()); + } + //0x00 + if ('battery' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x00); + if (payload.battery < 0 || payload.battery > 100) { + throw new Error('battery must be between 0 and 100'); + } + buffer.writeUInt8(payload.battery); + encoded = encoded.concat(buffer.toBytes()); + } + //0x01 + if ('vaping_index' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x01); + if (payload.vaping_index < 0 || payload.vaping_index > 100) { + throw new Error('vaping_index must be between 0 and 100'); + } + buffer.writeUInt8(payload.vaping_index); + encoded = encoded.concat(buffer.toBytes()); + } + //0x02 + if ('vaping_index_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x02); + buffer.writeUInt8(payload.vaping_index_alarm.type); + if (payload.vaping_index_alarm.type == 0x00) { + } + if (payload.vaping_index_alarm.type == 0x01) { + } + if (payload.vaping_index_alarm.type == 0x02) { + } + if (payload.vaping_index_alarm.type == 0x10) { + if (payload.vaping_index_alarm.alarm_deactivation.vaping_index < 0 || payload.vaping_index_alarm.alarm_deactivation.vaping_index > 100) { + throw new Error('vaping_index_alarm.alarm_deactivation.vaping_index must be between 0 and 100'); + } + buffer.writeUInt8(payload.vaping_index_alarm.alarm_deactivation.vaping_index); + } + if (payload.vaping_index_alarm.type == 0x11) { + if (payload.vaping_index_alarm.alarm_trigger.vaping_index < 0 || payload.vaping_index_alarm.alarm_trigger.vaping_index > 100) { + throw new Error('vaping_index_alarm.alarm_trigger.vaping_index must be between 0 and 100'); + } + buffer.writeUInt8(payload.vaping_index_alarm.alarm_trigger.vaping_index); + } + if (payload.vaping_index_alarm.type == 0x20) { + } + if (payload.vaping_index_alarm.type == 0x21) { + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x03 + if ('pm1_0' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x03); + if (payload.pm1_0 < 0 || payload.pm1_0 > 1000) { + throw new Error('pm1_0 must be between 0 and 1000'); + } + buffer.writeUInt16LE(payload.pm1_0); + encoded = encoded.concat(buffer.toBytes()); + } + //0x04 + if ('pm1_0_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x04); + buffer.writeUInt8(payload.pm1_0_alarm.type); + if (payload.pm1_0_alarm.type == 0x00) { + } + if (payload.pm1_0_alarm.type == 0x01) { + } + if (payload.pm1_0_alarm.type == 0x02) { + } + if (payload.pm1_0_alarm.type == 0x10) { + if (payload.pm1_0_alarm.alarm_deactivation.pm1_0 < 0 || payload.pm1_0_alarm.alarm_deactivation.pm1_0 > 1000) { + throw new Error('pm1_0_alarm.alarm_deactivation.pm1_0 must be between 0 and 1000'); + } + buffer.writeUInt16LE(payload.pm1_0_alarm.alarm_deactivation.pm1_0); + } + if (payload.pm1_0_alarm.type == 0x11) { + if (payload.pm1_0_alarm.alarm_trigger.pm1_0 < 0 || payload.pm1_0_alarm.alarm_trigger.pm1_0 > 1000) { + throw new Error('pm1_0_alarm.alarm_trigger.pm1_0 must be between 0 and 1000'); + } + buffer.writeUInt16LE(payload.pm1_0_alarm.alarm_trigger.pm1_0); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x05 + if ('pm2_5' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x05); + if (payload.pm2_5 < 0 || payload.pm2_5 > 1000) { + throw new Error('pm2_5 must be between 0 and 1000'); + } + buffer.writeUInt16LE(payload.pm2_5); + encoded = encoded.concat(buffer.toBytes()); + } + //0x06 + if ('pm2_5_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x06); + buffer.writeUInt8(payload.pm2_5_alarm.type); + if (payload.pm2_5_alarm.type == 0x00) { + } + if (payload.pm2_5_alarm.type == 0x01) { + } + if (payload.pm2_5_alarm.type == 0x02) { + } + if (payload.pm2_5_alarm.type == 0x10) { + if (payload.pm2_5_alarm.alarm_deactivation.pm2_5 < 0 || payload.pm2_5_alarm.alarm_deactivation.pm2_5 > 1000) { + throw new Error('pm2_5_alarm.alarm_deactivation.pm2_5 must be between 0 and 1000'); + } + buffer.writeUInt16LE(payload.pm2_5_alarm.alarm_deactivation.pm2_5); + } + if (payload.pm2_5_alarm.type == 0x11) { + if (payload.pm2_5_alarm.alarm_trigger.pm2_5 < 0 || payload.pm2_5_alarm.alarm_trigger.pm2_5 > 1000) { + throw new Error('pm2_5_alarm.alarm_trigger.pm2_5 must be between 0 and 1000'); + } + buffer.writeUInt16LE(payload.pm2_5_alarm.alarm_trigger.pm2_5); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x07 + if ('pm10' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x07); + if (payload.pm10 < 0 || payload.pm10 > 1000) { + throw new Error('pm10 must be between 0 and 1000'); + } + buffer.writeUInt16LE(payload.pm10); + encoded = encoded.concat(buffer.toBytes()); + } + //0x08 + if ('pm10_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x08); + buffer.writeUInt8(payload.pm10_alarm.type); + if (payload.pm10_alarm.type == 0x00) { + } + if (payload.pm10_alarm.type == 0x01) { + } + if (payload.pm10_alarm.type == 0x02) { + } + if (payload.pm10_alarm.type == 0x10) { + if (payload.pm10_alarm.alarm_deactivation.pm10 < 0 || payload.pm10_alarm.alarm_deactivation.pm10 > 1000) { + throw new Error('pm10_alarm.alarm_deactivation.pm10 must be between 0 and 1000'); + } + buffer.writeUInt16LE(payload.pm10_alarm.alarm_deactivation.pm10); + } + if (payload.pm10_alarm.type == 0x11) { + if (payload.pm10_alarm.alarm_trigger.pm10 < 0 || payload.pm10_alarm.alarm_trigger.pm10 > 1000) { + throw new Error('pm10_alarm.alarm_trigger.pm10 must be between 0 and 1000'); + } + buffer.writeUInt16LE(payload.pm10_alarm.alarm_trigger.pm10); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x09 + if ('temperature' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x09); + if (payload.temperature < -20 || payload.temperature > 60) { + throw new Error('temperature must be between -20 and 60'); + } + buffer.writeInt16LE(payload.temperature * 10); + encoded = encoded.concat(buffer.toBytes()); + } + //0x0a + if ('temperature_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0a); + buffer.writeUInt8(payload.temperature_alarm.type); + if (payload.temperature_alarm.type == 0x00) { + } + if (payload.temperature_alarm.type == 0x01) { + } + if (payload.temperature_alarm.type == 0x02) { + } + if (payload.temperature_alarm.type == 0x10) { + if (payload.temperature_alarm.alarm_deactivation.temperature < -20 || payload.temperature_alarm.alarm_deactivation.temperature > 60) { + throw new Error('temperature_alarm.alarm_deactivation.temperature must be between -20 and 60'); + } + buffer.writeInt16LE(payload.temperature_alarm.alarm_deactivation.temperature * 10); + } + if (payload.temperature_alarm.type == 0x11) { + if (payload.temperature_alarm.alarm_trigger.temperature < -20 || payload.temperature_alarm.alarm_trigger.temperature > 60) { + throw new Error('temperature_alarm.alarm_trigger.temperature must be between -20 and 60'); + } + buffer.writeInt16LE(payload.temperature_alarm.alarm_trigger.temperature * 10); + } + if (payload.temperature_alarm.type == 0x20) { + } + if (payload.temperature_alarm.type == 0x21) { + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x0b + if ('humidity' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0b); + if (payload.humidity < 0 || payload.humidity > 100) { + throw new Error('humidity must be between 0 and 100'); + } + buffer.writeUInt16LE(payload.humidity * 10); + encoded = encoded.concat(buffer.toBytes()); + } + //0x0c + if ('humidity_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0c); + buffer.writeUInt8(payload.humidity_alarm.type); + if (payload.humidity_alarm.type == 0x00) { + } + if (payload.humidity_alarm.type == 0x01) { + } + if (payload.humidity_alarm.type == 0x02) { + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x0d + if ('tvoc' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0d); + if (payload.tvoc < 0 || payload.tvoc > 2000) { + throw new Error('tvoc must be between 0 and 2000'); + } + buffer.writeUInt16LE(payload.tvoc); + encoded = encoded.concat(buffer.toBytes()); + } + //0x0e + if ('tvoc_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0e); + buffer.writeUInt8(payload.tvoc_alarm.type); + if (payload.tvoc_alarm.type == 0x00) { + } + if (payload.tvoc_alarm.type == 0x01) { + } + if (payload.tvoc_alarm.type == 0x02) { + } + if (payload.tvoc_alarm.type == 0x10) { + if (payload.tvoc_alarm.alarm_deactivation.tvoc < 0 || payload.tvoc_alarm.alarm_deactivation.tvoc > 2000) { + throw new Error('tvoc_alarm.alarm_deactivation.tvoc must be between 0 and 2000'); + } + buffer.writeUInt16LE(payload.tvoc_alarm.alarm_deactivation.tvoc); + } + if (payload.tvoc_alarm.type == 0x11) { + if (payload.tvoc_alarm.alarm_trigger.tvoc < 0 || payload.tvoc_alarm.alarm_trigger.tvoc > 2000) { + throw new Error('tvoc_alarm.alarm_trigger.tvoc must be between 0 and 2000'); + } + buffer.writeUInt16LE(payload.tvoc_alarm.alarm_trigger.tvoc); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x0f + if ('tamper_status' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0f); + // 0:Normal, 1:Triggered + buffer.writeUInt8(payload.tamper_status); + encoded = encoded.concat(buffer.toBytes()); + } + //0x10 + if ('tamper_status_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x10); + buffer.writeUInt8(payload.tamper_status_alarm.type); + if (payload.tamper_status_alarm.type == 0x20) { + } + if (payload.tamper_status_alarm.type == 0x21) { + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x11 + if ('buzzer' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x11); + // 0:Normal, 1:Triggered + buffer.writeUInt8(payload.buzzer); + encoded = encoded.concat(buffer.toBytes()); + } + //0x12 + if ('occupancy_status' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x12); + // 0:vacant, 1:occuppied + buffer.writeUInt8(payload.occupancy_status); + encoded = encoded.concat(buffer.toBytes()); + } + //0x20 + if ('tvoc_raw_data_1' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x20); + buffer.writeFloatLE(payload.tvoc_raw_data_1.rmox_0); + buffer.writeFloatLE(payload.tvoc_raw_data_1.rmox_1); + encoded = encoded.concat(buffer.toBytes()); + } + //0x21 + if ('tvoc_raw_data_2' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x21); + buffer.writeFloatLE(payload.tvoc_raw_data_2.rmox_2); + buffer.writeFloatLE(payload.tvoc_raw_data_2.rmox_3); + encoded = encoded.concat(buffer.toBytes()); + } + //0x22 + if ('tvoc_raw_data_3' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x22); + buffer.writeFloatLE(payload.tvoc_raw_data_3.rmox_4); + buffer.writeFloatLE(payload.tvoc_raw_data_3.rmox_5); + encoded = encoded.concat(buffer.toBytes()); + } + //0x23 + if ('tvoc_raw_data_4' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x23); + buffer.writeFloatLE(payload.tvoc_raw_data_4.rmox_6); + buffer.writeFloatLE(payload.tvoc_raw_data_4.rmox_7); + encoded = encoded.concat(buffer.toBytes()); + } + //0x24 + if ('tvoc_raw_data_5' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x24); + buffer.writeFloatLE(payload.tvoc_raw_data_5.rmox_8); + buffer.writeFloatLE(payload.tvoc_raw_data_5.rmox_9); + encoded = encoded.concat(buffer.toBytes()); + } + //0x25 + if ('tvoc_raw_data_6' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x25); + buffer.writeFloatLE(payload.tvoc_raw_data_6.rmox_10); + buffer.writeFloatLE(payload.tvoc_raw_data_6.rmox_11); + encoded = encoded.concat(buffer.toBytes()); + } + //0x26 + if ('tvoc_raw_data_7' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x26); + buffer.writeFloatLE(payload.tvoc_raw_data_7.rmox_12); + buffer.writeFloatLE(payload.tvoc_raw_data_7.zmod4510_rmox_3); + encoded = encoded.concat(buffer.toBytes()); + } + //0x27 + if ('tvoc_raw_data_8' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x27); + buffer.writeFloatLE(payload.tvoc_raw_data_8.log_rcda); + buffer.writeFloatLE(payload.tvoc_raw_data_8.rhtr); + encoded = encoded.concat(buffer.toBytes()); + } + //0x28 + if ('tvoc_raw_data_9' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x28); + buffer.writeFloatLE(payload.tvoc_raw_data_9.temperature); + buffer.writeFloatLE(payload.tvoc_raw_data_9.iaq); + encoded = encoded.concat(buffer.toBytes()); + } + //0x29 + if ('tvoc_raw_data_10' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x29); + buffer.writeFloatLE(payload.tvoc_raw_data_10.tvoc); + buffer.writeFloatLE(payload.tvoc_raw_data_10.etoh); + encoded = encoded.concat(buffer.toBytes()); + } + //0x2a + if ('tvoc_raw_data_11' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x2a); + buffer.writeFloatLE(payload.tvoc_raw_data_11.eco2); + buffer.writeFloatLE(payload.tvoc_raw_data_11.rel_iaq); + encoded = encoded.concat(buffer.toBytes()); + } + //0x2b + if ('pm_sensor_working_time' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x2b); + buffer.writeUInt32LE(payload.pm_sensor_working_time); + encoded = encoded.concat(buffer.toBytes()); + } + //0xc9 + if ('random_key' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xc9); + // 0:disable, 1:enable + buffer.writeUInt8(payload.random_key); + encoded = encoded.concat(buffer.toBytes()); + } + //0xc8 + if ('device_status' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xc8); + // 0:Off, 1:On + buffer.writeUInt8(payload.device_status); + encoded = encoded.concat(buffer.toBytes()); + } + //0x60 + if ('reporting_interval' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x60); + // 0:second, 1:min + buffer.writeUInt8(payload.reporting_interval.unit); + if (payload.reporting_interval.unit == 0x00) { + if (payload.reporting_interval.seconds_of_time < 10 || payload.reporting_interval.seconds_of_time > 64800) { + throw new Error('reporting_interval.seconds_of_time must be between 10 and 64800'); + } + buffer.writeUInt16LE(payload.reporting_interval.seconds_of_time); + } + if (payload.reporting_interval.unit == 0x01) { + if (payload.reporting_interval.minutes_of_time < 1 || payload.reporting_interval.minutes_of_time > 1440) { + throw new Error('reporting_interval.minutes_of_time must be between 1 and 1440'); + } + buffer.writeUInt16LE(payload.reporting_interval.minutes_of_time); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x61 + if ('temperature_unit' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x61); + // 0:℃, 1:℉ + buffer.writeUInt8(payload.temperature_unit); + encoded = encoded.concat(buffer.toBytes()); + } + //0x67 + if ('tamper_alarm_enable' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x67); + // 0:disable, 1:enable + buffer.writeUInt8(payload.tamper_alarm_enable); + encoded = encoded.concat(buffer.toBytes()); + } + //0x62 + if ('led_status' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x62); + // 0:disable, 1:enable + buffer.writeUInt8(payload.led_status); + encoded = encoded.concat(buffer.toBytes()); + } + //0x63 + if ('buzzer_enable' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x63); + // 0:disable, 1:enable + buffer.writeUInt8(payload.buzzer_enable); + encoded = encoded.concat(buffer.toBytes()); + } + //0x64 + if ('buzzer_sleep' in payload) { + var buffer = new Buffer(); + if (isValid(payload.buzzer_sleep.item_1)) { + buffer.writeUInt8(0x64); + buffer.writeUInt8(0x01); + // 0:disable, 1:enable + buffer.writeUInt8(payload.buzzer_sleep.item_1.enable); + if (payload.buzzer_sleep.item_1.start_time < 0 || payload.buzzer_sleep.item_1.start_time > 1439) { + throw new Error('buzzer_sleep.item_1.start_time must be between 0 and 1439'); + } + buffer.writeUInt16LE(payload.buzzer_sleep.item_1.start_time); + if (payload.buzzer_sleep.item_1.end_time < 0 || payload.buzzer_sleep.item_1.end_time > 1439) { + throw new Error('buzzer_sleep.item_1.end_time must be between 0 and 1439'); + } + buffer.writeUInt16LE(payload.buzzer_sleep.item_1.end_time); + } + if (isValid(payload.buzzer_sleep.item_2)) { + buffer.writeUInt8(0x64); + buffer.writeUInt8(0x02); + // 0:disable, 1:enable + buffer.writeUInt8(payload.buzzer_sleep.item_2.enable); + if (payload.buzzer_sleep.item_2.start_time < 0 || payload.buzzer_sleep.item_2.start_time > 1439) { + throw new Error('buzzer_sleep.item_2.start_time must be between 0 and 1439'); + } + buffer.writeUInt16LE(payload.buzzer_sleep.item_2.start_time); + if (payload.buzzer_sleep.item_2.end_time < 0 || payload.buzzer_sleep.item_2.end_time > 1439) { + throw new Error('buzzer_sleep.item_2.end_time must be between 0 and 1439'); + } + buffer.writeUInt16LE(payload.buzzer_sleep.item_2.end_time); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x65 + if ('buzzer_button_stop_enable' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x65); + // 0:disable, 1:enable + buffer.writeUInt8(payload.buzzer_button_stop_enable); + encoded = encoded.concat(buffer.toBytes()); + } + //0x66 + if ('buzzer_silent_time' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x66); + if (payload.buzzer_silent_time < 0 || payload.buzzer_silent_time > 1440) { + throw new Error('buzzer_silent_time must be between 0 and 1440'); + } + buffer.writeUInt16LE(payload.buzzer_silent_time); + encoded = encoded.concat(buffer.toBytes()); + } + //0xc7 + if ('time_zone' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xc7); + buffer.writeInt16LE(payload.time_zone); + encoded = encoded.concat(buffer.toBytes()); + } + //0xc6 + if ('daylight_saving_time' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xc6); + // 0:disable, 1:enable + buffer.writeUInt8(payload.daylight_saving_time.enable); + if (payload.daylight_saving_time.daylight_saving_time_offset < 0 || payload.daylight_saving_time.daylight_saving_time_offset > 120) { + throw new Error('daylight_saving_time.daylight_saving_time_offset must be between 0 and 120'); + } + buffer.writeUInt8(payload.daylight_saving_time.daylight_saving_time_offset); + // 1:Jan., 2:Feb., 3:Mar., 4:Apr., 5:May, 6:Jun., 7:Jul., 8:Aug., 9:Sep., 10:Oct., 11:Nov., 12:Dec. + buffer.writeUInt8(payload.daylight_saving_time.start_month); + var bitOptions = 0; + // 1:1st, 2: 2nd, 3: 3rd, 4: 4th, 5: last + bitOptions |= payload.daylight_saving_time.start_week_num << 4; + + // 1:Mon., 2:Tues., 3:Wed., 4:Thurs., 5:Fri., 6:Sat., 7:Sun. + bitOptions |= payload.daylight_saving_time.start_week_day << 0; + buffer.writeUInt8(bitOptions); + + buffer.writeUInt16LE(payload.daylight_saving_time.start_hour_min); + // 1:Jan., 2:Feb., 3:Mar., 4:Apr., 5:May, 6:Jun., 7:Jul., 8:Aug., 9:Sep., 10:Oct., 11:Nov., 12:Dec. + buffer.writeUInt8(payload.daylight_saving_time.end_month); + var bitOptions = 0; + // 1:1st, 2: 2nd, 3: 3rd, 4: 4th, 5: last + bitOptions |= payload.daylight_saving_time.end_week_num << 4; + + // 1:Mon., 2:Tues., 3:Wed., 4:Thurs., 5:Fri., 6:Sat., 7:Sun. + bitOptions |= payload.daylight_saving_time.end_week_day << 0; + buffer.writeUInt8(bitOptions); + + buffer.writeUInt16LE(payload.daylight_saving_time.end_hour_min); + encoded = encoded.concat(buffer.toBytes()); + } + //0x68 + if ('tvoc_raw_reporting_enable' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x68); + // 0:disable, 1:enable + buffer.writeUInt8(payload.tvoc_raw_reporting_enable); + encoded = encoded.concat(buffer.toBytes()); + } + //0x69 + if ('temperature_alarm_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x69); + // 0:disable, 1:enable + buffer.writeUInt8(payload.temperature_alarm_settings.enable); + // 0:disable, 1:condition: xB, 3:condition: AB + buffer.writeUInt8(payload.temperature_alarm_settings.threshold_condition); + if (payload.temperature_alarm_settings.threshold_min < -20 || payload.temperature_alarm_settings.threshold_min > 60) { + throw new Error('temperature_alarm_settings.threshold_min must be between -20 and 60'); + } + buffer.writeInt16LE(payload.temperature_alarm_settings.threshold_min * 10); + if (payload.temperature_alarm_settings.threshold_max < -20 || payload.temperature_alarm_settings.threshold_max > 60) { + throw new Error('temperature_alarm_settings.threshold_max must be between -20 and 60'); + } + buffer.writeInt16LE(payload.temperature_alarm_settings.threshold_max * 10); + encoded = encoded.concat(buffer.toBytes()); + } + //0x6a + if ('pm1_0_alarm_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x6a); + // 0:disable, 1:enable + buffer.writeUInt8(payload.pm1_0_alarm_settings.enable); + // 0:disable, 1:condition: xB, 3:condition: AB + buffer.writeUInt8(payload.pm1_0_alarm_settings.threshold_condition); + if (payload.pm1_0_alarm_settings.threshold_min < 0 || payload.pm1_0_alarm_settings.threshold_min > 1000) { + throw new Error('pm1_0_alarm_settings.threshold_min must be between 0 and 1000'); + } + buffer.writeInt16LE(payload.pm1_0_alarm_settings.threshold_min); + if (payload.pm1_0_alarm_settings.threshold_max < 0 || payload.pm1_0_alarm_settings.threshold_max > 1000) { + throw new Error('pm1_0_alarm_settings.threshold_max must be between 0 and 1000'); + } + buffer.writeInt16LE(payload.pm1_0_alarm_settings.threshold_max); + encoded = encoded.concat(buffer.toBytes()); + } + //0x6b + if ('pm2_5_alarm_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x6b); + // 0:disable, 1:enable + buffer.writeUInt8(payload.pm2_5_alarm_settings.enable); + // 0:disable, 1:condition: xB, 3:condition: AB + buffer.writeUInt8(payload.pm2_5_alarm_settings.threshold_condition); + if (payload.pm2_5_alarm_settings.threshold_min < 0 || payload.pm2_5_alarm_settings.threshold_min > 1000) { + throw new Error('pm2_5_alarm_settings.threshold_min must be between 0 and 1000'); + } + buffer.writeInt16LE(payload.pm2_5_alarm_settings.threshold_min); + if (payload.pm2_5_alarm_settings.threshold_max < 0 || payload.pm2_5_alarm_settings.threshold_max > 1000) { + throw new Error('pm2_5_alarm_settings.threshold_max must be between 0 and 1000'); + } + buffer.writeInt16LE(payload.pm2_5_alarm_settings.threshold_max); + encoded = encoded.concat(buffer.toBytes()); + } + //0x6c + if ('pm10_alarm_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x6c); + // 0:disable, 1:enable + buffer.writeUInt8(payload.pm10_alarm_settings.enable); + // 0:disable, 1:condition: xB, 3:condition: AB + buffer.writeUInt8(payload.pm10_alarm_settings.threshold_condition); + if (payload.pm10_alarm_settings.threshold_min < 0 || payload.pm10_alarm_settings.threshold_min > 1000) { + throw new Error('pm10_alarm_settings.threshold_min must be between 0 and 1000'); + } + buffer.writeInt16LE(payload.pm10_alarm_settings.threshold_min); + if (payload.pm10_alarm_settings.threshold_max < 0 || payload.pm10_alarm_settings.threshold_max > 1000) { + throw new Error('pm10_alarm_settings.threshold_max must be between 0 and 1000'); + } + buffer.writeInt16LE(payload.pm10_alarm_settings.threshold_max); + encoded = encoded.concat(buffer.toBytes()); + } + //0x6d + if ('tvoc_alarm_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x6d); + // 0:disable, 1:enable + buffer.writeUInt8(payload.tvoc_alarm_settings.enable); + // 0:disable, 1:condition: xB, 3:condition: AB + buffer.writeUInt8(payload.tvoc_alarm_settings.threshold_condition); + if (payload.tvoc_alarm_settings.threshold_min < 0 || payload.tvoc_alarm_settings.threshold_min > 2000) { + throw new Error('tvoc_alarm_settings.threshold_min must be between 0 and 2000'); + } + buffer.writeInt16LE(payload.tvoc_alarm_settings.threshold_min); + if (payload.tvoc_alarm_settings.threshold_max < 0 || payload.tvoc_alarm_settings.threshold_max > 2000) { + throw new Error('tvoc_alarm_settings.threshold_max must be between 0 and 2000'); + } + buffer.writeInt16LE(payload.tvoc_alarm_settings.threshold_max); + encoded = encoded.concat(buffer.toBytes()); + } + //0x6e + if ('vaping_index_alarm_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x6e); + // 0:disable, 1:enable + buffer.writeUInt8(payload.vaping_index_alarm_settings.enable); + // 0:disable, 1:condition: xB, 3:condition: AB + buffer.writeUInt8(payload.vaping_index_alarm_settings.threshold_condition); + if (payload.vaping_index_alarm_settings.threshold_min < 0 || payload.vaping_index_alarm_settings.threshold_min > 100) { + throw new Error('vaping_index_alarm_settings.threshold_min must be between 0 and 100'); + } + buffer.writeUInt8(payload.vaping_index_alarm_settings.threshold_min); + if (payload.vaping_index_alarm_settings.threshold_max < 0 || payload.vaping_index_alarm_settings.threshold_max > 100) { + throw new Error('vaping_index_alarm_settings.threshold_max must be between 0 and 100'); + } + buffer.writeUInt8(payload.vaping_index_alarm_settings.threshold_max); + encoded = encoded.concat(buffer.toBytes()); + } + //0x6f + if ('alarm_reporting_times' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x6f); + if (payload.alarm_reporting_times < 1 || payload.alarm_reporting_times > 1000) { + throw new Error('alarm_reporting_times must be between 1 and 1000'); + } + buffer.writeUInt16LE(payload.alarm_reporting_times); + encoded = encoded.concat(buffer.toBytes()); + } + //0x70 + if ('alarm_deactivation_enable' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x70); + // 0:disable, 1:enable + buffer.writeUInt8(payload.alarm_deactivation_enable); + encoded = encoded.concat(buffer.toBytes()); + } + //0x71 + if ('temperature_calibration_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x71); + // 0:disable, 1:enable + buffer.writeUInt8(payload.temperature_calibration_settings.enable); + if (payload.temperature_calibration_settings.calibration_value < -80 || payload.temperature_calibration_settings.calibration_value > 80) { + throw new Error('temperature_calibration_settings.calibration_value must be between -80 and 80'); + } + buffer.writeInt16LE(payload.temperature_calibration_settings.calibration_value * 10); + encoded = encoded.concat(buffer.toBytes()); + } + //0x72 + if ('humidity_calibration_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x72); + // 0:disable, 1:enable + buffer.writeUInt8(payload.humidity_calibration_settings.enable); + if (payload.humidity_calibration_settings.calibration_value < -100 || payload.humidity_calibration_settings.calibration_value > 100) { + throw new Error('humidity_calibration_settings.calibration_value must be between -100 and 100'); + } + buffer.writeInt16LE(payload.humidity_calibration_settings.calibration_value * 10); + encoded = encoded.concat(buffer.toBytes()); + } + //0x73 + if ('pm1_0_calibration_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x73); + // 0:disable, 1:enable + buffer.writeUInt8(payload.pm1_0_calibration_settings.enable); + if (payload.pm1_0_calibration_settings.calibration_value < -1000 || payload.pm1_0_calibration_settings.calibration_value > 1000) { + throw new Error('pm1_0_calibration_settings.calibration_value must be between -1000 and 1000'); + } + buffer.writeInt16LE(payload.pm1_0_calibration_settings.calibration_value); + encoded = encoded.concat(buffer.toBytes()); + } + //0x74 + if ('pm2_5_calibration_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x74); + // 0:disable, 1:enable + buffer.writeUInt8(payload.pm2_5_calibration_settings.enable); + if (payload.pm2_5_calibration_settings.calibration_value < -1000 || payload.pm2_5_calibration_settings.calibration_value > 1000) { + throw new Error('pm2_5_calibration_settings.calibration_value must be between -1000 and 1000'); + } + buffer.writeInt16LE(payload.pm2_5_calibration_settings.calibration_value); + encoded = encoded.concat(buffer.toBytes()); + } + //0x75 + if ('pm10_calibration_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x75); + // 0:disable, 1:enable + buffer.writeUInt8(payload.pm10_calibration_settings.enable); + if (payload.pm10_calibration_settings.calibration_value < -1000 || payload.pm10_calibration_settings.calibration_value > 1000) { + throw new Error('pm10_calibration_settings.calibration_value must be between -1000 and 1000'); + } + buffer.writeInt16LE(payload.pm10_calibration_settings.calibration_value); + encoded = encoded.concat(buffer.toBytes()); + } + //0x76 + if ('tvoc_calibration_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x76); + // 0:disable, 1:enable + buffer.writeUInt8(payload.tvoc_calibration_settings.enable); + if (payload.tvoc_calibration_settings.calibration_value < -2000 || payload.tvoc_calibration_settings.calibration_value > 2000) { + throw new Error('tvoc_calibration_settings.calibration_value must be between -2000 and 2000'); + } + buffer.writeInt16LE(payload.tvoc_calibration_settings.calibration_value); + encoded = encoded.concat(buffer.toBytes()); + } + //0x77 + if ('vaping_index_calibration_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x77); + // 0:disable, 1:enable + buffer.writeUInt8(payload.vaping_index_calibration_settings.enable); + if (payload.vaping_index_calibration_settings.calibration_value < -100 || payload.vaping_index_calibration_settings.calibration_value > 100) { + throw new Error('vaping_index_calibration_settings.calibration_value must be between -100 and 100'); + } + buffer.writeInt8(payload.vaping_index_calibration_settings.calibration_value); + encoded = encoded.concat(buffer.toBytes()); + } + //0xbf + if ('reset' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xbf); + encoded = encoded.concat(buffer.toBytes()); + } + //0xbe + if ('reboot' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xbe); + encoded = encoded.concat(buffer.toBytes()); + } + //0xbd + if ('clear_historical_data' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xbd); + encoded = encoded.concat(buffer.toBytes()); + } + //0xbc + if ('stop_historical_data_retrieval' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xbc); + encoded = encoded.concat(buffer.toBytes()); + } + //0xbb + if ('retrieve_historical_data_by_time' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xbb); + buffer.writeUInt32LE(payload.retrieve_historical_data_by_time.time); + encoded = encoded.concat(buffer.toBytes()); + } + //0xba + if ('retrieve_historical_data_by_time_range' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xba); + buffer.writeUInt32LE(payload.retrieve_historical_data_by_time_range.start_time); + buffer.writeUInt32LE(payload.retrieve_historical_data_by_time_range.end_time); + encoded = encoded.concat(buffer.toBytes()); + } + //0xb9 + if ('query_device_status' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xb9); + encoded = encoded.concat(buffer.toBytes()); + } + //0xb8 + if ('synchronize_time' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xb8); + encoded = encoded.concat(buffer.toBytes()); + } + //0xb7 + if ('set_time' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xb7); + buffer.writeUInt32LE(payload.set_time.timestamp); + encoded = encoded.concat(buffer.toBytes()); + } + //0xb6 + if ('reconnect' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xb6); + encoded = encoded.concat(buffer.toBytes()); + } + //0x5f + if ('stop_buzzer_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x5f); + encoded = encoded.concat(buffer.toBytes()); + } + //0x5e + if ('execute_tvoc_self_clean' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x5e); + encoded = encoded.concat(buffer.toBytes()); + } + return encoded; } -/** - * alarm deactivate enable - * @param {object} alarm_deactivation_enable values: (0: disable, 1: enable) - * @example { "alarm_deactivation_enable": 1 } - */ -function setAlarmDeactivateEnable(alarm_deactivation_enable) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(alarm_deactivation_enable) === -1) { - throw new Error("alarm_deactivation_enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x70); - buffer.writeUInt8(getValue(enable_map, alarm_deactivation_enable)); - return buffer.toBytes(); +function Buffer() { + this.buffer = new Array(); } -/** - * temperature calibration config - * @param {object} temperature_calibration_settings - * @param {number} temperature_calibration_settings.enable values: (0: disable, 1: enable) - * @param {number} temperature_calibration_settings.calibration_value unit: Celsius, range: [-80, 80] - * @example { "temperature_calibration_settings": { "enable": 1, "calibration_value": 20 } } - */ -function setTemperatureCalibrationSettings(temperature_calibration_settings) { - var enable = temperature_calibration_settings.enable; - var calibration_value = temperature_calibration_settings.calibration_value; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("temperature_calibration_settings.enable must be one of " + enable_values.join(", ")); - } - if (calibration_value < -80 || calibration_value > 80) { - throw new Error("temperature_calibration_settings.calibration_value must be between -80 and 80"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x71); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt16LE(calibration_value * 10); - return buffer.toBytes(); -} - -/** - * humidity calibration config - * @param {object} humidity_calibration_settings - * @param {number} humidity_calibration_settings.enable values: (0: disable, 1: enable) - * @param {number} humidity_calibration_settings.calibration_value unit: %, range: [-100, 100] - * @example { "humidity_calibration_settings": { "enable": 1, "calibration_value": 50 } } - */ -function setHumidityCalibrationSettings(humidity_calibration_settings) { - var enable = humidity_calibration_settings.enable; - var calibration_value = humidity_calibration_settings.calibration_value; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("humidity_calibration_settings.enable must be one of " + enable_values.join(", ")); - } - if (calibration_value < -100 || calibration_value > 100) { - throw new Error("humidity_calibration_settings.calibration_value must be between -100 and 100"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x72); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt16LE(calibration_value * 10); - return buffer.toBytes(); -} - -/** - * pm1 calibration config - * @param {object} pm1_calibration_settings - * @param {number} pm1_calibration_settings.enable values: (0: disable, 1: enable) - * @param {number} pm1_calibration_settings.calibration_value, range: [-1000, 1000] - * @example { "pm1_0_calibration_settings": { "enable": 1, "calibration_value": 10 } } - */ -function setPM1CalibrationSettings(pm1_0_calibration_settings) { - var enable = pm1_0_calibration_settings.enable; - var calibration_value = pm1_0_calibration_settings.calibration_value; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("pm1_0_calibration_settings.enable must be one of " + enable_values.join(", ")); - } - if (calibration_value < -1000 || calibration_value > 1000) { - throw new Error("pm1_0_calibration_settings.calibration_value must be between -1000 and 1000"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x73); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt16LE(calibration_value); - return buffer.toBytes(); -} - -/** - * pm2.5 calibration config - * @param {object} pm2_5_calibration_settings - * @param {number} pm2_5_calibration_settings.enable values: (0: disable, 1: enable) - * @param {number} pm2_5_calibration_settings.calibration_value, range: [-1000, 1000] - * @example { "pm2_5_calibration_settings": { "enable": 1, "calibration_value": 10 } } - */ -function setPM25CalibrationSettings(pm2_5_calibration_settings) { - var enable = pm2_5_calibration_settings.enable; - var calibration_value = pm2_5_calibration_settings.calibration_value; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("pm2_5_calibration_settings.enable must be one of " + enable_values.join(", ")); - } - if (calibration_value < -1000 || calibration_value > 1000) { - throw new Error("pm2_5_calibration_settings.calibration_value must be between -1000 and 1000"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x74); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt16LE(calibration_value); - return buffer.toBytes(); -} - -/** - * pm10 calibration config - * @param {object} pm10_calibration_settings - * @param {number} pm10_calibration_settings.enable values: (0: disable, 1: enable) - * @param {number} pm10_calibration_settings.calibration_value, range: [-1000, 1000] - * @example { "pm10_calibration_settings": { "enable": 1, "calibration_value": 10 } } - */ -function setPM10CalibrationSettings(pm10_calibration_settings) { - var enable = pm10_calibration_settings.enable; - var calibration_value = pm10_calibration_settings.calibration_value; +Buffer.prototype._write = function(value, byteLength, isLittleEndian) { + value = Math.round(value); + var offset = 0; + for (var index = 0; index < byteLength; index++) { + offset = isLittleEndian ? index << 3 : (byteLength - 1 - index) << 3; + this.buffer.push((value >> offset) & 0xff); + } +}; - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("pm10_calibration_settings.enable must be one of " + enable_values.join(", ")); - } - if (calibration_value < -1000 || calibration_value > 1000) { - throw new Error("pm10_calibration_settings.calibration_value must be between -1000 and 1000"); - } +Buffer.prototype.writeUInt8 = function(value) { + this._write(value, 1, true); +}; - var buffer = new Buffer(4); - buffer.writeUInt8(0x75); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt16LE(calibration_value); - return buffer.toBytes(); -} +Buffer.prototype.writeInt8 = function(value) { + this._write(value < 0 ? value + 0x100 : value, 1, true); +}; -/** - * tvoc calibration settings - * @param {object} tvoc_calibration_settings - * @param {number} tvoc_calibration_settings.enable values: (0: disable, 1: enable) - * @param {number} tvoc_calibration_settings.calibration_value unit: ppm, range: [-2000, 2000] - * @example { "tvoc_calibration_settings": { "enable": 1, "calibration_value": 10 } } - */ -function setTVOCCalibrationSettings(tvoc_calibration_settings) { - var enable = tvoc_calibration_settings.enable; - var calibration_value = tvoc_calibration_settings.calibration_value; +Buffer.prototype.writeUInt16LE = function(value) { + this._write(value, 2, true); +}; - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("tvoc_calibration_settings.enable must be one of " + enable_values.join(", ")); - } - if (calibration_value < -2000 || calibration_value > 2000) { - throw new Error("tvoc_calibration_settings.calibration_value must be between -2000 and 2000"); - } +Buffer.prototype.writeInt16LE = function(value) { + this._write(value < 0 ? value + 0x10000 : value, 2, true); +}; - var buffer = new Buffer(4); - buffer.writeUInt8(0x76); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt16LE(calibration_value); - return buffer.toBytes(); -} +Buffer.prototype.writeUInt24LE = function(value) { + this._write(value, 3, true); +}; -/** - * vaping index calibration settings - * @param {object} vaping_index_calibration_settings - * @param {number} vaping_index_calibration_settings.enable values: (0: disable, 1: enable) - * @param {number} vaping_index_calibration_settings.calibration_value range: [-100, 100] - * @example { "vaping_index_calibration_settings": { "enable": 1, "calibration_value": 10 } } - */ -function setVapingIndexCalibrationSettings(vaping_index_calibration_settings) { - var enable = vaping_index_calibration_settings.enable; - var calibration_value = vaping_index_calibration_settings.calibration_value; +Buffer.prototype.writeInt24LE = function(value) { + this._write(value < 0 ? value + 0x1000000 : value, 3, true); +}; - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("vaping_index_calibration_settings.enable must be one of " + enable_values.join(", ")); - } - if (calibration_value < -100 || calibration_value > 100) { - throw new Error("vaping_index_calibration_settings.calibration_value must be between -100 and 100"); - } +Buffer.prototype.writeUInt32LE = function(value) { + this._write(value, 4, true); +}; - var buffer = new Buffer(3); - buffer.writeUInt8(0x77); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt8(calibration_value); - return buffer.toBytes(); -} +Buffer.prototype.writeInt32LE = function(value) { + this._write(value < 0 ? value + 0x100000000 : value, 4, true); +}; -/** - * timezone - * @param {number} time_zone values: (-720: UTC-12, -660: UTC-11, -600: UTC-10, -570: UTC-9:30, -540: UTC-9, -480: UTC-8, - * -420: UTC-7, -360: UTC-6, -300: UTC-5, -240: UTC-4, -210: UTC-3:30, -180: UTC-3, -120: UTC-2, -60: UTC-1, - * 0: UTC, 60: UTC+1, 120: UTC+2, 180: UTC+3, 210: UTC+3:30, 240: UTC+4, 270: UTC+4:30, 300: UTC+5, 330: UTC+5:30, - * 345: UTC+5:45, 360: UTC+6, 390: UTC+6:30, 420: UTC+7, 480: UTC+8, 540: UTC+9, 570: UTC+9:30, 600: UTC+10, 630: UTC+10:30, - * 660: UTC+11, 720: UTC+12, 765: UTC+12:45, 780: UTC+13, 840: UTC+14) - * @example { "time_zone": 480 } - */ -function setTimeZone(time_zone) { - var timezone_map = { "-720": "UTC-12", "-660": "UTC-11", "-600": "UTC-10", "-570": "UTC-9:30", "-540": "UTC-9", "-480": "UTC-8", "-420": "UTC-7", "-360": "UTC-6", "-300": "UTC-5", "-240": "UTC-4", "-210": "UTC-3:30", "-180": "UTC-3", "-120": "UTC-2", "-60": "UTC-1", 0: "UTC", 60: "UTC+1", 120: "UTC+2", 180: "UTC+3", 210: "UTC+3:30", 240: "UTC+4", 270: "UTC+4:30", 300: "UTC+5", 330: "UTC+5:30", 345: "UTC+5:45", 360: "UTC+6", 390: "UTC+6:30", 420: "UTC+7", 480: "UTC+8", 540: "UTC+9", 570: "UTC+9:30", 600: "UTC+10", 630: "UTC+10:30", 660: "UTC+11", 720: "UTC+12", 765: "UTC+12:45", 780: "UTC+13", 840: "UTC+14" }; - var timezone_values = getValues(timezone_map); - if (timezone_values.indexOf(time_zone) === -1) { - throw new Error("time_zone must be one of " + timezone_values.join(", ")); - } +Buffer.prototype.writeFloatLE = function(value) { + var sign = (value < 0 || (value === 0 && 1 / value === -Infinity)) ? 1 : 0; + var absValue = Math.abs(value); + + if (absValue === 0) { + this._write(sign ? 0x80000000 : 0, 4, true); + return; + } else if (value !== value) { + this._write(0x7fc00000, 4, true); + return; + } else if (absValue === Infinity) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } + + var exponent = Math.floor(Math.log(absValue) / Math.LN2); + var normalized = absValue / Math.pow(2, exponent); + if (normalized < 1) { + exponent -= 1; + normalized *= 2; + } else if (normalized >= 2) { + exponent += 1; + normalized /= 2; + } + + var biasedExponent = exponent + 127; + var mantissaBits = 0; + if (biasedExponent <= 0) { + biasedExponent = 0; + mantissaBits = Math.round(absValue / Math.pow(2, -149)); + if (mantissaBits > 0x7fffff) { + mantissaBits = 0x7fffff; + } + } else { + mantissaBits = Math.round((normalized - 1) * 0x800000); + if (mantissaBits === 0x800000) { + biasedExponent += 1; + mantissaBits = 0; + } + if (biasedExponent >= 0xff) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } + } + + var floatBits = ((((sign << 31) >>> 0) | ((biasedExponent & 0xff) << 23) | (mantissaBits & 0x7fffff)) >>> 0); + this._write(floatBits, 4, true); +}; - var buffer = new Buffer(3); - buffer.writeUInt8(0xc7); - buffer.writeInt16LE(getValue(timezone_map, time_zone)); - return buffer.toBytes(); -} +Buffer.prototype.writeBytes = function(bytes, length, mustEqual) { + if (mustEqual === undefined) mustEqual = false; + if (length < bytes.length) { + throw new Error('bytes length is greater than length'); + } + if (mustEqual && bytes.length != length) { + throw new Error('bytes length is not equal to length'); + } + + for (var i = 0; i < bytes.length; i++) { + this.buffer.push(bytes[i]); + } + + if (length > bytes.length) { + for (var i = bytes.length; i < length; i++) { + this.buffer.push(0); + } + } +}; -/** - * daylight saving time settings - * @param {object} daylight_saving_time - * @param {number} daylight_saving_time.daylight_saving_time_enable values: (0: disable, 1: enable) - * @param {number} daylight_saving_time.daylight_saving_time_offset unit: minutes - * @param {number} daylight_saving_time.start_month values: (1: January, 2: February, 3: March, 4: April, 5: May, 6: June, 7: July, 8: August, 9: September, 10: October, 11: November, 12: December) - * @param {number} daylight_saving_time.start_week_num values: (1: First week, 2: Second week, 3: Third week, 4: Fourth week, 5: Last week) - * @param {number} daylight_saving_time.start_week_day values: (1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday, 7: Sunday) - * @param {number} daylight_saving_time.start_hour_min unit: minutes - * @param {number} daylight_saving_time.end_month values: (1: January, 2: February, 3: March, 4: April, 5: May, 6: June, 7: July, 8: August, 9: September, 10: October, 11: November, 12: December) - * @param {number} daylight_saving_time.end_week_num values: (1: First week, 2: Second week, 3: Third week, 4: Fourth week, 5: Last week) - * @param {number} daylight_saving_time.end_week_day values: (1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday, 7: Sunday) - * @param {number} daylight_saving_time.end_hour_min unit: minutes - * @example { "daylight_saving_time": { "enable": 1, "offset": 60, "start_month": 3, "start_week": 1, "start_day": 1, "start_time": 0, "end_month": 11, "end_week": 4, "end_day": 7, "end_time": 120 } } - */ -function setDaylightSavingTimeSettings(daylight_saving_time) { - var enable = daylight_saving_time.daylight_saving_time_enable; - var daylight_saving_time_offset = daylight_saving_time.daylight_saving_time_offset; - var start_month = daylight_saving_time.start_month; - var start_week_num = daylight_saving_time.start_week_num; - var start_week_day = daylight_saving_time.start_week_day; - var start_hour_min = daylight_saving_time.start_hour_min; - var end_month = daylight_saving_time.end_month; - var end_week_num = daylight_saving_time.end_week_num; - var end_week_day = daylight_saving_time.end_week_day; - var end_hour_min = daylight_saving_time.end_hour_min; +Buffer.prototype.writeHexString = function(hexString, length, mustEqual) { + if (mustEqual === undefined) mustEqual = false; + var bytes = []; + for (var i = 0; i < hexString.length; i += 2) { + bytes.push(parseInt(hexString.substr(i, 2), 16)); + } + if (mustEqual && bytes.length != length) { + throw new Error('hex string length is not equal to length'); + } + this.writeBytes(bytes, length); +}; - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("daylight_saving_time.daylight_saving_time_enable must be one of " + enable_values.join(", ")); - } - var month_values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; - if (month_values.indexOf(start_month) === -1 || month_values.indexOf(end_month) === -1) { - throw new Error("daylight_saving_time.start_month and end_month must be one of " + month_values.join(", ")); - } - var week_values = [1, 2, 3, 4, 5]; - if (week_values.indexOf(start_week_num) === -1 || week_values.indexOf(end_week_num) === -1) { - throw new Error("daylight_saving_time.start_week_num and end_week_num must be one of " + week_values.join(", ")); - } - var day_values = [1, 2, 3, 4, 5, 6, 7]; - if (day_values.indexOf(start_week_day) === -1 || day_values.indexOf(end_week_day) === -1) { - throw new Error("daylight_saving_time.start_week_day and end_week_day must be one of " + day_values.join(", ")); - } +Buffer.prototype.writeString = function(str, length, mustEqual) { + if (mustEqual === undefined) mustEqual = false; + var bytes = encodeUtf8(str); + if (mustEqual && bytes.length != length) { + throw new Error('string length is not equal to length'); + } + this.writeBytes(bytes, length); +}; - var start_day_value = (start_week_num << 4) | start_week_day; - var end_day_value = (end_week_num << 4) | end_week_day; +Buffer.prototype.writeUnknownDataType = function(val) { + throw new Error('Unknown data type encountered. Please Contact Developer.'); +}; - var buffer = new Buffer(11); - buffer.writeUInt8(0xc6); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt8(daylight_saving_time_offset); - buffer.writeUInt8(start_month); - buffer.writeUInt8(start_day_value); - buffer.writeUInt16LE(start_hour_min); - buffer.writeUInt8(end_month); - buffer.writeUInt8(end_day_value); - buffer.writeUInt16LE(end_hour_min); - return buffer.toBytes(); -} +Buffer.prototype.writeHexStringReverse = function(hexString, length, mustEqual) { + if (mustEqual === undefined) mustEqual = false; + var bytes = []; + for (var i = hexString.length - 2; i >= 0; i -= 2) { + bytes.push(parseInt(hexString.substr(i, 2), 16)); + } + if (mustEqual && bytes.length != length) { + throw new Error('hex string length is not equal to length'); + } + this.writeBytes(bytes, length); +}; -/** - * reboot - */ -function reboot() { - var buffer = new Buffer(1); - buffer.writeUInt8(0xbe); - return buffer.toBytes(); -} +Buffer.prototype.toBytes = function() { + return this.buffer; +}; -/** - * synchronize time - * @example { "synchronize_time": 1 } - */ -function synchronizeTime() { - var buffer = new Buffer(1); - buffer.writeUInt8(0xb8); - return buffer.toBytes(); +function encodeUtf8(str) { + var byteArray = []; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + if (charCode < 0x80) { + byteArray.push(charCode); + } else if (charCode < 0x800) { + byteArray.push(0xc0 | (charCode >> 6)); + byteArray.push(0x80 | (charCode & 0x3f)); + } else if (charCode < 0x10000) { + byteArray.push(0xe0 | (charCode >> 12)); + byteArray.push(0x80 | ((charCode >> 6) & 0x3f)); + byteArray.push(0x80 | (charCode & 0x3f)); + } else if (charCode < 0x200000) { + byteArray.push(0xf0 | (charCode >> 18)); + byteArray.push(0x80 | ((charCode >> 12) & 0x3f)); + byteArray.push(0x80 | ((charCode >> 6) & 0x3f)); + byteArray.push(0x80 | (charCode & 0x3f)); + } + } + return byteArray; } -/** - * query device status - * @example { "query_device_status": 1 } - */ -function queryDeviceStatus() { - var buffer = new Buffer(1); - buffer.writeUInt8(0xb9); - return buffer.toBytes(); +function isValid(value) { + return value !== undefined && value !== null && value !== ''; } -/** - * reconnect - * @example { "reconnect": 1 } - */ -function reconnect() { - var buffer = new Buffer(1); - buffer.writeUInt8(0xb6); - return buffer.toBytes(); +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; } -/** - * stop buzzer alarm - * @example { "stop_buzzer_alarm": 1 } - */ -function stopBuzzerAlarm() { - var buffer = new Buffer(1); - buffer.writeUInt8(0x5f); - return buffer.toBytes(); +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; } - -/** - * execute TVOC self clean - * @example { "execute_tvoc_self_clean": 1 } - */ -function executeTVOCSelfClean() { - var buffer = new Buffer(1); - buffer.writeUInt8(0x5e); - return buffer.toBytes(); + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } + + current[parts[parts.length - 1]] = value; + return obj; } -function setQueryCmd(bytes) { - var name_map = { - 60: { level: 1, name: "reporting_interval" }, - 61: { level: 1, name: "temperature_unit" }, - 62: { level: 1, name: "led_status" }, - 63: { level: 1, name: "buzzer_enable" }, - 64: { level: 1, name: "buzzer_sleep" }, - 65: { level: 1, name: "buzzer_button_stop_enable" }, - 66: { level: 1, name: "buzzer_silent_time" }, - 67: { level: 1, name: "tamper_alarm_enable" }, - 68: { level: 1, name: "tvoc_raw_reporting_enable" }, - 69: { level: 1, name: "temperature_alarm_settings" }, - "6a": { level: 1, name: "pm1_0_alarm_settings" }, - "6b": { level: 1, name: "pm2_5_alarm_settings" }, - "6c": { level: 1, name: "pm10_alarm_settings" }, - "6d": { level: 1, name: "tvoc_alarm_settings" }, - "6e": { level: 1, name: "vaping_index_alarm_settings" }, - "6f": { level: 1, name: "alarm_reporting_times" }, - 70: { level: 1, name: "alarm_deactivation_enable" }, - 71: { level: 1, name: "temperature_calibration_settings" }, - 72: { level: 1, name: "humidity_calibration_settings" }, - 73: { level: 1, name: "pm1_0_calibration_settings" }, - 74: { level: 1, name: "pm2_5_calibration_settings" }, - 75: { level: 1, name: "pm10_calibration_settings" }, - 76: { level: 1, name: "tvoc_calibration_settings" }, - 77: { level: 1, name: "vaping_index_calibration_settings" }, - c6: { level: 1, name: "daylight_saving_time" }, - c7: { level: 1, name: "time_zone" }, - be: { level: 0, name: "reboot" }, - b6: { level: 0, name: "reconnect" }, - b8: { level: 0, name: "synchronize_time" }, - b9: { level: 0, name: "query_device_status" }, - "5f": { level: 0, name: "stop_buzzer_alarm" }, - "5e": { level: 0, name: "execute_tvoc_self_clean" }, - }; - - var cmd = readHexString(bytes.slice(0, 1)); - var cmd_level = name_map[cmd].level; - - if (cmd_level != 0) { - var buffer = new Buffer(2 + cmd_level); - buffer.writeUInt8(0xef); - buffer.writeUInt8(cmd_level); - buffer.writeBytes(bytes.slice(0, cmd_level)); - return buffer.toBytes(); - } - return []; +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); } -function getValues(map) { - var values = []; - for (var key in map) { - values.push(RAW_VALUE ? parseInt(key) : map[key]); - } - return values; +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); } -function getValue(map, value) { - if (RAW_VALUE) return value; - for (var key in map) { - if (map[key] === value) { - return parseInt(key); +function getAllLeafPaths(obj, prefix) { + var paths = []; + + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } } - } - throw new Error("not match in " + JSON.stringify(map)); + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; } -function Buffer(size) { - this.buffer = new Array(size); - this.offset = 0; - - for (var i = 0; i < size; i++) { - this.buffer[i] = 0; - } +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); } -Buffer.prototype._write = function (value, byteLength, isLittleEndian) { - for (var index = 0; index < byteLength; index++) { - var shift = isLittleEndian ? index << 3 : (byteLength - 1 - index) << 3; - this.buffer[this.offset + index] = (value & (0xff << shift)) >> shift; - } -}; - -Buffer.prototype.writeUInt8 = function (value) { - this._write(value, 1, true); - this.offset += 1; -}; - -Buffer.prototype.writeInt8 = function (value) { - this._write(value < 0 ? value + 0x100 : value, 1, true); - this.offset += 1; -}; - -Buffer.prototype.writeUInt16LE = function (value) { - this._write(value, 2, true); - this.offset += 2; -}; - -Buffer.prototype.writeInt16LE = function (value) { - this._write(value < 0 ? value + 0x10000 : value, 2, true); - this.offset += 2; -}; - -Buffer.prototype.writeUInt32LE = function (value) { - this._write(value, 4, true); - this.offset += 4; -}; - -Buffer.prototype.writeInt32LE = function (value) { - this._write(value < 0 ? value + 0x100000000 : value, 4, true); - this.offset += 4; -}; - -Buffer.prototype.writeD2DCommand = function (value, defaultValue) { - if (typeof value !== "string") { - value = defaultValue; - } - if (value.length !== 4) { - throw new Error("d2d_cmd length must be 4"); +function cmdMap() { + return { + "request_check_order": "fe", + "request_full_inspection": "f4", + "request_full_inspection.start_inspection": "f400", + "request_full_inspection.control": "f401", + "request_full_inspection.reading": "f402", + "request_full_inspection.end_inspection": "f403", + "request_command_queries": "ef", + "all_configurations_request_by_device": "ee", + "lorawan_configuration_settings": "cf", + "lorawan_configuration_settings.mode": "cf00", + "tsl_version": "df", + "product_sn": "db", + "version": "da", + "oem_id": "d9", + "battery": "00", + "vaping_index": "01", + "vaping_index_alarm": "02", + "vaping_index_alarm.collection_error": "0200", + "vaping_index_alarm.lower_range_error": "0201", + "vaping_index_alarm.over_range_error": "0202", + "vaping_index_alarm.alarm_deactivation": "0210", + "vaping_index_alarm.alarm_trigger": "0211", + "vaping_index_alarm.interference_alarm_deactivation": "0220", + "vaping_index_alarm.interference_alarm_trigger": "0221", + "pm1_0": "03", + "pm1_0_alarm": "04", + "pm1_0_alarm.collection_error": "0400", + "pm1_0_alarm.lower_range_error": "0401", + "pm1_0_alarm.over_range_error": "0402", + "pm1_0_alarm.alarm_deactivation": "0410", + "pm1_0_alarm.alarm_trigger": "0411", + "pm2_5": "05", + "pm2_5_alarm": "06", + "pm2_5_alarm.collection_error": "0600", + "pm2_5_alarm.lower_range_error": "0601", + "pm2_5_alarm.over_range_error": "0602", + "pm2_5_alarm.alarm_deactivation": "0610", + "pm2_5_alarm.alarm_trigger": "0611", + "pm10": "07", + "pm10_alarm": "08", + "pm10_alarm.collection_error": "0800", + "pm10_alarm.lower_range_error": "0801", + "pm10_alarm.over_range_error": "0802", + "pm10_alarm.alarm_deactivation": "0810", + "pm10_alarm.alarm_trigger": "0811", + "temperature": "09", + "temperature_alarm": "0a", + "temperature_alarm.collection_error": "0a00", + "temperature_alarm.lower_range_error": "0a01", + "temperature_alarm.over_range_error": "0a02", + "temperature_alarm.alarm_deactivation": "0a10", + "temperature_alarm.alarm_trigger": "0a11", + "temperature_alarm.burning_alarm_deactivation": "0a20", + "temperature_alarm.burning_alarm_trigger": "0a21", + "humidity": "0b", + "humidity_alarm": "0c", + "humidity_alarm.collection_error": "0c00", + "humidity_alarm.lower_range_error": "0c01", + "humidity_alarm.over_range_error": "0c02", + "tvoc": "0d", + "tvoc_alarm": "0e", + "tvoc_alarm.collection_error": "0e00", + "tvoc_alarm.lower_range_error": "0e01", + "tvoc_alarm.over_range_error": "0e02", + "tvoc_alarm.alarm_deactivation": "0e10", + "tvoc_alarm.alarm_trigger": "0e11", + "tamper_status": "0f", + "tamper_status_alarm": "10", + "tamper_status_alarm.normal": "1020", + "tamper_status_alarm.trigger": "1021", + "buzzer": "11", + "occupancy_status": "12", + "tvoc_raw_data_1": "20", + "tvoc_raw_data_2": "21", + "tvoc_raw_data_3": "22", + "tvoc_raw_data_4": "23", + "tvoc_raw_data_5": "24", + "tvoc_raw_data_6": "25", + "tvoc_raw_data_7": "26", + "tvoc_raw_data_8": "27", + "tvoc_raw_data_9": "28", + "tvoc_raw_data_10": "29", + "tvoc_raw_data_11": "2a", + "pm_sensor_working_time": "2b", + "random_key": "c9", + "device_status": "c8", + "reporting_interval": "60", + "reporting_interval.seconds_of_time": "6000", + "reporting_interval.minutes_of_time": "6001", + "temperature_unit": "61", + "tamper_alarm_enable": "67", + "led_status": "62", + "buzzer_enable": "63", + "buzzer_sleep": "64", + "buzzer_sleep.item_1": "6401", + "buzzer_sleep.item_2": "6402", + "buzzer_button_stop_enable": "65", + "buzzer_silent_time": "66", + "time_zone": "c7", + "daylight_saving_time": "c6", + "tvoc_raw_reporting_enable": "68", + "temperature_alarm_settings": "69", + "pm1_0_alarm_settings": "6a", + "pm2_5_alarm_settings": "6b", + "pm10_alarm_settings": "6c", + "tvoc_alarm_settings": "6d", + "vaping_index_alarm_settings": "6e", + "alarm_reporting_times": "6f", + "alarm_deactivation_enable": "70", + "temperature_calibration_settings": "71", + "humidity_calibration_settings": "72", + "pm1_0_calibration_settings": "73", + "pm2_5_calibration_settings": "74", + "pm10_calibration_settings": "75", + "tvoc_calibration_settings": "76", + "vaping_index_calibration_settings": "77", + "reset": "bf", + "reboot": "be", + "clear_historical_data": "bd", + "stop_historical_data_retrieval": "bc", + "retrieve_historical_data_by_time": "bb", + "retrieve_historical_data_by_time_range": "ba", + "query_device_status": "b9", + "synchronize_time": "b8", + "set_time": "b7", + "reconnect": "b6", + "stop_buzzer_alarm": "5f", + "execute_tvoc_self_clean": "5e" + }; +} +function processTemperature(payload) { + var allTemperatureProperties = { + "temperature": { + "coefficient": 0.1 + }, + "temperature_alarm.alarm_deactivation.temperature": { + "coefficient": 0.1 + }, + "temperature_alarm.alarm_trigger.temperature": { + "coefficient": 0.1 + }, + "temperature_alarm_settings.threshold_min": { + "coefficient": 0.1 + }, + "temperature_alarm_settings.threshold_max": { + "coefficient": 0.1 + }, + "temperature_calibration_settings.calibration_value": { + "coefficient": 0.1 } - this.buffer[this.offset] = parseInt(value.substr(2, 2), 16); - this.buffer[this.offset + 1] = parseInt(value.substr(0, 2), 16); - this.offset += 2; -}; - -Buffer.prototype.toBytes = function () { - return this.buffer; }; - -function readHexString(bytes) { - var temp = []; - for (var idx = 0; idx < bytes.length; idx++) { - temp.push(("0" + (bytes[idx] & 0xff).toString(16)).slice(-2)); - } - return temp.join(""); -} + var leafPaths = getAllLeafPaths(payload); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + var stringCoefficient = String(allTemperatureProperties[newPropertyId].coefficient); + var dotIndex = stringCoefficient.indexOf('.'); + var precision = dotIndex != -1 ? stringCoefficient.length - dotIndex - 1 : 0; + if (!hasPath(payload, propertyId)) { + if (hasPath(payload, fahrenheitProperty) && hasPath(payload, celsiusProperty)) { + throw new Error(fahrenheitProperty + ' and ' + celsiusProperty + ' cannot be in payload at the same time'); + } + if (hasPath(payload, fahrenheitProperty)) { + setPath(payload, propertyId, Number(((getPath(payload, fahrenheitProperty) - 32) / 1.8).toFixed(precision))); + } else if (hasPath(payload, celsiusProperty)) { + setPath(payload, propertyId, Number(getPath(payload, celsiusProperty).toFixed(precision))); + } + } + } + } + return payload; +} \ No newline at end of file diff --git a/vendors/milesight-iot/wt-series/wt102/wt102-codec.json b/vendors/milesight-iot/wt-series/wt102/wt102-codec.json index a91ae25..59550ab 100644 --- a/vendors/milesight-iot/wt-series/wt102/wt102-codec.json +++ b/vendors/milesight-iot/wt-series/wt102/wt102-codec.json @@ -1,85 +1,9 @@ { "version": "1.0.0", "object": [ - { - "id": "anti_freeze_protection_alarm.lifted.current_valve_status", - "name": "Current Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "anti_freeze_protection_alarm.lifted.environment_temperature" - ] - }, - { - "id": "anti_freeze_protection_alarm.lifted.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "anti_freeze_protection_alarm.lifted.current_valve_status" - ] - }, - { - "id": "anti_freeze_protection_alarm.trigger.current_valve_status", - "name": "Current Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "anti_freeze_protection_alarm.trigger.environment_temperature" - ] - }, - { - "id": "anti_freeze_protection_alarm.trigger.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "anti_freeze_protection_alarm.trigger.current_valve_status" - ] - }, { "id": "anti_freeze_protection_alarm.type", - "name": "Alarm Type", + "name": "Alarm Type(Freeze Protection Alarm)", "value": "", "unit": "", "access_mode": "R", @@ -100,9 +24,28 @@ "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, + { + "id": "anti_freeze_protection_setting.celsius_temperature_value", + "name": "Celsius Freeze Temperature(Freeze Protection)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 5 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "anti_freeze_protection_setting.enable" + ] + }, { "id": "anti_freeze_protection_setting.enable", - "name": "Enable", + "name": "Enable(Freeze Protection)", "value": "1", "unit": "", "access_mode": "RW", @@ -125,9 +68,28 @@ "anti_freeze_protection_setting.temperature_value" ] }, + { + "id": "anti_freeze_protection_setting.fahrenheit_temperature_value", + "name": "Fahrenheit Freeze Temperature(Freeze Protection)", + "value": "37.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 41 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "anti_freeze_protection_setting.enable" + ] + }, { "id": "anti_freeze_protection_setting.temperature_value", - "name": "Freeze Temperature", + "name": "Freeze Temperature(Freeze Protection)", "value": "3", "unit": "°C", "access_mode": "RW", @@ -145,28 +107,46 @@ ] }, { - "id": "auto_away_report.active_by_target_temperature.environment_temperature", - "name": "Ambient Temperature", + "id": "auto_away_report.active_by_target_temperature.celsius_target_temperature", + "name": "Celsius Energy Saving Temperature(Auto-Away Trigger)", "value": "", "unit": "°C", "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 5, + 35 ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "auto_away_report.active_by_target_temperature.state", - "auto_away_report.active_by_target_temperature.target_temperature" + "auto_away_report.active_by_target_temperature.state" + ] + }, + { + "id": "auto_away_report.active_by_target_temperature.fahrenheit_target_temperature", + "name": "Fahrenheit Energy Saving Temperature(Auto-Away Trigger)", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "auto_away_report.active_by_target_temperature.state" ] }, { "id": "auto_away_report.active_by_target_temperature.state", - "name": "Occupancy status", + "name": "Occupancy status(Auto-Away Trigger)", "value": "", "unit": "", "access_mode": "R", @@ -186,13 +166,12 @@ "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "auto_away_report.active_by_target_temperature.environment_temperature", "auto_away_report.active_by_target_temperature.target_temperature" ] }, { "id": "auto_away_report.active_by_target_temperature.target_temperature", - "name": "Energy Saving Temperature", + "name": "Energy Saving Temperature(Auto-Away Trigger)", "value": "", "unit": "°C", "access_mode": "R", @@ -206,33 +185,12 @@ "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "auto_away_report.active_by_target_temperature.state", - "auto_away_report.active_by_target_temperature.environment_temperature" - ] - }, - { - "id": "auto_away_report.active_by_target_valve_opening.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "auto_away_report.active_by_target_valve_opening.state", - "auto_away_report.active_by_target_valve_opening.target_valve_opening" + "auto_away_report.active_by_target_temperature.state" ] }, { "id": "auto_away_report.active_by_target_valve_opening.state", - "name": "Occupancy status", + "name": "Occupancy status(Auto-Away Trigger)", "value": "", "unit": "", "access_mode": "R", @@ -252,13 +210,12 @@ "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "auto_away_report.active_by_target_valve_opening.environment_temperature", "auto_away_report.active_by_target_valve_opening.target_valve_opening" ] }, { "id": "auto_away_report.active_by_target_valve_opening.target_valve_opening", - "name": "Energy Saving Valve Opening", + "name": "Energy Saving Valve Opening(Auto-Away Trigger)", "value": "", "unit": "%", "access_mode": "R", @@ -272,13 +229,12 @@ "bacnet_unit_type_id": 98, "bacnet_unit_type": "UNITS_PERCENT", "reference": [ - "auto_away_report.active_by_target_valve_opening.state", - "auto_away_report.active_by_target_valve_opening.environment_temperature" + "auto_away_report.active_by_target_valve_opening.state" ] }, { "id": "auto_away_report.event_type", - "name": "Event Type", + "name": "Event Type(Auto-Away)", "value": "", "unit": "", "access_mode": "R", @@ -307,29 +263,9 @@ "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, - { - "id": "auto_away_report.inactive_by_target_temperature.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "auto_away_report.inactive_by_target_temperature.state", - "auto_away_report.inactive_by_target_temperature.target_temperature" - ] - }, { "id": "auto_away_report.inactive_by_target_temperature.state", - "name": "Occupancy status", + "name": "Occupancy status(Auto-Away Exit)", "value": "", "unit": "", "access_mode": "R", @@ -348,54 +284,11 @@ "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "auto_away_report.inactive_by_target_temperature.environment_temperature", - "auto_away_report.inactive_by_target_temperature.target_temperature" - ] - }, - { - "id": "auto_away_report.inactive_by_target_temperature.target_temperature", - "name": "Target Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 5, - 35 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "auto_away_report.inactive_by_target_temperature.state", - "auto_away_report.inactive_by_target_temperature.environment_temperature" - ] - }, - { - "id": "auto_away_report.inactive_by_target_valve_opening.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "auto_away_report.inactive_by_target_valve_opening.state", - "auto_away_report.inactive_by_target_valve_opening.target_valve_opening" - ] + "reference": [] }, { "id": "auto_away_report.inactive_by_target_valve_opening.state", - "name": "Occupancy status", + "name": "Occupancy status(Auto-Away Exit)", "value": "", "unit": "", "access_mode": "R", @@ -414,34 +307,11 @@ "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "auto_away_report.inactive_by_target_valve_opening.environment_temperature", - "auto_away_report.inactive_by_target_valve_opening.target_valve_opening" - ] - }, - { - "id": "auto_away_report.inactive_by_target_valve_opening.target_valve_opening", - "name": "Target Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "auto_away_report.inactive_by_target_valve_opening.state", - "auto_away_report.inactive_by_target_valve_opening.environment_temperature" - ] + "reference": [] }, { "id": "auto_away_settings.cycle_time_fri", - "name": "Fri.", + "name": "Fri.(Auto-Away)", "value": "0", "unit": "", "access_mode": "RW", @@ -472,13 +342,15 @@ "auto_away_settings.cycle_time_sat", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, { "id": "auto_away_settings.cycle_time_mon", - "name": "Mon.", + "name": "Mon.(Auto-Away)", "value": "0", "unit": "", "access_mode": "RW", @@ -509,13 +381,15 @@ "auto_away_settings.cycle_time_sat", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, { "id": "auto_away_settings.cycle_time_sat", - "name": "Sat.", + "name": "Sat.(Auto-Away)", "value": "0", "unit": "", "access_mode": "RW", @@ -546,13 +420,15 @@ "auto_away_settings.cycle_time_fri", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, { "id": "auto_away_settings.cycle_time_sun", - "name": "Sun.", + "name": "Sun.(Auto-Away)", "value": "0", "unit": "", "access_mode": "RW", @@ -583,13 +459,15 @@ "auto_away_settings.cycle_time_sat", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, { "id": "auto_away_settings.cycle_time_thur", - "name": "Thur.", + "name": "Thur.(Auto-Away)", "value": "0", "unit": "", "access_mode": "RW", @@ -620,13 +498,15 @@ "auto_away_settings.cycle_time_sat", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, { "id": "auto_away_settings.cycle_time_tues", - "name": "Tues.", + "name": "Tues.(Auto-Away)", "value": "0", "unit": "", "access_mode": "RW", @@ -657,13 +537,15 @@ "auto_away_settings.cycle_time_sat", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, { "id": "auto_away_settings.cycle_time_wed", - "name": "Wed.", + "name": "Wed.(Auto-Away)", "value": "0", "unit": "", "access_mode": "RW", @@ -694,13 +576,15 @@ "auto_away_settings.cycle_time_sat", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, { "id": "auto_away_settings.enable", - "name": "Enable", + "name": "Enable(Auto-Away)", "value": "0", "unit": "", "access_mode": "RW", @@ -731,13 +615,15 @@ "auto_away_settings.cycle_time_sat", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, { "id": "auto_away_settings.end_time", - "name": "End Time", + "name": "End Time(Auto-Away)", "value": "0", "unit": "min", "access_mode": "RW", @@ -762,13 +648,34 @@ "auto_away_settings.cycle_time_sat", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, + { + "id": "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "name": "Celsius Energy Saving Temperature(Energy Saving Settings)", + "value": "19", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "auto_away_settings.energy_saving_settings.mode" + ] + }, { "id": "auto_away_settings.energy_saving_settings.energy_saving_temperature", - "name": "Energy Saving Temperature", + "name": "Energy Saving Temperature(Energy Saving Settings)", "value": "19", "unit": "°C", "access_mode": "RW", @@ -787,7 +694,7 @@ }, { "id": "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", - "name": "Energy Saving Valve Opening", + "name": "Energy Saving Valve Opening(Energy Saving Settings)", "value": "50", "unit": "%", "access_mode": "RW", @@ -804,9 +711,28 @@ "auto_away_settings.energy_saving_settings.mode" ] }, + { + "id": "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", + "name": "Fahrenheit Energy Saving Temperature(Energy Saving Settings)", + "value": "66.2", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "auto_away_settings.energy_saving_settings.mode" + ] + }, { "id": "auto_away_settings.energy_saving_settings.mode", - "name": "Energy Saving Settings", + "name": "Energy Saving Settings(Energy Saving Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -829,7 +755,7 @@ }, { "id": "auto_away_settings.reserved", - "name": "Reserved", + "name": "Reserved(Auto-Away)", "value": "", "unit": "", "access_mode": "RW", @@ -850,13 +776,25 @@ "auto_away_settings.cycle_time_fri", "auto_away_settings.cycle_time_sat", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" + ], + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ] }, { "id": "auto_away_settings.start_time", - "name": "Start Time", + "name": "Start Time(Auto-Away)", "value": "0", "unit": "min", "access_mode": "RW", @@ -881,32 +819,12 @@ "auto_away_settings.cycle_time_sat", "auto_away_settings.reserved", "auto_away_settings.energy_saving_settings.energy_saving_temperature", + "auto_away_settings.energy_saving_settings.celsius_energy_saving_temperature", + "auto_away_settings.energy_saving_settings.fahrenheit_energy_saving_temperature", "auto_away_settings.energy_saving_settings.energy_saving_valve_opening_degree", "auto_away_settings.energy_saving_settings.mode" ] }, - { - "id": "auto_p_enable", - "name": "Auto-P", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Disable" - }, - { - "value": 1, - "name": "Enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, { "id": "battery", "name": "Battery", @@ -946,7 +864,39 @@ ] }, { - "id": "change_report_enable", + "id": "celsius_target_temperature", + "name": "Celsius Target Temperature", + "value": "", + "unit": "°C", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "celsius_temperature", + "name": "Celsius Temperature", + "value": "", + "unit": "°C", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "change_report_enable", "name": "Local Modification Report", "value": "0", "unit": "", @@ -969,7 +919,7 @@ }, { "id": "child_lock.enable", - "name": "Enable", + "name": "Enable(Child Lock)", "value": "0", "unit": "", "access_mode": "RW", @@ -996,7 +946,7 @@ }, { "id": "child_lock.func_button", - "name": "+ /-", + "name": "+ /-(Child Lock)", "value": "0", "unit": "", "access_mode": "RW", @@ -1023,7 +973,7 @@ }, { "id": "child_lock.reserved", - "name": "Reserved", + "name": "Reserved(Child Lock)", "value": "", "unit": "", "access_mode": "RW", @@ -1036,11 +986,21 @@ "child_lock.enable", "child_lock.system_button", "child_lock.func_button" + ], + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ] }, { "id": "child_lock.system_button", - "name": "Power On/Off", + "name": "Power On/Off(Child Lock)", "value": "0", "unit": "", "access_mode": "RW", @@ -1111,7 +1071,7 @@ }, { "id": "data_storage_settings.command", - "name": "Sub-command", + "name": "Sub-command(Data Storage Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -1142,7 +1102,7 @@ }, { "id": "data_storage_settings.enable", - "name": "Data Storage Enable", + "name": "Data Storage Enable(Data Storage Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -1165,7 +1125,7 @@ }, { "id": "data_storage_settings.retransmission_enable", - "name": "Data Retransmission Enable", + "name": "Data Retransmission Enable(Data Storage Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -1188,7 +1148,7 @@ }, { "id": "data_storage_settings.retransmission_interval", - "name": "Data Retransmission Interval", + "name": "Data Retransmission Interval(Data Storage Settings)", "value": "600", "unit": "s", "access_mode": "RW", @@ -1205,7 +1165,7 @@ }, { "id": "data_storage_settings.retrieval_interval", - "name": "Data Retrieval Interval", + "name": "Data Retrieval Interval(Data Storage Settings)", "value": "60", "unit": "s", "access_mode": "RW", @@ -1222,7 +1182,7 @@ }, { "id": "daylight_saving_time.daylight_saving_time_offset", - "name": "DST Bias", + "name": "DST Bias(Daylight Saving Time)", "value": "60", "unit": "min", "access_mode": "RW", @@ -1249,7 +1209,7 @@ }, { "id": "daylight_saving_time.enable", - "name": "Enable", + "name": "Enable(Daylight Saving Time)", "value": "0", "unit": "", "access_mode": "RW", @@ -1282,7 +1242,7 @@ }, { "id": "daylight_saving_time.end_hour_min", - "name": "Time", + "name": "Time(Daylight Saving Time)", "value": "0", "unit": "min", "access_mode": "RW", @@ -1403,7 +1363,7 @@ }, { "id": "daylight_saving_time.end_month", - "name": "Month", + "name": "Month(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", @@ -1476,7 +1436,7 @@ }, { "id": "daylight_saving_time.end_week_day", - "name": "Week", + "name": "Week(Daylight Saving Time)", "value": "7", "unit": "", "access_mode": "RW", @@ -1529,7 +1489,7 @@ }, { "id": "daylight_saving_time.end_week_num", - "name": "Number of Week", + "name": "Number of Week(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", @@ -1574,7 +1534,7 @@ }, { "id": "daylight_saving_time.start_hour_min", - "name": "Time", + "name": "Time(Daylight Saving Time)", "value": "0", "unit": "min", "access_mode": "RW", @@ -1695,7 +1655,7 @@ }, { "id": "daylight_saving_time.start_month", - "name": "Month", + "name": "Month(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", @@ -1768,7 +1728,7 @@ }, { "id": "daylight_saving_time.start_week_day", - "name": "Week", + "name": "Week(Daylight Saving Time)", "value": "7", "unit": "", "access_mode": "RW", @@ -1821,7 +1781,7 @@ }, { "id": "daylight_saving_time.start_week_num", - "name": "Number of Week", + "name": "Number of Week(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", @@ -1866,7 +1826,7 @@ }, { "id": "delete_schedule.type", - "name": "Select Schedule", + "name": "Select Schedule(Delete Schedule)", "value": "255", "unit": "", "access_mode": "W", @@ -1991,9 +1951,41 @@ "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, + { + "id": "fahrenheit_target_temperature", + "name": "Fahrenheit Target Temperature", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_temperature", + "name": "Fahrenheit Temperature", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, { "id": "heating_period_settings.command", - "name": "Sub-command", + "name": "Sub-command(Heating Period Configuration)", "value": "0", "unit": "", "access_mode": "RW", @@ -2040,7 +2032,7 @@ }, { "id": "heating_period_settings.heating_date_settings.end_day", - "name": "Heating End Day", + "name": "Heating End Day(Heating Date)", "value": "31", "unit": "", "access_mode": "RW", @@ -2061,7 +2053,7 @@ }, { "id": "heating_period_settings.heating_date_settings.end_mon", - "name": "Heating End Month", + "name": "Heating End Month(Heating Date)", "value": "12", "unit": "", "access_mode": "RW", @@ -2082,7 +2074,7 @@ }, { "id": "heating_period_settings.heating_date_settings.start_day", - "name": "Heating Start Day", + "name": "Heating Start Day(Heating Date)", "value": "1", "unit": "", "access_mode": "RW", @@ -2103,7 +2095,7 @@ }, { "id": "heating_period_settings.heating_date_settings.start_mon", - "name": "Heating Start Month", + "name": "Heating Start Month(Heating Date)", "value": "1", "unit": "", "access_mode": "RW", @@ -2124,14 +2116,14 @@ }, { "id": "heating_period_settings.heating_period_reporting_interval.minutes_of_time", - "name": "Heating Period Reporting Interval", + "name": "Heating Period Reporting Interval(Heating Period Reporting Interval)", "value": "10", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT16", "range": [ - 1, + 5, 1440 ], "bacnet_type": "analog_value_object", @@ -2143,7 +2135,7 @@ }, { "id": "heating_period_settings.heating_period_reporting_interval.seconds_of_time", - "name": "Heating Period Reporting Interval", + "name": "Heating Period Reporting Interval(Heating Period Reporting Interval)", "value": "600", "unit": "s", "access_mode": "RW", @@ -2162,7 +2154,7 @@ }, { "id": "heating_period_settings.heating_period_reporting_interval.unit", - "name": "Heating Period Reporting Interval Unit", + "name": "Heating Period Reporting Interval Unit(Heating Period Reporting Interval)", "value": "1", "unit": "", "access_mode": "RW", @@ -2185,14 +2177,14 @@ }, { "id": "heating_period_settings.non_heating_period_reporting_interval.minutes_of_time", - "name": "Non-heating Period Reporting Interval", + "name": "Non-heating Period Reporting Interval(Non-heating Period Reporting Interval)", "value": "1440", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT16", "range": [ - 1, + 5, 1440 ], "bacnet_type": "analog_value_object", @@ -2204,7 +2196,7 @@ }, { "id": "heating_period_settings.non_heating_period_reporting_interval.seconds_of_time", - "name": "Non-heating Period Reporting Interval", + "name": "Non-heating Period Reporting Interval(Non-heating Period Reporting Interval)", "value": "64800", "unit": "s", "access_mode": "RW", @@ -2223,7 +2215,7 @@ }, { "id": "heating_period_settings.non_heating_period_reporting_interval.unit", - "name": "Non-heating Period Reporting Interval Unit", + "name": "Non-heating Period Reporting Interval Unit(Non-heating Period Reporting Interval)", "value": "1", "unit": "", "access_mode": "RW", @@ -2246,7 +2238,7 @@ }, { "id": "heating_period_settings.valve_status_control", - "name": "Non-heating Period Valve Status", + "name": "Non-heating Period Valve Status(Heating Period Configuration)", "value": "1", "unit": "", "access_mode": "RW", @@ -2269,7 +2261,7 @@ }, { "id": "historical_data_report.mode", - "name": "Historical Data Mode", + "name": "Historical Data Mode(Historical Data)", "value": "", "unit": "", "access_mode": "R", @@ -2294,7 +2286,7 @@ }, { "id": "historical_data_report.timestamp", - "name": "Historical Data Timestamps", + "name": "Historical Data Timestamps(Historical Data)", "value": "", "unit": "", "access_mode": "R", @@ -2307,146 +2299,9 @@ "historical_data_report.mode" ] }, - { - "id": "low_battery_alarm.value", - "name": "Battery", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [] - }, - { - "id": "mandatory_heating_alarm.enter.battery_level", - "name": "Battery", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "mandatory_heating_alarm.enter.environment_temperature", - "mandatory_heating_alarm.enter.current_valve_status" - ] - }, - { - "id": "mandatory_heating_alarm.enter.current_valve_status", - "name": "Current Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "mandatory_heating_alarm.enter.environment_temperature", - "mandatory_heating_alarm.enter.battery_level" - ] - }, - { - "id": "mandatory_heating_alarm.enter.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "mandatory_heating_alarm.enter.current_valve_status", - "mandatory_heating_alarm.enter.battery_level" - ] - }, - { - "id": "mandatory_heating_alarm.exit.battery_level", - "name": "Battery", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "mandatory_heating_alarm.exit.environment_temperature", - "mandatory_heating_alarm.exit.current_valve_status" - ] - }, - { - "id": "mandatory_heating_alarm.exit.current_valve_status", - "name": "Current Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "mandatory_heating_alarm.exit.environment_temperature", - "mandatory_heating_alarm.exit.battery_level" - ] - }, - { - "id": "mandatory_heating_alarm.exit.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "mandatory_heating_alarm.exit.current_valve_status", - "mandatory_heating_alarm.exit.battery_level" - ] - }, { "id": "mandatory_heating_alarm.type", - "name": "Alarm Type", + "name": "Alarm Type(Forced Heating Alarm)", "value": "", "unit": "", "access_mode": "R", @@ -2491,7 +2346,7 @@ }, { "id": "motor_calibration_result_report.status", - "name": "Motor Calibration Status", + "name": "Motor Calibration Status(Motor Calibration Result)", "value": "", "unit": "", "access_mode": "R", @@ -2524,50 +2379,6 @@ "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, - { - "id": "motor_controllable_range.distance", - "name": "Motor Controllable Distance", - "value": "666", - "unit": "mm", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 0, - 666 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 30, - "bacnet_unit_type": "UNITS_MILLIMETERS", - "reference": [ - "motor_controllable_range.enable" - ] - }, - { - "id": "motor_controllable_range.enable", - "name": "Motor Controllable Distance Enable", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Disable" - }, - { - "value": 1, - "name": "Enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "motor_controllable_range.distance" - ] - }, { "id": "motor_position", "name": "Motor Position", @@ -2630,339 +2441,54 @@ "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "periodic_reporting.integrated_control_for_heating.battery_level", - "name": "Battery", + "id": "periodic_reporting.report_type", + "name": "Reporting Type(Periodic Reporting)", "value": "", - "unit": "%", + "unit": "", "access_mode": "R", - "data_type": "NUMBER", + "data_type": "ENUM", "value_type": "UINT8", - "range": [ - 0, - 100 + "values": [ + { + "value": 0, + "name": "Non-heating Period Reporting" + }, + { + "value": 1, + "name": "Heating Period Temperature Control Reporting" + }, + { + "value": 2, + "name": "Heating Period Valve Opening Control Reporting" + }, + { + "value": 3, + "name": "Heating Period Integrated Control Reporting" + } ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.integrated_control_for_heating.environment_temperature", - "periodic_reporting.integrated_control_for_heating.current_valve_opening", - "periodic_reporting.integrated_control_for_heating.target_temperature", - "periodic_reporting.integrated_control_for_heating.target_valve_opening" - ] + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "periodic_reporting.integrated_control_for_heating.current_valve_opening", - "name": "Current Valve Opening", + "id": "product_sn", + "name": "SN", "value": "", - "unit": "%", + "unit": "", "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.integrated_control_for_heating.environment_temperature", - "periodic_reporting.integrated_control_for_heating.target_temperature", - "periodic_reporting.integrated_control_for_heating.target_valve_opening", - "periodic_reporting.integrated_control_for_heating.battery_level" - ] - }, - { - "id": "periodic_reporting.integrated_control_for_heating.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "periodic_reporting.integrated_control_for_heating.current_valve_opening", - "periodic_reporting.integrated_control_for_heating.target_temperature", - "periodic_reporting.integrated_control_for_heating.target_valve_opening", - "periodic_reporting.integrated_control_for_heating.battery_level" - ] - }, - { - "id": "periodic_reporting.integrated_control_for_heating.target_temperature", - "name": "Target Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 5, - 35 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "periodic_reporting.integrated_control_for_heating.environment_temperature", - "periodic_reporting.integrated_control_for_heating.current_valve_opening", - "periodic_reporting.integrated_control_for_heating.target_valve_opening", - "periodic_reporting.integrated_control_for_heating.battery_level" - ] - }, - { - "id": "periodic_reporting.integrated_control_for_heating.target_valve_opening", - "name": "Target Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.integrated_control_for_heating.environment_temperature", - "periodic_reporting.integrated_control_for_heating.current_valve_opening", - "periodic_reporting.integrated_control_for_heating.target_temperature", - "periodic_reporting.integrated_control_for_heating.battery_level" - ] - }, - { - "id": "periodic_reporting.non_heating_season.battery_level", - "name": "Battery", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.non_heating_season.target_valve_opening" - ] - }, - { - "id": "periodic_reporting.non_heating_season.target_valve_opening", - "name": "Target Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.non_heating_season.battery_level" - ] - }, - { - "id": "periodic_reporting.target_temperature_for_heating.battery_level", - "name": "Battery", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.target_temperature_for_heating.environment_temperature", - "periodic_reporting.target_temperature_for_heating.current_valve_opening", - "periodic_reporting.target_temperature_for_heating.target_temperature" - ] - }, - { - "id": "periodic_reporting.target_temperature_for_heating.current_valve_opening", - "name": "Current Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.target_temperature_for_heating.environment_temperature", - "periodic_reporting.target_temperature_for_heating.target_temperature", - "periodic_reporting.target_temperature_for_heating.battery_level" - ] - }, - { - "id": "periodic_reporting.target_temperature_for_heating.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "periodic_reporting.target_temperature_for_heating.current_valve_opening", - "periodic_reporting.target_temperature_for_heating.target_temperature", - "periodic_reporting.target_temperature_for_heating.battery_level" - ] - }, - { - "id": "periodic_reporting.target_temperature_for_heating.target_temperature", - "name": "Target Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 5, - 35 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "periodic_reporting.target_temperature_for_heating.environment_temperature", - "periodic_reporting.target_temperature_for_heating.current_valve_opening", - "periodic_reporting.target_temperature_for_heating.battery_level" - ] - }, - { - "id": "periodic_reporting.target_valve_opening_for_heating.battery_level", - "name": "Battery", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.target_valve_opening_for_heating.environment_temperature", - "periodic_reporting.target_valve_opening_for_heating.current_valve_opening", - "periodic_reporting.target_valve_opening_for_heating.target_valve_opening" - ] - }, - { - "id": "periodic_reporting.target_valve_opening_for_heating.current_valve_opening", - "name": "Current Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.target_valve_opening_for_heating.environment_temperature", - "periodic_reporting.target_valve_opening_for_heating.target_valve_opening", - "periodic_reporting.target_valve_opening_for_heating.battery_level" - ] - }, - { - "id": "periodic_reporting.target_valve_opening_for_heating.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "periodic_reporting.target_valve_opening_for_heating.current_valve_opening", - "periodic_reporting.target_valve_opening_for_heating.target_valve_opening", - "periodic_reporting.target_valve_opening_for_heating.battery_level" - ] - }, - { - "id": "periodic_reporting.target_valve_opening_for_heating.target_valve_opening", - "name": "Target Valve Opening", - "value": "", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "periodic_reporting.target_valve_opening_for_heating.environment_temperature", - "periodic_reporting.target_valve_opening_for_heating.current_valve_opening", - "periodic_reporting.target_valve_opening_for_heating.battery_level" - ] - }, - { - "id": "product_sn", - "name": "SN", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "query_device_status", - "name": "Device Status Query", - "access_mode": "W", - "data_type": "BOOL", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 16, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "query_device_status", + "name": "Device Status Query", + "access_mode": "W", + "data_type": "BOOL", "value_type": "UINT8", "unit": "", "bacnet_unit_type_id": 95, @@ -3002,28 +2528,6 @@ } ] }, - { - "id": "random_key", - "name": "Random key", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Disable" - }, - { - "value": 1, - "name": "Enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, { "id": "reboot", "name": "Reboot", @@ -3068,28 +2572,6 @@ } ] }, - { - "id": "request_query_all_configurations", - "name": "Request to Query All Configurations", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "unit": "", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "bacnet_type": "binary_output_object", - "value": "", - "values": [ - { - "value": 0, - "name": "no" - }, - { - "value": 1, - "name": "yes" - } - ] - }, { "id": "reset", "name": "Reset", @@ -3114,7 +2596,7 @@ }, { "id": "retrieve_historical_data_by_time_range.end_time", - "name": "End Time", + "name": "End Time(Retrieval(Periods of Time))", "value": "", "unit": "", "access_mode": "W", @@ -3129,7 +2611,7 @@ }, { "id": "retrieve_historical_data_by_time_range.start_time", - "name": "Start Time", + "name": "Start Time(Retrieval(Periods of Time))", "value": "", "unit": "", "access_mode": "W", @@ -3144,7 +2626,7 @@ }, { "id": "retrieve_historical_data_by_time.time", - "name": "Time Point", + "name": "Time Point(Retrieval(Point-in-Time))", "value": "", "unit": "", "access_mode": "W", @@ -3157,7 +2639,7 @@ }, { "id": "set_occupancy_state.state", - "name": "Occupancy Status", + "name": "Occupancy Status(Occupancy Status Setting)", "value": "0", "unit": "", "access_mode": "W", @@ -3180,7 +2662,7 @@ }, { "id": "set_opening_window.state", - "name": "Open Window Status", + "name": "Open Window Status(Open Window Status Setting)", "value": "0", "unit": "", "access_mode": "W", @@ -3201,9 +2683,43 @@ "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, + { + "id": "set_target_temperature.celsius_value", + "name": "Celsius Temperature(Target Temperature Setting)", + "value": "0", + "unit": "°C", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "set_target_temperature.fahrenheit_value", + "name": "Fahrenheit Temperature(Target Temperature Setting)", + "value": "32", + "unit": "℉", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, { "id": "set_target_temperature.value", - "name": "Temperature", + "name": "Temperature(Target Temperature Setting)", "value": "0", "unit": "°C", "access_mode": "W", @@ -3220,7 +2736,7 @@ }, { "id": "set_target_valve_opening_degree.value", - "name": "Target Valve Opening", + "name": "Target Valve Opening(Target Valve Opening Setting)", "value": "0", "unit": "%", "access_mode": "W", @@ -3235,9 +2751,43 @@ "bacnet_unit_type": "UNITS_PERCENT", "reference": [] }, + { + "id": "set_temperature.celsius_value", + "name": "Celsius Temperature(LoRa Receive Temperature)", + "value": "0", + "unit": "°C", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "set_temperature.fahrenheit_value", + "name": "Fahrenheit Temperature(LoRa Receive Temperature)", + "value": "32", + "unit": "℉", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, { "id": "set_temperature.value", - "name": "Temperature", + "name": "Temperature(LoRa Receive Temperature)", "value": "0", "unit": "°C", "access_mode": "W", @@ -3254,7 +2804,7 @@ }, { "id": "set_time.timestamp", - "name": "Timestamp", + "name": "Timestamp(Time Synchronize)", "value": "", "unit": "", "access_mode": "W", @@ -3325,9 +2875,100 @@ "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, + { + "id": "temp_control.celsius_over_temperature_side_deadband", + "name": "Celsius Over-temperature Side Deadband(Temperature Control)", + "value": "0.1", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 5 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "temp_control.celsius_target_temperature_adjustment_range_max", + "name": "Celsius Maximum of Target Temperature Adjustment Range(Temperature Control)", + "value": "35", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "temp_control.celsius_target_temperature_adjustment_range_min", + "name": "Celsius Minimum of Target Temperature Adjustment Range(Temperature Control)", + "value": "5", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "temp_control.celsius_target_temperature_resolution", + "name": "Celsius Target Temperature Resolution(Temperature Control)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "0.5" + }, + { + "value": 1, + "name": "1" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "temp_control.celsius_under_temperature_side_deadband", + "name": "Celsius Under-temperature Side Deadband(Temperature Control)", + "value": "0.1", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 5 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, { "id": "temp_control.command", - "name": "Sub-command", + "name": "Sub-command(Temperature Control)", "value": "0", "unit": "", "access_mode": "RW", @@ -3382,7 +3023,7 @@ }, { "id": "temp_control.enable", - "name": "Temperature Control Enable", + "name": "Temperature Control Enable(Temperature Control)", "value": "1", "unit": "", "access_mode": "RW", @@ -3403,9 +3044,134 @@ "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, + { + "id": "temp_control.fahrenheit_over_temperature_side_deadband", + "name": "Fahrenheit Over-temperature Side Deadband(Temperature Control)", + "value": "32.18", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 32, + 41 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "temp_control.fahrenheit_target_temperature_adjustment_range_max", + "name": "Fahrenheit Maximum of Target Temperature Adjustment Range(Temperature Control)", + "value": "95", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "temp_control.fahrenheit_target_temperature_adjustment_range_min", + "name": "Fahrenheit Minimum of Target Temperature Adjustment Range(Temperature Control)", + "value": "41", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "temp_control.fahrenheit_target_temperature_resolution", + "name": "Fahrenheit Target Temperature Resolution(Temperature Control)", + "value": "32", + "unit": "℉", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "0.5" + }, + { + "value": 1, + "name": "1" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "temp_control.fahrenheit_under_temperature_side_deadband", + "name": "Fahrenheit Under-temperature Side Deadband(Temperature Control)", + "value": "32.18", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 32, + 41 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "temp_control.mode_settings.auto_control.celsius_target_temperature", + "name": "Celsius Target Temperature(Automatic Temperature Control)", + "value": "19", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "temp_control.mode_settings.auto_control.fahrenheit_target_temperature", + "name": "Fahrenheit Target Temperature(Automatic Temperature Control)", + "value": "66.2", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, { "id": "temp_control.mode_settings.auto_control.target_temperature", - "name": "Target Temperature", + "name": "Target Temperature(Automatic Temperature Control)", "value": "19", "unit": "°C", "access_mode": "RW", @@ -3421,8 +3187,42 @@ "reference": [] }, { - "id": "temp_control.mode_settings.intergrated_control.target_temp", - "name": "Target Temperature", + "id": "temp_control.mode_settings.intergrated_control.celsius_target_temperature", + "name": "Celsius Target Temperature(Integrated Control)", + "value": "19", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "temp_control.mode_settings.intergrated_control.fahrenheit_target_temperature", + "name": "Fahrenheit Target Temperature(Integrated Control)", + "value": "66.2", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "temp_control.mode_settings.intergrated_control.target_temperature", + "name": "Target Temperature(Integrated Control)", "value": "19", "unit": "°C", "access_mode": "RW", @@ -3439,7 +3239,7 @@ }, { "id": "temp_control.mode_settings.mode", - "name": "Temperature Control Mode", + "name": "Temperature Control Mode(Temperature Control Mode Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -3466,7 +3266,7 @@ }, { "id": "temp_control.mode_settings.valve_control.target_valve_status", - "name": "Target Valve Opening", + "name": "Target Valve Opening(Valve Opening Control)", "value": "50", "unit": "%", "access_mode": "RW", @@ -3483,7 +3283,7 @@ }, { "id": "temp_control.over_temperature_side_deadband", - "name": "Over-temperature Side Deadband", + "name": "Over-temperature Side Deadband(Temperature Control)", "value": "0.1", "unit": "°C", "access_mode": "RW", @@ -3500,7 +3300,7 @@ }, { "id": "temp_control.target_temperature_adjustment_range_max", - "name": "Maximum of Target Temperature Adjustment Range", + "name": "Maximum of Target Temperature Adjustment Range(Temperature Control)", "value": "35", "unit": "°C", "access_mode": "RW", @@ -3517,7 +3317,7 @@ }, { "id": "temp_control.target_temperature_adjustment_range_min", - "name": "Minimum of Target Temperature Adjustment Range", + "name": "Minimum of Target Temperature Adjustment Range(Temperature Control)", "value": "5", "unit": "°C", "access_mode": "RW", @@ -3534,7 +3334,7 @@ }, { "id": "temp_control.target_temperature_resolution", - "name": "Target Temperature Resolution", + "name": "Target Temperature Resolution(Temperature Control)", "value": "0", "unit": "°C", "access_mode": "RW", @@ -3557,7 +3357,7 @@ }, { "id": "temp_control.under_temperature_side_deadband", - "name": "Under-temperature Side Deadband", + "name": "Under-temperature Side Deadband(Temperature Control)", "value": "0.1", "unit": "°C", "access_mode": "RW", @@ -3604,9 +3404,51 @@ "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, + { + "id": "temperature_alarm_settings.celsius_threshold_max", + "name": "Celsius High Temperature Threshold(Temperature Threshold Alarm)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" + ] + }, + { + "id": "temperature_alarm_settings.celsius_threshold_min", + "name": "Celsius ​Low Temperature Threshold(Temperature Threshold Alarm)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" + ] + }, { "id": "temperature_alarm_settings.enable", - "name": "Enable", + "name": "Enable(Temperature Threshold Alarm)", "value": "0", "unit": "", "access_mode": "RW", @@ -3631,9 +3473,51 @@ "temperature_alarm_settings.threshold_max" ] }, + { + "id": "temperature_alarm_settings.fahrenheit_threshold_max", + "name": "Fahrenheit High Temperature Threshold(Temperature Threshold Alarm)", + "value": "32", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" + ] + }, + { + "id": "temperature_alarm_settings.fahrenheit_threshold_min", + "name": "Fahrenheit ​Low Temperature Threshold(Temperature Threshold Alarm)", + "value": "32", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" + ] + }, { "id": "temperature_alarm_settings.threshold_condition", - "name": "Alarm Mode", + "name": "Alarm Mode(Temperature Threshold Alarm)", "value": "0", "unit": "", "access_mode": "RW", @@ -3668,7 +3552,7 @@ }, { "id": "temperature_alarm_settings.threshold_max", - "name": "High Temperature Threshold", + "name": "High Temperature Threshold(Temperature Threshold Alarm)", "value": "0", "unit": "°C", "access_mode": "RW", @@ -3689,7 +3573,7 @@ }, { "id": "temperature_alarm_settings.threshold_min", - "name": "​Low Temperature Threshold", + "name": "​Low Temperature Threshold(Temperature Threshold Alarm)", "value": "0", "unit": "°C", "access_mode": "RW", @@ -3708,77 +3592,9 @@ "temperature_alarm_settings.threshold_max" ] }, - { - "id": "temperature_alarm.lower_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] - }, - { - "id": "temperature_alarm.lower_range_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] - }, - { - "id": "temperature_alarm.over_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] - }, - { - "id": "temperature_alarm.over_range_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] - }, { "id": "temperature_alarm.type", - "name": "Alarm Type", + "name": "Alarm Type(Temperature Alarm)", "value": "", "unit": "", "access_mode": "R", @@ -3809,7 +3625,26 @@ }, { "id": "temperature_calibration_settings.calibration_value", - "name": "Calibration Value", + "name": "Calibration Value(Temperature Calibration Settings)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -60, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_calibration_settings.enable" + ] + }, + { + "id": "temperature_calibration_settings.celsius_calibration_value", + "name": "Celsius Calibration Value(Temperature Calibration Settings)", "value": "0", "unit": "°C", "access_mode": "RW", @@ -3828,7 +3663,7 @@ }, { "id": "temperature_calibration_settings.enable", - "name": "Enable", + "name": "Enable(Temperature Calibration Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -3851,9 +3686,28 @@ "temperature_calibration_settings.calibration_value" ] }, + { + "id": "temperature_calibration_settings.fahrenheit_calibration_value", + "name": "Fahrenheit Calibration Value(Temperature Calibration Settings)", + "value": "32", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -76, + 140 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_calibration_settings.enable" + ] + }, { "id": "temperature_source_settings.external_ntc_reception.timeout", - "name": "Timeout", + "name": "Timeout(External NTC Receive Temperature)", "value": "30", "unit": "min", "access_mode": "RW", @@ -3872,7 +3726,7 @@ }, { "id": "temperature_source_settings.external_ntc_reception.timeout_response", - "name": "External NTC Dropout Settings", + "name": "External NTC Dropout Settings(External NTC Receive Temperature)", "value": "2", "unit": "", "access_mode": "RW", @@ -3901,7 +3755,7 @@ }, { "id": "temperature_source_settings.lorawan_reception.timeout", - "name": "Timeout", + "name": "Timeout(LoRa Receive Temperature)", "value": "30", "unit": "min", "access_mode": "RW", @@ -3920,7 +3774,7 @@ }, { "id": "temperature_source_settings.lorawan_reception.timeout_response", - "name": "LoRa Receive Dropout Settings", + "name": "LoRa Receive Dropout Settings(LoRa Receive Temperature)", "value": "2", "unit": "", "access_mode": "RW", @@ -3949,7 +3803,7 @@ }, { "id": "temperature_source_settings.type", - "name": "Ambient Temperature Source", + "name": "Ambient Temperature Source(Ambient Temperature Source Setting)", "value": "0", "unit": "", "access_mode": "RW", @@ -4189,7 +4043,7 @@ }, { "id": "version.firmware_version", - "name": "Firmware Version", + "name": "Firmware Version(Product Version)", "value": "", "unit": "", "access_mode": "R", @@ -4205,7 +4059,7 @@ }, { "id": "version.hardware_version", - "name": "Hardware Version", + "name": "Hardware Version(Product Version)", "value": "", "unit": "", "access_mode": "R", @@ -4219,28 +4073,9 @@ "version.firmware_version" ] }, - { - "id": "window_opening_alarm.release.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "window_opening_alarm.release.state" - ] - }, { "id": "window_opening_alarm.release.state", - "name": "Open Window Status", + "name": "Open Window Status(Open Window Release)", "value": "", "unit": "", "access_mode": "R", @@ -4259,32 +4094,11 @@ "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "window_opening_alarm.release.environment_temperature" - ] - }, - { - "id": "window_opening_alarm.trigger.environment_temperature", - "name": "Ambient Temperature", - "value": "", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "window_opening_alarm.trigger.state" - ] + "reference": [] }, { "id": "window_opening_alarm.trigger.state", - "name": "Open Window Status", + "name": "Open Window Status(Open Window Trigger)", "value": "", "unit": "", "access_mode": "R", @@ -4303,13 +4117,11 @@ "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "window_opening_alarm.trigger.environment_temperature" - ] + "reference": [] }, { "id": "window_opening_alarm.type", - "name": "Alarm Type", + "name": "Alarm Type(Open Window Alarm)", "value": "", "unit": "", "access_mode": "R", @@ -4330,9 +4142,30 @@ "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, + { + "id": "window_opening_detection_settings.celsius_cooling_rate", + "name": "Celsius Rate of Temperature Fall(Open Window Detection)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 2, + 10 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "window_opening_detection_settings.enable", + "window_opening_detection_settings.valve_status", + "window_opening_detection_settings.stop_temperature_control_time" + ] + }, { "id": "window_opening_detection_settings.cooling_rate", - "name": "Rate of Temperature Fall", + "name": "Rate of Temperature Fall(Open Window Detection)", "value": "3", "unit": "°C", "access_mode": "RW", @@ -4353,7 +4186,7 @@ }, { "id": "window_opening_detection_settings.enable", - "name": "Enable", + "name": "Enable(Open Window Detection)", "value": "0", "unit": "", "access_mode": "RW", @@ -4378,9 +4211,30 @@ "window_opening_detection_settings.stop_temperature_control_time" ] }, + { + "id": "window_opening_detection_settings.fahrenheit_cooling_rate", + "name": "Fahrenheit Rate of Temperature Fall(Open Window Detection)", + "value": "37.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 35.6, + 50 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "window_opening_detection_settings.enable", + "window_opening_detection_settings.valve_status", + "window_opening_detection_settings.stop_temperature_control_time" + ] + }, { "id": "window_opening_detection_settings.stop_temperature_control_time", - "name": "Stop Temperature Control", + "name": "Stop Temperature Control(Open Window Detection)", "value": "30", "unit": "min", "access_mode": "RW", @@ -4401,7 +4255,7 @@ }, { "id": "window_opening_detection_settings.valve_status", - "name": "Open Window Valve Status", + "name": "Open Window Valve Status(Open Window Detection)", "value": "0", "unit": "", "access_mode": "RW", diff --git a/vendors/milesight-iot/wt-series/wt102/wt102-decoder.js b/vendors/milesight-iot/wt-series/wt102/wt102-decoder.js index 54d0048..88c1f7d 100644 --- a/vendors/milesight-iot/wt-series/wt102/wt102-decoder.js +++ b/vendors/milesight-iot/wt-series/wt102/wt102-decoder.js @@ -27,7 +27,7 @@ function Decoder(bytes, port) { function milesightDeviceDecode(bytes) { var decoded = {}; - var result = {}; + var result = {}; var history = []; var unknown_command = 0; @@ -69,7 +69,6 @@ function milesightDeviceDecode(bytes) { decoded.timestamp = readUInt32LE(bytes, counterObj, 4); history.push(decoded); break; - break; case 0xcf: // skip 1 byte counterObj.i++; @@ -106,8 +105,7 @@ function milesightDeviceDecode(bytes) { decoded.battery = readUInt8(bytes, counterObj, 1); break; case 0x01: - // decoded.temperature = readInt16LE(bytes, counterObj, 2) / 100; - decoded.temperature = Math.round(readInt16LE(bytes, counterObj, 2) / 100 * 10) / 10; + decoded.temperature = readInt16LE(bytes, counterObj, 2) / 100; break; case 0x02: decoded.motor_total_stroke = readUInt16LE(bytes, counterObj, 2); @@ -132,7 +130,7 @@ function milesightDeviceDecode(bytes) { case 0x08: decoded.low_battery_alarm = decoded.low_battery_alarm || {}; decoded.low_battery_alarm.value = readUInt8(bytes, counterObj, 1); - // decoded.battery = decoded.low_battery_alarm.value; + decoded.battery = decoded.low_battery_alarm.value; break; case 0x09: decoded.temperature_alarm = decoded.temperature_alarm || {}; @@ -140,22 +138,22 @@ function milesightDeviceDecode(bytes) { if (decoded.temperature_alarm.type == 0x10) { decoded.temperature_alarm.lower_range_alarm_deactivation = decoded.temperature_alarm.lower_range_alarm_deactivation || {}; decoded.temperature_alarm.lower_range_alarm_deactivation.temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.temperature_alarm.lower_range_alarm_deactivation.temperature; + decoded.temperature = decoded.temperature_alarm.lower_range_alarm_deactivation.temperature; } if (decoded.temperature_alarm.type == 0x11) { decoded.temperature_alarm.lower_range_alarm_trigger = decoded.temperature_alarm.lower_range_alarm_trigger || {}; decoded.temperature_alarm.lower_range_alarm_trigger.temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.temperature_alarm.lower_range_alarm_trigger.temperature; + decoded.temperature = decoded.temperature_alarm.lower_range_alarm_trigger.temperature; } if (decoded.temperature_alarm.type == 0x12) { decoded.temperature_alarm.over_range_alarm_deactivation = decoded.temperature_alarm.over_range_alarm_deactivation || {}; decoded.temperature_alarm.over_range_alarm_deactivation.temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.temperature_alarm.over_range_alarm_deactivation.temperature; + decoded.temperature = decoded.temperature_alarm.over_range_alarm_deactivation.temperature; } if (decoded.temperature_alarm.type == 0x13) { decoded.temperature_alarm.over_range_alarm_trigger = decoded.temperature_alarm.over_range_alarm_trigger || {}; decoded.temperature_alarm.over_range_alarm_trigger.temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.temperature_alarm.over_range_alarm_trigger.temperature; + decoded.temperature = decoded.temperature_alarm.over_range_alarm_trigger.temperature; } break; case 0x0a: @@ -164,16 +162,16 @@ function milesightDeviceDecode(bytes) { if (decoded.anti_freeze_protection_alarm.type == 0x20) { decoded.anti_freeze_protection_alarm.lifted = decoded.anti_freeze_protection_alarm.lifted || {}; decoded.anti_freeze_protection_alarm.lifted.environment_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.anti_freeze_protection_alarm.lifted.environment_temperature; + decoded.temperature = decoded.anti_freeze_protection_alarm.lifted.environment_temperature; decoded.anti_freeze_protection_alarm.lifted.current_valve_status = readUInt8(bytes, counterObj, 1); - // decoded.valve_opening_degree = decoded.anti_freeze_protection_alarm.lifted.current_valve_status; + decoded.valve_opening_degree = decoded.anti_freeze_protection_alarm.lifted.current_valve_status; } if (decoded.anti_freeze_protection_alarm.type == 0x21) { decoded.anti_freeze_protection_alarm.trigger = decoded.anti_freeze_protection_alarm.trigger || {}; decoded.anti_freeze_protection_alarm.trigger.environment_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.anti_freeze_protection_alarm.trigger.environment_temperature; + decoded.temperature = decoded.anti_freeze_protection_alarm.trigger.environment_temperature; decoded.anti_freeze_protection_alarm.trigger.current_valve_status = readUInt8(bytes, counterObj, 1); - // decoded.valve_opening_degree = decoded.anti_freeze_protection_alarm.trigger.current_valve_status; + decoded.valve_opening_degree = decoded.anti_freeze_protection_alarm.trigger.current_valve_status; } break; case 0x0b: @@ -182,20 +180,20 @@ function milesightDeviceDecode(bytes) { if (decoded.mandatory_heating_alarm.type == 0x20) { decoded.mandatory_heating_alarm.exit = decoded.mandatory_heating_alarm.exit || {}; decoded.mandatory_heating_alarm.exit.environment_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.mandatory_heating_alarm.exit.environment_temperature; + decoded.temperature = decoded.mandatory_heating_alarm.exit.environment_temperature; decoded.mandatory_heating_alarm.exit.current_valve_status = readUInt8(bytes, counterObj, 1); - // decoded.valve_opening_degree = decoded.mandatory_heating_alarm.exit.current_valve_status; + decoded.valve_opening_degree = decoded.mandatory_heating_alarm.exit.current_valve_status; decoded.mandatory_heating_alarm.exit.battery_level = readUInt8(bytes, counterObj, 1); - // decoded.battery = decoded.mandatory_heating_alarm.exit.battery_level; + decoded.battery = decoded.mandatory_heating_alarm.exit.battery_level; } if (decoded.mandatory_heating_alarm.type == 0x21) { decoded.mandatory_heating_alarm.enter = decoded.mandatory_heating_alarm.enter || {}; decoded.mandatory_heating_alarm.enter.environment_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.mandatory_heating_alarm.enter.environment_temperature; + decoded.temperature = decoded.mandatory_heating_alarm.enter.environment_temperature; decoded.mandatory_heating_alarm.enter.current_valve_status = readUInt8(bytes, counterObj, 1); - // decoded.valve_opening_degree = decoded.mandatory_heating_alarm.enter.current_valve_status; + decoded.valve_opening_degree = decoded.mandatory_heating_alarm.enter.current_valve_status; decoded.mandatory_heating_alarm.enter.battery_level = readUInt8(bytes, counterObj, 1); - // decoded.battery = decoded.mandatory_heating_alarm.enter.battery_level; + decoded.battery = decoded.mandatory_heating_alarm.enter.battery_level; } break; case 0x0c: @@ -244,14 +242,14 @@ function milesightDeviceDecode(bytes) { // 0:Normal, 1:Open decoded.window_opening_alarm.release.state = readUInt8(bytes, counterObj, 1); decoded.window_opening_alarm.release.environment_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.window_opening_alarm.release.environment_temperature; + decoded.temperature = decoded.window_opening_alarm.release.environment_temperature; } if (decoded.window_opening_alarm.type == 0x21) { decoded.window_opening_alarm.trigger = decoded.window_opening_alarm.trigger || {}; // 0:Normal, 1:Open decoded.window_opening_alarm.trigger.state = readUInt8(bytes, counterObj, 1); decoded.window_opening_alarm.trigger.environment_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.window_opening_alarm.trigger.environment_temperature; + decoded.temperature = decoded.window_opening_alarm.trigger.environment_temperature; } break; case 0x0e: @@ -260,44 +258,44 @@ function milesightDeviceDecode(bytes) { if (decoded.periodic_reporting.report_type == 0x00) { decoded.periodic_reporting.non_heating_season = decoded.periodic_reporting.non_heating_season || {}; decoded.periodic_reporting.non_heating_season.target_valve_opening = readUInt8(bytes, counterObj, 1); - // decoded.target_valve_opening_degree = decoded.periodic_reporting.non_heating_season.target_valve_opening; + decoded.target_valve_opening_degree = decoded.periodic_reporting.non_heating_season.target_valve_opening; decoded.periodic_reporting.non_heating_season.battery_level = readUInt8(bytes, counterObj, 1); - // decoded.battery = decoded.periodic_reporting.non_heating_season.battery_level; + decoded.battery = decoded.periodic_reporting.non_heating_season.battery_level; } if (decoded.periodic_reporting.report_type == 0x01) { decoded.periodic_reporting.target_temperature_for_heating = decoded.periodic_reporting.target_temperature_for_heating || {}; decoded.periodic_reporting.target_temperature_for_heating.environment_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.periodic_reporting.target_temperature_for_heating.environment_temperature; + decoded.temperature = decoded.periodic_reporting.target_temperature_for_heating.environment_temperature; decoded.periodic_reporting.target_temperature_for_heating.current_valve_opening = readUInt8(bytes, counterObj, 1); - // decoded.valve_opening_degree = decoded.periodic_reporting.target_temperature_for_heating.current_valve_opening; + decoded.valve_opening_degree = decoded.periodic_reporting.target_temperature_for_heating.current_valve_opening; decoded.periodic_reporting.target_temperature_for_heating.target_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.target_temperature = decoded.periodic_reporting.target_temperature_for_heating.target_temperature; + decoded.target_temperature = decoded.periodic_reporting.target_temperature_for_heating.target_temperature; decoded.periodic_reporting.target_temperature_for_heating.battery_level = readUInt8(bytes, counterObj, 1); - // decoded.battery = decoded.periodic_reporting.target_temperature_for_heating.battery_level; + decoded.battery = decoded.periodic_reporting.target_temperature_for_heating.battery_level; } if (decoded.periodic_reporting.report_type == 0x02) { decoded.periodic_reporting.target_valve_opening_for_heating = decoded.periodic_reporting.target_valve_opening_for_heating || {}; decoded.periodic_reporting.target_valve_opening_for_heating.environment_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.periodic_reporting.target_valve_opening_for_heating.environment_temperature; + decoded.temperature = decoded.periodic_reporting.target_valve_opening_for_heating.environment_temperature; decoded.periodic_reporting.target_valve_opening_for_heating.current_valve_opening = readUInt8(bytes, counterObj, 1); - // decoded.valve_opening_degree = decoded.periodic_reporting.target_valve_opening_for_heating.current_valve_opening; + decoded.valve_opening_degree = decoded.periodic_reporting.target_valve_opening_for_heating.current_valve_opening; decoded.periodic_reporting.target_valve_opening_for_heating.target_valve_opening = readUInt8(bytes, counterObj, 1); - // decoded.target_valve_opening_degree = decoded.periodic_reporting.target_valve_opening_for_heating.target_valve_opening; + decoded.target_valve_opening_degree = decoded.periodic_reporting.target_valve_opening_for_heating.target_valve_opening; decoded.periodic_reporting.target_valve_opening_for_heating.battery_level = readUInt8(bytes, counterObj, 1); - // decoded.battery = decoded.periodic_reporting.target_valve_opening_for_heating.battery_level; + decoded.battery = decoded.periodic_reporting.target_valve_opening_for_heating.battery_level; } if (decoded.periodic_reporting.report_type == 0x03) { decoded.periodic_reporting.integrated_control_for_heating = decoded.periodic_reporting.integrated_control_for_heating || {}; decoded.periodic_reporting.integrated_control_for_heating.environment_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.temperature = decoded.periodic_reporting.integrated_control_for_heating.environment_temperature; + decoded.temperature = decoded.periodic_reporting.integrated_control_for_heating.environment_temperature; decoded.periodic_reporting.integrated_control_for_heating.current_valve_opening = readUInt8(bytes, counterObj, 1); - // decoded.valve_opening_degree = decoded.periodic_reporting.integrated_control_for_heating.current_valve_opening; + decoded.valve_opening_degree = decoded.periodic_reporting.integrated_control_for_heating.current_valve_opening; decoded.periodic_reporting.integrated_control_for_heating.target_temperature = readInt16LE(bytes, counterObj, 2) / 100; - // decoded.target_temperature = decoded.periodic_reporting.integrated_control_for_heating.target_temperature; + decoded.target_temperature = decoded.periodic_reporting.integrated_control_for_heating.target_temperature; decoded.periodic_reporting.integrated_control_for_heating.target_valve_opening = readUInt8(bytes, counterObj, 1); - // decoded.target_valve_opening_degree = decoded.periodic_reporting.integrated_control_for_heating.target_valve_opening; + decoded.target_valve_opening_degree = decoded.periodic_reporting.integrated_control_for_heating.target_valve_opening; decoded.periodic_reporting.integrated_control_for_heating.battery_level = readUInt8(bytes, counterObj, 1); - // decoded.battery = decoded.periodic_reporting.integrated_control_for_heating.battery_level; + decoded.battery = decoded.periodic_reporting.integrated_control_for_heating.battery_level; } break; case 0xc9: @@ -372,28 +370,28 @@ function milesightDeviceDecode(bytes) { break; case 0x65: decoded.temp_control = decoded.temp_control || {}; - var target_temperature_control_settings_command = readUInt8(bytes, counterObj, 1); - if (target_temperature_control_settings_command == 0x00) { + var temp_control_command = readUInt8(bytes, counterObj, 1); + if (temp_control_command == 0x00) { // 0:Disable, 1:Enable decoded.temp_control.enable = readUInt8(bytes, counterObj, 1); } - if (target_temperature_control_settings_command == 0x01) { + if (temp_control_command == 0x01) { // 0:0.5, 1:1 decoded.temp_control.target_temperature_resolution = readUInt8(bytes, counterObj, 1); } - if (target_temperature_control_settings_command == 0x02) { + if (temp_control_command == 0x02) { decoded.temp_control.under_temperature_side_deadband = readInt16LE(bytes, counterObj, 2) / 100; } - if (target_temperature_control_settings_command == 0x03) { + if (temp_control_command == 0x03) { decoded.temp_control.over_temperature_side_deadband = readInt16LE(bytes, counterObj, 2) / 100; } - if (target_temperature_control_settings_command == 0x04) { + if (temp_control_command == 0x04) { decoded.temp_control.target_temperature_adjustment_range_min = readInt16LE(bytes, counterObj, 2) / 100; } - if (target_temperature_control_settings_command == 0x05) { + if (temp_control_command == 0x05) { decoded.temp_control.target_temperature_adjustment_range_max = readInt16LE(bytes, counterObj, 2) / 100; } - if (target_temperature_control_settings_command == 0x06) { + if (temp_control_command == 0x06) { decoded.temp_control.mode_settings = decoded.temp_control.mode_settings || {}; // 0:Automatic Temperature Control, 1:Valve Opening Control, 2:Integrated Control decoded.temp_control.mode_settings.mode = readUInt8(bytes, counterObj, 1); @@ -672,6 +670,9 @@ function milesightDeviceDecode(bytes) { case 0xbe: decoded.reboot = readOnlyCommand(bytes, counterObj, 0); break; + default: + unknown_command = 1; + break; } if (unknown_command) { throw new Error('unknown command: ' + command_id); @@ -688,6 +689,8 @@ function milesightDeviceDecode(bytes) { } } + processTemperature(result); + return result; } @@ -728,18 +731,18 @@ function readHardwareVersion(bytes) { } function readFirmwareVersion(bytes) { - var major = (bytes[0] & 0xff).toString(16); - var minor = (bytes[1] & 0xff).toString(16); - var release = (bytes[2] & 0xff).toString(16); - var alpha = (bytes[3] & 0xff).toString(16); - var unit_test = (bytes[4] & 0xff).toString(16); - var test = (bytes[5] & 0xff).toString(16); + var major = bytes[0] & 0xff; + var minor = bytes[1] & 0xff; + var release = bytes[2] & 0xff; + var alpha = bytes[3] & 0xff; + var unit_test = bytes[4] & 0xff; + var test = bytes[5] & 0xff; - var version = "v" + major + "." + minor; - if (release !== "0") version += "-r" + release; - if (alpha !== "0") version += "-a" + alpha; - if (unit_test !== "0") version += "-u" + unit_test; - if (test !== "0") version += "-t" + test; + var version = 'v' + major + '.' + minor; + if (release !== 0) version += '-r' + release; + if (alpha !== 0) version += '-a' + alpha; + if (unit_test !== 0) version += '-u' + unit_test; + if (test !== 0) version += '-t' + test; return version; } @@ -766,14 +769,14 @@ function readInt16LE(allBytes, counterObj, end) { } function readUInt24LE(allBytes, counterObj, end) { - var bytes = readBytes(allBytes, counterObj, end); // 3 bytes expected - var value = (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; - return value & 0xffffff; + var bytes = readBytes(allBytes, counterObj, end); // 3 bytes expected + var value = (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; + return value & 0xffffff; } function readInt24LE(allBytes, counterObj, end) { - var ref = readUInt24LE(allBytes, counterObj, end); - return ref > 0x7fffff ? ref - 0x1000000 : ref; + var ref = readUInt24LE(allBytes, counterObj, end); + return ref > 0x7fffff ? ref - 0x1000000 : ref; } function readUInt32LE(allBytes, counterObj, end) { @@ -890,49 +893,145 @@ function insertArrayItem(array, item, idName) { } function readCommand(allBytes, counterObj, end) { - var bytes = readBytes(allBytes, counterObj, end); - var cmd = bytes - .map(function(b) { - var hex = b.toString(16); - return hex.length === 1 ? '0' + hex : hex; - }) - .join('') - .toLowerCase(); + var bytes = readBytes(allBytes, counterObj, end); + var cmd = bytes + .map(function(b) { + var hex = b.toString(16); + return hex.length === 1 ? '0' + hex : hex; + }) + .join('') + .toLowerCase(); - var map = cmdMap(); - for (var key in map) { - var xxs = []; - var isMatch = false; - if (key.length !== cmd.length) { - continue; - } - for (var i = 0; i < key.length; i += 2) { - var hexString = key.slice(i, i + 2); - var cmdString = cmd.slice(i, i + 2); - if (hexString === cmdString || hexString === 'xx') { - if (hexString === 'xx') { - xxs.push('.' + parseInt(cmdString, 16)); - } - isMatch = true; - continue; - } else { - isMatch = false; - break; - } - } - if (isMatch) { - var propertyId = map[key]; - if (propertyId.indexOf('._item') === -1) { - return propertyId; - } - var j = 0; - var result = propertyId.replace(/\._item/g, function() { - return xxs[j++]; - }); - return result; - } - } - return null; + var map = cmdMap(); + for (var key in map) { + var xxs = []; + var isMatch = false; + if (key.length !== cmd.length) { + continue; + } + for (var i = 0; i < key.length; i += 2) { + var hexString = key.slice(i, i + 2); + var cmdString = cmd.slice(i, i + 2); + if (hexString === cmdString || hexString === 'xx') { + if (hexString === 'xx') { + xxs.push('.' + parseInt(cmdString, 16)); + } + isMatch = true; + continue; + } else { + isMatch = false; + break; + } + } + if (isMatch) { + var propertyId = map[key]; + if (propertyId.indexOf('._item') === -1) { + return propertyId; + } + var j = 0; + var result = propertyId.replace(/\._item/g, function() { + return xxs[j++]; + }); + return result; + } + } + return null; +} + +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; +} + +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; +} + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } + + current[parts[parts.length - 1]] = value; + return obj; +} + +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); +} + +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); +} + +function getAllLeafPaths(obj, prefix) { + var paths = []; + + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } + } + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; + +} + +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); } function cmdMap() { @@ -950,6 +1049,8 @@ function cmdMap() { "68": "anti_freeze_protection_setting", "69": "mandatory_heating_enable", "70": "motor_controllable_range", + "6101": "temperature_source_settings.external_ntc_reception", + "6102": "temperature_source_settings.lorawan_reception", "6300": "heating_period_settings.heating_date_settings", "6301": "heating_period_settings.heating_period_reporting_interval", "6302": "heating_period_settings.non_heating_period_reporting_interval", @@ -961,9 +1062,16 @@ function cmdMap() { "6504": "temp_control.target_temperature_adjustment_range_min", "6505": "temp_control.target_temperature_adjustment_range_max", "6506": "temp_control.mode_settings", + "630100": "heating_period_settings.heating_period_reporting_interval.seconds_of_time", + "630101": "heating_period_settings.heating_period_reporting_interval.minutes_of_time", + "630200": "heating_period_settings.non_heating_period_reporting_interval.seconds_of_time", + "630201": "heating_period_settings.non_heating_period_reporting_interval.minutes_of_time", + "650600": "temp_control.mode_settings.auto_control", + "650601": "temp_control.mode_settings.valve_control", + "650602": "temp_control.mode_settings.intergrated_control", "ff": "request_check_sequence_number", "fe": "request_check_order", - "ef": "request_command_queries", + "ef": "command_queries_reply", "ee": "request_query_all_configurations", "ed": "historical_data_report", "cf": "lorawan_configuration_settings", @@ -986,11 +1094,29 @@ function cmdMap() { "07": "target_valve_opening_degree", "08": "low_battery_alarm", "09": "temperature_alarm", + "0910": "temperature_alarm.lower_range_alarm_deactivation", + "0911": "temperature_alarm.lower_range_alarm_trigger", + "0912": "temperature_alarm.over_range_alarm_deactivation", + "0913": "temperature_alarm.over_range_alarm_trigger", "0a": "anti_freeze_protection_alarm", + "0a20": "anti_freeze_protection_alarm.lifted", + "0a21": "anti_freeze_protection_alarm.trigger", "0b": "mandatory_heating_alarm", + "0b20": "mandatory_heating_alarm.exit", + "0b21": "mandatory_heating_alarm.enter", "0c": "auto_away_report", + "0c20": "auto_away_report.inactive_by_target_temperature", + "0c21": "auto_away_report.active_by_target_temperature", + "0c22": "auto_away_report.inactive_by_target_valve_opening", + "0c23": "auto_away_report.active_by_target_valve_opening", "0d": "window_opening_alarm", + "0d20": "window_opening_alarm.release", + "0d21": "window_opening_alarm.trigger", "0e": "periodic_reporting", + "0e00": "periodic_reporting.non_heating_season", + "0e01": "periodic_reporting.target_temperature_for_heating", + "0e02": "periodic_reporting.target_valve_opening_for_heating", + "0e03": "periodic_reporting.integrated_control_for_heating", "c9": "random_key", "c4": "auto_p_enable", "6a": "child_lock", @@ -1034,4 +1160,153 @@ function cmdMap() { "bf": "reset", "be": "reboot" }; +} +function processTemperature(decoded) { + var allTemperatureProperties = { + "temperature": { + "precision": 2 + }, + "target_temperature": { + "precision": 1 + }, + "temperature_alarm.lower_range_alarm_deactivation.temperature": { + "precision": 1 + }, + "temperature_alarm.lower_range_alarm_trigger.temperature": { + "precision": 1 + }, + "temperature_alarm.over_range_alarm_deactivation.temperature": { + "precision": 1 + }, + "temperature_alarm.over_range_alarm_trigger.temperature": { + "precision": 1 + }, + "anti_freeze_protection_alarm.lifted.environment_temperature": { + "precision": 1 + }, + "anti_freeze_protection_alarm.trigger.environment_temperature": { + "precision": 1 + }, + "mandatory_heating_alarm.exit.environment_temperature": { + "precision": 1 + }, + "mandatory_heating_alarm.enter.environment_temperature": { + "precision": 1 + }, + "auto_away_report.inactive_by_target_temperature.environment_temperature": { + "precision": 1 + }, + "auto_away_report.inactive_by_target_temperature.target_temperature": { + "precision": 1 + }, + "auto_away_report.active_by_target_temperature.environment_temperature": { + "precision": 1 + }, + "auto_away_report.active_by_target_temperature.target_temperature": { + "precision": 1 + }, + "auto_away_report.inactive_by_target_valve_opening.environment_temperature": { + "precision": 1 + }, + "auto_away_report.active_by_target_valve_opening.environment_temperature": { + "precision": 1 + }, + "window_opening_alarm.release.environment_temperature": { + "precision": 1 + }, + "window_opening_alarm.trigger.environment_temperature": { + "precision": 1 + }, + "periodic_reporting.target_temperature_for_heating.environment_temperature": { + "precision": 1 + }, + "periodic_reporting.target_temperature_for_heating.target_temperature": { + "precision": 1 + }, + "periodic_reporting.target_valve_opening_for_heating.environment_temperature": { + "precision": 1 + }, + "periodic_reporting.integrated_control_for_heating.environment_temperature": { + "precision": 1 + }, + "periodic_reporting.integrated_control_for_heating.target_temperature": { + "precision": 1 + }, + "temp_control.target_temperature_resolution": { + "precision": null + }, + "temp_control.under_temperature_side_deadband": { + "precision": 1 + }, + "temp_control.over_temperature_side_deadband": { + "precision": 1 + }, + "temp_control.target_temperature_adjustment_range_min": { + "precision": 1 + }, + "temp_control.target_temperature_adjustment_range_max": { + "precision": 1 + }, + "temp_control.mode_settings.auto_control.target_temperature": { + "precision": 1 + }, + "temp_control.mode_settings.intergrated_control.target_temp": { + "precision": 1 + }, + "window_opening_detection_settings.cooling_rate": { + "precision": 1 + }, + "auto_away_settings.energy_saving_settings.energy_saving_temperature": { + "precision": 1 + }, + "anti_freeze_protection_setting.temperature_value": { + "precision": 1 + }, + "temperature_calibration_settings.calibration_value": { + "precision": 1 + }, + "temperature_alarm_settings.threshold_min": { + "precision": 1 + }, + "temperature_alarm_settings.threshold_max": { + "precision": 1 + }, + "schedule_settings._item.target_temperature": { + "precision": 1 + }, + "set_target_temperature.value": { + "precision": 1 + }, + "set_temperature.value": { + "precision": 1 + } +}; + var leafPaths = getAllLeafPaths(decoded); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + if (hasPath(decoded, propertyId)) { + setPath(decoded, fahrenheitProperty, Number((getPath(decoded, propertyId) * 1.8 + 32).toFixed(allTemperatureProperties[newPropertyId].precision))); + setPath(decoded, celsiusProperty, Number(getPath(decoded, propertyId).toFixed(allTemperatureProperties[newPropertyId].precision))); + } + } + } + return decoded; } \ No newline at end of file diff --git a/vendors/milesight-iot/wt-series/wt102/wt102-encoder.js b/vendors/milesight-iot/wt-series/wt102/wt102-encoder.js index da06227..a1d93d2 100644 --- a/vendors/milesight-iot/wt-series/wt102/wt102-encoder.js +++ b/vendors/milesight-iot/wt-series/wt102/wt102-encoder.js @@ -26,6 +26,7 @@ function Encoder(obj, port) { /* eslint-enable */ function milesightDeviceEncode(payload) { + processTemperature(payload); var encoded = []; //0xff if ('request_check_sequence_number' in payload) { @@ -62,7 +63,6 @@ function milesightDeviceEncode(payload) { var hex = Number(part).toString(16); while (hex.length < 2) { hex = '0' + hex; } pureNumber.push(hex); - console.log(pureNumber); formateStrParts.push('_item'); } else { formateStrParts.push(part); @@ -597,8 +597,8 @@ function milesightDeviceEncode(payload) { buffer.writeUInt16LE(payload.heating_period_settings.heating_period_reporting_interval.seconds_of_time); } if (payload.heating_period_settings.heating_period_reporting_interval.unit == 0x01) { - if (payload.heating_period_settings.heating_period_reporting_interval.minutes_of_time < 1 || payload.heating_period_settings.heating_period_reporting_interval.minutes_of_time > 1440) { - throw new Error('heating_period_settings.heating_period_reporting_interval.minutes_of_time must be between 1 and 1440'); + if (payload.heating_period_settings.heating_period_reporting_interval.minutes_of_time < 5 || payload.heating_period_settings.heating_period_reporting_interval.minutes_of_time > 1440) { + throw new Error('heating_period_settings.heating_period_reporting_interval.minutes_of_time must be between 5 and 1440'); } buffer.writeUInt16LE(payload.heating_period_settings.heating_period_reporting_interval.minutes_of_time); } @@ -615,8 +615,8 @@ function milesightDeviceEncode(payload) { buffer.writeUInt16LE(payload.heating_period_settings.non_heating_period_reporting_interval.seconds_of_time); } if (payload.heating_period_settings.non_heating_period_reporting_interval.unit == 0x01) { - if (payload.heating_period_settings.non_heating_period_reporting_interval.minutes_of_time < 1 || payload.heating_period_settings.non_heating_period_reporting_interval.minutes_of_time > 1440) { - throw new Error('heating_period_settings.non_heating_period_reporting_interval.minutes_of_time must be between 1 and 1440'); + if (payload.heating_period_settings.non_heating_period_reporting_interval.minutes_of_time < 5 || payload.heating_period_settings.non_heating_period_reporting_interval.minutes_of_time > 1440) { + throw new Error('heating_period_settings.non_heating_period_reporting_interval.minutes_of_time must be between 5 and 1440'); } buffer.writeUInt16LE(payload.heating_period_settings.non_heating_period_reporting_interval.minutes_of_time); } @@ -1236,11 +1236,11 @@ Buffer.prototype.writeInt16LE = function(value) { }; Buffer.prototype.writeUInt24LE = function(value) { - this._write(value, 3, true); + this._write(value, 3, true); }; Buffer.prototype.writeInt24LE = function(value) { - this._write(value < 0 ? value + 0x1000000 : value, 3, true); + this._write(value < 0 ? value + 0x1000000 : value, 3, true); }; Buffer.prototype.writeUInt32LE = function(value) { @@ -1251,6 +1251,55 @@ Buffer.prototype.writeInt32LE = function(value) { this._write(value < 0 ? value + 0x100000000 : value, 4, true); }; +Buffer.prototype.writeFloatLE = function(value) { + var sign = (value < 0 || (value === 0 && 1 / value === -Infinity)) ? 1 : 0; + var absValue = Math.abs(value); + + if (absValue === 0) { + this._write(sign ? 0x80000000 : 0, 4, true); + return; + } else if (value !== value) { + this._write(0x7fc00000, 4, true); + return; + } else if (absValue === Infinity) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } + + var exponent = Math.floor(Math.log(absValue) / Math.LN2); + var normalized = absValue / Math.pow(2, exponent); + if (normalized < 1) { + exponent -= 1; + normalized *= 2; + } else if (normalized >= 2) { + exponent += 1; + normalized /= 2; + } + + var biasedExponent = exponent + 127; + var mantissaBits = 0; + if (biasedExponent <= 0) { + biasedExponent = 0; + mantissaBits = Math.round(absValue / Math.pow(2, -149)); + if (mantissaBits > 0x7fffff) { + mantissaBits = 0x7fffff; + } + } else { + mantissaBits = Math.round((normalized - 1) * 0x800000); + if (mantissaBits === 0x800000) { + biasedExponent += 1; + mantissaBits = 0; + } + if (biasedExponent >= 0xff) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } + } + + var floatBits = ((((sign << 31) >>> 0) | ((biasedExponent & 0xff) << 23) | (mantissaBits & 0x7fffff)) >>> 0); + this._write(floatBits, 4, true); +}; + Buffer.prototype.writeBytes = function(bytes, length, mustEqual) { if (mustEqual === undefined) mustEqual = false; if (length < bytes.length) { @@ -1339,12 +1388,106 @@ function isValid(value) { return value !== undefined && value !== null && value !== ''; } +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; +} + +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; +} + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } + + current[parts[parts.length - 1]] = value; + return obj; +} + +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); +} + +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); +} + +function getAllLeafPaths(obj, prefix) { + var paths = []; + + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } + } + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; +} + +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); +} function cmdMap() { return { "request_check_sequence_number": "ff", "request_check_order": "fe", - "request_command_queries": "ef", + "command_queries_reply": "ef", "request_query_all_configurations": "ee", "historical_data_report": "ed", "lorawan_configuration_settings": "cf", @@ -1367,29 +1510,56 @@ function cmdMap() { "target_valve_opening_degree": "07", "low_battery_alarm": "08", "temperature_alarm": "09", + "temperature_alarm.lower_range_alarm_deactivation": "0910", + "temperature_alarm.lower_range_alarm_trigger": "0911", + "temperature_alarm.over_range_alarm_deactivation": "0912", + "temperature_alarm.over_range_alarm_trigger": "0913", "anti_freeze_protection_alarm": "0a", + "anti_freeze_protection_alarm.lifted": "0a20", + "anti_freeze_protection_alarm.trigger": "0a21", "mandatory_heating_alarm": "0b", + "mandatory_heating_alarm.exit": "0b20", + "mandatory_heating_alarm.enter": "0b21", "auto_away_report": "0c", + "auto_away_report.inactive_by_target_temperature": "0c20", + "auto_away_report.active_by_target_temperature": "0c21", + "auto_away_report.inactive_by_target_valve_opening": "0c22", + "auto_away_report.active_by_target_valve_opening": "0c23", "window_opening_alarm": "0d", + "window_opening_alarm.release": "0d20", + "window_opening_alarm.trigger": "0d21", "periodic_reporting": "0e", + "periodic_reporting.non_heating_season": "0e00", + "periodic_reporting.target_temperature_for_heating": "0e01", + "periodic_reporting.target_valve_opening_for_heating": "0e02", + "periodic_reporting.integrated_control_for_heating": "0e03", "random_key": "c9", "auto_p_enable": "c4", "temperature_unit": "60", "temperature_source_settings": "61", + "temperature_source_settings.external_ntc_reception": "6101", + "temperature_source_settings.lorawan_reception": "6102", "environment_temperature_display_enable": "62", "heating_period_settings": "63", "heating_period_settings.heating_date_settings": "6300", "heating_period_settings.heating_period_reporting_interval": "6301", + "heating_period_settings.heating_period_reporting_interval.seconds_of_time": "630100", + "heating_period_settings.heating_period_reporting_interval.minutes_of_time": "630101", "heating_period_settings.non_heating_period_reporting_interval": "6302", + "heating_period_settings.non_heating_period_reporting_interval.seconds_of_time": "630200", + "heating_period_settings.non_heating_period_reporting_interval.minutes_of_time": "630201", "heating_period_settings.valve_status_control": "6303", - "target_temperature_control_settings": "65", - "target_temperature_control_settings.enable": "6500", - "target_temperature_control_settings.target_temperature_resolution": "6501", - "target_temperature_control_settings.under_temperature_side_deadband": "6502", - "target_temperature_control_settings.over_temperature_side_deadband": "6503", - "target_temperature_control_settings.target_temperature_adjustment_range_min": "6504", - "target_temperature_control_settings.target_temperature_adjustment_range_max": "6505", - "target_temperature_control_settings.mode_settings": "6506", + "temp_control": "65", + "temp_control.enable": "6500", + "temp_control.target_temperature_resolution": "6501", + "temp_control.under_temperature_side_deadband": "6502", + "temp_control.over_temperature_side_deadband": "6503", + "temp_control.target_temperature_adjustment_range_min": "6504", + "temp_control.target_temperature_adjustment_range_max": "6505", + "temp_control.mode_settings": "6506", + "temp_control.mode_settings.auto_control": "650600", + "temp_control.mode_settings.valve_control": "650601", + "temp_control.mode_settings.intergrated_control": "650602", "window_opening_detection_settings": "66", "auto_away_settings": "67", "anti_freeze_protection_setting": "68", @@ -1439,4 +1609,162 @@ function cmdMap() { "reset": "bf", "reboot": "be" }; +} +function processTemperature(payload) { + var allTemperatureProperties = { + "temperature": { + "coefficient": 0.01 + }, + "target_temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.lower_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.lower_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.over_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.over_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "anti_freeze_protection_alarm.lifted.environment_temperature": { + "coefficient": 0.01 + }, + "anti_freeze_protection_alarm.trigger.environment_temperature": { + "coefficient": 0.01 + }, + "mandatory_heating_alarm.exit.environment_temperature": { + "coefficient": 0.01 + }, + "mandatory_heating_alarm.enter.environment_temperature": { + "coefficient": 0.01 + }, + "auto_away_report.inactive_by_target_temperature.environment_temperature": { + "coefficient": 0.01 + }, + "auto_away_report.inactive_by_target_temperature.target_temperature": { + "coefficient": 0.01 + }, + "auto_away_report.active_by_target_temperature.environment_temperature": { + "coefficient": 0.01 + }, + "auto_away_report.active_by_target_temperature.target_temperature": { + "coefficient": 0.01 + }, + "auto_away_report.inactive_by_target_valve_opening.environment_temperature": { + "coefficient": 0.01 + }, + "auto_away_report.active_by_target_valve_opening.environment_temperature": { + "coefficient": 0.01 + }, + "window_opening_alarm.release.environment_temperature": { + "coefficient": 0.01 + }, + "window_opening_alarm.trigger.environment_temperature": { + "coefficient": 0.01 + }, + "periodic_reporting.target_temperature_for_heating.environment_temperature": { + "coefficient": 0.01 + }, + "periodic_reporting.target_temperature_for_heating.target_temperature": { + "coefficient": 0.01 + }, + "periodic_reporting.target_valve_opening_for_heating.environment_temperature": { + "coefficient": 0.01 + }, + "periodic_reporting.integrated_control_for_heating.environment_temperature": { + "coefficient": 0.01 + }, + "periodic_reporting.integrated_control_for_heating.target_temperature": { + "coefficient": 0.01 + }, + "temp_control.target_temperature_resolution": { + "coefficient": null + }, + "temp_control.under_temperature_side_deadband": { + "coefficient": 0.01 + }, + "temp_control.over_temperature_side_deadband": { + "coefficient": 0.01 + }, + "temp_control.target_temperature_adjustment_range_min": { + "coefficient": 0.01 + }, + "temp_control.target_temperature_adjustment_range_max": { + "coefficient": 0.01 + }, + "temp_control.mode_settings.auto_control.target_temperature": { + "coefficient": 0.01 + }, + "temp_control.mode_settings.intergrated_control.target_temp": { + "coefficient": 0.01 + }, + "window_opening_detection_settings.cooling_rate": { + "coefficient": 0.01 + }, + "auto_away_settings.energy_saving_settings.energy_saving_temperature": { + "coefficient": 0.01 + }, + "anti_freeze_protection_setting.temperature_value": { + "coefficient": 0.01 + }, + "temperature_calibration_settings.calibration_value": { + "coefficient": 0.01 + }, + "temperature_alarm_settings.threshold_min": { + "coefficient": 0.01 + }, + "temperature_alarm_settings.threshold_max": { + "coefficient": 0.01 + }, + "schedule_settings._item.target_temperature": { + "coefficient": 0.01 + }, + "set_target_temperature.value": { + "coefficient": 0.01 + }, + "set_temperature.value": { + "coefficient": 0.01 + } +}; + var leafPaths = getAllLeafPaths(payload); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + var stringCoefficient = String(allTemperatureProperties[newPropertyId].coefficient); + var dotIndex = stringCoefficient.indexOf('.'); + var precision = dotIndex != -1 ? stringCoefficient.length - dotIndex - 1 : 0; + if (!hasPath(payload, propertyId)) { + if (hasPath(payload, fahrenheitProperty) && hasPath(payload, celsiusProperty)) { + throw new Error(fahrenheitProperty + ' and ' + celsiusProperty + ' cannot be in payload at the same time'); + } + if (hasPath(payload, fahrenheitProperty)) { + setPath(payload, propertyId, Number(((getPath(payload, fahrenheitProperty) - 32) / 1.8).toFixed(precision))); + } else if (hasPath(payload, celsiusProperty)) { + setPath(payload, propertyId, Number(getPath(payload, celsiusProperty).toFixed(precision))); + } + } + } + } + return payload; } \ No newline at end of file diff --git a/vendors/milesight-iot/wt-series/wt303/wt303-codec.json b/vendors/milesight-iot/wt-series/wt303/wt303-codec.json index 4084478..814e10c 100644 --- a/vendors/milesight-iot/wt-series/wt303/wt303-codec.json +++ b/vendors/milesight-iot/wt-series/wt303/wt303-codec.json @@ -2,484 +2,336 @@ "version": "1.0.0", "object": [ { - "id": "tsl_version", - "name": "TSL Version", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 6, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "product_sn", - "name": "Product SN", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "version.hardware_version", - "name": "Hardware Version", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 6, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "version.firmware_version", - "name": "Firmware Version", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "oem_id", - "name": "OEM ID", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 2, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "id": "celsius_cooling_target_temperature", + "name": "Celsius CoolingTarget Temperature", + "value": "28", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "data_source", - "name": "Data Source", - "value": "0", - "unit": "", - "access_mode": "R", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Internal" - }, - { - "value": 1, - "name": "External NTC" - }, - { - "value": 2, - "name": "LoRaWAN Reception" - }, - { - "value": 3, - "name": "D2D Reception" - } + "id": "celsius_heating_target_temperature", + "name": "Celsius Heating Target Temperature", + "value": "17", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "temperature", - "name": "Temperature", + "id": "celsius_target_temperature", + "name": "Celsius Target Temperature", "value": "", - "unit": "℃", + "unit": "°C", "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 5, + 35 ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "humidity", - "name": "Humidity", - "value": "", - "unit": "%", - "access_mode": "R", + "id": "celsius_target_temperature_tolerance", + "name": "Celsius Target Temperature Tolerance", + "value": "1", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ 0, - 100 + 5 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "target_temperature", - "name": "Target Temperature", + "id": "celsius_temperature", + "name": "Celsius Temperature", "value": "", - "unit": "℃", + "unit": "°C", "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 5, - 35 + -20, + 60 ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "temperature_control_info.mode", - "name": "Temperature Control Mode", - "value": "1", + "id": "child_lock.enable", + "name": "Child Lock Enable(Child Lock)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Ventilation" + "name": "disable" }, { "value": 1, - "name": "Heat" - }, - { - "value": 2, - "name": "Cool" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temperature_control_info.status" + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" ] }, { - "id": "temperature_control_info.status", - "name": "Temperature Control Status", - "value": "0", + "id": "child_lock.fan_button", + "name": "Fan Mode(Child Lock)", + "value": "1", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Standby" + "name": "disable" }, { "value": 1, - "name": "Heat" - }, - { - "value": 2, - "name": "Cool" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temperature_control_info.mode" + "child_lock.enable", + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" ] }, { - "id": "temperature_control_valve_status", - "name": "Valve Status", - "value": "0", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT" - }, - { - "id": "fan_control_info.mode", - "name": "Fan Mode", - "value": "0", + "id": "child_lock.reboot_reset_button", + "name": "Reboot&Reset(Child Lock)", + "value": "1", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Auto" + "name": "disable" }, { "value": 1, - "name": "Low" - }, - { - "value": 2, - "name": "Medium" - }, - { - "value": 3, - "name": "High" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "fan_control_info.status" + "child_lock.enable", + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reserved" ] }, { - "id": "fan_control_info.status", - "name": "Fan Status", + "id": "child_lock.reserved", + "name": "Reserved(Child Lock)", "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Off" + "name": "disable" }, { "value": 1, - "name": "Low" - }, - { - "value": 2, - "name": "Medium" - }, - { - "value": 3, - "name": "High" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "fan_control_info.mode" + "child_lock.enable", + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button" ] }, { - "id": "execution_plan_id", - "name": "Schedule", - "value": "255", + "id": "child_lock.system_button", + "name": "System On/Off (Child Lock)", + "value": "1", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Schedule1" + "name": "disable" }, { "value": 1, - "name": "Schedule2" - }, - { - "value": 2, - "name": "Schedule3" - }, - { - "value": 3, - "name": "Schedule4" - }, - { - "value": 4, - "name": "Schedule5" - }, - { - "value": 5, - "name": "Schedule6" - }, - { - "value": 6, - "name": "Schedule7" - }, - { - "value": 7, - "name": "Schedule8" - }, - { - "value": 8, - "name": "Schedule9" - }, - { - "value": 9, - "name": "Schedule10" - }, - { - "value": 10, - "name": "Schedule11" - }, - { - "value": 11, - "name": "Schedule12" - }, - { - "value": 12, - "name": "Schedule13" - }, - { - "value": 13, - "name": "Schedule14" - }, - { - "value": 14, - "name": "Schedule15" - }, - { - "value": 15, - "name": "Schedule16" - }, - { - "value": 255, - "name": "Not executed" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "collection_interval.seconds_of_time", - "name": "Collecting Interval", - "value": "30", - "unit": "s", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "range": [ - 10, - 64800 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": [] - }, - { - "id": "reporting_interval.minutes_of_time", - "name": "Reporting Interval", - "value": "10", - "unit": "min", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "range": [ - 1, - 1440 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": [] + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "child_lock.enable", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" + ] }, { - "id": "temperature_unit", - "name": "Temperature Unit", - "value": "0", + "id": "child_lock.temperature_button", + "name": "Temperature + /-(Child Lock)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "℃" + "name": "disable" }, { "value": 1, - "name": "℉" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "child_lock.enable", + "child_lock.system_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" + ] }, { - "id": "temperature_source.type", - "name": "Temperature Source", - "value": "0", + "id": "child_lock.temperature_control_button", + "name": "Temperature Control Mode(Child Lock)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Embedded Temperature" + "name": "disable" }, { "value": 1, - "name": "External NTC" - }, - { - "value": 2, - "name": "LoRa Receive" - }, - { - "value": 3, - "name": "D2D Receive" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temperature_source.lorawan_reception.timeout", - "temperature_source.lorawan_reception.timeout_response", - "temperature_source.d2d_reception.timeout", - "temperature_source.d2d_reception.timeout_response" + "child_lock.enable", + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" ] }, { - "id": "temperature_source.lorawan_reception.timeout", - "name": "Timeout", - "value": "10", + "id": "collection_interval.minutes_of_time", + "name": "Collecting Interval(Collecting Interval)", + "value": "1", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "UINT16", "range": [ 1, - 60 + 1440 ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 72, "bacnet_unit_type": "UNITS_MINUTES", "reference": [ - "temperature_source.lorawan_reception.timeout_response" + "collection_interval.unit" ] }, { - "id": "temperature_source.lorawan_reception.timeout_response", - "name": "Device Offline Settings", + "id": "collection_interval.seconds_of_time", + "name": "Collecting Interval(Collecting Interval)", + "value": "30", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 10, + 64800 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "collection_interval.unit" + ] + }, + { + "id": "collection_interval.unit", + "name": "Collecting Interval Unit(Collecting Interval)", "value": "0", "unit": "", "access_mode": "RW", @@ -488,240 +340,115 @@ "values": [ { "value": 0, - "name": "Keep Control" + "name": "second" }, { "value": 1, - "name": "Turn Off The Control" - }, - { - "value": 2, - "name": "Switch The Embedded Temperature" + "name": "min" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temperature_source.lorawan_reception.timeout" - ] + "reference": [] }, { - "id": "temperature_source.d2d_reception.timeout", - "name": "Timeout", - "value": "10", - "unit": "min", + "id": "cooling_target_temperature", + "name": "CoolingTarget Temperature", + "value": "28", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "FLOAT", "range": [ - 1, - 60 + 5, + 35 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "cooling_target_temperature_range.celsius_max", + "name": "Celsius Max Value(Cooling Target Temperature Regulation Range)", + "value": "35", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "temperature_source.d2d_reception.timeout_response" + "cooling_target_temperature_range.min" ] }, { - "id": "temperature_source.d2d_reception.timeout_response", - "name": "Device Offline Settings", - "value": "0", - "unit": "", + "id": "cooling_target_temperature_range.celsius_min", + "name": "Celsius Min Value(Cooling Target Temperature Regulation Range)", + "value": "23", + "unit": "°C", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Keep Control" - }, - { - "value": 1, - "name": "Turn Off The Control" - }, - { - "value": 2, - "name": "Switch The Embedded Temperature" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "temperature_source.d2d_reception.timeout" + "cooling_target_temperature_range.max" ] }, { - "id": "system_status", - "name": "System On/Off", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Off" - }, - { - "value": 1, - "name": "On" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "mode_enable", - "name": "Mode Enable", - "value": "7", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 7, - "name": "Ventilation、Heat、Cool" - }, - { - "value": 3, - "name": "Ventilation、Heat" - }, - { - "value": 5, - "name": "Ventilation、Cool" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "temperature_control_mode", - "name": "Temperature Control Mode", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Ventilation" - }, - { - "value": 1, - "name": "Heat" - }, - { - "value": 2, - "name": "Cool" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "target_temperature_resolution", - "name": "Target Temperature Resolution", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "0.5" - }, - { - "value": 1, - "name": "1" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "heating_target_temperature", - "name": "Heating Target Temperature", - "value": "17", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 5, - 35 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" - }, - { - "id": "cooling_target_temperature", - "name": "CoolingTarget Temperature", - "value": "28", - "unit": "℃", + "id": "cooling_target_temperature_range.fahrenheit_max", + "name": "Fahrenheit Max Value(Cooling Target Temperature Regulation Range)", + "value": "95", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 5, - 35 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" - }, - { - "id": "target_temperature_tolerance", - "name": "Target Temperature Tolerance", - "value": "1", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 0.1, - 5 + 41, + 95 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "cooling_target_temperature_range.min" + ] }, { - "id": "heating_target_temperature_range.min", - "name": "Min Value", - "value": "10", - "unit": "℃", + "id": "cooling_target_temperature_range.fahrenheit_min", + "name": "Fahrenheit Min Value(Cooling Target Temperature Regulation Range)", + "value": "73.4", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 5, - 35 + 41, + 95 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "heating_target_temperature_range.max" + "cooling_target_temperature_range.max" ] }, { - "id": "heating_target_temperature_range.max", - "name": "Max Value", - "value": "19", - "unit": "℃", + "id": "cooling_target_temperature_range.max", + "name": "Max Value(Cooling Target Temperature Regulation Range)", + "value": "35", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", @@ -733,14 +460,14 @@ "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "heating_target_temperature_range.min" + "cooling_target_temperature_range.min" ] }, { "id": "cooling_target_temperature_range.min", - "name": "Min Value", + "name": "Min Value(Cooling Target Temperature Regulation Range)", "value": "23", - "unit": "℃", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", @@ -756,65 +483,8 @@ ] }, { - "id": "cooling_target_temperature_range.max", - "name": "Max Value", - "value": "35", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 5, - 35 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "cooling_target_temperature_range.min" - ] - }, - { - "id": "target_humidity_range.min", - "name": "Min Value", - "value": "40", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "target_humidity_range.max" - ] - }, - { - "id": "target_humidity_range.max", - "name": "Max Value", - "value": "80", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "target_humidity_range.min" - ] - }, - { - "id": "temperature_control_dehumidification.enable", - "name": "Temp. Control and Dehumidify", + "id": "d2d_master_enable", + "name": "D2D Controller Enable", "value": "0", "unit": "", "access_mode": "RW", @@ -832,63 +502,33 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temperature_control_dehumidification.temperature_tolerance" - ] - }, - { - "id": "temperature_control_dehumidification.temperature_tolerance", - "name": "Temp. Tolerance for Dehumidification", - "value": "1", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 0.1, - 5 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "temperature_control_dehumidification.enable" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "fan_control_mode", - "name": "Fan Mode", + "id": "d2d_pairing_enable", + "name": "D2D Pairing Enable", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Auto" + "name": "disable" }, { "value": 1, - "name": "Low" - }, - { - "value": 2, - "name": "Medium" - }, - { - "value": 3, - "name": "High" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "fan_delay_close.enable", - "name": "Fan Delay Enable", + "id": "d2d_slave_enable", + "name": "D2D Agent Enable", "value": "0", "unit": "", "access_mode": "RW", @@ -906,145 +546,69 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "fan_delay_close.time" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "fan_delay_close.time", - "name": "The Duration of Delay", - "value": "60", - "unit": "s", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "range": [ - 30, - 3600 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": [ - "fan_delay_close.enable" - ] - }, - { - "id": "fan_auto_mode_temperature_range.speed_range_1", - "name": "ΔT1", - "value": "3", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 1, - 15 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "fan_auto_mode_temperature_range.speed_range_2" - ] - }, - { - "id": "fan_auto_mode_temperature_range.speed_range_2", - "name": "ΔT2", - "value": "5", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 1, - 15 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "fan_auto_mode_temperature_range.speed_range_1" - ] - }, - { - "id": "timed_system_control.enable", - "name": "Timer Switch Enable", + "id": "data_source", + "name": "Data Source", "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "Internal" }, { "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [] - }, - { - "id": "intelligent_display_enable", - "name": "Smart Display", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "name": "External NTC" + }, { - "value": 0, - "name": "disable" + "value": 2, + "name": "LoRaWAN Reception" }, { - "value": 1, - "name": "enable" + "value": 3, + "name": "D2D Reception" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "screen_object_settings.enable", - "name": "Screen Display", - "value": "1", - "unit": "", + "id": "daylight_saving_time.daylight_saving_time_offset", + "name": "DST Bias(Daylight Saving Time)", + "value": "60", + "unit": "min", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } + "range": [ + 1, + 120 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", "reference": [ - "screen_object_settings.environmental_temperature", - "screen_object_settings.environmental_humidity", - "screen_object_settings.target_temperature", - "screen_object_settings.schedule_name" + "daylight_saving_time.enable", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "screen_object_settings.environmental_temperature", - "name": "Ambient Temperature", - "value": "1", + "id": "daylight_saving_time.enable", + "name": "Daylight Saving Time(Daylight Saving Time)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", @@ -1063,423 +627,677 @@ "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "screen_object_settings.enable", - "screen_object_settings.environmental_humidity", - "screen_object_settings.target_temperature", - "screen_object_settings.schedule_name" + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "screen_object_settings.environmental_humidity", - "name": "Ambient Humidity", - "value": "1", - "unit": "", + "id": "daylight_saving_time.end_hour_min", + "name": "Time(Daylight Saving Time)", + "value": "0", + "unit": "min", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", + "data_type": "ENUM", + "value_type": "UINT16", "values": [ { "value": 0, - "name": "disable" + "name": "00:00" }, { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "screen_object_settings.enable", - "screen_object_settings.environmental_temperature", - "screen_object_settings.target_temperature", - "screen_object_settings.schedule_name" - ] - }, - { - "id": "screen_object_settings.target_temperature", - "name": "Target Temperature", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "value": 60, + "name": "01:00" + }, { - "value": 0, - "name": "disable" + "value": 120, + "name": "02:00" }, { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "screen_object_settings.enable", - "screen_object_settings.environmental_temperature", - "screen_object_settings.environmental_humidity", - "screen_object_settings.schedule_name" - ] - }, - { - "id": "screen_object_settings.schedule_name", - "name": "Schedule", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "value": 180, + "name": "03:00" + }, { - "value": 0, - "name": "disable" + "value": 240, + "name": "04:00" }, { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "screen_object_settings.enable", - "screen_object_settings.environmental_temperature", - "screen_object_settings.environmental_humidity", - "screen_object_settings.target_temperature" - ] - }, - { - "id": "child_lock.enable", - "name": "Child Lock Enable", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "value": 300, + "name": "05:00" + }, { - "value": 0, - "name": "disable" + "value": 360, + "name": "06:00" }, { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "child_lock.system_button", - "child_lock.temperature_button", - "child_lock.fan_button", - "child_lock.temperature_control_button", - "child_lock.reboot_reset_button" - ] - }, - { - "id": "child_lock.system_button", - "name": "System On/Off", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "value": 420, + "name": "07:00" + }, { - "value": 0, - "name": "disable" + "value": 480, + "name": "08:00" }, { - "value": 1, - "name": "enable" + "value": 540, + "name": "09:00" + }, + { + "value": 600, + "name": "10:00" + }, + { + "value": 660, + "name": "11:00" + }, + { + "value": 720, + "name": "12:00" + }, + { + "value": 780, + "name": "13:00" + }, + { + "value": 840, + "name": "14:00" + }, + { + "value": 900, + "name": "15:00" + }, + { + "value": 960, + "name": "16:00" + }, + { + "value": 1020, + "name": "17:00" + }, + { + "value": 1080, + "name": "18:00" + }, + { + "value": 1140, + "name": "19:00" + }, + { + "value": 1200, + "name": "20:00" + }, + { + "value": 1260, + "name": "21:00" + }, + { + "value": 1320, + "name": "22:00" + }, + { + "value": 1380, + "name": "23:00" } ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", "reference": [ - "child_lock.enable", - "child_lock.temperature_button", - "child_lock.fan_button", - "child_lock.temperature_control_button", - "child_lock.reboot_reset_button" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day" ] }, { - "id": "child_lock.temperature_button", - "name": "Temperature + /-", + "id": "daylight_saving_time.end_month", + "name": "Month(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "Jan." }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "Feb." + }, + { + "value": 3, + "name": "Mar." + }, + { + "value": 4, + "name": "Apr." + }, + { + "value": 5, + "name": "May" + }, + { + "value": 6, + "name": "Jun." + }, + { + "value": 7, + "name": "Jul." + }, + { + "value": 8, + "name": "Aug." + }, + { + "value": 9, + "name": "Sep." + }, + { + "value": 10, + "name": "Oct." + }, + { + "value": 11, + "name": "Nov." + }, + { + "value": 12, + "name": "Dec." } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "child_lock.enable", - "child_lock.system_button", - "child_lock.fan_button", - "child_lock.temperature_control_button", - "child_lock.reboot_reset_button" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "child_lock.fan_button", - "name": "Fan Mode", - "value": "1", + "id": "daylight_saving_time.end_week_day", + "name": "Week(Daylight Saving Time)", + "value": "7", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "Mon." }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "Tues." + }, + { + "value": 3, + "name": "Wed." + }, + { + "value": 4, + "name": "Thurs." + }, + { + "value": 5, + "name": "Fri." + }, + { + "value": 6, + "name": "Sat." + }, + { + "value": 7, + "name": "Sun." } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "child_lock.enable", - "child_lock.system_button", - "child_lock.temperature_button", - "child_lock.temperature_control_button", - "child_lock.reboot_reset_button" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_hour_min" ] }, { - "id": "child_lock.temperature_control_button", - "name": "Temperature Control Mode", + "id": "daylight_saving_time.end_week_num", + "name": "Number of Week(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "1st" }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "2nd" + }, + { + "value": 3, + "name": "3rd" + }, + { + "value": 4, + "name": "4th" + }, + { + "value": 5, + "name": "last" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "child_lock.enable", - "child_lock.system_button", - "child_lock.temperature_button", - "child_lock.fan_button", - "child_lock.reboot_reset_button" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "child_lock.reboot_reset_button", - "name": "Reboot&Reset", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", + "id": "daylight_saving_time.start_hour_min", + "name": "Time(Daylight Saving Time)", + "value": "0", + "unit": "min", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT16", "values": [ { "value": 0, - "name": "disable" + "name": "00:00" }, { - "value": 1, - "name": "enable" + "value": 60, + "name": "01:00" + }, + { + "value": 120, + "name": "02:00" + }, + { + "value": 180, + "name": "03:00" + }, + { + "value": 240, + "name": "04:00" + }, + { + "value": 300, + "name": "05:00" + }, + { + "value": 360, + "name": "06:00" + }, + { + "value": 420, + "name": "07:00" + }, + { + "value": 480, + "name": "08:00" + }, + { + "value": 540, + "name": "09:00" + }, + { + "value": 600, + "name": "10:00" + }, + { + "value": 660, + "name": "11:00" + }, + { + "value": 720, + "name": "12:00" + }, + { + "value": 780, + "name": "13:00" + }, + { + "value": 840, + "name": "14:00" + }, + { + "value": 900, + "name": "15:00" + }, + { + "value": 960, + "name": "16:00" + }, + { + "value": 1020, + "name": "17:00" + }, + { + "value": 1080, + "name": "18:00" + }, + { + "value": 1140, + "name": "19:00" + }, + { + "value": 1200, + "name": "20:00" + }, + { + "value": 1260, + "name": "21:00" + }, + { + "value": 1320, + "name": "22:00" + }, + { + "value": 1380, + "name": "23:00" } ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", "reference": [ - "child_lock.enable", - "child_lock.system_button", - "child_lock.temperature_button", - "child_lock.fan_button", - "child_lock.temperature_control_button" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "temporary_unlock_settings.enable", - "name": "Unlock Function Enable", - "value": "0", + "id": "daylight_saving_time.start_month", + "name": "Month(Daylight Saving Time)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "Jan." }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "Feb." + }, + { + "value": 3, + "name": "Mar." + }, + { + "value": 4, + "name": "Apr." + }, + { + "value": 5, + "name": "May" + }, + { + "value": 6, + "name": "Jun." + }, + { + "value": 7, + "name": "Jul." + }, + { + "value": 8, + "name": "Aug." + }, + { + "value": 9, + "name": "Sep." + }, + { + "value": 10, + "name": "Oct." + }, + { + "value": 11, + "name": "Nov." + }, + { + "value": 12, + "name": "Dec." } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "temporary_unlock_settings.system", - "name": "System On/Off", - "value": "0", + "id": "daylight_saving_time.start_week_day", + "name": "Week(Daylight Saving Time)", + "value": "7", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "Mon." }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "Tues." + }, + { + "value": 3, + "name": "Wed." + }, + { + "value": 4, + "name": "Thurs." + }, + { + "value": 5, + "name": "Fri." + }, + { + "value": 6, + "name": "Sat." + }, + { + "value": 7, + "name": "Sun." } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "temporary_unlock_settings.temperature_up", - "name": "Temperature +", - "value": "0", + "id": "daylight_saving_time.start_week_num", + "name": "Number of Week(Daylight Saving Time)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "1st" }, { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, + "value": 2, + "name": "2nd" + }, + { + "value": 3, + "name": "3rd" + }, + { + "value": 4, + "name": "4th" + }, + { + "value": 5, + "name": "last" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "temporary_unlock_settings.temperature_down", - "name": "Temperature -", - "value": "0", + "id": "delete_schedule.type", + "name": "Delete Schedule(Delete Schedule List)", + "value": "255", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "W", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "Schedule1" }, { "value": 1, - "name": "enable" + "name": "Schedule2" + }, + { + "value": 2, + "name": "Schedule3" + }, + { + "value": 3, + "name": "Schedule4" + }, + { + "value": 4, + "name": "Schedule5" + }, + { + "value": 5, + "name": "Schedule6" + }, + { + "value": 6, + "name": "Schedule7" + }, + { + "value": 7, + "name": "Schedule8" + }, + { + "value": 255, + "name": "Reset All" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" - ] + "reference": [] }, { - "id": "temporary_unlock_settings.fan", - "name": "Fan Mode", - "value": "0", + "id": "device_status", + "name": "Device Status", + "value": "1", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "Off" }, { "value": 1, - "name": "enable" + "name": "On" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "binary_input_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "temporary_unlock_settings.temperature_control", - "name": "Temperature Control Mode", + "id": "di_enable", + "name": "DI Enable", "value": "0", "unit": "", "access_mode": "RW", @@ -1497,1073 +1315,889 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.unlocking_duration" - ] - }, - { - "id": "temporary_unlock_settings.unlocking_duration", - "name": "Unlocking Time", - "value": "30", - "unit": "s", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "range": [ - 1, - 3600 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "time_zone", - "name": "Time Zone", - "value": "0", - "unit": "min", + "id": "di_settings.card_control.insertion_plan.trigger_by_extraction", + "name": "Remove Card(Insert Schedule)", + "value": "1", + "unit": "", "access_mode": "RW", "data_type": "ENUM", - "value_type": "INT16", + "value_type": "UINT8", "values": [ { - "value": -720, - "name": "UTC-12(IDLW)" + "value": 0, + "name": "Schedule1" }, { - "value": -660, - "name": "UTC-11(SST)" + "value": 1, + "name": "Schedule2" }, { - "value": -600, - "name": "UTC-10(HST)" + "value": 2, + "name": "Schedule3" }, { - "value": -570, - "name": "UTC-9:30(MIT)" + "value": 3, + "name": "Schedule4" }, { - "value": -540, - "name": "UTC-9(AKST)" + "value": 4, + "name": "Schedule5" }, { - "value": -480, - "name": "UTC-8(PST)" + "value": 5, + "name": "Schedule6" }, { - "value": -420, - "name": "UTC-7(MST)" + "value": 6, + "name": "Schedule7" }, { - "value": -360, - "name": "UTC-6(CST)" + "value": 7, + "name": "Schedule8" }, { - "value": -300, - "name": "UTC-5(EST)" - }, + "value": 255, + "name": "None" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "di_settings.card_control.insertion_plan.trigger_by_insertion" + ] + }, + { + "id": "di_settings.card_control.insertion_plan.trigger_by_insertion", + "name": "Insert Card(Insert Schedule)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ { - "value": -240, - "name": "UTC-4(AST)" + "value": 0, + "name": "Schedule1" }, { - "value": -210, - "name": "UTC-3:30(NST)" + "value": 1, + "name": "Schedule2" }, { - "value": -180, - "name": "UTC-3(BRT)" + "value": 2, + "name": "Schedule3" }, { - "value": -120, - "name": "UTC-2(FNT)" + "value": 3, + "name": "Schedule4" }, { - "value": -60, - "name": "UTC-1(CVT)" + "value": 4, + "name": "Schedule5" }, { - "value": 0, - "name": "UTC(WET)" + "value": 5, + "name": "Schedule6" }, { - "value": 60, - "name": "UTC+1(CET)" + "value": 6, + "name": "Schedule7" }, { - "value": 120, - "name": "UTC+2(EET)" + "value": 7, + "name": "Schedule8" }, { - "value": 180, - "name": "UTC+3(MSK)" + "value": 255, + "name": "None" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "di_settings.card_control.insertion_plan.trigger_by_extraction" + ] + }, + { + "id": "di_settings.card_control.system_control.trigger_by_insertion", + "name": "Insert Card(System Control)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "system off" }, { - "value": 210, - "name": "UTC+3:30(IRST)" - }, - { - "value": 240, - "name": "UTC+4(GST)" - }, - { - "value": 270, - "name": "UTC+4:30(AFT)" - }, - { - "value": 300, - "name": "UTC+5(PKT)" - }, - { - "value": 330, - "name": "UTC+5:30(IST)" - }, - { - "value": 345, - "name": "UTC+5:45(NPT)" - }, - { - "value": 360, - "name": "UTC+6(BHT)" - }, - { - "value": 390, - "name": "UTC+6:30(MMT)" - }, - { - "value": 420, - "name": "UTC+7(ICT)" - }, - { - "value": 480, - "name": "UTC+8(CT/CST)" - }, - { - "value": 540, - "name": "UTC+9(JST)" - }, - { - "value": 570, - "name": "UTC+9:30(ACST)" - }, - { - "value": 600, - "name": "UTC+10(AEST)" - }, - { - "value": 630, - "name": "UTC+10:30(LHST)" - }, - { - "value": 660, - "name": "UTC+11(VUT)" - }, - { - "value": 720, - "name": "UTC+12(NZST)" - }, - { - "value": 765, - "name": "UTC+12:45(CHAST)" - }, + "value": 1, + "name": "system on" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "di_settings.card_control.type", + "name": "Control Object(Room Card)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ { - "value": 780, - "name": "UTC+13(PHOT)" + "value": 0, + "name": "System Control" }, { - "value": 840, - "name": "UTC+14(LINT)" + "value": 1, + "name": "Insert Schedule" } ], "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES" + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "daylight_saving_time.daylight_saving_time_enable", - "name": "Daylight Saving Time", + "id": "di_settings.magnet_detection.magnet_type", + "name": "Sensor Type(Magnetic Contact Switch)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "NO" }, { "value": 1, - "name": "enable" + "name": "NC" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" - ] + "reference": [] }, { - "id": "daylight_saving_time.daylight_saving_time_offset", - "name": "DST Bias", - "value": "60", - "unit": "min", + "id": "di_settings.object", + "name": "DI Interface(DI Settings)", + "value": "0", + "unit": "", "access_mode": "RW", - "data_type": "NUMBER", + "data_type": "ENUM", "value_type": "UINT8", - "range": [ - 1, - 120 + "values": [ + { + "value": 0, + "name": "Room Card" + }, + { + "value": 0, + "name": "System Control" + }, + { + "value": 1, + "name": "Insert Schedule" + }, + { + "value": 1, + "name": "Magnetic Contact Switch" + } ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" - ] + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "daylight_saving_time.start_month", - "name": "Month", - "value": "1", + "id": "execution_plan_id", + "name": "Schedule", + "value": "255", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ + { + "value": 0, + "name": "Schedule1" + }, { "value": 1, - "name": "Jan." + "name": "Schedule2" }, { "value": 2, - "name": "Feb." + "name": "Schedule3" }, { "value": 3, - "name": "Mar." + "name": "Schedule4" }, { "value": 4, - "name": "Apr." + "name": "Schedule5" }, { "value": 5, - "name": "May" + "name": "Schedule6" }, { "value": 6, - "name": "Jun." + "name": "Schedule7" }, { "value": 7, - "name": "Jul." + "name": "Schedule8" }, { "value": 8, - "name": "Aug." + "name": "Schedule9" }, { "value": 9, - "name": "Sep." + "name": "Schedule10" }, { "value": 10, - "name": "Oct." + "name": "Schedule11" }, { "value": 11, - "name": "Nov." + "name": "Schedule12" }, { "value": 12, - "name": "Dec." - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" - ] - }, - { - "id": "daylight_saving_time.start_week_num", - "name": "Number of Week", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 1, - "name": "1st" + "name": "Schedule13" }, { - "value": 2, - "name": "2nd" + "value": 13, + "name": "Schedule14" }, { - "value": 3, - "name": "3rd" + "value": 14, + "name": "Schedule15" }, { - "value": 4, - "name": "4th" + "value": 15, + "name": "Schedule16" }, { - "value": 5, - "name": "last" + "value": 255, + "name": "Not executed" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "daylight_saving_time.start_week_day", - "name": "Week", - "value": "7", - "unit": "", + "id": "fahrenheit_cooling_target_temperature", + "name": "Fahrenheit CoolingTarget Temperature", + "value": "82.4", + "unit": "℉", "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_heating_target_temperature", + "name": "Fahrenheit Heating Target Temperature", + "value": "62.6", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_target_temperature", + "name": "Fahrenheit Target Temperature", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_target_temperature_tolerance", + "name": "Fahrenheit Target Temperature Tolerance", + "value": "33.8", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 32, + 41 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_temperature", + "name": "Fahrenheit Temperature", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fan_auto_mode_temperature_range.celsius_speed_range_1", + "name": "Celsius ΔT1(Auto Fan Speed Control Delta Settings)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 15 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_2" + ] + }, + { + "id": "fan_auto_mode_temperature_range.celsius_speed_range_2", + "name": "Celsius ΔT2(Auto Fan Speed Control Delta Settings)", + "value": "5", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 15 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_1" + ] + }, + { + "id": "fan_auto_mode_temperature_range.fahrenheit_speed_range_1", + "name": "Fahrenheit ΔT1(Auto Fan Speed Control Delta Settings)", + "value": "37.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 59 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_2" + ] + }, + { + "id": "fan_auto_mode_temperature_range.fahrenheit_speed_range_2", + "name": "Fahrenheit ΔT2(Auto Fan Speed Control Delta Settings)", + "value": "41", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 59 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_1" + ] + }, + { + "id": "fan_auto_mode_temperature_range.speed_range_1", + "name": "ΔT1(Auto Fan Speed Control Delta Settings)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 15 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_2" + ] + }, + { + "id": "fan_auto_mode_temperature_range.speed_range_2", + "name": "ΔT2(Auto Fan Speed Control Delta Settings)", + "value": "5", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 15 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_1" + ] + }, + { + "id": "fan_control_info.mode", + "name": "Fan Mode(Fan Status)", + "value": "0", + "unit": "", + "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ + { + "value": 0, + "name": "Auto" + }, { "value": 1, - "name": "Mon." + "name": "Low" }, { "value": 2, - "name": "Tues." + "name": "Medium" }, { "value": 3, - "name": "Wed." - }, + "name": "High" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "fan_control_info.status" + ] + }, + { + "id": "fan_control_info.status", + "name": "Fan Status(Fan Status)", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ { - "value": 4, - "name": "Thurs." + "value": 0, + "name": "Off" }, { - "value": 5, - "name": "Fri." + "value": 1, + "name": "Low" }, { - "value": 6, - "name": "Sat." + "value": 2, + "name": "Medium" }, { - "value": 7, - "name": "Sun." + "value": 3, + "name": "High" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "fan_control_info.mode" ] }, { - "id": "daylight_saving_time.start_hour_min", - "name": "Time", + "id": "fan_control_mode", + "name": "Fan Mode", "value": "0", - "unit": "min", + "unit": "", "access_mode": "RW", "data_type": "ENUM", - "value_type": "UINT16", + "value_type": "UINT8", "values": [ { "value": 0, - "name": "00:00" - }, - { - "value": 60, - "name": "01:00" - }, - { - "value": 120, - "name": "02:00" - }, - { - "value": 180, - "name": "03:00" - }, - { - "value": 240, - "name": "04:00" - }, - { - "value": 300, - "name": "05:00" - }, - { - "value": 360, - "name": "06:00" - }, - { - "value": 420, - "name": "07:00" + "name": "Auto" }, { - "value": 480, - "name": "08:00" + "value": 1, + "name": "Low" }, { - "value": 540, - "name": "09:00" + "value": 2, + "name": "Medium" }, { - "value": 600, - "name": "10:00" - }, + "value": 3, + "name": "High" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "fan_delay_close.enable", + "name": "Fan Delay Enable(Fan Delay)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ { - "value": 660, - "name": "11:00" + "value": 0, + "name": "disable" }, { - "value": 720, - "name": "12:00" - }, - { - "value": 780, - "name": "13:00" - }, - { - "value": 840, - "name": "14:00" - }, - { - "value": 900, - "name": "15:00" - }, - { - "value": 960, - "name": "16:00" - }, - { - "value": 1020, - "name": "17:00" - }, - { - "value": 1080, - "name": "18:00" - }, - { - "value": 1140, - "name": "19:00" - }, - { - "value": 1200, - "name": "20:00" - }, - { - "value": 1260, - "name": "21:00" - }, - { - "value": 1320, - "name": "22:00" - }, - { - "value": 1380, - "name": "23:00" + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "fan_delay_close.time" ] }, { - "id": "daylight_saving_time.end_month", - "name": "Month", + "id": "fan_delay_close.time", + "name": "The Duration of Delay(Fan Delay)", + "value": "60", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 30, + 3600 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "fan_delay_close.enable" + ] + }, + { + "id": "fan_stop_enable", + "name": "Fan Stop Settings", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "Jan." - }, - { - "value": 2, - "name": "Feb." - }, - { - "value": 3, - "name": "Mar." - }, - { - "value": 4, - "name": "Apr." - }, - { - "value": 5, - "name": "May" - }, - { - "value": 6, - "name": "Jun." - }, - { - "value": 7, - "name": "Jul." - }, - { - "value": 8, - "name": "Aug." - }, - { - "value": 9, - "name": "Sep." - }, - { - "value": 10, - "name": "Oct." - }, - { - "value": 11, - "name": "Nov." + "value": 0, + "name": "disable" }, { - "value": 12, - "name": "Dec." + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "freeze_protection_settings.celsius_target_temperature", + "name": "Celsius Protection Temperature(Freeze Protection)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 5 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "freeze_protection_settings.enable" ] }, { - "id": "daylight_saving_time.end_week_num", - "name": "Number of Week", + "id": "freeze_protection_settings.enable", + "name": "Freeze Protection(Freeze Protection)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "1st" - }, - { - "value": 2, - "name": "2nd" - }, - { - "value": 3, - "name": "3rd" - }, - { - "value": 4, - "name": "4th" + "value": 0, + "name": "disable" }, { - "value": 5, - "name": "last" + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "freeze_protection_settings.target_temperature" ] }, { - "id": "daylight_saving_time.end_week_day", - "name": "Week", - "value": "7", - "unit": "", + "id": "freeze_protection_settings.fahrenheit_target_temperature", + "name": "Fahrenheit Protection Temperature(Freeze Protection)", + "value": "37.4", + "unit": "℉", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 1, - "name": "Mon." - }, - { - "value": 2, - "name": "Tues." - }, - { - "value": 3, - "name": "Wed." - }, - { - "value": 4, - "name": "Thurs." - }, - { - "value": 5, - "name": "Fri." - }, - { - "value": 6, - "name": "Sat." - }, - { - "value": 7, - "name": "Sun." - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 41 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_hour_min" + "freeze_protection_settings.enable" ] }, { - "id": "daylight_saving_time.end_hour_min", - "name": "Time", - "value": "0", - "unit": "min", + "id": "freeze_protection_settings.target_temperature", + "name": "Protection Temperature(Freeze Protection)", + "value": "3", + "unit": "°C", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT16", - "values": [ - { - "value": 0, - "name": "00:00" - }, - { - "value": 60, - "name": "01:00" - }, - { - "value": 120, - "name": "02:00" - }, - { - "value": 180, - "name": "03:00" - }, - { - "value": 240, - "name": "04:00" - }, - { - "value": 300, - "name": "05:00" - }, - { - "value": 360, - "name": "06:00" - }, - { - "value": 420, - "name": "07:00" - }, - { - "value": 480, - "name": "08:00" - }, - { - "value": 540, - "name": "09:00" - }, - { - "value": 600, - "name": "10:00" - }, - { - "value": 660, - "name": "11:00" - }, - { - "value": 720, - "name": "12:00" - }, - { - "value": 780, - "name": "13:00" - }, - { - "value": 840, - "name": "14:00" - }, - { - "value": 900, - "name": "15:00" - }, - { - "value": 960, - "name": "16:00" - }, - { - "value": 1020, - "name": "17:00" - }, - { - "value": 1080, - "name": "18:00" - }, - { - "value": 1140, - "name": "19:00" - }, - { - "value": 1200, - "name": "20:00" - }, - { - "value": 1260, - "name": "21:00" - }, - { - "value": 1320, - "name": "22:00" - }, - { - "value": 1380, - "name": "23:00" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 5 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day" + "freeze_protection_settings.enable" ] }, { - "id": "temperature_calibration_settings.enable", - "name": "Temperature Calibration", - "value": "0", - "unit": "", + "id": "heating_target_temperature", + "name": "Heating Target Temperature", + "value": "17", + "unit": "°C", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temperature_calibration_settings.calibration_value" - ] + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "temperature_calibration_settings.calibration_value", - "name": "Calibration Value", - "value": "0", - "unit": "℃", + "id": "heating_target_temperature_range.celsius_max", + "name": "Celsius Max Value(Heating Target Temperature Regulation Range)", + "value": "19", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -80, - 80 + 5, + 35 ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "temperature_calibration_settings.enable" - ] - }, - { - "id": "humidity_calibration_settings.enable", - "name": "Humidity Calibration", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "humidity_calibration_settings.calibration_value" + "heating_target_temperature_range.min" ] }, { - "id": "humidity_calibration_settings.calibration_value", - "name": "Calibration Value", - "value": "0", - "unit": "%", + "id": "heating_target_temperature_range.celsius_min", + "name": "Celsius Min Value(Heating Target Temperature Regulation Range)", + "value": "10", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -100, - 100 + 5, + 35 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "humidity_calibration_settings.enable" + "heating_target_temperature_range.max" ] }, { - "id": "temperature_alarm_settings.enable", - "name": "Temperature Threshold Alarm", - "value": "0", - "unit": "", + "id": "heating_target_temperature_range.fahrenheit_max", + "name": "Fahrenheit Max Value(Heating Target Temperature Regulation Range)", + "value": "66.2", + "unit": "℉", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "temperature_alarm_settings.threshold_condition", - "temperature_alarm_settings.threshold_min", - "temperature_alarm_settings.threshold_max" + "heating_target_temperature_range.min" ] }, { - "id": "temperature_alarm_settings.threshold_condition", - "name": "Threshold Mode", - "value": "0", - "unit": "", + "id": "heating_target_temperature_range.fahrenheit_min", + "name": "Fahrenheit Min Value(Heating Target Temperature Regulation Range)", + "value": "50", + "unit": "℉", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "condition: xB" - }, - { - "value": 3, - "name": "condition: A≤x≤B" - }, - { - "value": 4, - "name": "condition: xB" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "temperature_alarm_settings.enable", - "temperature_alarm_settings.threshold_min", - "temperature_alarm_settings.threshold_max" + "heating_target_temperature_range.max" ] }, { - "id": "temperature_alarm_settings.threshold_min", - "name": "Value A", - "value": "0", - "unit": "℃", + "id": "heating_target_temperature_range.max", + "name": "Max Value(Heating Target Temperature Regulation Range)", + "value": "19", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 5, + 35 ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "temperature_alarm_settings.enable", - "temperature_alarm_settings.threshold_condition", - "temperature_alarm_settings.threshold_max" + "heating_target_temperature_range.min" ] }, { - "id": "temperature_alarm_settings.threshold_max", - "name": "Value B", - "value": "0", - "unit": "℃", + "id": "heating_target_temperature_range.min", + "name": "Min Value(Heating Target Temperature Regulation Range)", + "value": "10", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 5, + 35 ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "temperature_alarm_settings.enable", - "temperature_alarm_settings.threshold_condition", - "temperature_alarm_settings.threshold_min" + "heating_target_temperature_range.max" ] }, { - "id": "high_temperature_alarm_settings.enable", - "name": "Persistent High Temperature", - "value": "0", - "unit": "", + "id": "high_temperature_alarm_settings.celsius_difference_in_temperature", + "name": "Celsius Difference in Temperature(Persistent High Temperature Alarm Settings)", + "value": "3", + "unit": "°C", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 10 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "high_temperature_alarm_settings.difference_in_temperature", + "high_temperature_alarm_settings.enable", "high_temperature_alarm_settings.duration" ] }, { "id": "high_temperature_alarm_settings.difference_in_temperature", - "name": "Difference in Temperature", + "name": "Difference in Temperature(Persistent High Temperature Alarm Settings)", "value": "3", - "unit": "℃", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", @@ -2581,7 +2215,7 @@ }, { "id": "high_temperature_alarm_settings.duration", - "name": "Duration", + "name": "Duration(Persistent High Temperature Alarm Settings)", "value": "5", "unit": "min", "access_mode": "RW", @@ -2600,8 +2234,8 @@ ] }, { - "id": "low_temperature_alarm_settings.enable", - "name": "Persistent Low Temperature", + "id": "high_temperature_alarm_settings.enable", + "name": "Persistent High Temperature(Persistent High Temperature Alarm Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -2621,210 +2255,221 @@ "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "low_temperature_alarm_settings.difference_in_temperature", - "low_temperature_alarm_settings.duration" + "high_temperature_alarm_settings.difference_in_temperature", + "high_temperature_alarm_settings.duration" ] }, { - "id": "low_temperature_alarm_settings.difference_in_temperature", - "name": "Difference in Temperature", - "value": "3", - "unit": "℃", + "id": "high_temperature_alarm_settings.fahrenheit_difference_in_temperature", + "name": "Fahrenheit Difference in Temperature(Persistent High Temperature Alarm Settings)", + "value": "37.4", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 1, - 10 + 33.8, + 50 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "low_temperature_alarm_settings.enable", - "low_temperature_alarm_settings.duration" + "high_temperature_alarm_settings.enable", + "high_temperature_alarm_settings.duration" ] }, { - "id": "low_temperature_alarm_settings.duration", - "name": "Duration", - "value": "5", - "unit": "min", - "access_mode": "RW", + "id": "humidity", + "name": "Humidity", + "value": "", + "unit": "%", + "access_mode": "R", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "FLOAT", "range": [ 0, - 60 + 100 ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": [ - "low_temperature_alarm_settings.enable", - "low_temperature_alarm_settings.difference_in_temperature" - ] + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT" }, { - "id": "interface_settings.object", - "name": "System Type", - "value": "1", + "id": "humidity_alarm.type", + "name": "Alarm Type(Humidity Alarm)", + "value": "", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Four-pipe, 0~10V Valve+Three-speeds Fan" + "name": "Collection Error" }, { "value": 1, - "name": "Two-pipe, 0~10V Valve+Three-speeds Fan" + "name": "Exceed the Range Lower Limit" }, { "value": 2, - "name": "Two-pipe, 0~10V Valve+EC Fan" + "name": "Exceed the Range Upper Limit" }, { "value": 3, - "name": "Four-pipe,Two-wire Valve+EC Fan" - }, - { - "value": 4, - "name": "Two-pipe, Two-wire Valve+EC Fan" - }, - { - "value": 5, - "name": "Two-pipe, Three-wire Valve+EC Fan" + "name": "No Data" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "humidity_calibration_settings.calibration_value", + "name": "Calibration Value(Humidity Calibration Settings)", + "value": "0", + "unit": "%", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -100, + 100 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", "reference": [ - "interface_settings.valve_4_pipe_10_v.cooling", - "interface_settings.valve_4_pipe_10_v.heating", - "interface_settings.valve_2_pipe_10_v.control", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power", - "interface_settings.valve_2_pipe_10_v_fan_ec.control", - "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power", - "interface_settings.valve_2_pipe_2_wire_fan_ec.control", - "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" + "humidity_calibration_settings.enable" ] }, { - "id": "interface_settings.valve_4_pipe_10_v.cooling", - "name": "Cooling Valve", - "value": "1", + "id": "humidity_calibration_settings.enable", + "name": "Humidity Calibration(Humidity Calibration Settings)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "AO1" + "value": 0, + "name": "disable" }, { - "value": 2, - "name": "AO2" + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_4_pipe_10_v.heating" + "humidity_calibration_settings.calibration_value" ] }, { - "id": "interface_settings.valve_4_pipe_10_v.heating", - "name": "Heating Valve", - "value": "2", + "id": "insert_schedule.type", + "name": "Event Control(Event Control)", + "value": "0", "unit": "", - "access_mode": "RW", + "access_mode": "W", "data_type": "ENUM", "value_type": "UINT8", "values": [ + { + "value": 0, + "name": "Schedule1" + }, { "value": 1, - "name": "AO1" + "name": "Schedule2" }, { "value": 2, - "name": "AO2" + "name": "Schedule3" + }, + { + "value": 3, + "name": "Schedule4" + }, + { + "value": 4, + "name": "Schedule5" + }, + { + "value": 5, + "name": "Schedule6" + }, + { + "value": 6, + "name": "Schedule7" + }, + { + "value": 7, + "name": "Schedule8" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_4_pipe_10_v.cooling" - ] + "reference": [] }, { - "id": "interface_settings.valve_2_pipe_10_v.control", - "name": "Valve", + "id": "intelligent_display_enable", + "name": "Smart Display", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "AO1" + "value": 0, + "name": "disable" }, { - "value": 2, - "name": "AO2" + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "interface_settings.valve_2_pipe_10_v_fan_ec.control", - "name": "Valve", + "id": "interface_settings.object", + "name": "System Type(Interface Settings)", "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ + { + "value": 0, + "name": "Four-pipe, Two-wire Valve+Three-speeds Fan" + }, { "value": 1, - "name": "AO1" + "name": "Two-pipe, Two-wire Valve+Three-speeds Fan" }, { "value": 2, - "name": "AO2" + "name": "Two-pipe, Three-wire Valve+Three-speeds Fan" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_2_pipe_10_v_fan_ec.fan", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power" - ] + "reference": [] }, { - "id": "interface_settings.valve_2_pipe_10_v_fan_ec.fan", - "name": "EC Fan", - "value": "2", + "id": "interface_settings.valve_2_pipe_2_wire.control", + "name": "Valve(Two-pipe, Two-wire Valve+Three-speeds Fan)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", @@ -2832,120 +2477,96 @@ "values": [ { "value": 1, - "name": "AO1" + "name": "V1/ NO" }, { "value": 2, - "name": "AO2" + "name": "V2/ NC" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_2_pipe_10_v_fan_ec.control", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power" - ] + "reference": [] }, { - "id": "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power", - "name": "Fan Power WIre", - "value": "5", + "id": "interface_settings.valve_2_pipe_3_wire.nc", + "name": "NC(Two-pipe, Three-wire Valve+Three-speeds Fan)", + "value": "2", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "None" - }, - { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" + "value": 1, + "name": "V1/ NO" }, { - "value": 5, - "name": "Q3" + "value": 2, + "name": "V2/ NC" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_2_pipe_10_v_fan_ec.control", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan" + "interface_settings.valve_2_pipe_3_wire.no" ] }, { - "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "name": "Cooling Valve", - "value": "3", + "id": "interface_settings.valve_2_pipe_3_wire.no", + "name": "NO(Two-pipe, Three-wire Valve+Three-speeds Fan)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" + "value": 1, + "name": "V1/ NO" }, { - "value": 5, - "name": "Q3" + "value": 2, + "name": "V2/ NC" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power" + "interface_settings.valve_2_pipe_3_wire.nc" ] }, { - "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "name": "Heating Valve", - "value": "4", + "id": "interface_settings.valve_4_pipe_2_wire.cooling", + "name": "Cooling Valve(Four-pipe, Two-wire Valve+Three-speeds Fan)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" + "value": 1, + "name": "V1/ NO" }, { - "value": 5, - "name": "Q3" + "value": 2, + "name": "V2/ NC" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power" + "interface_settings.valve_4_pipe_2_wire.heating" ] }, { - "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", - "name": "EC Fan", + "id": "interface_settings.valve_4_pipe_2_wire.heating", + "name": "Heating Valve(Four-pipe, Two-wire Valve+Three-speeds Fan)", "value": "2", "unit": "", "access_mode": "RW", @@ -2954,26 +2575,24 @@ "values": [ { "value": 1, - "name": "AO1" + "name": "V1/ NO" }, { "value": 2, - "name": "AO2" + "name": "V2/ NC" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power" + "interface_settings.valve_4_pipe_2_wire.cooling" ] }, { - "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power", - "name": "Fan Power WIre", - "value": "5", + "id": "lorawan_configuration_settings.mode", + "name": "LoRaWAN Work Mode(LoRaWAN Settings)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", @@ -2981,415 +2600,533 @@ "values": [ { "value": 0, - "name": "None" + "name": "ClassA" }, { - "value": 3, - "name": "Q1" + "value": 1, + "name": "ClassB" }, { - "value": 4, - "name": "Q2" + "value": 2, + "name": "ClassC" }, { - "value": 5, - "name": "Q3" + "value": 3, + "name": "ClassC to B" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan" - ] + "reference": [] }, { - "id": "interface_settings.valve_2_pipe_2_wire_fan_ec.control", - "name": "Valve", + "id": "low_temperature_alarm_settings.celsius_difference_in_temperature", + "name": "Celsius Difference in Temperature(Persistent Low Temperature Alarm Settings)", "value": "3", - "unit": "", + "unit": "°C", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" - }, - { - "value": 5, - "name": "Q3" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 10 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power" + "low_temperature_alarm_settings.enable", + "low_temperature_alarm_settings.duration" ] }, { - "id": "interface_settings.valve_2_pipe_2_wire_fan_ec.fan", - "name": "EC Fan", - "value": "2", + "id": "low_temperature_alarm_settings.difference_in_temperature", + "name": "Difference in Temperature(Persistent Low Temperature Alarm Settings)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 10 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "low_temperature_alarm_settings.enable", + "low_temperature_alarm_settings.duration" + ] + }, + { + "id": "low_temperature_alarm_settings.duration", + "name": "Duration(Persistent Low Temperature Alarm Settings)", + "value": "5", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 0, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "low_temperature_alarm_settings.enable", + "low_temperature_alarm_settings.difference_in_temperature" + ] + }, + { + "id": "low_temperature_alarm_settings.enable", + "name": "Persistent Low Temperature(Persistent Low Temperature Alarm Settings)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "AO1" + "value": 0, + "name": "disable" }, { - "value": 2, - "name": "AO2" + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_2_pipe_2_wire_fan_ec.control", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power" + "low_temperature_alarm_settings.difference_in_temperature", + "low_temperature_alarm_settings.duration" ] }, { - "id": "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power", - "name": "Fan Power WIre", - "value": "5", + "id": "low_temperature_alarm_settings.fahrenheit_difference_in_temperature", + "name": "Fahrenheit Difference in Temperature(Persistent Low Temperature Alarm Settings)", + "value": "37.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 50 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "low_temperature_alarm_settings.enable", + "low_temperature_alarm_settings.duration" + ] + }, + { + "id": "mode_enable", + "name": "Mode Enable", + "value": "7", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "None" + "value": 7, + "name": "Ventilation、Heat、Cool" }, { "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" + "name": "Ventilation、Heat" }, { "value": 5, - "name": "Q3" + "name": "Ventilation、Cool" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_2_pipe_2_wire_fan_ec.control", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "name": "NO", - "value": "3", + "id": "oem_id", + "name": "OEM ID", + "value": "", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "product_sn", + "name": "SN", + "value": "", + "unit": "", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 16, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "query_device_status", + "name": "Query Device Status", + "access_mode": "W", + "data_type": "BOOL", "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", "values": [ { - "value": 3, - "name": "Q1" + "value": 0, + "name": "no" }, { - "value": 4, - "name": "Q2" + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "reboot", + "name": "Reboot", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" }, { - "value": 5, - "name": "Q3" + "value": 1, + "name": "yes" } - ], - "bacnet_type": "multistate_value_object", + ] + }, + { + "id": "reconnect", + "name": "Network Reconnection", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } ] }, { - "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "name": "NC", - "value": "4", + "id": "relay_changes_report_enable", + "name": "Relay/Valve Change Report", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 3, - "name": "Q1" + "value": 0, + "name": "disable" }, { - "value": 4, - "name": "Q2" + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "relay_status.high_status", + "name": "Fan High(Relay/Valve Status )", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Open" }, { - "value": 5, - "name": "Q3" + "value": 1, + "name": "Close" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" + "relay_status.low_status", + "relay_status.mid_status", + "relay_status.valve_1_status", + "relay_status.valve_2_status", + "relay_status.reserved" ] }, { - "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", - "name": "EC Fan", - "value": "2", + "id": "relay_status.low_status", + "name": "Fan Low(Relay/Valve Status )", + "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "ENUM", + "access_mode": "R", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "AO1" + "value": 0, + "name": "Open" }, { - "value": 2, - "name": "AO2" + "value": 1, + "name": "Close" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" + "relay_status.mid_status", + "relay_status.high_status", + "relay_status.valve_1_status", + "relay_status.valve_2_status", + "relay_status.reserved" ] }, { - "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power", - "name": "Fan Power WIre", - "value": "5", + "id": "relay_status.mid_status", + "name": "Fan Medium(Relay/Valve Status )", + "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "ENUM", + "access_mode": "R", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "None" - }, - { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" + "name": "Open" }, { - "value": 5, - "name": "Q3" + "value": 1, + "name": "Close" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan" + "relay_status.low_status", + "relay_status.high_status", + "relay_status.valve_1_status", + "relay_status.valve_2_status", + "relay_status.reserved" ] }, { - "id": "valve_control_settings.control_interval", - "name": "Valve Control Interval", - "value": "30", - "unit": "s", - "access_mode": "RW", + "id": "relay_status.reserved", + "name": "Reserved(Relay/Valve Status )", + "value": "", + "unit": "", + "access_mode": "R", "data_type": "NUMBER", "value_type": "UINT8", - "range": [ - 1, - 60 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": [] - }, - { - "id": "valve_control_settings.control_adjustment_range", - "name": "Valve Control Adjustment Range", - "value": "10", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 1, - 15 + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "relay_status.low_status", + "relay_status.mid_status", + "relay_status.high_status", + "relay_status.valve_1_status", + "relay_status.valve_2_status" ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ] }, { - "id": "valve_control_settings.opening_range.min", - "name": "Min Value", + "id": "relay_status.valve_1_status", + "name": "Valve 1(Relay/Valve Status )", "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "NUMBER", + "access_mode": "R", + "data_type": "BOOL", "value_type": "UINT8", - "range": [ - 0, - 100 + "values": [ + { + "value": 0, + "name": "Open" + }, + { + "value": 1, + "name": "Close" + } ], - "bacnet_type": "analog_value_object", + "bacnet_type": "binary_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "valve_control_settings.opening_range.max" + "relay_status.low_status", + "relay_status.mid_status", + "relay_status.high_status", + "relay_status.valve_2_status", + "relay_status.reserved" ] }, { - "id": "valve_control_settings.opening_range.max", - "name": "Max Value", - "value": "100", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", + "id": "relay_status.valve_2_status", + "name": "Valve 2(Relay/Valve Status )", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "BOOL", "value_type": "UINT8", - "range": [ - 0, - 100 + "values": [ + { + "value": 0, + "name": "Open" + }, + { + "value": 1, + "name": "Close" + } ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", + "bacnet_type": "binary_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "valve_control_settings.opening_range.min" + "relay_status.low_status", + "relay_status.mid_status", + "relay_status.high_status", + "relay_status.valve_1_status", + "relay_status.reserved" ] }, { - "id": "fan_ec_control_settings.low_threshold", - "name": "Low Speed", - "value": "50", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 1, - 100 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [] - }, - { - "id": "fan_ec_control_settings.mid_threshold", - "name": "Medium Speed", - "value": "80", - "unit": "%", + "id": "reporting_interval.minutes_of_time", + "name": "Reporting Interval(Reporting Interval)", + "value": "10", + "unit": "min", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "UINT16", "range": [ 1, - 100 + 1440 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [] + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "reporting_interval.unit" + ] }, { - "id": "fan_ec_control_settings.high_threshold", - "name": "High Speed", - "value": "100", - "unit": "%", + "id": "reporting_interval.seconds_of_time", + "name": "Reporting Interval(Reporting Interval)", + "value": "600", + "unit": "s", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "UINT16", "range": [ - 1, - 100 + 10, + 64800 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [] + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "reporting_interval.unit" + ] }, { - "id": "fan_stop_enable", - "name": "Fan Stop Settings", + "id": "reporting_interval.unit", + "name": "Reporting Interval Unit(Reporting Interval)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "second" }, { "value": 1, - "name": "enable" + "name": "min" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "valve_output_0v_enable", - "name": "Valve output 0% setting", - "value": "1", - "unit": "", - "access_mode": "RW", + "id": "reset", + "name": "Reset", + "access_mode": "W", "data_type": "BOOL", "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", "values": [ { "value": 0, - "name": "disable" + "name": "no" }, { "value": 1, - "name": "enable" + "name": "yes" } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + ] }, { - "id": "di_enable", - "name": "DI Enable", - "value": "0", + "id": "screen_object_settings.enable", + "name": "Screen Display(Screen Display Settings)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", @@ -3406,241 +3143,253 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "di_settings.object", - "name": "DI Interface", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Room Card" - }, - { - "value": 1, - "name": "Magnetic Contact Switch" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "di_settings.card_control.type", - "di_settings.card_control.system_control.trigger_by_insertion", - "di_settings.card_control.insertion_plan.trigger_by_insertion", - "di_settings.card_control.insertion_plan.trigger_by_extraction", - "di_settings.magnet_detection.magnet_type" + "screen_object_settings.environmental_temperature", + "screen_object_settings.environmental_humidity", + "screen_object_settings.target_temperature", + "screen_object_settings.schedule_name", + "screen_object_settings.reserved" ] }, { - "id": "di_settings.card_control.type", - "name": "Control Object", - "value": "0", + "id": "screen_object_settings.environmental_humidity", + "name": "Ambient Humidity(Screen Display Settings)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "System Control" + "name": "disable" }, { "value": 1, - "name": "Insert Schedule" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "di_settings.card_control.system_control.trigger_by_insertion", - "di_settings.card_control.insertion_plan.trigger_by_insertion", - "di_settings.card_control.insertion_plan.trigger_by_extraction" + "screen_object_settings.enable", + "screen_object_settings.environmental_temperature", + "screen_object_settings.target_temperature", + "screen_object_settings.schedule_name", + "screen_object_settings.reserved" ] }, { - "id": "di_settings.card_control.system_control.trigger_by_insertion", - "name": "Insert Card", + "id": "screen_object_settings.environmental_temperature", + "name": "Ambient Temperature(Screen Display Settings)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "system off" + "name": "disable" }, { "value": 1, - "name": "system on" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [] + "reference": [ + "screen_object_settings.enable", + "screen_object_settings.environmental_humidity", + "screen_object_settings.target_temperature", + "screen_object_settings.schedule_name", + "screen_object_settings.reserved" + ] }, { - "id": "di_settings.card_control.insertion_plan.trigger_by_insertion", - "name": "Insert Card", + "id": "screen_object_settings.reserved", + "name": "Reserved(Screen Display Settings)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Schedule1" + "name": "disable" }, { "value": 1, - "name": "Schedule2" - }, - { - "value": 2, - "name": "Schedule3" - }, - { - "value": 3, - "name": "Schedule4" - }, - { - "value": 4, - "name": "Schedule5" - }, - { - "value": 5, - "name": "Schedule6" - }, - { - "value": 6, - "name": "Schedule7" - }, - { - "value": 7, - "name": "Schedule8" - }, - { - "value": 255, - "name": "None" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "di_settings.card_control.insertion_plan.trigger_by_extraction" + "screen_object_settings.enable", + "screen_object_settings.environmental_temperature", + "screen_object_settings.environmental_humidity", + "screen_object_settings.target_temperature", + "screen_object_settings.schedule_name" ] }, { - "id": "di_settings.card_control.insertion_plan.trigger_by_extraction", - "name": "Remove Card", + "id": "screen_object_settings.schedule_name", + "name": "Schedule(Screen Display Settings)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Schedule1" + "name": "disable" }, { "value": 1, - "name": "Schedule2" - }, - { - "value": 2, - "name": "Schedule3" - }, - { - "value": 3, - "name": "Schedule4" - }, - { - "value": 4, - "name": "Schedule5" - }, - { - "value": 5, - "name": "Schedule6" - }, - { - "value": 6, - "name": "Schedule7" - }, - { - "value": 7, - "name": "Schedule8" - }, - { - "value": 255, - "name": "None" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "di_settings.card_control.insertion_plan.trigger_by_insertion" + "screen_object_settings.enable", + "screen_object_settings.environmental_temperature", + "screen_object_settings.environmental_humidity", + "screen_object_settings.target_temperature", + "screen_object_settings.reserved" ] }, { - "id": "di_settings.magnet_detection.magnet_type", - "name": "Sensor Type", - "value": "0", + "id": "screen_object_settings.target_temperature", + "name": "Target Temperature (Screen Display Settings)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "NO" + "name": "disable" }, { "value": 1, - "name": "NC" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [] - }, - { - "id": "window_opening_detection_enable", - "name": "Open Window Detection", + "reference": [ + "screen_object_settings.enable", + "screen_object_settings.environmental_temperature", + "screen_object_settings.environmental_humidity", + "screen_object_settings.schedule_name", + "screen_object_settings.reserved" + ] + }, + { + "id": "send_humidity.humidity", + "name": "Humidity Extend Value(Humidity Extend Settings)", "value": "0", - "unit": "", - "access_mode": "RW", + "unit": "%", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 100 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [] + }, + { + "id": "send_temperature.celsius_temperature", + "name": "Celsius Temperature Extend Value(Temperature Extend Settings)", + "value": "0", + "unit": "°C", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "send_temperature.fahrenheit_temperature", + "name": "Fahrenheit Temperature Extend Value(Temperature Extend Settings)", + "value": "32", + "unit": "℉", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "send_temperature.temperature", + "name": "Temperature Extend Value(Temperature Extend Settings)", + "value": "0", + "unit": "°C", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "synchronize_time", + "name": "Time Synchronize", + "access_mode": "W", "data_type": "BOOL", "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", "values": [ { "value": 0, - "name": "disable" + "name": "no" }, { "value": 1, - "name": "enable" + "name": "yes" } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + ] }, { - "id": "window_opening_detection_settings.type", - "name": "Detection Method", + "id": "system_status", + "name": "System On/Off", "value": "0", "unit": "", "access_mode": "RW", @@ -3649,209 +3398,137 @@ "values": [ { "value": 0, - "name": "Temperature Detection" + "name": "Off" }, { "value": 1, - "name": "Magnetic Detection" + "name": "On" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "window_opening_detection_settings.temperature_detection.difference_in_temperature", - "window_opening_detection_settings.temperature_detection.stop_time", - "window_opening_detection_settings.magnet_detection.duration" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "window_opening_detection_settings.temperature_detection.difference_in_temperature", - "name": "Temperature Change", - "value": "3", - "unit": "℃", + "id": "target_humidity_range.max", + "name": "Max Value(Target Humidity Regulation Range)", + "value": "80", + "unit": "%", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 1, - 10 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "window_opening_detection_settings.temperature_detection.stop_time" - ] - }, - { - "id": "window_opening_detection_settings.temperature_detection.stop_time", - "name": "Stop Temperature Control For", - "value": "30", - "unit": "min", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 1, - 60 + 0, + 100 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", "reference": [ - "window_opening_detection_settings.temperature_detection.difference_in_temperature" + "target_humidity_range.min" ] }, { - "id": "window_opening_detection_settings.magnet_detection.duration", - "name": "Duration", - "value": "10", - "unit": "min", + "id": "target_humidity_range.min", + "name": "Min Value(Target Humidity Regulation Range)", + "value": "40", + "unit": "%", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "FLOAT", "range": [ - 1, - 60 + 0, + 100 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": [] - }, - { - "id": "freeze_protection_settings.enable", - "name": "Freeze Protection", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", "reference": [ - "freeze_protection_settings.target_temperature" + "target_humidity_range.max" ] }, { - "id": "freeze_protection_settings.target_temperature", - "name": "Protection Temperature", - "value": "3", - "unit": "℃", - "access_mode": "RW", + "id": "target_temperature", + "name": "Target Temperature", + "value": "", + "unit": "°C", + "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 1, - 5 + 5, + 35 ], - "bacnet_type": "analog_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "freeze_protection_settings.enable" - ] + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "d2d_pairing_enable", - "name": "D2D Pairing Enable", - "value": "0", + "id": "target_temperature_alarm.type", + "name": "Alarm Type(Target Temperature Alarm)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 3, + "name": "No Data" }, { - "value": 1, - "name": "enable" + "value": 3, + "name": "No Data" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "d2d_master_enable", - "name": "D2D Controller Enable", + "id": "target_temperature_resolution", + "name": "Target Temperature Resolution", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "0.5" }, { "value": 1, - "name": "enable" + "name": "1" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "d2d_slave_enable", - "name": "D2D Agent Enable", - "value": "0", - "unit": "", + "id": "target_temperature_tolerance", + "name": "Target Temperature Tolerance", + "value": "1", + "unit": "°C", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "temperature_alarm.lower_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 0, + 5 ], - "bacnet_type": "analog_input_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "temperature_alarm.lower_range_alarm_trigger.temperature", + "id": "temperature", "name": "Temperature", "value": "", - "unit": "℃", + "unit": "°C", "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", @@ -3861,245 +3538,1368 @@ ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "temperature_alarm.over_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "temperature_alarm_settings.celsius_threshold_max", + "name": "Celsius Value B(Temperature Threshold Alarm Settings)", + "value": "0", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ -20, 60 ], - "bacnet_type": "analog_input_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" + ] }, { - "id": "temperature_alarm.over_range_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "temperature_alarm_settings.celsius_threshold_min", + "name": "Celsius Value A(Temperature Threshold Alarm Settings)", + "value": "0", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ -20, 60 ], - "bacnet_type": "analog_input_object", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" + ] + }, + { + "id": "temperature_alarm_settings.enable", + "name": "Temperature Threshold Alarm(Temperature Threshold Alarm Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min", + "temperature_alarm_settings.threshold_max" + ] + }, + { + "id": "temperature_alarm_settings.fahrenheit_threshold_max", + "name": "Fahrenheit Value B(Temperature Threshold Alarm Settings)", + "value": "32", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" + ] + }, + { + "id": "temperature_alarm_settings.fahrenheit_threshold_min", + "name": "Fahrenheit Value A(Temperature Threshold Alarm Settings)", + "value": "32", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" + ] + }, + { + "id": "temperature_alarm_settings.threshold_condition", + "name": "Threshold Mode(Temperature Threshold Alarm Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "condition: xB" + }, + { + "value": 3, + "name": "condition: A≤x≤B" + }, + { + "value": 4, + "name": "condition: xB" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_min", + "temperature_alarm_settings.threshold_max" + ] + }, + { + "id": "temperature_alarm_settings.threshold_max", + "name": "Value B(Temperature Threshold Alarm Settings)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" + ] + }, + { + "id": "temperature_alarm_settings.threshold_min", + "name": "Value A(Temperature Threshold Alarm Settings)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" + ] + }, + { + "id": "temperature_alarm.type", + "name": "Alarm Type(Temperature Alarm)", + "value": "", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Collection Error" + }, + { + "value": 1, + "name": "Exceed the Range Lower Limit" + }, + { + "value": 2, + "name": "Exceed the Range Upper Limit" + }, + { + "value": 3, + "name": "No Data" + }, + { + "value": 16, + "name": "Temperature Below Alarm Released" + }, + { + "value": 17, + "name": "Temperature Below Alarm" + }, + { + "value": 18, + "name": "Temperature Above Alarm Released" + }, + { + "value": 19, + "name": "Temperature Above Alarm" + }, + { + "value": 20, + "name": "Temperature Between Alarm Released" + }, + { + "value": 21, + "name": "Temperature Between Alarm" + }, + { + "value": 22, + "name": "Exceed Tolerance Alarm Released" + }, + { + "value": 23, + "name": "Exceed Tolerance Alarm" + }, + { + "value": 32, + "name": "Persistent Low Temperature Alarm Released" + }, + { + "value": 33, + "name": "Persistent Low Temperature Alarm" + }, + { + "value": 34, + "name": "Persistent High Temperature Alarm Released" + }, + { + "value": 35, + "name": "Persistent High Temperature Alarm Released" + }, + { + "value": 48, + "name": "Freeze Protection Alarm Released" + }, + { + "value": 49, + "name": "Freeze Protection Alarm" + }, + { + "value": 50, + "name": "Open Window Alarm Released" + }, + { + "value": 51, + "name": "Open Window Alarm" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "temperature_calibration_settings.calibration_value", + "name": "Calibration Value(Temperature Calibration Settings)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -80, + 80 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_calibration_settings.enable" + ] + }, + { + "id": "temperature_calibration_settings.celsius_calibration_value", + "name": "Celsius Calibration Value(Temperature Calibration Settings)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -80, + 80 + ], + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_calibration_settings.enable" + ] + }, + { + "id": "temperature_calibration_settings.enable", + "name": "Temperature Calibration(Temperature Calibration Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_calibration_settings.calibration_value" + ] + }, + { + "id": "temperature_calibration_settings.fahrenheit_calibration_value", + "name": "Fahrenheit Calibration Value(Temperature Calibration Settings)", + "value": "32", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -112, + 176 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_calibration_settings.enable" + ] + }, + { + "id": "temperature_control_dehumidification.celsius_temperature_tolerance", + "name": "Celsius Temp. Tolerance for Dehumidification\n(Temp. Control and Dehumidify Settings)", + "value": "1", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 5 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_control_dehumidification.enable" + ] + }, + { + "id": "temperature_control_dehumidification.enable", + "name": "Temp. Control and Dehumidify(Temp. Control and Dehumidify Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_control_dehumidification.temperature_tolerance" + ] + }, + { + "id": "temperature_control_dehumidification.fahrenheit_temperature_tolerance", + "name": "Fahrenheit Temp. Tolerance for Dehumidification\n(Temp. Control and Dehumidify Settings)", + "value": "33.8", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 32, + 41 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_control_dehumidification.enable" + ] + }, + { + "id": "temperature_control_dehumidification.temperature_tolerance", + "name": "Temp. Tolerance for Dehumidification\n(Temp. Control and Dehumidify Settings)", + "value": "1", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 5 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_control_dehumidification.enable" + ] + }, + { + "id": "temperature_control_info.mode", + "name": "Temperature Control Mode(Temperature Control Status)", + "value": "1", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Ventilation" + }, + { + "value": 1, + "name": "Heat" + }, + { + "value": 2, + "name": "Cool" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_control_info.status" + ] + }, + { + "id": "temperature_control_info.status", + "name": "Temperature Control Status(Temperature Control Status)", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Standby" + }, + { + "value": 1, + "name": "Heat" + }, + { + "value": 2, + "name": "Cool" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_control_info.mode" + ] + }, + { + "id": "temperature_control_mode", + "name": "Temperature Control Mode", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Ventilation" + }, + { + "value": 1, + "name": "Heat" + }, + { + "value": 2, + "name": "Cool" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "temperature_control_valve_status", + "name": "Valve Status", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Close" + }, + { + "value": 100, + "name": "Open" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "temperature_source.d2d_reception.timeout", + "name": "Timeout(D2D Receive)", + "value": "10", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 1, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "temperature_source.d2d_reception.timeout_response" + ] + }, + { + "id": "temperature_source.d2d_reception.timeout_response", + "name": "Device Offline Settings(D2D Receive)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Keep Control" + }, + { + "value": 1, + "name": "Turn Off The Control" + }, + { + "value": 2, + "name": "Switch The Embedded Temperature" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_source.d2d_reception.timeout" + ] + }, + { + "id": "temperature_source.lorawan_reception.timeout", + "name": "Timeout(LoRa Receive)", + "value": "10", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 1, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "temperature_source.lorawan_reception.timeout_response" + ] + }, + { + "id": "temperature_source.lorawan_reception.timeout_response", + "name": "Device Offline Settings(LoRa Receive)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Keep Control" + }, + { + "value": 1, + "name": "Turn Off The Control" + }, + { + "value": 2, + "name": "Switch The Embedded Temperature" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_source.lorawan_reception.timeout" + ] + }, + { + "id": "temperature_source.type", + "name": "Temperature Source(Temperature Data Source)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Embedded Temperature" + }, + { + "value": 1, + "name": "External NTC" + }, + { + "value": 2, + "name": "LoRa Receive" + }, + { + "value": 3, + "name": "D2D Receive" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "temperature_unit", + "name": "Temperature Unit", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "℃" + }, + { + "value": 1, + "name": "℉" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "temporary_unlock_settings.enable", + "name": "Unlock Function Enable(Unlock Button Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" + ] + }, + { + "id": "temporary_unlock_settings.fan", + "name": "Fan Mode(Unlock Button Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" + ] + }, + { + "id": "temporary_unlock_settings.reserved", + "name": "Reserved(Unlock Button Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.unlocking_duration" + ] + }, + { + "id": "temporary_unlock_settings.system", + "name": "System On/Off (Unlock Button Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" + ] + }, + { + "id": "temporary_unlock_settings.temperature_control", + "name": "Temperature Control Mode(Unlock Button Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" + ] + }, + { + "id": "temporary_unlock_settings.temperature_down", + "name": "Temperature -(Unlock Button Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" + ] + }, + { + "id": "temporary_unlock_settings.temperature_up", + "name": "Temperature + (Unlock Button Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" + ] + }, + { + "id": "temporary_unlock_settings.unlocking_duration", + "name": "Unlocking Time(Unlock Button Settings)", + "value": "30", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 3600 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved" + ] + }, + { + "id": "time_zone", + "name": "Time Zone", + "value": "0", + "unit": "min", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "INT16", + "values": [ + { + "value": -720, + "name": "UTC-12(IDLW)" + }, + { + "value": -660, + "name": "UTC-11(SST)" + }, + { + "value": -600, + "name": "UTC-10(HST)" + }, + { + "value": -570, + "name": "UTC-9:30(MIT)" + }, + { + "value": -540, + "name": "UTC-9(AKST)" + }, + { + "value": -480, + "name": "UTC-8(PST)" + }, + { + "value": -420, + "name": "UTC-7(MST)" + }, + { + "value": -360, + "name": "UTC-6(CST)" + }, + { + "value": -300, + "name": "UTC-5(EST)" + }, + { + "value": -240, + "name": "UTC-4(AST)" + }, + { + "value": -210, + "name": "UTC-3:30(NST)" + }, + { + "value": -180, + "name": "UTC-3(BRT)" + }, + { + "value": -120, + "name": "UTC-2(FNT)" + }, + { + "value": -60, + "name": "UTC-1(CVT)" + }, + { + "value": 0, + "name": "UTC(WET)" + }, + { + "value": 60, + "name": "UTC+1(CET)" + }, + { + "value": 120, + "name": "UTC+2(EET)" + }, + { + "value": 180, + "name": "UTC+3(MSK)" + }, + { + "value": 210, + "name": "UTC+3:30(IRST)" + }, + { + "value": 240, + "name": "UTC+4(GST)" + }, + { + "value": 270, + "name": "UTC+4:30(AFT)" + }, + { + "value": 300, + "name": "UTC+5(PKT)" + }, + { + "value": 330, + "name": "UTC+5:30(IST)" + }, + { + "value": 345, + "name": "UTC+5:45(NPT)" + }, + { + "value": 360, + "name": "UTC+6(BHT)" + }, + { + "value": 390, + "name": "UTC+6:30(MMT)" + }, + { + "value": 420, + "name": "UTC+7(ICT)" + }, + { + "value": 480, + "name": "UTC+8(CT/CST)" + }, + { + "value": 540, + "name": "UTC+9(JST)" + }, + { + "value": 570, + "name": "UTC+9:30(ACST)" + }, + { + "value": 600, + "name": "UTC+10(AEST)" + }, + { + "value": 630, + "name": "UTC+10:30(LHST)" + }, + { + "value": 660, + "name": "UTC+11(VUT)" + }, + { + "value": 720, + "name": "UTC+12(NZST)" + }, + { + "value": 765, + "name": "UTC+12:45(CHAST)" + }, + { + "value": 780, + "name": "UTC+13(PHOT)" + }, + { + "value": 840, + "name": "UTC+14(LINT)" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES" + }, + { + "id": "timed_system_control.command", + "name": "Sub-command(Timer Switch System)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Timer Switch Enable" + }, + { + "value": 0, + "name": "Timer Switch Enable" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, { - "id": "temperature_alarm.within_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 + "id": "timed_system_control.enable", + "name": "Timer Switch Enable(Timer Switch System)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, { - "id": "temperature_alarm.within_range_alarm_trigger.temperature", - "name": "Temperature", + "id": "tsl_version", + "name": "TSL Version", "value": "", - "unit": "℃", + "unit": "", "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "temperature_alarm.exceed_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 + "id": "update_open_windows_state.type", + "name": "Open Window Status Control( Open Window Status Control)", + "value": "0", + "unit": "", + "access_mode": "W", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Normal" + }, + { + "value": 1, + "name": "Open" + } ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, { - "id": "temperature_alarm.exceed_range_alarm_trigger.temperature", - "name": "Temperature", + "id": "version.firmware_version", + "name": "Firmware Version(Product Version)", "value": "", - "unit": "℃", + "unit": "", "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 12, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "version.hardware_version" + ] }, { - "id": "temperature_alarm.persistent_low_temperature_alarm_deactivation.temperature", - "name": "Temperature", + "id": "version.hardware_version", + "name": "Hardware Version(Product Version)", "value": "", - "unit": "℃", + "unit": "", "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "version.firmware_version" + ] }, { - "id": "temperature_alarm.persistent_low_temperature_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 + "id": "window_opening_detection_enable", + "name": "Open Window Detection", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "temperature_alarm.persistent_high_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "window_opening_detection_settings.magnet_detection.duration", + "name": "Duration(Magnetic Detection)", + "value": "10", + "unit": "min", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT8", "range": [ - -20, + 1, 60 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", "reference": [] }, { - "id": "temperature_alarm.persistent_high_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "window_opening_detection_settings.temperature_detection.celsius_difference_in_temperature", + "name": "Celsius Temperature Change(Temperature Detection)", + "value": "3", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 1, + 10 ], - "bacnet_type": "analog_input_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "reference": [ + "window_opening_detection_settings.temperature_detection.stop_time" + ] }, { - "id": "temperature_alarm.anti_freeze_protection_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "window_opening_detection_settings.temperature_detection.difference_in_temperature", + "name": "Temperature Change(Temperature Detection)", + "value": "3", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 1, + 10 ], - "bacnet_type": "analog_input_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "reference": [ + "window_opening_detection_settings.temperature_detection.stop_time" + ] }, { - "id": "temperature_alarm.anti_freeze_protection_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "window_opening_detection_settings.temperature_detection.fahrenheit_difference_in_temperature", + "name": "Fahrenheit Temperature Change(Temperature Detection)", + "value": "37.4", + "unit": "℉", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 33.8, + 50 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "window_opening_detection_settings.temperature_detection.stop_time" + ] }, { - "id": "temperature_alarm.window_status_detection_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "window_opening_detection_settings.temperature_detection.stop_time", + "name": "Stop Temperature Control For(Temperature Detection)", + "value": "30", + "unit": "min", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT8", "range": [ - -20, + 1, 60 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "window_opening_detection_settings.temperature_detection.difference_in_temperature" + ] }, { - "id": "temperature_alarm.window_status_detection_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 + "id": "window_opening_detection_settings.type", + "name": "Detection Method(Open Window Detection)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Temperature Detection" + }, + { + "value": 1, + "name": "Magnetic Detection" + } ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] } ] diff --git a/vendors/milesight-iot/wt-series/wt303/wt303-decoder.js b/vendors/milesight-iot/wt-series/wt303/wt303-decoder.js index aecd3f9..eb91465 100644 --- a/vendors/milesight-iot/wt-series/wt303/wt303-decoder.js +++ b/vendors/milesight-iot/wt-series/wt303/wt303-decoder.js @@ -27,6 +27,8 @@ function Decoder(bytes, port) { function milesightDeviceDecode(bytes) { var decoded = {}; + var result = {}; + var history = []; var unknown_command = 0; var counterObj = {}; @@ -815,16 +817,34 @@ function milesightDeviceDecode(bytes) { // 0:Schedule1, 1:Schedule2, 2:Schedule3, 3:Schedule4, 4:Schedule5, 5:Schedule6, 6:Schedule7, 7:Schedule8, 255:Reset All decoded.delete_schedule.type = readUInt8(bytes, counterObj, 1); break; + case 0xbf: + decoded.reset = readOnlyCommand(bytes, counterObj, 0); + break; case 0xbe: decoded.reboot = readOnlyCommand(bytes, counterObj, 0); break; + default: + unknown_command = 1; + break; } if (unknown_command) { throw new Error('unknown command: ' + command_id); } } - return decoded; + if (Object.keys(history).length > 0) { + result.history = history; + } else { + for (var k2 in decoded) { + if (decoded.hasOwnProperty(k2)) { + result[k2] = decoded[k2]; + } + } + } + + processTemperature(result); + + return result; } function readOnlyCommand(bytes) { @@ -891,6 +911,17 @@ function readInt16LE(allBytes, counterObj, end) { return ref > 0x7fff ? ref - 0x10000 : ref; } +function readUInt24LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); // 3 bytes expected + var value = (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; + return value & 0xffffff; +} + +function readInt24LE(allBytes, counterObj, end) { + var ref = readUInt24LE(allBytes, counterObj, end); + return ref > 0x7fffff ? ref - 0x1000000 : ref; +} + function readUInt32LE(allBytes, counterObj, end) { var bytes = readBytes(allBytes, counterObj, end); var value = (bytes[3] << 24) + (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; @@ -975,7 +1006,7 @@ function extractBits(byte, startBit, endBit) { if (byte < 0 || byte > 0xffff) { throw new Error("byte must be in range 0..65535"); } - if (startBit < 0 || endBit > 16 || startBit >= endBit) { + if (startBit >= endBit) { throw new Error("invalid bit range"); } @@ -1005,49 +1036,145 @@ function insertArrayItem(array, item, idName) { } function readCommand(allBytes, counterObj, end) { - var bytes = readBytes(allBytes, counterObj, end); - var cmd = bytes - .map(function(b) { - var hex = b.toString(16); - return hex.length === 1 ? '0' + hex : hex; - }) - .join('') - .toLowerCase(); + var bytes = readBytes(allBytes, counterObj, end); + var cmd = bytes + .map(function(b) { + var hex = b.toString(16); + return hex.length === 1 ? '0' + hex : hex; + }) + .join('') + .toLowerCase(); - var map = cmdMap(); - for (var key in map) { - var xxs = []; - var isMatch = false; - if (key.length !== cmd.length) { - continue; - } - for (var i = 0; i < key.length; i += 2) { - var hexString = key.slice(i, i + 2); - var cmdString = cmd.slice(i, i + 2); - if (hexString === cmdString || hexString === 'xx') { - if (hexString === 'xx') { - xxs.push('.' + parseInt(cmdString, 16)); - } - isMatch = true; - continue; - } else { - isMatch = false; - break; - } - } - if (isMatch) { - var propertyId = map[key]; - if (propertyId.indexOf('._item') === -1) { - return propertyId; - } - var j = 0; - var result = propertyId.replace(/\._item/g, function() { - return xxs[j++]; - }); - return result; - } - } - return null; + var map = cmdMap(); + for (var key in map) { + var xxs = []; + var isMatch = false; + if (key.length !== cmd.length) { + continue; + } + for (var i = 0; i < key.length; i += 2) { + var hexString = key.slice(i, i + 2); + var cmdString = cmd.slice(i, i + 2); + if (hexString === cmdString || hexString === 'xx') { + if (hexString === 'xx') { + xxs.push('.' + parseInt(cmdString, 16)); + } + isMatch = true; + continue; + } else { + isMatch = false; + break; + } + } + if (isMatch) { + var propertyId = map[key]; + if (propertyId.indexOf('._item') === -1) { + return propertyId; + } + var j = 0; + var result = propertyId.replace(/\._item/g, function() { + return xxs[j++]; + }); + return result; + } + } + return null; +} + +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; +} + +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; +} + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } + + current[parts[parts.length - 1]] = value; + return obj; +} + +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); +} + +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); +} + +function getAllLeafPaths(obj, prefix) { + var paths = []; + + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } + } + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; + +} + +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); } function cmdMap() { @@ -1082,6 +1209,18 @@ function cmdMap() { "88": "d2d_master_enable", "89": "d2d_master_settings", "90": "relay_changes_report_enable", + "6000": "collection_interval.seconds_of_time", + "6001": "collection_interval.minutes_of_time", + "6200": "reporting_interval.seconds_of_time", + "6201": "reporting_interval.minutes_of_time", + "8100": "di_settings.card_control", + "8101": "di_settings.magnet_detection", + "8300": "window_opening_detection_settings.temperature_detection", + "8301": "window_opening_detection_settings.magnet_detection", + "8502": "temperature_source.lorawan_reception", + "8503": "temperature_source.d2d_reception", + "810000": "di_settings.card_control.system_control", + "810001": "di_settings.card_control.insertion_plan", "fe": "request_check_order", "f4": "request_full_inspection", "f400": "request_full_inspection.start_inspection", @@ -1105,8 +1244,33 @@ function cmdMap() { "07": "fan_control_info", "08": "execution_plan_id", "09": "temperature_alarm", + "0900": "temperature_alarm.collection_error", + "0901": "temperature_alarm.lower_range_error", + "0902": "temperature_alarm.over_range_error", + "0903": "temperature_alarm.no_data", + "0910": "temperature_alarm.lower_range_alarm_deactivation", + "0911": "temperature_alarm.lower_range_alarm_trigger", + "0912": "temperature_alarm.over_range_alarm_deactivation", + "0913": "temperature_alarm.over_range_alarm_trigger", + "0914": "temperature_alarm.within_range_alarm_deactivation", + "0915": "temperature_alarm.within_range_alarm_trigger", + "0916": "temperature_alarm.exceed_range_alarm_deactivation", + "0917": "temperature_alarm.exceed_range_alarm_trigger", + "0920": "temperature_alarm.persistent_low_temperature_alarm_deactivation", + "0921": "temperature_alarm.persistent_low_temperature_alarm_trigger", + "0922": "temperature_alarm.persistent_high_alarm_deactivation", + "0923": "temperature_alarm.persistent_high_alarm_trigger", + "0930": "temperature_alarm.anti_freeze_protection_deactivation", + "0931": "temperature_alarm.anti_freeze_protection_trigger", + "0932": "temperature_alarm.window_status_detection_deactivation", + "0933": "temperature_alarm.window_status_detection_trigger", "0a": "humidity_alarm", + "0a00": "humidity_alarm.collection_error", + "0a01": "humidity_alarm.lower_range_error", + "0a02": "humidity_alarm.over_range_error", + "0a03": "humidity_alarm.no_data", "0b": "target_temperature_alarm", + "0b03": "target_temperature_alarm.no_data", "c8": "device_status", "c4": "auto_p_enable", "6b": "heating_target_temperature", @@ -1139,6 +1303,9 @@ function cmdMap() { "7bxx04": "schedule_settings._item.cycle_settings", "7bxx04xx": "schedule_settings._item.cycle_settings._item", "7c": "interface_settings", + "7c00": "interface_settings.valve_4_pipe_2_wire", + "7c01": "interface_settings.valve_2_pipe_2_wire", + "7c02": "interface_settings.valve_2_pipe_3_wire", "8e": "fan_stop_enable", "87xx": "d2d_pairing_settings._item", "87xx00": "d2d_pairing_settings._item.enable", @@ -1161,6 +1328,156 @@ function cmdMap() { "5d": "update_open_windows_state", "5e": "insert_schedule", "5f": "delete_schedule", + "bf": "reset", "be": "reboot" }; +} +function processTemperature(decoded) { + var allTemperatureProperties = { + "temperature": { + "precision": 2 + }, + "target_temperature": { + "precision": 2 + }, + "temperature_alarm.lower_range_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.lower_range_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.over_range_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.over_range_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.within_range_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.within_range_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.exceed_range_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.exceed_range_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.persistent_low_temperature_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.persistent_low_temperature_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.persistent_high_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.persistent_high_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.anti_freeze_protection_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.anti_freeze_protection_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.window_status_detection_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.window_status_detection_trigger.temperature": { + "precision": 2 + }, + "heating_target_temperature": { + "precision": 2 + }, + "cooling_target_temperature": { + "precision": 2 + }, + "target_temperature_tolerance": { + "precision": 2 + }, + "heating_target_temperature_range.min": { + "precision": 2 + }, + "heating_target_temperature_range.max": { + "precision": 2 + }, + "cooling_target_temperature_range.min": { + "precision": 2 + }, + "cooling_target_temperature_range.max": { + "precision": 2 + }, + "temperature_control_dehumidification.temperature_tolerance": { + "precision": 2 + }, + "fan_auto_mode_temperature_range.speed_range_1": { + "precision": 2 + }, + "fan_auto_mode_temperature_range.speed_range_2": { + "precision": 2 + }, + "temperature_calibration_settings.calibration_value": { + "precision": 2 + }, + "temperature_alarm_settings.threshold_min": { + "precision": 2 + }, + "temperature_alarm_settings.threshold_max": { + "precision": 2 + }, + "high_temperature_alarm_settings.difference_in_temperature": { + "precision": 2 + }, + "low_temperature_alarm_settings.difference_in_temperature": { + "precision": 2 + }, + "schedule_settings._item.content.heat_target_temperature": { + "precision": 2 + }, + "schedule_settings._item.content.cool_target_temperature": { + "precision": 2 + }, + "schedule_settings._item.content.temperature_tolerance": { + "precision": 2 + }, + "window_opening_detection_settings.temperature_detection.difference_in_temperature": { + "precision": 2 + }, + "freeze_protection_settings.target_temperature": { + "precision": 2 + }, + "send_temperature.temperature": { + "precision": 2 + } +}; + var leafPaths = getAllLeafPaths(decoded); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + if (hasPath(decoded, propertyId)) { + setPath(decoded, fahrenheitProperty, Number((getPath(decoded, propertyId) * 1.8 + 32).toFixed(allTemperatureProperties[newPropertyId].precision))); + setPath(decoded, celsiusProperty, Number(getPath(decoded, propertyId).toFixed(allTemperatureProperties[newPropertyId].precision))); + } + } + } + return decoded; } \ No newline at end of file diff --git a/vendors/milesight-iot/wt-series/wt303/wt303-encoder.js b/vendors/milesight-iot/wt-series/wt303/wt303-encoder.js index 88ca661..fce071d 100644 --- a/vendors/milesight-iot/wt-series/wt303/wt303-encoder.js +++ b/vendors/milesight-iot/wt-series/wt303/wt303-encoder.js @@ -26,6 +26,7 @@ function Encoder(obj, port) { /* eslint-enable */ function milesightDeviceEncode(payload) { + processTemperature(payload); var encoded = []; //0xfe if ('request_check_order' in payload) { @@ -80,7 +81,6 @@ function milesightDeviceEncode(payload) { var hex = Number(part).toString(16); while (hex.length < 2) { hex = '0' + hex; } pureNumber.push(hex); - console.log(pureNumber); formateStrParts.push('_item'); } else { formateStrParts.push(part); @@ -1323,6 +1323,12 @@ function milesightDeviceEncode(payload) { buffer.writeUInt8(payload.delete_schedule.type); encoded = encoded.concat(buffer.toBytes()); } + //0xbf + if ('reset' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xbf); + encoded = encoded.concat(buffer.toBytes()); + } //0xbe if ('reboot' in payload) { var buffer = new Buffer(); @@ -1361,6 +1367,14 @@ Buffer.prototype.writeInt16LE = function(value) { this._write(value < 0 ? value + 0x10000 : value, 2, true); }; +Buffer.prototype.writeUInt24LE = function(value) { + this._write(value, 3, true); +}; + +Buffer.prototype.writeInt24LE = function(value) { + this._write(value < 0 ? value + 0x1000000 : value, 3, true); +}; + Buffer.prototype.writeUInt32LE = function(value) { this._write(value, 4, true); }; @@ -1369,6 +1383,55 @@ Buffer.prototype.writeInt32LE = function(value) { this._write(value < 0 ? value + 0x100000000 : value, 4, true); }; +Buffer.prototype.writeFloatLE = function(value) { + var sign = (value < 0 || (value === 0 && 1 / value === -Infinity)) ? 1 : 0; + var absValue = Math.abs(value); + + if (absValue === 0) { + this._write(sign ? 0x80000000 : 0, 4, true); + return; + } else if (value !== value) { + this._write(0x7fc00000, 4, true); + return; + } else if (absValue === Infinity) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } + + var exponent = Math.floor(Math.log(absValue) / Math.LN2); + var normalized = absValue / Math.pow(2, exponent); + if (normalized < 1) { + exponent -= 1; + normalized *= 2; + } else if (normalized >= 2) { + exponent += 1; + normalized /= 2; + } + + var biasedExponent = exponent + 127; + var mantissaBits = 0; + if (biasedExponent <= 0) { + biasedExponent = 0; + mantissaBits = Math.round(absValue / Math.pow(2, -149)); + if (mantissaBits > 0x7fffff) { + mantissaBits = 0x7fffff; + } + } else { + mantissaBits = Math.round((normalized - 1) * 0x800000); + if (mantissaBits === 0x800000) { + biasedExponent += 1; + mantissaBits = 0; + } + if (biasedExponent >= 0xff) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } + } + + var floatBits = ((((sign << 31) >>> 0) | ((biasedExponent & 0xff) << 23) | (mantissaBits & 0x7fffff)) >>> 0); + this._write(floatBits, 4, true); +}; + Buffer.prototype.writeBytes = function(bytes, length, mustEqual) { if (mustEqual === undefined) mustEqual = false; if (length < bytes.length) { @@ -1457,6 +1520,100 @@ function isValid(value) { return value !== undefined && value !== null && value !== ''; } +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; +} + +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; +} + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } + + current[parts[parts.length - 1]] = value; + return obj; +} + +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); +} + +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); +} + +function getAllLeafPaths(obj, prefix) { + var paths = []; + + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } + } + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; +} + +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); +} function cmdMap() { return { @@ -1483,16 +1640,47 @@ function cmdMap() { "fan_control_info": "07", "execution_plan_id": "08", "temperature_alarm": "09", + "temperature_alarm.collection_error": "0900", + "temperature_alarm.lower_range_error": "0901", + "temperature_alarm.over_range_error": "0902", + "temperature_alarm.no_data": "0903", + "temperature_alarm.lower_range_alarm_deactivation": "0910", + "temperature_alarm.lower_range_alarm_trigger": "0911", + "temperature_alarm.over_range_alarm_deactivation": "0912", + "temperature_alarm.over_range_alarm_trigger": "0913", + "temperature_alarm.within_range_alarm_deactivation": "0914", + "temperature_alarm.within_range_alarm_trigger": "0915", + "temperature_alarm.exceed_range_alarm_deactivation": "0916", + "temperature_alarm.exceed_range_alarm_trigger": "0917", + "temperature_alarm.persistent_low_temperature_alarm_deactivation": "0920", + "temperature_alarm.persistent_low_temperature_alarm_trigger": "0921", + "temperature_alarm.persistent_high_alarm_deactivation": "0922", + "temperature_alarm.persistent_high_alarm_trigger": "0923", + "temperature_alarm.anti_freeze_protection_deactivation": "0930", + "temperature_alarm.anti_freeze_protection_trigger": "0931", + "temperature_alarm.window_status_detection_deactivation": "0932", + "temperature_alarm.window_status_detection_trigger": "0933", "humidity_alarm": "0a", + "humidity_alarm.collection_error": "0a00", + "humidity_alarm.lower_range_error": "0a01", + "humidity_alarm.over_range_error": "0a02", + "humidity_alarm.no_data": "0a03", "target_temperature_alarm": "0b", + "target_temperature_alarm.no_data": "0b03", "relay_status": "10", "device_status": "c8", "collection_interval": "60", + "collection_interval.seconds_of_time": "6000", + "collection_interval.minutes_of_time": "6001", "reporting_interval": "62", + "reporting_interval.seconds_of_time": "6200", + "reporting_interval.minutes_of_time": "6201", "auto_p_enable": "c4", "relay_changes_report_enable": "90", "temperature_unit": "63", "temperature_source": "85", + "temperature_source.lorawan_reception": "8502", + "temperature_source.d2d_reception": "8503", "system_status": "67", "mode_enable": "64", "temperature_control_mode": "68", @@ -1538,11 +1726,20 @@ function cmdMap() { "schedule_settings._item.cycle_settings": "7bxx04", "schedule_settings._item.cycle_settings._item": "7bxx04xx", "interface_settings": "7c", + "interface_settings.valve_4_pipe_2_wire": "7c00", + "interface_settings.valve_2_pipe_2_wire": "7c01", + "interface_settings.valve_2_pipe_3_wire": "7c02", "fan_stop_enable": "8e", "di_enable": "80", "di_settings": "81", + "di_settings.card_control": "8100", + "di_settings.card_control.system_control": "810000", + "di_settings.card_control.insertion_plan": "810001", + "di_settings.magnet_detection": "8101", "window_opening_detection_enable": "82", "window_opening_detection_settings": "83", + "window_opening_detection_settings.temperature_detection": "8300", + "window_opening_detection_settings.magnet_detection": "8301", "freeze_protection_settings": "84", "d2d_pairing_enable": "86", "d2d_pairing_settings": "87", @@ -1569,6 +1766,165 @@ function cmdMap() { "update_open_windows_state": "5d", "insert_schedule": "5e", "delete_schedule": "5f", + "reset": "bf", "reboot": "be" }; +} +function processTemperature(payload) { + var allTemperatureProperties = { + "temperature": { + "coefficient": 0.01 + }, + "target_temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.lower_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.lower_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.over_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.over_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.within_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.within_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.exceed_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.exceed_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.persistent_low_temperature_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.persistent_low_temperature_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.persistent_high_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.persistent_high_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.anti_freeze_protection_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.anti_freeze_protection_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.window_status_detection_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.window_status_detection_trigger.temperature": { + "coefficient": 0.01 + }, + "heating_target_temperature": { + "coefficient": 0.01 + }, + "cooling_target_temperature": { + "coefficient": 0.01 + }, + "target_temperature_tolerance": { + "coefficient": 0.01 + }, + "heating_target_temperature_range.min": { + "coefficient": 0.01 + }, + "heating_target_temperature_range.max": { + "coefficient": 0.01 + }, + "cooling_target_temperature_range.min": { + "coefficient": 0.01 + }, + "cooling_target_temperature_range.max": { + "coefficient": 0.01 + }, + "temperature_control_dehumidification.temperature_tolerance": { + "coefficient": 0.01 + }, + "fan_auto_mode_temperature_range.speed_range_1": { + "coefficient": 0.01 + }, + "fan_auto_mode_temperature_range.speed_range_2": { + "coefficient": 0.01 + }, + "temperature_calibration_settings.calibration_value": { + "coefficient": 0.01 + }, + "temperature_alarm_settings.threshold_min": { + "coefficient": 0.01 + }, + "temperature_alarm_settings.threshold_max": { + "coefficient": 0.01 + }, + "high_temperature_alarm_settings.difference_in_temperature": { + "coefficient": 0.01 + }, + "low_temperature_alarm_settings.difference_in_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content.heat_target_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content.cool_target_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content.temperature_tolerance": { + "coefficient": 0.01 + }, + "window_opening_detection_settings.temperature_detection.difference_in_temperature": { + "coefficient": 0.01 + }, + "freeze_protection_settings.target_temperature": { + "coefficient": 0.01 + }, + "send_temperature.temperature": { + "coefficient": 0.01 + } +}; + var leafPaths = getAllLeafPaths(payload); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + var stringCoefficient = String(allTemperatureProperties[newPropertyId].coefficient); + var dotIndex = stringCoefficient.indexOf('.'); + var precision = dotIndex != -1 ? stringCoefficient.length - dotIndex - 1 : 0; + if (!hasPath(payload, propertyId)) { + if (hasPath(payload, fahrenheitProperty) && hasPath(payload, celsiusProperty)) { + throw new Error(fahrenheitProperty + ' and ' + celsiusProperty + ' cannot be in payload at the same time'); + } + if (hasPath(payload, fahrenheitProperty)) { + setPath(payload, propertyId, Number(((getPath(payload, fahrenheitProperty) - 32) / 1.8).toFixed(precision))); + } else if (hasPath(payload, celsiusProperty)) { + setPath(payload, propertyId, Number(getPath(payload, celsiusProperty).toFixed(precision))); + } + } + } + } + return payload; } \ No newline at end of file diff --git a/vendors/milesight-iot/wt-series/wt304/wt304-codec.json b/vendors/milesight-iot/wt-series/wt304/wt304-codec.json index 4084478..c68281e 100644 --- a/vendors/milesight-iot/wt-series/wt304/wt304-codec.json +++ b/vendors/milesight-iot/wt-series/wt304/wt304-codec.json @@ -2,484 +2,336 @@ "version": "1.0.0", "object": [ { - "id": "tsl_version", - "name": "TSL Version", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 6, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "product_sn", - "name": "Product SN", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "version.hardware_version", - "name": "Hardware Version", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 6, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "version.firmware_version", - "name": "Firmware Version", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "oem_id", - "name": "OEM ID", - "value": "", - "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 2, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "id": "celsius_cooling_target_temperature", + "name": "Celsius CoolingTarget Temperature", + "value": "28", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "data_source", - "name": "Data Source", - "value": "0", - "unit": "", - "access_mode": "R", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Internal" - }, - { - "value": 1, - "name": "External NTC" - }, - { - "value": 2, - "name": "LoRaWAN Reception" - }, - { - "value": 3, - "name": "D2D Reception" - } + "id": "celsius_heating_target_temperature", + "name": "Celsius Heating Target Temperature", + "value": "17", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "temperature", - "name": "Temperature", + "id": "celsius_target_temperature", + "name": "Celsius Target Temperature", "value": "", - "unit": "℃", + "unit": "°C", "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 5, + 35 ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "humidity", - "name": "Humidity", - "value": "", - "unit": "%", - "access_mode": "R", + "id": "celsius_target_temperature_tolerance", + "name": "Celsius Target Temperature Tolerance", + "value": "1", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ 0, - 100 + 5 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "target_temperature", - "name": "Target Temperature", + "id": "celsius_temperature", + "name": "Celsius Temperature", "value": "", - "unit": "℃", + "unit": "°C", "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 5, - 35 + -20, + 60 ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "temperature_control_info.mode", - "name": "Temperature Control Mode", - "value": "1", + "id": "child_lock.enable", + "name": "Child Lock Enable(Child Lock)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Ventilation" + "name": "disable" }, { "value": 1, - "name": "Heat" - }, - { - "value": 2, - "name": "Cool" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temperature_control_info.status" + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" ] }, { - "id": "temperature_control_info.status", - "name": "Temperature Control Status", - "value": "0", + "id": "child_lock.fan_button", + "name": "Fan Mode(Child Lock)", + "value": "1", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Standby" + "name": "disable" }, { "value": 1, - "name": "Heat" - }, - { - "value": 2, - "name": "Cool" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temperature_control_info.mode" + "child_lock.enable", + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" ] }, { - "id": "temperature_control_valve_status", - "name": "Valve Status", - "value": "0", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT" - }, - { - "id": "fan_control_info.mode", - "name": "Fan Mode", - "value": "0", + "id": "child_lock.reboot_reset_button", + "name": "Reboot&Reset(Child Lock)", + "value": "1", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Auto" + "name": "disable" }, { "value": 1, - "name": "Low" - }, - { - "value": 2, - "name": "Medium" - }, - { - "value": 3, - "name": "High" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "fan_control_info.status" + "child_lock.enable", + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reserved" ] }, { - "id": "fan_control_info.status", - "name": "Fan Status", + "id": "child_lock.reserved", + "name": "Reserved(Child Lock)", "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Off" + "name": "disable" }, { "value": 1, - "name": "Low" - }, - { - "value": 2, - "name": "Medium" - }, - { - "value": 3, - "name": "High" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "fan_control_info.mode" + "child_lock.enable", + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button" ] }, { - "id": "execution_plan_id", - "name": "Schedule", - "value": "255", + "id": "child_lock.system_button", + "name": "System On/Off (Child Lock)", + "value": "1", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Schedule1" + "name": "disable" }, { "value": 1, - "name": "Schedule2" - }, - { - "value": 2, - "name": "Schedule3" - }, - { - "value": 3, - "name": "Schedule4" - }, - { - "value": 4, - "name": "Schedule5" - }, - { - "value": 5, - "name": "Schedule6" - }, - { - "value": 6, - "name": "Schedule7" - }, - { - "value": 7, - "name": "Schedule8" - }, - { - "value": 8, - "name": "Schedule9" - }, - { - "value": 9, - "name": "Schedule10" - }, - { - "value": 10, - "name": "Schedule11" - }, - { - "value": 11, - "name": "Schedule12" - }, - { - "value": 12, - "name": "Schedule13" - }, - { - "value": 13, - "name": "Schedule14" - }, - { - "value": 14, - "name": "Schedule15" - }, - { - "value": 15, - "name": "Schedule16" - }, - { - "value": 255, - "name": "Not executed" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "collection_interval.seconds_of_time", - "name": "Collecting Interval", - "value": "30", - "unit": "s", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "range": [ - 10, - 64800 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": [] - }, - { - "id": "reporting_interval.minutes_of_time", - "name": "Reporting Interval", - "value": "10", - "unit": "min", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "range": [ - 1, - 1440 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": [] + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "child_lock.enable", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" + ] }, { - "id": "temperature_unit", - "name": "Temperature Unit", - "value": "0", + "id": "child_lock.temperature_button", + "name": "Temperature + /-(Child Lock)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "℃" + "name": "disable" }, { "value": 1, - "name": "℉" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "child_lock.enable", + "child_lock.system_button", + "child_lock.fan_button", + "child_lock.temperature_control_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" + ] }, { - "id": "temperature_source.type", - "name": "Temperature Source", - "value": "0", + "id": "child_lock.temperature_control_button", + "name": "Temperature Control Mode(Child Lock)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Embedded Temperature" + "name": "disable" }, { "value": 1, - "name": "External NTC" - }, - { - "value": 2, - "name": "LoRa Receive" - }, - { - "value": 3, - "name": "D2D Receive" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temperature_source.lorawan_reception.timeout", - "temperature_source.lorawan_reception.timeout_response", - "temperature_source.d2d_reception.timeout", - "temperature_source.d2d_reception.timeout_response" + "child_lock.enable", + "child_lock.system_button", + "child_lock.temperature_button", + "child_lock.fan_button", + "child_lock.reboot_reset_button", + "child_lock.reserved" ] }, { - "id": "temperature_source.lorawan_reception.timeout", - "name": "Timeout", - "value": "10", + "id": "collection_interval.minutes_of_time", + "name": "Collecting Interval(Collecting Interval)", + "value": "1", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "UINT16", "range": [ 1, - 60 + 1440 ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 72, "bacnet_unit_type": "UNITS_MINUTES", "reference": [ - "temperature_source.lorawan_reception.timeout_response" + "collection_interval.unit" ] }, { - "id": "temperature_source.lorawan_reception.timeout_response", - "name": "Device Offline Settings", + "id": "collection_interval.seconds_of_time", + "name": "Collecting Interval(Collecting Interval)", + "value": "30", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 10, + 64800 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "collection_interval.unit" + ] + }, + { + "id": "collection_interval.unit", + "name": "Collecting Interval Unit(Collecting Interval)", "value": "0", "unit": "", "access_mode": "RW", @@ -488,240 +340,115 @@ "values": [ { "value": 0, - "name": "Keep Control" + "name": "second" }, { "value": 1, - "name": "Turn Off The Control" - }, - { - "value": 2, - "name": "Switch The Embedded Temperature" + "name": "min" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temperature_source.lorawan_reception.timeout" - ] + "reference": [] }, { - "id": "temperature_source.d2d_reception.timeout", - "name": "Timeout", - "value": "10", - "unit": "min", + "id": "cooling_target_temperature", + "name": "CoolingTarget Temperature", + "value": "28", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "FLOAT", "range": [ - 1, - 60 + 5, + 35 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "cooling_target_temperature_range.celsius_max", + "name": "Celsius Max Value(Cooling Target Temperature Regulation Range)", + "value": "35", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "temperature_source.d2d_reception.timeout_response" + "cooling_target_temperature_range.min" ] }, { - "id": "temperature_source.d2d_reception.timeout_response", - "name": "Device Offline Settings", - "value": "0", - "unit": "", + "id": "cooling_target_temperature_range.celsius_min", + "name": "Celsius Min Value(Cooling Target Temperature Regulation Range)", + "value": "23", + "unit": "°C", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Keep Control" - }, - { - "value": 1, - "name": "Turn Off The Control" - }, - { - "value": 2, - "name": "Switch The Embedded Temperature" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "temperature_source.d2d_reception.timeout" + "cooling_target_temperature_range.max" ] }, { - "id": "system_status", - "name": "System On/Off", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Off" - }, - { - "value": 1, - "name": "On" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "mode_enable", - "name": "Mode Enable", - "value": "7", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 7, - "name": "Ventilation、Heat、Cool" - }, - { - "value": 3, - "name": "Ventilation、Heat" - }, - { - "value": 5, - "name": "Ventilation、Cool" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "temperature_control_mode", - "name": "Temperature Control Mode", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "Ventilation" - }, - { - "value": 1, - "name": "Heat" - }, - { - "value": 2, - "name": "Cool" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "target_temperature_resolution", - "name": "Target Temperature Resolution", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "0.5" - }, - { - "value": 1, - "name": "1" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "heating_target_temperature", - "name": "Heating Target Temperature", - "value": "17", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 5, - 35 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" - }, - { - "id": "cooling_target_temperature", - "name": "CoolingTarget Temperature", - "value": "28", - "unit": "℃", + "id": "cooling_target_temperature_range.fahrenheit_max", + "name": "Fahrenheit Max Value(Cooling Target Temperature Regulation Range)", + "value": "95", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 5, - 35 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" - }, - { - "id": "target_temperature_tolerance", - "name": "Target Temperature Tolerance", - "value": "1", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 0.1, - 5 + 41, + 95 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "cooling_target_temperature_range.min" + ] }, { - "id": "heating_target_temperature_range.min", - "name": "Min Value", - "value": "10", - "unit": "℃", + "id": "cooling_target_temperature_range.fahrenheit_min", + "name": "Fahrenheit Min Value(Cooling Target Temperature Regulation Range)", + "value": "73.4", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 5, - 35 + 41, + 95 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "heating_target_temperature_range.max" + "cooling_target_temperature_range.max" ] }, { - "id": "heating_target_temperature_range.max", - "name": "Max Value", - "value": "19", - "unit": "℃", + "id": "cooling_target_temperature_range.max", + "name": "Max Value(Cooling Target Temperature Regulation Range)", + "value": "35", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", @@ -733,14 +460,14 @@ "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "heating_target_temperature_range.min" + "cooling_target_temperature_range.min" ] }, { "id": "cooling_target_temperature_range.min", - "name": "Min Value", + "name": "Min Value(Cooling Target Temperature Regulation Range)", "value": "23", - "unit": "℃", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", @@ -756,65 +483,8 @@ ] }, { - "id": "cooling_target_temperature_range.max", - "name": "Max Value", - "value": "35", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 5, - 35 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "cooling_target_temperature_range.min" - ] - }, - { - "id": "target_humidity_range.min", - "name": "Min Value", - "value": "40", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "target_humidity_range.max" - ] - }, - { - "id": "target_humidity_range.max", - "name": "Max Value", - "value": "80", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "target_humidity_range.min" - ] - }, - { - "id": "temperature_control_dehumidification.enable", - "name": "Temp. Control and Dehumidify", + "id": "d2d_master_enable", + "name": "D2D Controller Enable", "value": "0", "unit": "", "access_mode": "RW", @@ -832,63 +502,33 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temperature_control_dehumidification.temperature_tolerance" - ] - }, - { - "id": "temperature_control_dehumidification.temperature_tolerance", - "name": "Temp. Tolerance for Dehumidification", - "value": "1", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 0.1, - 5 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "temperature_control_dehumidification.enable" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "fan_control_mode", - "name": "Fan Mode", + "id": "d2d_pairing_enable", + "name": "D2D Pairing Enable", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Auto" + "name": "disable" }, { "value": 1, - "name": "Low" - }, - { - "value": 2, - "name": "Medium" - }, - { - "value": 3, - "name": "High" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "fan_delay_close.enable", - "name": "Fan Delay Enable", + "id": "d2d_slave_enable", + "name": "D2D Agent Enable", "value": "0", "unit": "", "access_mode": "RW", @@ -906,145 +546,69 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "fan_delay_close.time" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "fan_delay_close.time", - "name": "The Duration of Delay", - "value": "60", - "unit": "s", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "range": [ - 30, - 3600 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": [ - "fan_delay_close.enable" - ] - }, - { - "id": "fan_auto_mode_temperature_range.speed_range_1", - "name": "ΔT1", - "value": "3", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 1, - 15 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "fan_auto_mode_temperature_range.speed_range_2" - ] - }, - { - "id": "fan_auto_mode_temperature_range.speed_range_2", - "name": "ΔT2", - "value": "5", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 1, - 15 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "fan_auto_mode_temperature_range.speed_range_1" - ] - }, - { - "id": "timed_system_control.enable", - "name": "Timer Switch Enable", + "id": "data_source", + "name": "Data Source", "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "Internal" }, { "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [] - }, - { - "id": "intelligent_display_enable", - "name": "Smart Display", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "name": "External NTC" + }, { - "value": 0, - "name": "disable" + "value": 2, + "name": "LoRaWAN Reception" }, { - "value": 1, - "name": "enable" + "value": 3, + "name": "D2D Reception" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "screen_object_settings.enable", - "name": "Screen Display", - "value": "1", - "unit": "", + "id": "daylight_saving_time.daylight_saving_time_offset", + "name": "DST Bias(Daylight Saving Time)", + "value": "60", + "unit": "min", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } + "range": [ + 1, + 120 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", "reference": [ - "screen_object_settings.environmental_temperature", - "screen_object_settings.environmental_humidity", - "screen_object_settings.target_temperature", - "screen_object_settings.schedule_name" + "daylight_saving_time.enable", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "screen_object_settings.environmental_temperature", - "name": "Ambient Temperature", - "value": "1", + "id": "daylight_saving_time.enable", + "name": "Daylight Saving Time(Daylight Saving Time)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", @@ -1063,639 +627,2526 @@ "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "screen_object_settings.enable", - "screen_object_settings.environmental_humidity", - "screen_object_settings.target_temperature", - "screen_object_settings.schedule_name" + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "screen_object_settings.environmental_humidity", - "name": "Ambient Humidity", - "value": "1", - "unit": "", + "id": "daylight_saving_time.end_hour_min", + "name": "Time(Daylight Saving Time)", + "value": "0", + "unit": "min", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", + "data_type": "ENUM", + "value_type": "UINT16", "values": [ { "value": 0, - "name": "disable" + "name": "00:00" }, { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "screen_object_settings.enable", - "screen_object_settings.environmental_temperature", - "screen_object_settings.target_temperature", - "screen_object_settings.schedule_name" - ] - }, - { - "id": "screen_object_settings.target_temperature", - "name": "Target Temperature", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "value": 60, + "name": "01:00" + }, { - "value": 0, - "name": "disable" + "value": 120, + "name": "02:00" }, { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "screen_object_settings.enable", - "screen_object_settings.environmental_temperature", - "screen_object_settings.environmental_humidity", - "screen_object_settings.schedule_name" - ] - }, - { - "id": "screen_object_settings.schedule_name", - "name": "Schedule", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "value": 180, + "name": "03:00" + }, { - "value": 0, - "name": "disable" + "value": 240, + "name": "04:00" }, { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "screen_object_settings.enable", - "screen_object_settings.environmental_temperature", - "screen_object_settings.environmental_humidity", - "screen_object_settings.target_temperature" - ] - }, - { - "id": "child_lock.enable", - "name": "Child Lock Enable", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "value": 300, + "name": "05:00" + }, { - "value": 0, - "name": "disable" + "value": 360, + "name": "06:00" }, { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "child_lock.system_button", - "child_lock.temperature_button", - "child_lock.fan_button", - "child_lock.temperature_control_button", - "child_lock.reboot_reset_button" - ] - }, - { - "id": "child_lock.system_button", - "name": "System On/Off", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "value": 420, + "name": "07:00" + }, { - "value": 0, - "name": "disable" + "value": 480, + "name": "08:00" }, { - "value": 1, - "name": "enable" + "value": 540, + "name": "09:00" + }, + { + "value": 600, + "name": "10:00" + }, + { + "value": 660, + "name": "11:00" + }, + { + "value": 720, + "name": "12:00" + }, + { + "value": 780, + "name": "13:00" + }, + { + "value": 840, + "name": "14:00" + }, + { + "value": 900, + "name": "15:00" + }, + { + "value": 960, + "name": "16:00" + }, + { + "value": 1020, + "name": "17:00" + }, + { + "value": 1080, + "name": "18:00" + }, + { + "value": 1140, + "name": "19:00" + }, + { + "value": 1200, + "name": "20:00" + }, + { + "value": 1260, + "name": "21:00" + }, + { + "value": 1320, + "name": "22:00" + }, + { + "value": 1380, + "name": "23:00" } ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", "reference": [ - "child_lock.enable", - "child_lock.temperature_button", - "child_lock.fan_button", - "child_lock.temperature_control_button", - "child_lock.reboot_reset_button" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day" ] }, { - "id": "child_lock.temperature_button", - "name": "Temperature + /-", + "id": "daylight_saving_time.end_month", + "name": "Month(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "Jan." }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "Feb." + }, + { + "value": 3, + "name": "Mar." + }, + { + "value": 4, + "name": "Apr." + }, + { + "value": 5, + "name": "May" + }, + { + "value": 6, + "name": "Jun." + }, + { + "value": 7, + "name": "Jul." + }, + { + "value": 8, + "name": "Aug." + }, + { + "value": 9, + "name": "Sep." + }, + { + "value": 10, + "name": "Oct." + }, + { + "value": 11, + "name": "Nov." + }, + { + "value": 12, + "name": "Dec." } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "child_lock.enable", - "child_lock.system_button", - "child_lock.fan_button", - "child_lock.temperature_control_button", - "child_lock.reboot_reset_button" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "child_lock.fan_button", - "name": "Fan Mode", - "value": "1", + "id": "daylight_saving_time.end_week_day", + "name": "Week(Daylight Saving Time)", + "value": "7", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "Mon." }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "Tues." + }, + { + "value": 3, + "name": "Wed." + }, + { + "value": 4, + "name": "Thurs." + }, + { + "value": 5, + "name": "Fri." + }, + { + "value": 6, + "name": "Sat." + }, + { + "value": 7, + "name": "Sun." } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "child_lock.enable", - "child_lock.system_button", - "child_lock.temperature_button", - "child_lock.temperature_control_button", - "child_lock.reboot_reset_button" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_hour_min" ] }, { - "id": "child_lock.temperature_control_button", - "name": "Temperature Control Mode", + "id": "daylight_saving_time.end_week_num", + "name": "Number of Week(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "1st" }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "2nd" + }, + { + "value": 3, + "name": "3rd" + }, + { + "value": 4, + "name": "4th" + }, + { + "value": 5, + "name": "last" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "child_lock.enable", - "child_lock.system_button", - "child_lock.temperature_button", - "child_lock.fan_button", - "child_lock.reboot_reset_button" + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" ] }, { - "id": "child_lock.reboot_reset_button", - "name": "Reboot&Reset", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "id": "daylight_saving_time.start_hour_min", + "name": "Time(Daylight Saving Time)", + "value": "0", + "unit": "min", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT16", + "values": [ + { + "value": 0, + "name": "00:00" + }, + { + "value": 60, + "name": "01:00" + }, + { + "value": 120, + "name": "02:00" + }, + { + "value": 180, + "name": "03:00" + }, + { + "value": 240, + "name": "04:00" + }, + { + "value": 300, + "name": "05:00" + }, + { + "value": 360, + "name": "06:00" + }, + { + "value": 420, + "name": "07:00" + }, + { + "value": 480, + "name": "08:00" + }, + { + "value": 540, + "name": "09:00" + }, + { + "value": 600, + "name": "10:00" + }, + { + "value": 660, + "name": "11:00" + }, + { + "value": 720, + "name": "12:00" + }, + { + "value": 780, + "name": "13:00" + }, + { + "value": 840, + "name": "14:00" + }, + { + "value": 900, + "name": "15:00" + }, + { + "value": 960, + "name": "16:00" + }, + { + "value": 1020, + "name": "17:00" + }, + { + "value": 1080, + "name": "18:00" + }, + { + "value": 1140, + "name": "19:00" + }, + { + "value": 1200, + "name": "20:00" + }, + { + "value": 1260, + "name": "21:00" + }, + { + "value": 1320, + "name": "22:00" + }, + { + "value": 1380, + "name": "23:00" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.start_month", + "name": "Month(Daylight Saving Time)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "Jan." + }, + { + "value": 2, + "name": "Feb." + }, + { + "value": 3, + "name": "Mar." + }, + { + "value": 4, + "name": "Apr." + }, + { + "value": 5, + "name": "May" + }, + { + "value": 6, + "name": "Jun." + }, + { + "value": 7, + "name": "Jul." + }, + { + "value": 8, + "name": "Aug." + }, + { + "value": 9, + "name": "Sep." + }, + { + "value": 10, + "name": "Oct." + }, + { + "value": 11, + "name": "Nov." + }, + { + "value": 12, + "name": "Dec." + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.start_week_day", + "name": "Week(Daylight Saving Time)", + "value": "7", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "Mon." + }, + { + "value": 2, + "name": "Tues." + }, + { + "value": 3, + "name": "Wed." + }, + { + "value": 4, + "name": "Thurs." + }, + { + "value": 5, + "name": "Fri." + }, + { + "value": 6, + "name": "Sat." + }, + { + "value": 7, + "name": "Sun." + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "daylight_saving_time.start_week_num", + "name": "Number of Week(Daylight Saving Time)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "1st" + }, + { + "value": 2, + "name": "2nd" + }, + { + "value": 3, + "name": "3rd" + }, + { + "value": 4, + "name": "4th" + }, + { + "value": 5, + "name": "last" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "delete_schedule.type", + "name": "Delete Schedule(Delete Schedule List)", + "value": "255", + "unit": "", + "access_mode": "W", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Schedule1" + }, + { + "value": 1, + "name": "Schedule2" + }, + { + "value": 2, + "name": "Schedule3" + }, + { + "value": 3, + "name": "Schedule4" + }, + { + "value": 4, + "name": "Schedule5" + }, + { + "value": 5, + "name": "Schedule6" + }, + { + "value": 6, + "name": "Schedule7" + }, + { + "value": 7, + "name": "Schedule8" + }, + { + "value": 255, + "name": "Reset All" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "device_status", + "name": "Device Status", + "value": "1", + "unit": "", + "access_mode": "R", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Off" + }, + { + "value": 1, + "name": "On" + } + ], + "bacnet_type": "binary_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "di_enable", + "name": "DI Enable", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "di_settings.card_control.insertion_plan.trigger_by_extraction", + "name": "Remove Card(Insert Schedule)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Schedule1" + }, + { + "value": 1, + "name": "Schedule2" + }, + { + "value": 2, + "name": "Schedule3" + }, + { + "value": 3, + "name": "Schedule4" + }, + { + "value": 4, + "name": "Schedule5" + }, + { + "value": 5, + "name": "Schedule6" + }, + { + "value": 6, + "name": "Schedule7" + }, + { + "value": 7, + "name": "Schedule8" + }, + { + "value": 255, + "name": "None" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "di_settings.card_control.insertion_plan.trigger_by_insertion" + ] + }, + { + "id": "di_settings.card_control.insertion_plan.trigger_by_insertion", + "name": "Insert Card(Insert Schedule)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Schedule1" + }, + { + "value": 1, + "name": "Schedule2" + }, + { + "value": 2, + "name": "Schedule3" + }, + { + "value": 3, + "name": "Schedule4" + }, + { + "value": 4, + "name": "Schedule5" + }, + { + "value": 5, + "name": "Schedule6" + }, + { + "value": 6, + "name": "Schedule7" + }, + { + "value": 7, + "name": "Schedule8" + }, + { + "value": 255, + "name": "None" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "di_settings.card_control.insertion_plan.trigger_by_extraction" + ] + }, + { + "id": "di_settings.card_control.system_control.trigger_by_insertion", + "name": "Insert Card(System Control)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "system off" + }, + { + "value": 1, + "name": "system on" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "di_settings.card_control.type", + "name": "Control Object(Room Card)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "System Control" + }, + { + "value": 1, + "name": "Insert Schedule" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "di_settings.magnet_detection.magnet_type", + "name": "Sensor Type(Magnetic Contact Switch)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "NO" + }, + { + "value": 1, + "name": "NC" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "di_settings.object", + "name": "DI Interface(DI Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Room Card" + }, + { + "value": 0, + "name": "System Control" + }, + { + "value": 1, + "name": "Insert Schedule" + }, + { + "value": 1, + "name": "Magnetic Contact Switch" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "execution_plan_id", + "name": "Schedule", + "value": "255", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Schedule1" + }, + { + "value": 1, + "name": "Schedule2" + }, + { + "value": 2, + "name": "Schedule3" + }, + { + "value": 3, + "name": "Schedule4" + }, + { + "value": 4, + "name": "Schedule5" + }, + { + "value": 5, + "name": "Schedule6" + }, + { + "value": 6, + "name": "Schedule7" + }, + { + "value": 7, + "name": "Schedule8" + }, + { + "value": 8, + "name": "Schedule9" + }, + { + "value": 9, + "name": "Schedule10" + }, + { + "value": 10, + "name": "Schedule11" + }, + { + "value": 11, + "name": "Schedule12" + }, + { + "value": 12, + "name": "Schedule13" + }, + { + "value": 13, + "name": "Schedule14" + }, + { + "value": 14, + "name": "Schedule15" + }, + { + "value": 15, + "name": "Schedule16" + }, + { + "value": 255, + "name": "Not executed" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "fahrenheit_cooling_target_temperature", + "name": "Fahrenheit CoolingTarget Temperature", + "value": "82.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_heating_target_temperature", + "name": "Fahrenheit Heating Target Temperature", + "value": "62.6", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_target_temperature", + "name": "Fahrenheit Target Temperature", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_target_temperature_tolerance", + "name": "Fahrenheit Target Temperature Tolerance", + "value": "33.8", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 32, + 41 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_temperature", + "name": "Fahrenheit Temperature", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fan_auto_mode_temperature_range.celsius_speed_range_1", + "name": "Celsius ΔT1(Auto Fan Speed Control Delta Settings)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 15 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_2" + ] + }, + { + "id": "fan_auto_mode_temperature_range.celsius_speed_range_2", + "name": "Celsius ΔT2(Auto Fan Speed Control Delta Settings)", + "value": "5", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 15 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_1" + ] + }, + { + "id": "fan_auto_mode_temperature_range.fahrenheit_speed_range_1", + "name": "Fahrenheit ΔT1(Auto Fan Speed Control Delta Settings)", + "value": "37.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 59 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_2" + ] + }, + { + "id": "fan_auto_mode_temperature_range.fahrenheit_speed_range_2", + "name": "Fahrenheit ΔT2(Auto Fan Speed Control Delta Settings)", + "value": "41", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 59 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_1" + ] + }, + { + "id": "fan_auto_mode_temperature_range.speed_range_1", + "name": "ΔT1(Auto Fan Speed Control Delta Settings)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 15 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_2" + ] + }, + { + "id": "fan_auto_mode_temperature_range.speed_range_2", + "name": "ΔT2(Auto Fan Speed Control Delta Settings)", + "value": "5", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 15 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "fan_auto_mode_temperature_range.speed_range_1" + ] + }, + { + "id": "fan_control_info.mode", + "name": "Fan Mode(Fan Status)", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Auto" + }, + { + "value": 1, + "name": "Low" + }, + { + "value": 2, + "name": "Medium" + }, + { + "value": 3, + "name": "High" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "fan_control_info.status" + ] + }, + { + "id": "fan_control_info.status", + "name": "Fan Status(Fan Status)", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Off" + }, + { + "value": 1, + "name": "Low" + }, + { + "value": 2, + "name": "Medium" + }, + { + "value": 3, + "name": "High" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "fan_control_info.mode" + ] + }, + { + "id": "fan_control_mode", + "name": "Fan Mode", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Auto" + }, + { + "value": 1, + "name": "Low" + }, + { + "value": 2, + "name": "Medium" + }, + { + "value": 3, + "name": "High" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "fan_delay_close.enable", + "name": "Fan Delay Enable(Fan Delay)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "fan_delay_close.time" + ] + }, + { + "id": "fan_delay_close.time", + "name": "The Duration of Delay(Fan Delay)", + "value": "60", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 30, + 3600 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "fan_delay_close.enable" + ] + }, + { + "id": "fan_ec_control_settings.high_threshold", + "name": "High Speed(EC Fan Speed Settings)", + "value": "100", + "unit": "%", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 1, + 100 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [] + }, + { + "id": "fan_ec_control_settings.low_threshold", + "name": "Low Speed(EC Fan Speed Settings)", + "value": "50", + "unit": "%", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 1, + 100 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [] + }, + { + "id": "fan_ec_control_settings.mid_threshold", + "name": "Medium Speed(EC Fan Speed Settings)", + "value": "80", + "unit": "%", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 1, + 100 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [] + }, + { + "id": "fan_ec_control_settings.type", + "name": "Control Content(EC Fan Speed Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Low Speed" + }, + { + "value": 1, + "name": "Medium Speed" + }, + { + "value": 2, + "name": "High Speed" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "fan_stop_enable", + "name": "Fan Stop Settings", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "freeze_protection_settings.celsius_target_temperature", + "name": "Celsius Protection Temperature(Freeze Protection)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 5 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "freeze_protection_settings.enable" + ] + }, + { + "id": "freeze_protection_settings.enable", + "name": "Freeze Protection(Freeze Protection)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "freeze_protection_settings.target_temperature" + ] + }, + { + "id": "freeze_protection_settings.fahrenheit_target_temperature", + "name": "Fahrenheit Protection Temperature(Freeze Protection)", + "value": "37.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 41 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "freeze_protection_settings.enable" + ] + }, + { + "id": "freeze_protection_settings.target_temperature", + "name": "Protection Temperature(Freeze Protection)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 5 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "freeze_protection_settings.enable" + ] + }, + { + "id": "heating_target_temperature", + "name": "Heating Target Temperature", + "value": "17", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "heating_target_temperature_range.celsius_max", + "name": "Celsius Max Value(Heating Target Temperature Regulation Range)", + "value": "19", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "heating_target_temperature_range.min" + ] + }, + { + "id": "heating_target_temperature_range.celsius_min", + "name": "Celsius Min Value(Heating Target Temperature Regulation Range)", + "value": "10", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "heating_target_temperature_range.max" + ] + }, + { + "id": "heating_target_temperature_range.fahrenheit_max", + "name": "Fahrenheit Max Value(Heating Target Temperature Regulation Range)", + "value": "66.2", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "heating_target_temperature_range.min" + ] + }, + { + "id": "heating_target_temperature_range.fahrenheit_min", + "name": "Fahrenheit Min Value(Heating Target Temperature Regulation Range)", + "value": "50", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "heating_target_temperature_range.max" + ] + }, + { + "id": "heating_target_temperature_range.max", + "name": "Max Value(Heating Target Temperature Regulation Range)", + "value": "19", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "heating_target_temperature_range.min" + ] + }, + { + "id": "heating_target_temperature_range.min", + "name": "Min Value(Heating Target Temperature Regulation Range)", + "value": "10", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "heating_target_temperature_range.max" + ] + }, + { + "id": "high_temperature_alarm_settings.celsius_difference_in_temperature", + "name": "Celsius Difference in Temperature(Persistent High Temperature Alarm Settings)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 10 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "high_temperature_alarm_settings.enable", + "high_temperature_alarm_settings.duration" + ] + }, + { + "id": "high_temperature_alarm_settings.difference_in_temperature", + "name": "Difference in Temperature(Persistent High Temperature Alarm Settings)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 10 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "high_temperature_alarm_settings.enable", + "high_temperature_alarm_settings.duration" + ] + }, + { + "id": "high_temperature_alarm_settings.duration", + "name": "Duration(Persistent High Temperature Alarm Settings)", + "value": "5", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 0, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "high_temperature_alarm_settings.enable", + "high_temperature_alarm_settings.difference_in_temperature" + ] + }, + { + "id": "high_temperature_alarm_settings.enable", + "name": "Persistent High Temperature(Persistent High Temperature Alarm Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "high_temperature_alarm_settings.difference_in_temperature", + "high_temperature_alarm_settings.duration" + ] + }, + { + "id": "high_temperature_alarm_settings.fahrenheit_difference_in_temperature", + "name": "Fahrenheit Difference in Temperature(Persistent High Temperature Alarm Settings)", + "value": "37.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 50 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "high_temperature_alarm_settings.enable", + "high_temperature_alarm_settings.duration" + ] + }, + { + "id": "humidity", + "name": "Humidity", + "value": "", + "unit": "%", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 100 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT" + }, + { + "id": "humidity_alarm.type", + "name": "Alarm Type(Humidity Alarm)", + "value": "", + "unit": "", + "access_mode": "R", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Collection Error" + }, + { + "value": 1, + "name": "Exceed the Range Lower Limit" + }, + { + "value": 2, + "name": "Exceed the Range Upper Limit" + }, + { + "value": 3, + "name": "No Data" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "humidity_calibration_settings.calibration_value", + "name": "Calibration Value(Humidity Calibration Settings)", + "value": "0", + "unit": "%", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -100, + 100 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [ + "humidity_calibration_settings.enable" + ] + }, + { + "id": "humidity_calibration_settings.enable", + "name": "Humidity Calibration(Humidity Calibration Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "humidity_calibration_settings.calibration_value" + ] + }, + { + "id": "insert_schedule.type", + "name": "Event Control(Event Control)", + "value": "0", + "unit": "", + "access_mode": "W", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Schedule1" + }, + { + "value": 1, + "name": "Schedule2" + }, + { + "value": 2, + "name": "Schedule3" + }, + { + "value": 3, + "name": "Schedule4" + }, + { + "value": 4, + "name": "Schedule5" + }, + { + "value": 5, + "name": "Schedule6" + }, + { + "value": 6, + "name": "Schedule7" + }, + { + "value": 7, + "name": "Schedule8" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "intelligent_display_enable", + "name": "Smart Display", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "interface_settings.object", + "name": "System Type(Interface Settings)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Four-pipe, 0~10V Valve+Three-speeds Fan" + }, + { + "value": 1, + "name": "Two-pipe, 0~10V Valve+Three-speeds Fan" + }, + { + "value": 2, + "name": "Two-pipe, 0~10V Valve+EC Fan" + }, + { + "value": 3, + "name": "Four-pipe,Two-wire Valve+EC Fan" + }, + { + "value": 4, + "name": "Two-pipe, Two-wire Valve+EC Fan" + }, + { + "value": 5, + "name": "Two-pipe, Three-wire Valve+EC Fan" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "interface_settings.valve_2_pipe_10_v_fan_ec.control", + "name": "Valve(Two-pipe, 0~10V Valve+EC Fan)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "AO1" + }, + { + "value": 2, + "name": "AO2" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "interface_settings.valve_2_pipe_10_v_fan_ec.fan", + "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power" + ] + }, + { + "id": "interface_settings.valve_2_pipe_10_v_fan_ec.fan", + "name": "EC Fan(Two-pipe, 0~10V Valve+EC Fan)", + "value": "2", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "AO1" + }, + { + "value": 2, + "name": "AO2" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "interface_settings.valve_2_pipe_10_v_fan_ec.control", + "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power" + ] + }, + { + "id": "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power", + "name": "Fan Power WIre(Two-pipe, 0~10V Valve+EC Fan)", + "value": "5", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "None" + }, + { + "value": 3, + "name": "Q1" + }, + { + "value": 4, + "name": "Q2" + }, + { + "value": 5, + "name": "Q3" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "interface_settings.valve_2_pipe_10_v_fan_ec.control", + "interface_settings.valve_2_pipe_10_v_fan_ec.fan" + ] + }, + { + "id": "interface_settings.valve_2_pipe_10_v.control", + "name": "Valve(Two-pipe, 0~10V Valve+Three-speeds Fan)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "AO1" + }, + { + "value": 2, + "name": "AO2" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "interface_settings.valve_2_pipe_2_wire_fan_ec.control", + "name": "Valve(Two-pipe, Two-wire Valve+EC Fan)", + "value": "3", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 3, + "name": "Q1" + }, + { + "value": 4, + "name": "Q2" + }, + { + "value": 5, + "name": "Q3" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "interface_settings.valve_2_pipe_2_wire_fan_ec.fan", + "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power" + ] + }, + { + "id": "interface_settings.valve_2_pipe_2_wire_fan_ec.fan", + "name": "EC Fan(Two-pipe, Two-wire Valve+EC Fan)", + "value": "2", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "AO1" }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "AO2" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "child_lock.enable", - "child_lock.system_button", - "child_lock.temperature_button", - "child_lock.fan_button", - "child_lock.temperature_control_button" + "interface_settings.valve_2_pipe_2_wire_fan_ec.control", + "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power" ] }, { - "id": "temporary_unlock_settings.enable", - "name": "Unlock Function Enable", - "value": "0", + "id": "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power", + "name": "Fan Power WIre(Two-pipe, Two-wire Valve+EC Fan)", + "value": "5", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "None" + }, + { + "value": 3, + "name": "Q1" + }, + { + "value": 4, + "name": "Q2" }, + { + "value": 5, + "name": "Q3" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "interface_settings.valve_2_pipe_2_wire_fan_ec.control", + "interface_settings.valve_2_pipe_2_wire_fan_ec.fan" + ] + }, + { + "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", + "name": "EC Fan(Two-pipe, Three-wire Valve+EC Fan)", + "value": "2", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ { "value": 1, - "name": "enable" + "name": "AO1" + }, + { + "value": 2, + "name": "AO2" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" + "interface_settings.valve_2_pipe_3_wire_fan_ec.no", + "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", + "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" ] }, { - "id": "temporary_unlock_settings.system", - "name": "System On/Off", - "value": "0", + "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power", + "name": "Fan Power WIre(Two-pipe, Three-wire Valve+EC Fan)", + "value": "5", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "None" }, { - "value": 1, - "name": "enable" + "value": 3, + "name": "Q1" + }, + { + "value": 4, + "name": "Q2" + }, + { + "value": 5, + "name": "Q3" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" + "interface_settings.valve_2_pipe_3_wire_fan_ec.no", + "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", + "interface_settings.valve_2_pipe_3_wire_fan_ec.fan" ] }, { - "id": "temporary_unlock_settings.temperature_up", - "name": "Temperature +", - "value": "0", + "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", + "name": "NC(Two-pipe, Three-wire Valve+EC Fan)", + "value": "4", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 3, + "name": "Q1" + }, + { + "value": 4, + "name": "Q2" + }, + { + "value": 5, + "name": "Q3" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "interface_settings.valve_2_pipe_3_wire_fan_ec.no", + "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", + "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" + ] + }, + { + "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.no", + "name": "NO(Two-pipe, Three-wire Valve+EC Fan)", + "value": "3", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 3, + "name": "Q1" + }, + { + "value": 4, + "name": "Q2" }, + { + "value": 5, + "name": "Q3" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", + "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", + "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" + ] + }, + { + "id": "interface_settings.valve_4_pipe_10_v.cooling", + "name": "Cooling Valve(Four-pipe, 0~10V Valve+Three-speeds Fan)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ { "value": 1, - "name": "enable" + "name": "AO1" + }, + { + "value": 2, + "name": "AO2" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" + "interface_settings.valve_4_pipe_10_v.heating" ] }, { - "id": "temporary_unlock_settings.temperature_down", - "name": "Temperature -", - "value": "0", + "id": "interface_settings.valve_4_pipe_10_v.heating", + "name": "Heating Valve(Four-pipe, 0~10V Valve+Three-speeds Fan)", + "value": "2", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 1, + "name": "AO1" + }, + { + "value": 2, + "name": "AO2" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "interface_settings.valve_4_pipe_10_v.cooling" + ] + }, + { + "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", + "name": "Cooling Valve(Four-pipe,Two-wire Valve+EC Fan)", + "value": "3", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 3, + "name": "Q1" + }, + { + "value": 4, + "name": "Q2" + }, + { + "value": 5, + "name": "Q3" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", + "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", + "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power" + ] + }, + { + "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", + "name": "EC Fan(Four-pipe,Two-wire Valve+EC Fan)", + "value": "2", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 1, + "name": "AO1" }, { - "value": 1, - "name": "enable" + "value": 2, + "name": "AO2" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" + "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", + "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", + "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power" ] }, { - "id": "temporary_unlock_settings.fan", - "name": "Fan Mode", - "value": "0", + "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power", + "name": "Fan Power WIre(Four-pipe,Two-wire Valve+EC Fan)", + "value": "5", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "None" }, { - "value": 1, - "name": "enable" + "value": 3, + "name": "Q1" + }, + { + "value": 4, + "name": "Q2" + }, + { + "value": 5, + "name": "Q3" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.temperature_control", - "temporary_unlock_settings.unlocking_duration" + "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", + "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", + "interface_settings.valve_4_pipe_2_wire_fan_ec.fan" ] }, { - "id": "temporary_unlock_settings.temperature_control", - "name": "Temperature Control Mode", - "value": "0", + "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", + "name": "Heating Valve(Four-pipe,Two-wire Valve+EC Fan)", + "value": "4", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 3, + "name": "Q1" }, { - "value": 1, - "name": "enable" + "value": 4, + "name": "Q2" + }, + { + "value": 5, + "name": "Q3" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.unlocking_duration" - ] - }, - { - "id": "temporary_unlock_settings.unlocking_duration", - "name": "Unlocking Time", - "value": "30", - "unit": "s", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "range": [ - 1, - 3600 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": [ - "temporary_unlock_settings.enable", - "temporary_unlock_settings.system", - "temporary_unlock_settings.temperature_up", - "temporary_unlock_settings.temperature_down", - "temporary_unlock_settings.fan", - "temporary_unlock_settings.temperature_control" + "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", + "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", + "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power" ] }, { - "id": "time_zone", - "name": "Time Zone", + "id": "lorawan_configuration_settings.mode", + "name": "LoRaWAN Work Mode(LoRaWAN Settings)", "value": "0", - "unit": "min", + "unit": "", "access_mode": "RW", "data_type": "ENUM", - "value_type": "INT16", + "value_type": "UINT8", "values": [ - { - "value": -720, - "name": "UTC-12(IDLW)" - }, - { - "value": -660, - "name": "UTC-11(SST)" - }, - { - "value": -600, - "name": "UTC-10(HST)" - }, - { - "value": -570, - "name": "UTC-9:30(MIT)" - }, - { - "value": -540, - "name": "UTC-9(AKST)" - }, - { - "value": -480, - "name": "UTC-8(PST)" - }, - { - "value": -420, - "name": "UTC-7(MST)" - }, - { - "value": -360, - "name": "UTC-6(CST)" - }, - { - "value": -300, - "name": "UTC-5(EST)" - }, - { - "value": -240, - "name": "UTC-4(AST)" - }, - { - "value": -210, - "name": "UTC-3:30(NST)" - }, - { - "value": -180, - "name": "UTC-3(BRT)" - }, - { - "value": -120, - "name": "UTC-2(FNT)" - }, - { - "value": -60, - "name": "UTC-1(CVT)" - }, { "value": 0, - "name": "UTC(WET)" - }, - { - "value": 60, - "name": "UTC+1(CET)" - }, - { - "value": 120, - "name": "UTC+2(EET)" - }, - { - "value": 180, - "name": "UTC+3(MSK)" - }, - { - "value": 210, - "name": "UTC+3:30(IRST)" - }, - { - "value": 240, - "name": "UTC+4(GST)" - }, - { - "value": 270, - "name": "UTC+4:30(AFT)" + "name": "ClassA" }, { - "value": 300, - "name": "UTC+5(PKT)" - }, - { - "value": 330, - "name": "UTC+5:30(IST)" - }, - { - "value": 345, - "name": "UTC+5:45(NPT)" - }, - { - "value": 360, - "name": "UTC+6(BHT)" - }, - { - "value": 390, - "name": "UTC+6:30(MMT)" - }, - { - "value": 420, - "name": "UTC+7(ICT)" - }, - { - "value": 480, - "name": "UTC+8(CT/CST)" - }, - { - "value": 540, - "name": "UTC+9(JST)" - }, - { - "value": 570, - "name": "UTC+9:30(ACST)" - }, - { - "value": 600, - "name": "UTC+10(AEST)" - }, - { - "value": 630, - "name": "UTC+10:30(LHST)" - }, - { - "value": 660, - "name": "UTC+11(VUT)" - }, - { - "value": 720, - "name": "UTC+12(NZST)" - }, - { - "value": 765, - "name": "UTC+12:45(CHAST)" + "value": 1, + "name": "ClassB" }, { - "value": 780, - "name": "UTC+13(PHOT)" + "value": 2, + "name": "ClassC" }, { - "value": 840, - "name": "UTC+14(LINT)" + "value": 3, + "name": "ClassC to B" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "low_temperature_alarm_settings.celsius_difference_in_temperature", + "name": "Celsius Difference in Temperature(Persistent Low Temperature Alarm Settings)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 10 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "low_temperature_alarm_settings.enable", + "low_temperature_alarm_settings.duration" + ] + }, + { + "id": "low_temperature_alarm_settings.difference_in_temperature", + "name": "Difference in Temperature(Persistent Low Temperature Alarm Settings)", + "value": "3", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 10 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "low_temperature_alarm_settings.enable", + "low_temperature_alarm_settings.duration" + ] + }, + { + "id": "low_temperature_alarm_settings.duration", + "name": "Duration(Persistent Low Temperature Alarm Settings)", + "value": "5", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 0, + 60 + ], + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES" + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "low_temperature_alarm_settings.enable", + "low_temperature_alarm_settings.difference_in_temperature" + ] }, { - "id": "daylight_saving_time.daylight_saving_time_enable", - "name": "Daylight Saving Time", + "id": "low_temperature_alarm_settings.enable", + "name": "Persistent Low Temperature(Persistent Low Temperature Alarm Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -1715,632 +3166,576 @@ "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "low_temperature_alarm_settings.difference_in_temperature", + "low_temperature_alarm_settings.duration" ] }, { - "id": "daylight_saving_time.daylight_saving_time_offset", - "name": "DST Bias", - "value": "60", - "unit": "min", + "id": "low_temperature_alarm_settings.fahrenheit_difference_in_temperature", + "name": "Fahrenheit Difference in Temperature(Persistent Low Temperature Alarm Settings)", + "value": "37.4", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "FLOAT", "range": [ - 1, - 120 + 33.8, + 50 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "low_temperature_alarm_settings.enable", + "low_temperature_alarm_settings.duration" ] }, { - "id": "daylight_saving_time.start_month", - "name": "Month", - "value": "1", + "id": "mode_enable", + "name": "Mode Enable", + "value": "7", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "Jan." - }, - { - "value": 2, - "name": "Feb." + "value": 7, + "name": "Ventilation、Heat、Cool" }, { "value": 3, - "name": "Mar." - }, - { - "value": 4, - "name": "Apr." + "name": "Ventilation、Heat" }, { "value": 5, - "name": "May" - }, + "name": "Ventilation、Cool" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "oem_id", + "name": "OEM ID", + "value": "", + "unit": "", + "access_mode": "RW", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "product_sn", + "name": "SN", + "value": "", + "unit": "", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 16, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "query_device_status", + "name": "Query Device Status", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ { - "value": 6, - "name": "Jun." + "value": 0, + "name": "no" }, { - "value": 7, - "name": "Jul." + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "reboot", + "name": "Reboot", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" }, { - "value": 8, - "name": "Aug." + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "reconnect", + "name": "Network Reconnection", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" }, { - "value": 9, - "name": "Sep." + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "relay_changes_report_enable", + "name": "Relay/Valve Change Report", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" }, { - "value": 10, - "name": "Oct." + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "relay_status.high_status", + "name": "Fan High(Relay/Valve Status )", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Open" }, { - "value": 11, - "name": "Nov." + "value": 1, + "name": "Close" + } + ], + "bacnet_type": "binary_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "relay_status.low_status", + "relay_status.mid_status", + "relay_status.valve_1_status", + "relay_status.valve_2_status", + "relay_status.reserved" + ] + }, + { + "id": "relay_status.low_status", + "name": "Fan Low(Relay/Valve Status )", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Open" }, { - "value": 12, - "name": "Dec." + "value": 1, + "name": "Close" + } + ], + "bacnet_type": "binary_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "relay_status.mid_status", + "relay_status.high_status", + "relay_status.valve_1_status", + "relay_status.valve_2_status", + "relay_status.reserved" + ] + }, + { + "id": "relay_status.mid_status", + "name": "Fan Medium(Relay/Valve Status )", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Open" + }, + { + "value": 1, + "name": "Close" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "relay_status.low_status", + "relay_status.high_status", + "relay_status.valve_1_status", + "relay_status.valve_2_status", + "relay_status.reserved" ] }, { - "id": "daylight_saving_time.start_week_num", - "name": "Number of Week", - "value": "1", + "id": "relay_status.reserved", + "name": "Reserved(Relay/Valve Status )", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "ENUM", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "relay_status.low_status", + "relay_status.mid_status", + "relay_status.high_status", + "relay_status.valve_1_status", + "relay_status.valve_2_status" + ], "values": [ { - "value": 1, - "name": "1st" - }, - { - "value": 2, - "name": "2nd" + "value": 0, + "name": "disable" }, { - "value": 3, - "name": "3rd" - }, + "value": 1, + "name": "enable" + } + ] + }, + { + "id": "relay_status.valve_1_status", + "name": "Valve 1(Relay/Valve Status )", + "value": "0", + "unit": "", + "access_mode": "R", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ { - "value": 4, - "name": "4th" + "value": 0, + "name": "Open" }, { - "value": 5, - "name": "last" + "value": 1, + "name": "Close" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "relay_status.low_status", + "relay_status.mid_status", + "relay_status.high_status", + "relay_status.valve_2_status", + "relay_status.reserved" ] }, { - "id": "daylight_saving_time.start_week_day", - "name": "Week", - "value": "7", + "id": "relay_status.valve_2_status", + "name": "Valve 2(Relay/Valve Status )", + "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "ENUM", + "access_mode": "R", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "Mon." - }, - { - "value": 2, - "name": "Tues." - }, - { - "value": 3, - "name": "Wed." - }, - { - "value": 4, - "name": "Thurs." - }, - { - "value": 5, - "name": "Fri." - }, - { - "value": 6, - "name": "Sat." + "value": 0, + "name": "Open" }, { - "value": 7, - "name": "Sun." + "value": 1, + "name": "Close" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "relay_status.low_status", + "relay_status.mid_status", + "relay_status.high_status", + "relay_status.valve_1_status", + "relay_status.reserved" ] }, { - "id": "daylight_saving_time.start_hour_min", - "name": "Time", - "value": "0", + "id": "reporting_interval.minutes_of_time", + "name": "Reporting Interval(Reporting Interval)", + "value": "10", "unit": "min", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 1440 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "reporting_interval.unit" + ] + }, + { + "id": "reporting_interval.seconds_of_time", + "name": "Reporting Interval(Reporting Interval)", + "value": "600", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", "value_type": "UINT16", + "range": [ + 10, + 64800 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "reporting_interval.unit" + ] + }, + { + "id": "reporting_interval.unit", + "name": "Reporting Interval Unit(Reporting Interval)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", "values": [ { "value": 0, - "name": "00:00" - }, - { - "value": 60, - "name": "01:00" - }, - { - "value": 120, - "name": "02:00" - }, - { - "value": 180, - "name": "03:00" - }, - { - "value": 240, - "name": "04:00" - }, - { - "value": 300, - "name": "05:00" - }, - { - "value": 360, - "name": "06:00" - }, - { - "value": 420, - "name": "07:00" - }, - { - "value": 480, - "name": "08:00" - }, - { - "value": 540, - "name": "09:00" - }, - { - "value": 600, - "name": "10:00" - }, - { - "value": 660, - "name": "11:00" - }, - { - "value": 720, - "name": "12:00" - }, - { - "value": 780, - "name": "13:00" - }, - { - "value": 840, - "name": "14:00" - }, - { - "value": 900, - "name": "15:00" - }, - { - "value": 960, - "name": "16:00" - }, - { - "value": 1020, - "name": "17:00" - }, - { - "value": 1080, - "name": "18:00" - }, - { - "value": 1140, - "name": "19:00" - }, - { - "value": 1200, - "name": "20:00" - }, - { - "value": 1260, - "name": "21:00" - }, - { - "value": 1320, - "name": "22:00" + "name": "second" }, { - "value": 1380, - "name": "23:00" + "value": 1, + "name": "min" } ], "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "reset", + "name": "Reset", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } ] }, { - "id": "daylight_saving_time.end_month", - "name": "Month", + "id": "screen_object_settings.enable", + "name": "Screen Display(Screen Display Settings)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "Jan." - }, - { - "value": 2, - "name": "Feb." - }, - { - "value": 3, - "name": "Mar." - }, - { - "value": 4, - "name": "Apr." - }, - { - "value": 5, - "name": "May" - }, - { - "value": 6, - "name": "Jun." - }, - { - "value": 7, - "name": "Jul." - }, - { - "value": 8, - "name": "Aug." - }, - { - "value": 9, - "name": "Sep." - }, - { - "value": 10, - "name": "Oct." - }, - { - "value": 11, - "name": "Nov." + "value": 0, + "name": "disable" }, { - "value": 12, - "name": "Dec." + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "screen_object_settings.environmental_temperature", + "screen_object_settings.environmental_humidity", + "screen_object_settings.target_temperature", + "screen_object_settings.schedule_name", + "screen_object_settings.reserved" ] }, { - "id": "daylight_saving_time.end_week_num", - "name": "Number of Week", + "id": "screen_object_settings.environmental_humidity", + "name": "Ambient Humidity(Screen Display Settings)", "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "1st" - }, - { - "value": 2, - "name": "2nd" - }, - { - "value": 3, - "name": "3rd" - }, - { - "value": 4, - "name": "4th" + "value": 0, + "name": "disable" }, { - "value": 5, - "name": "last" + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_day", - "daylight_saving_time.end_hour_min" + "screen_object_settings.enable", + "screen_object_settings.environmental_temperature", + "screen_object_settings.target_temperature", + "screen_object_settings.schedule_name", + "screen_object_settings.reserved" ] }, { - "id": "daylight_saving_time.end_week_day", - "name": "Week", - "value": "7", + "id": "screen_object_settings.environmental_temperature", + "name": "Ambient Temperature(Screen Display Settings)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "Mon." - }, - { - "value": 2, - "name": "Tues." - }, - { - "value": 3, - "name": "Wed." - }, - { - "value": 4, - "name": "Thurs." - }, - { - "value": 5, - "name": "Fri." - }, - { - "value": 6, - "name": "Sat." + "value": 0, + "name": "disable" }, { - "value": 7, - "name": "Sun." + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_hour_min" + "screen_object_settings.enable", + "screen_object_settings.environmental_humidity", + "screen_object_settings.target_temperature", + "screen_object_settings.schedule_name", + "screen_object_settings.reserved" ] }, { - "id": "daylight_saving_time.end_hour_min", - "name": "Time", + "id": "screen_object_settings.reserved", + "name": "Reserved(Screen Display Settings)", "value": "0", - "unit": "min", + "unit": "", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT16", + "data_type": "BOOL", + "value_type": "UINT8", "values": [ { "value": 0, - "name": "00:00" - }, - { - "value": 60, - "name": "01:00" - }, - { - "value": 120, - "name": "02:00" - }, - { - "value": 180, - "name": "03:00" - }, - { - "value": 240, - "name": "04:00" - }, - { - "value": 300, - "name": "05:00" - }, - { - "value": 360, - "name": "06:00" - }, - { - "value": 420, - "name": "07:00" - }, - { - "value": 480, - "name": "08:00" - }, - { - "value": 540, - "name": "09:00" - }, - { - "value": 600, - "name": "10:00" - }, - { - "value": 660, - "name": "11:00" - }, - { - "value": 720, - "name": "12:00" - }, - { - "value": 780, - "name": "13:00" - }, - { - "value": 840, - "name": "14:00" - }, - { - "value": 900, - "name": "15:00" - }, - { - "value": 960, - "name": "16:00" - }, - { - "value": 1020, - "name": "17:00" - }, - { - "value": 1080, - "name": "18:00" - }, - { - "value": 1140, - "name": "19:00" - }, - { - "value": 1200, - "name": "20:00" + "name": "disable" }, { - "value": 1260, - "name": "21:00" - }, + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "screen_object_settings.enable", + "screen_object_settings.environmental_temperature", + "screen_object_settings.environmental_humidity", + "screen_object_settings.target_temperature", + "screen_object_settings.schedule_name" + ] + }, + { + "id": "screen_object_settings.schedule_name", + "name": "Schedule(Screen Display Settings)", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ { - "value": 1320, - "name": "22:00" + "value": 0, + "name": "disable" }, { - "value": 1380, - "name": "23:00" + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "daylight_saving_time.daylight_saving_time_enable", - "daylight_saving_time.daylight_saving_time_offset", - "daylight_saving_time.start_month", - "daylight_saving_time.start_week_num", - "daylight_saving_time.start_week_day", - "daylight_saving_time.start_hour_min", - "daylight_saving_time.end_month", - "daylight_saving_time.end_week_num", - "daylight_saving_time.end_week_day" + "screen_object_settings.enable", + "screen_object_settings.environmental_temperature", + "screen_object_settings.environmental_humidity", + "screen_object_settings.target_temperature", + "screen_object_settings.reserved" ] }, { - "id": "temperature_calibration_settings.enable", - "name": "Temperature Calibration", - "value": "0", + "id": "screen_object_settings.target_temperature", + "name": "Target Temperature (Screen Display Settings)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", @@ -2359,102 +3754,205 @@ "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "temperature_calibration_settings.calibration_value" + "screen_object_settings.enable", + "screen_object_settings.environmental_temperature", + "screen_object_settings.environmental_humidity", + "screen_object_settings.schedule_name", + "screen_object_settings.reserved" ] }, { - "id": "temperature_calibration_settings.calibration_value", - "name": "Calibration Value", + "id": "send_humidity.humidity", + "name": "Humidity Extend Value(Humidity Extend Settings)", "value": "0", - "unit": "℃", - "access_mode": "RW", + "unit": "%", + "access_mode": "W", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -80, - 80 + 0, + 100 ], - "bacnet_type": "analog_value_object", + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [] + }, + { + "id": "send_temperature.celsius_temperature", + "name": "Celsius Temperature Extend Value(Temperature Extend Settings)", + "value": "0", + "unit": "°C", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_output_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "temperature_calibration_settings.enable" + "reference": [] + }, + { + "id": "send_temperature.fahrenheit_temperature", + "name": "Fahrenheit Temperature Extend Value(Temperature Extend Settings)", + "value": "32", + "unit": "℉", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "send_temperature.temperature", + "name": "Temperature Extend Value(Temperature Extend Settings)", + "value": "0", + "unit": "°C", + "access_mode": "W", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "synchronize_time", + "name": "Time Synchronize", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } ] }, { - "id": "humidity_calibration_settings.enable", - "name": "Humidity Calibration", + "id": "system_status", + "name": "System On/Off", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "Off" }, { "value": 1, - "name": "enable" + "name": "On" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "target_humidity_range.max", + "name": "Max Value(Target Humidity Regulation Range)", + "value": "80", + "unit": "%", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 100 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", "reference": [ - "humidity_calibration_settings.calibration_value" + "target_humidity_range.min" ] }, { - "id": "humidity_calibration_settings.calibration_value", - "name": "Calibration Value", - "value": "0", + "id": "target_humidity_range.min", + "name": "Min Value(Target Humidity Regulation Range)", + "value": "40", "unit": "%", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -100, + 0, 100 ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 98, "bacnet_unit_type": "UNITS_PERCENT", "reference": [ - "humidity_calibration_settings.enable" + "target_humidity_range.max" ] }, { - "id": "temperature_alarm_settings.enable", - "name": "Temperature Threshold Alarm", - "value": "0", + "id": "target_temperature", + "name": "Target Temperature", + "value": "", + "unit": "°C", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "target_temperature_alarm.type", + "name": "Alarm Type(Target Temperature Alarm)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 0, - "name": "disable" + "value": 3, + "name": "No Data" }, { - "value": 1, - "name": "enable" + "value": 3, + "name": "No Data" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temperature_alarm_settings.threshold_condition", - "temperature_alarm_settings.threshold_min", - "temperature_alarm_settings.threshold_max" - ] + "reference": [] }, { - "id": "temperature_alarm_settings.threshold_condition", - "name": "Threshold Mode", + "id": "target_temperature_resolution", + "name": "Target Temperature Resolution", "value": "0", "unit": "", "access_mode": "RW", @@ -2463,39 +3961,54 @@ "values": [ { "value": 0, - "name": "disable" + "name": "0.5" }, { "value": 1, - "name": "condition: xB" - }, - { - "value": 3, - "name": "condition: A≤x≤B" - }, - { - "value": 4, - "name": "condition: xB" + "name": "1" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "temperature_alarm_settings.enable", - "temperature_alarm_settings.threshold_min", - "temperature_alarm_settings.threshold_max" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "temperature_alarm_settings.threshold_min", - "name": "Value A", + "id": "target_temperature_tolerance", + "name": "Target Temperature Tolerance", + "value": "1", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 5 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "temperature", + "name": "Temperature", + "value": "", + "unit": "°C", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "temperature_alarm_settings.celsius_threshold_max", + "name": "Celsius Value B(Temperature Threshold Alarm Settings)", "value": "0", - "unit": "℃", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", @@ -2509,14 +4022,14 @@ "reference": [ "temperature_alarm_settings.enable", "temperature_alarm_settings.threshold_condition", - "temperature_alarm_settings.threshold_max" + "temperature_alarm_settings.threshold_min" ] }, { - "id": "temperature_alarm_settings.threshold_max", - "name": "Value B", + "id": "temperature_alarm_settings.celsius_threshold_min", + "name": "Celsius Value A(Temperature Threshold Alarm Settings)", "value": "0", - "unit": "℃", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", @@ -2530,12 +4043,12 @@ "reference": [ "temperature_alarm_settings.enable", "temperature_alarm_settings.threshold_condition", - "temperature_alarm_settings.threshold_min" + "temperature_alarm_settings.threshold_max" ] }, { - "id": "high_temperature_alarm_settings.enable", - "name": "Persistent High Temperature", + "id": "temperature_alarm_settings.enable", + "name": "Temperature Threshold Alarm(Temperature Threshold Alarm Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -2555,57 +4068,60 @@ "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "high_temperature_alarm_settings.difference_in_temperature", - "high_temperature_alarm_settings.duration" + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min", + "temperature_alarm_settings.threshold_max" ] }, { - "id": "high_temperature_alarm_settings.difference_in_temperature", - "name": "Difference in Temperature", - "value": "3", - "unit": "℃", + "id": "temperature_alarm_settings.fahrenheit_threshold_max", + "name": "Fahrenheit Value B(Temperature Threshold Alarm Settings)", + "value": "32", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 1, - 10 + -4, + 140 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "high_temperature_alarm_settings.enable", - "high_temperature_alarm_settings.duration" + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" ] }, { - "id": "high_temperature_alarm_settings.duration", - "name": "Duration", - "value": "5", - "unit": "min", + "id": "temperature_alarm_settings.fahrenheit_threshold_min", + "name": "Fahrenheit Value A(Temperature Threshold Alarm Settings)", + "value": "32", + "unit": "℉", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "FLOAT", "range": [ - 0, - 60 + -4, + 140 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "high_temperature_alarm_settings.enable", - "high_temperature_alarm_settings.difference_in_temperature" + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" ] }, { - "id": "low_temperature_alarm_settings.enable", - "name": "Persistent Low Temperature", + "id": "temperature_alarm_settings.threshold_condition", + "name": "Threshold Mode(Temperature Threshold Alarm Settings)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { @@ -2614,457 +4130,454 @@ }, { "value": 1, - "name": "enable" + "name": "condition: xB" + }, + { + "value": 3, + "name": "condition: A≤x≤B" + }, + { + "value": 4, + "name": "condition: xB" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "low_temperature_alarm_settings.difference_in_temperature", - "low_temperature_alarm_settings.duration" + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_min", + "temperature_alarm_settings.threshold_max" ] }, { - "id": "low_temperature_alarm_settings.difference_in_temperature", - "name": "Difference in Temperature", - "value": "3", - "unit": "℃", + "id": "temperature_alarm_settings.threshold_max", + "name": "Value B(Temperature Threshold Alarm Settings)", + "value": "0", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - 1, - 10 + -20, + 60 ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "low_temperature_alarm_settings.enable", - "low_temperature_alarm_settings.duration" + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_min" ] }, { - "id": "low_temperature_alarm_settings.duration", - "name": "Duration", - "value": "5", - "unit": "min", + "id": "temperature_alarm_settings.threshold_min", + "name": "Value A(Temperature Threshold Alarm Settings)", + "value": "0", + "unit": "°C", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "FLOAT", "range": [ - 0, + -20, 60 ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "low_temperature_alarm_settings.enable", - "low_temperature_alarm_settings.difference_in_temperature" + "temperature_alarm_settings.enable", + "temperature_alarm_settings.threshold_condition", + "temperature_alarm_settings.threshold_max" ] }, { - "id": "interface_settings.object", - "name": "System Type", - "value": "1", + "id": "temperature_alarm.type", + "name": "Alarm Type(Temperature Alarm)", + "value": "", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Four-pipe, 0~10V Valve+Three-speeds Fan" + "name": "Collection Error" }, { "value": 1, - "name": "Two-pipe, 0~10V Valve+Three-speeds Fan" + "name": "Exceed the Range Lower Limit" }, { "value": 2, - "name": "Two-pipe, 0~10V Valve+EC Fan" + "name": "Exceed the Range Upper Limit" }, { "value": 3, - "name": "Four-pipe,Two-wire Valve+EC Fan" + "name": "No Data" }, { - "value": 4, - "name": "Two-pipe, Two-wire Valve+EC Fan" + "value": 16, + "name": "Temperature Below Alarm Released" }, { - "value": 5, - "name": "Two-pipe, Three-wire Valve+EC Fan" + "value": 17, + "name": "Temperature Below Alarm" + }, + { + "value": 18, + "name": "Temperature Above Alarm Released" + }, + { + "value": 19, + "name": "Temperature Above Alarm" + }, + { + "value": 20, + "name": "Temperature Between Alarm Released" + }, + { + "value": 21, + "name": "Temperature Between Alarm" + }, + { + "value": 22, + "name": "Exceed Tolerance Alarm Released" + }, + { + "value": 23, + "name": "Exceed Tolerance Alarm" + }, + { + "value": 32, + "name": "Persistent Low Temperature Alarm Released" + }, + { + "value": 33, + "name": "Persistent Low Temperature Alarm" + }, + { + "value": 34, + "name": "Persistent High Temperature Alarm Released" + }, + { + "value": 35, + "name": "Persistent High Temperature Alarm Released" + }, + { + "value": 48, + "name": "Freeze Protection Alarm Released" + }, + { + "value": 49, + "name": "Freeze Protection Alarm" + }, + { + "value": 50, + "name": "Open Window Alarm Released" + }, + { + "value": 51, + "name": "Open Window Alarm" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_4_pipe_10_v.cooling", - "interface_settings.valve_4_pipe_10_v.heating", - "interface_settings.valve_2_pipe_10_v.control", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power", - "interface_settings.valve_2_pipe_10_v_fan_ec.control", - "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power", - "interface_settings.valve_2_pipe_2_wire_fan_ec.control", - "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" - ] + "reference": [] }, { - "id": "interface_settings.valve_4_pipe_10_v.cooling", - "name": "Cooling Valve", - "value": "1", - "unit": "", + "id": "temperature_calibration_settings.calibration_value", + "name": "Calibration Value(Temperature Calibration Settings)", + "value": "0", + "unit": "°C", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 1, - "name": "AO1" - }, - { - "value": 2, - "name": "AO2" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -80, + 80 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "interface_settings.valve_4_pipe_10_v.heating" + "temperature_calibration_settings.enable" ] }, { - "id": "interface_settings.valve_4_pipe_10_v.heating", - "name": "Heating Valve", - "value": "2", - "unit": "", + "id": "temperature_calibration_settings.celsius_calibration_value", + "name": "Celsius Calibration Value(Temperature Calibration Settings)", + "value": "0", + "unit": "°C", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 1, - "name": "AO1" - }, - { - "value": 2, - "name": "AO2" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -80, + 80 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "interface_settings.valve_4_pipe_10_v.cooling" + "temperature_calibration_settings.enable" ] }, { - "id": "interface_settings.valve_2_pipe_10_v.control", - "name": "Valve", - "value": "1", + "id": "temperature_calibration_settings.enable", + "name": "Temperature Calibration(Temperature Calibration Settings)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { - "value": 1, - "name": "AO1" + "value": 0, + "name": "disable" }, { - "value": 2, - "name": "AO2" + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [] + "reference": [ + "temperature_calibration_settings.calibration_value" + ] }, { - "id": "interface_settings.valve_2_pipe_10_v_fan_ec.control", - "name": "Valve", - "value": "1", - "unit": "", + "id": "temperature_calibration_settings.fahrenheit_calibration_value", + "name": "Fahrenheit Calibration Value(Temperature Calibration Settings)", + "value": "32", + "unit": "℉", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 1, - "name": "AO1" - }, - { - "value": 2, - "name": "AO2" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -112, + 176 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "interface_settings.valve_2_pipe_10_v_fan_ec.fan", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power" + "temperature_calibration_settings.enable" ] }, { - "id": "interface_settings.valve_2_pipe_10_v_fan_ec.fan", - "name": "EC Fan", - "value": "2", - "unit": "", + "id": "temperature_control_dehumidification.celsius_temperature_tolerance", + "name": "Celsius Temp. Tolerance for Dehumidification\n(Temp. Control and Dehumidify Settings)", + "value": "1", + "unit": "°C", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 1, - "name": "AO1" - }, - { - "value": 2, - "name": "AO2" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 5 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "interface_settings.valve_2_pipe_10_v_fan_ec.control", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power" + "temperature_control_dehumidification.enable" ] }, { - "id": "interface_settings.valve_2_pipe_10_v_fan_ec.fan_power", - "name": "Fan Power WIre", - "value": "5", + "id": "temperature_control_dehumidification.enable", + "name": "Temp. Control and Dehumidify(Temp. Control and Dehumidify Settings)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "None" - }, - { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" + "name": "disable" }, { - "value": 5, - "name": "Q3" + "value": 1, + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_2_pipe_10_v_fan_ec.control", - "interface_settings.valve_2_pipe_10_v_fan_ec.fan" + "temperature_control_dehumidification.temperature_tolerance" ] }, { - "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "name": "Cooling Valve", - "value": "3", - "unit": "", + "id": "temperature_control_dehumidification.fahrenheit_temperature_tolerance", + "name": "Fahrenheit Temp. Tolerance for Dehumidification\n(Temp. Control and Dehumidify Settings)", + "value": "33.8", + "unit": "℉", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" - }, - { - "value": 5, - "name": "Q3" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 32, + 41 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [ - "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power" + "temperature_control_dehumidification.enable" ] }, { - "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "name": "Heating Valve", - "value": "4", - "unit": "", + "id": "temperature_control_dehumidification.temperature_tolerance", + "name": "Temp. Tolerance for Dehumidification\n(Temp. Control and Dehumidify Settings)", + "value": "1", + "unit": "°C", "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ - { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" - }, - { - "value": 5, - "name": "Q3" - } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 5 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [ - "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power" + "temperature_control_dehumidification.enable" ] }, { - "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.fan", - "name": "EC Fan", - "value": "2", + "id": "temperature_control_info.mode", + "name": "Temperature Control Mode(Temperature Control Status)", + "value": "1", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ + { + "value": 0, + "name": "Ventilation" + }, { "value": 1, - "name": "AO1" + "name": "Heat" }, { "value": 2, - "name": "AO2" + "name": "Cool" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power" + "temperature_control_info.status" ] }, { - "id": "interface_settings.valve_4_pipe_2_wire_fan_ec.fan_power", - "name": "Fan Power WIre", - "value": "5", + "id": "temperature_control_info.status", + "name": "Temperature Control Status(Temperature Control Status)", + "value": "0", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "None" - }, - { - "value": 3, - "name": "Q1" + "name": "Standby" }, { - "value": 4, - "name": "Q2" + "value": 1, + "name": "Heat" }, { - "value": 5, - "name": "Q3" + "value": 2, + "name": "Cool" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_4_pipe_2_wire_fan_ec.cooling", - "interface_settings.valve_4_pipe_2_wire_fan_ec.heating", - "interface_settings.valve_4_pipe_2_wire_fan_ec.fan" + "temperature_control_info.mode" ] }, { - "id": "interface_settings.valve_2_pipe_2_wire_fan_ec.control", - "name": "Valve", - "value": "3", + "id": "temperature_control_mode", + "name": "Temperature Control Mode", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 3, - "name": "Q1" + "value": 0, + "name": "Ventilation" }, { - "value": 4, - "name": "Q2" + "value": 1, + "name": "Heat" }, { - "value": 5, - "name": "Q3" + "value": 2, + "name": "Cool" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power" - ] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "interface_settings.valve_2_pipe_2_wire_fan_ec.fan", - "name": "EC Fan", - "value": "2", - "unit": "", + "id": "temperature_control_valve_status", + "name": "Valve Status", + "value": "0", + "unit": "%", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 0, + 100 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT" + }, + { + "id": "temperature_source.d2d_reception.timeout", + "name": "Timeout(D2D Receive)", + "value": "10", + "unit": "min", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { - "value": 1, - "name": "AO1" - }, - { - "value": 2, - "name": "AO2" - } + "range": [ + 1, + 60 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", "reference": [ - "interface_settings.valve_2_pipe_2_wire_fan_ec.control", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power" + "temperature_source.d2d_reception.timeout_response" ] }, { - "id": "interface_settings.valve_2_pipe_2_wire_fan_ec.fan_power", - "name": "Fan Power WIre", - "value": "5", + "id": "temperature_source.d2d_reception.timeout_response", + "name": "Device Offline Settings(D2D Receive)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", @@ -3072,122 +4585,107 @@ "values": [ { "value": 0, - "name": "None" - }, - { - "value": 3, - "name": "Q1" + "name": "Keep Control" }, { - "value": 4, - "name": "Q2" + "value": 1, + "name": "Turn Off The Control" }, { - "value": 5, - "name": "Q3" + "value": 2, + "name": "Switch The Embedded Temperature" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_2_pipe_2_wire_fan_ec.control", - "interface_settings.valve_2_pipe_2_wire_fan_ec.fan" + "temperature_source.d2d_reception.timeout" ] }, { - "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "name": "NO", - "value": "3", - "unit": "", + "id": "temperature_source.lorawan_reception.timeout", + "name": "Timeout(LoRa Receive)", + "value": "10", + "unit": "min", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" - }, - { - "value": 5, - "name": "Q3" - } + "range": [ + 1, + 60 ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "temperature_source.lorawan_reception.timeout_response" ] }, { - "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "name": "NC", - "value": "4", + "id": "temperature_source.lorawan_reception.timeout_response", + "name": "Device Offline Settings(LoRa Receive)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ { - "value": 3, - "name": "Q1" + "value": 0, + "name": "Keep Control" }, { - "value": 4, - "name": "Q2" + "value": 1, + "name": "Turn Off The Control" }, { - "value": 5, - "name": "Q3" + "value": 2, + "name": "Switch The Embedded Temperature" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" + "temperature_source.lorawan_reception.timeout" ] }, { - "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.fan", - "name": "EC Fan", - "value": "2", + "id": "temperature_source.type", + "name": "Temperature Source(Temperature Data Source)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ + { + "value": 0, + "name": "Embedded Temperature" + }, { "value": 1, - "name": "AO1" + "name": "External NTC" }, { "value": 2, - "name": "AO2" + "name": "LoRa Receive" + }, + { + "value": 3, + "name": "D2D Receive" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power" - ] + "reference": [] }, { - "id": "interface_settings.valve_2_pipe_3_wire_fan_ec.fan_power", - "name": "Fan Power WIre", - "value": "5", + "id": "temperature_unit", + "name": "Temperature Unit", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", @@ -3195,157 +4693,52 @@ "values": [ { "value": 0, - "name": "None" - }, - { - "value": 3, - "name": "Q1" - }, - { - "value": 4, - "name": "Q2" + "name": "℃" }, { - "value": 5, - "name": "Q3" + "value": 1, + "name": "℉" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "interface_settings.valve_2_pipe_3_wire_fan_ec.no", - "interface_settings.valve_2_pipe_3_wire_fan_ec.nc", - "interface_settings.valve_2_pipe_3_wire_fan_ec.fan" - ] - }, - { - "id": "valve_control_settings.control_interval", - "name": "Valve Control Interval", - "value": "30", - "unit": "s", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 1, - 60 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": [] - }, - { - "id": "valve_control_settings.control_adjustment_range", - "name": "Valve Control Adjustment Range", - "value": "10", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 1, - 15 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "valve_control_settings.opening_range.min", - "name": "Min Value", + "id": "temporary_unlock_settings.enable", + "name": "Unlock Function Enable(Unlock Button Settings)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "NUMBER", + "data_type": "BOOL", "value_type": "UINT8", - "range": [ - 0, - 100 + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "analog_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "valve_control_settings.opening_range.max" - ] - }, - { - "id": "valve_control_settings.opening_range.max", - "name": "Max Value", - "value": "100", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 0, - 100 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [ - "valve_control_settings.opening_range.min" + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" ] }, { - "id": "fan_ec_control_settings.low_threshold", - "name": "Low Speed", - "value": "50", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 1, - 100 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [] - }, - { - "id": "fan_ec_control_settings.mid_threshold", - "name": "Medium Speed", - "value": "80", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 1, - 100 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [] - }, - { - "id": "fan_ec_control_settings.high_threshold", - "name": "High Speed", - "value": "100", - "unit": "%", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 1, - 100 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT", - "reference": [] - }, - { - "id": "fan_stop_enable", - "name": "Fan Stop Settings", - "value": "1", + "id": "temporary_unlock_settings.fan", + "name": "Fan Mode(Unlock Button Settings)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", @@ -3362,12 +4755,21 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" + ] }, { - "id": "valve_output_0v_enable", - "name": "Valve output 0% setting", - "value": "1", + "id": "temporary_unlock_settings.reserved", + "name": "Reserved(Unlock Button Settings)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", @@ -3384,11 +4786,20 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.unlocking_duration" + ] }, { - "id": "di_enable", - "name": "DI Enable", + "id": "temporary_unlock_settings.system", + "name": "System On/Off (Unlock Button Settings)", "value": "0", "unit": "", "access_mode": "RW", @@ -3406,241 +4817,300 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" + ] }, { - "id": "di_settings.object", - "name": "DI Interface", + "id": "temporary_unlock_settings.temperature_control", + "name": "Temperature Control Mode(Unlock Button Settings)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "Room Card" + "name": "disable" }, { "value": 1, - "name": "Magnetic Contact Switch" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "di_settings.card_control.type", - "di_settings.card_control.system_control.trigger_by_insertion", - "di_settings.card_control.insertion_plan.trigger_by_insertion", - "di_settings.card_control.insertion_plan.trigger_by_extraction", - "di_settings.magnet_detection.magnet_type" + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" ] }, { - "id": "di_settings.card_control.type", - "name": "Control Object", + "id": "temporary_unlock_settings.temperature_down", + "name": "Temperature -(Unlock Button Settings)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "System Control" + "name": "disable" }, { "value": 1, - "name": "Insert Schedule" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [ - "di_settings.card_control.system_control.trigger_by_insertion", - "di_settings.card_control.insertion_plan.trigger_by_insertion", - "di_settings.card_control.insertion_plan.trigger_by_extraction" + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" ] }, { - "id": "di_settings.card_control.system_control.trigger_by_insertion", - "name": "Insert Card", - "value": "1", + "id": "temporary_unlock_settings.temperature_up", + "name": "Temperature + (Unlock Button Settings)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ { "value": 0, - "name": "system off" + "name": "disable" }, { "value": 1, - "name": "system on" + "name": "enable" } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [] + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved", + "temporary_unlock_settings.unlocking_duration" + ] }, { - "id": "di_settings.card_control.insertion_plan.trigger_by_insertion", - "name": "Insert Card", + "id": "temporary_unlock_settings.unlocking_duration", + "name": "Unlocking Time(Unlock Button Settings)", + "value": "30", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 3600 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "temporary_unlock_settings.enable", + "temporary_unlock_settings.system", + "temporary_unlock_settings.temperature_up", + "temporary_unlock_settings.temperature_down", + "temporary_unlock_settings.fan", + "temporary_unlock_settings.temperature_control", + "temporary_unlock_settings.reserved" + ] + }, + { + "id": "time_zone", + "name": "Time Zone", "value": "0", - "unit": "", + "unit": "min", "access_mode": "RW", "data_type": "ENUM", - "value_type": "UINT8", + "value_type": "INT16", "values": [ { - "value": 0, - "name": "Schedule1" + "value": -720, + "name": "UTC-12(IDLW)" }, { - "value": 1, - "name": "Schedule2" + "value": -660, + "name": "UTC-11(SST)" }, { - "value": 2, - "name": "Schedule3" + "value": -600, + "name": "UTC-10(HST)" }, { - "value": 3, - "name": "Schedule4" + "value": -570, + "name": "UTC-9:30(MIT)" }, { - "value": 4, - "name": "Schedule5" + "value": -540, + "name": "UTC-9(AKST)" }, { - "value": 5, - "name": "Schedule6" + "value": -480, + "name": "UTC-8(PST)" }, { - "value": 6, - "name": "Schedule7" + "value": -420, + "name": "UTC-7(MST)" }, { - "value": 7, - "name": "Schedule8" + "value": -360, + "name": "UTC-6(CST)" }, { - "value": 255, - "name": "None" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "di_settings.card_control.insertion_plan.trigger_by_extraction" - ] - }, - { - "id": "di_settings.card_control.insertion_plan.trigger_by_extraction", - "name": "Remove Card", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ + "value": -300, + "name": "UTC-5(EST)" + }, + { + "value": -240, + "name": "UTC-4(AST)" + }, + { + "value": -210, + "name": "UTC-3:30(NST)" + }, + { + "value": -180, + "name": "UTC-3(BRT)" + }, + { + "value": -120, + "name": "UTC-2(FNT)" + }, + { + "value": -60, + "name": "UTC-1(CVT)" + }, { "value": 0, - "name": "Schedule1" + "name": "UTC(WET)" }, { - "value": 1, - "name": "Schedule2" + "value": 60, + "name": "UTC+1(CET)" }, { - "value": 2, - "name": "Schedule3" + "value": 120, + "name": "UTC+2(EET)" }, { - "value": 3, - "name": "Schedule4" + "value": 180, + "name": "UTC+3(MSK)" }, { - "value": 4, - "name": "Schedule5" + "value": 210, + "name": "UTC+3:30(IRST)" }, { - "value": 5, - "name": "Schedule6" + "value": 240, + "name": "UTC+4(GST)" }, { - "value": 6, - "name": "Schedule7" + "value": 270, + "name": "UTC+4:30(AFT)" }, { - "value": 7, - "name": "Schedule8" + "value": 300, + "name": "UTC+5(PKT)" }, { - "value": 255, - "name": "None" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "di_settings.card_control.insertion_plan.trigger_by_insertion" - ] - }, - { - "id": "di_settings.magnet_detection.magnet_type", - "name": "Sensor Type", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", - "value_type": "UINT8", - "values": [ + "value": 330, + "name": "UTC+5:30(IST)" + }, { - "value": 0, - "name": "NO" + "value": 345, + "name": "UTC+5:45(NPT)" }, { - "value": 1, - "name": "NC" - } - ], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [] - }, - { - "id": "window_opening_detection_enable", - "name": "Open Window Detection", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ + "value": 360, + "name": "UTC+6(BHT)" + }, { - "value": 0, - "name": "disable" + "value": 390, + "name": "UTC+6:30(MMT)" + }, + { + "value": 420, + "name": "UTC+7(ICT)" + }, + { + "value": 480, + "name": "UTC+8(CT/CST)" + }, + { + "value": 540, + "name": "UTC+9(JST)" + }, + { + "value": 570, + "name": "UTC+9:30(ACST)" + }, + { + "value": 600, + "name": "UTC+10(AEST)" + }, + { + "value": 630, + "name": "UTC+10:30(LHST)" + }, + { + "value": 660, + "name": "UTC+11(VUT)" + }, + { + "value": 720, + "name": "UTC+12(NZST)" + }, + { + "value": 765, + "name": "UTC+12:45(CHAST)" + }, + { + "value": 780, + "name": "UTC+13(PHOT)" }, { - "value": 1, - "name": "enable" + "value": 840, + "name": "UTC+14(LINT)" } ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES" }, { - "id": "window_opening_detection_settings.type", - "name": "Detection Method", + "id": "timed_system_control.command", + "name": "Sub-command(Timer Switch System)", "value": "0", "unit": "", "access_mode": "RW", @@ -3649,124 +5119,21 @@ "values": [ { "value": 0, - "name": "Temperature Detection" + "name": "Timer Switch Enable" }, { - "value": 1, - "name": "Magnetic Detection" + "value": 0, + "name": "Timer Switch Enable" } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "window_opening_detection_settings.temperature_detection.difference_in_temperature", - "window_opening_detection_settings.temperature_detection.stop_time", - "window_opening_detection_settings.magnet_detection.duration" - ] - }, - { - "id": "window_opening_detection_settings.temperature_detection.difference_in_temperature", - "name": "Temperature Change", - "value": "3", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 1, - 10 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "window_opening_detection_settings.temperature_detection.stop_time" - ] - }, - { - "id": "window_opening_detection_settings.temperature_detection.stop_time", - "name": "Stop Temperature Control For", - "value": "30", - "unit": "min", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 1, - 60 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": [ - "window_opening_detection_settings.temperature_detection.difference_in_temperature" - ] - }, - { - "id": "window_opening_detection_settings.magnet_detection.duration", - "name": "Duration", - "value": "10", - "unit": "min", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "range": [ - 1, - 60 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", "reference": [] }, { - "id": "freeze_protection_settings.enable", - "name": "Freeze Protection", - "value": "1", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": [ - "freeze_protection_settings.target_temperature" - ] - }, - { - "id": "freeze_protection_settings.target_temperature", - "name": "Protection Temperature", - "value": "3", - "unit": "℃", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - 1, - 5 - ], - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [ - "freeze_protection_settings.enable" - ] - }, - { - "id": "d2d_pairing_enable", - "name": "D2D Pairing Enable", + "id": "timed_system_control.enable", + "name": "Timer Switch Enable(Timer Switch System)", "value": "0", "unit": "", "access_mode": "RW", @@ -3784,322 +5151,368 @@ ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "d2d_master_enable", - "name": "D2D Controller Enable", - "value": "0", + "id": "tsl_version", + "name": "TSL Version", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { - "value": 0, - "name": "disable" - }, - { - "value": 1, - "name": "enable" - } - ], - "bacnet_type": "binary_value_object", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "d2d_slave_enable", - "name": "D2D Agent Enable", + "id": "update_open_windows_state.type", + "name": "Open Window Status Control( Open Window Status Control)", "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "W", + "data_type": "ENUM", "value_type": "UINT8", "values": [ { "value": 0, - "name": "disable" + "name": "Normal" }, { "value": 1, - "name": "enable" + "name": "Open" } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "temperature_alarm.lower_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] - }, - { - "id": "temperature_alarm.lower_range_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] - }, - { - "id": "temperature_alarm.over_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] - }, - { - "id": "temperature_alarm.over_range_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] - }, - { - "id": "temperature_alarm.within_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "range": [ - -20, - 60 - ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, { - "id": "temperature_alarm.within_range_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "valve_control_settings.celsius_control_adjustment_range", + "name": "Celsius Valve Control Adjustment Range(Valve Control Settingd)", + "value": "10", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 1, + 15 ], - "bacnet_type": "analog_input_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [] }, { - "id": "temperature_alarm.exceed_range_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "valve_control_settings.control_adjustment_range", + "name": "Valve Control Adjustment Range(Valve Control Settingd)", + "value": "10", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 1, + 15 ], - "bacnet_type": "analog_input_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", "reference": [] }, { - "id": "temperature_alarm.exceed_range_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "valve_control_settings.control_interval", + "name": "Valve Control Interval(Valve Control Settingd)", + "value": "30", + "unit": "s", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT8", "range": [ - -20, + 1, 60 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", "reference": [] }, { - "id": "temperature_alarm.persistent_low_temperature_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "valve_control_settings.fahrenheit_control_adjustment_range", + "name": "Fahrenheit Valve Control Adjustment Range(Valve Control Settingd)", + "value": "50", + "unit": "℉", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 33.8, + 59 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", "reference": [] }, { - "id": "temperature_alarm.persistent_low_temperature_alarm_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "valve_control_settings.opening_range.max", + "name": "Max Value(Valve Opening Range)", + "value": "100", + "unit": "%", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT8", "range": [ - -20, - 60 + 0, + 100 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [ + "valve_control_settings.opening_range.min" + ] }, { - "id": "temperature_alarm.persistent_high_alarm_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "valve_control_settings.opening_range.min", + "name": "Min Value(Valve Opening Range)", + "value": "0", + "unit": "", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT8", "range": [ - -20, - 60 + 0, + 100 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "valve_control_settings.opening_range.max" + ] + }, + { + "id": "valve_control_settings.type", + "name": "Control Content(Valve Control Settingd)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 2, + "name": "Valve Control Interval" + }, + { + "value": 0, + "name": "Valve Control Adjustment Range" + }, + { + "value": 1, + "name": "Valve Opening Range" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] }, { - "id": "temperature_alarm.persistent_high_alarm_trigger.temperature", - "name": "Temperature", + "id": "valve_output_0v_enable", + "name": "Valve output 0% setting", + "value": "1", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "version.firmware_version", + "name": "Firmware Version(Product Version)", + "value": "", + "unit": "", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 12, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "version.hardware_version" + ] + }, + { + "id": "version.hardware_version", + "name": "Hardware Version(Product Version)", "value": "", - "unit": "℃", + "unit": "", "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "version.firmware_version" + ] + }, + { + "id": "window_opening_detection_enable", + "name": "Open Window Detection", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "window_opening_detection_settings.magnet_detection.duration", + "name": "Duration(Magnetic Detection)", + "value": "10", + "unit": "min", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT8", "range": [ - -20, + 1, 60 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", "reference": [] }, { - "id": "temperature_alarm.anti_freeze_protection_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "window_opening_detection_settings.temperature_detection.celsius_difference_in_temperature", + "name": "Celsius Temperature Change(Temperature Detection)", + "value": "3", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 1, + 10 ], - "bacnet_type": "analog_input_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "reference": [ + "window_opening_detection_settings.temperature_detection.stop_time" + ] }, { - "id": "temperature_alarm.anti_freeze_protection_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "window_opening_detection_settings.temperature_detection.difference_in_temperature", + "name": "Temperature Change(Temperature Detection)", + "value": "3", + "unit": "°C", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 1, + 10 ], - "bacnet_type": "analog_input_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "reference": [ + "window_opening_detection_settings.temperature_detection.stop_time" + ] }, { - "id": "temperature_alarm.window_status_detection_deactivation.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "window_opening_detection_settings.temperature_detection.fahrenheit_difference_in_temperature", + "name": "Fahrenheit Temperature Change(Temperature Detection)", + "value": "37.4", + "unit": "℉", + "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", "range": [ - -20, - 60 + 33.8, + 50 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": [] + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "window_opening_detection_settings.temperature_detection.stop_time" + ] }, { - "id": "temperature_alarm.window_status_detection_trigger.temperature", - "name": "Temperature", - "value": "", - "unit": "℃", - "access_mode": "R", + "id": "window_opening_detection_settings.temperature_detection.stop_time", + "name": "Stop Temperature Control For(Temperature Detection)", + "value": "30", + "unit": "min", + "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT8", "range": [ - -20, + 1, 60 ], - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "window_opening_detection_settings.temperature_detection.difference_in_temperature" + ] + }, + { + "id": "window_opening_detection_settings.type", + "name": "Detection Method(Open Window Detection)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Temperature Detection" + }, + { + "value": 1, + "name": "Magnetic Detection" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", "reference": [] } ] diff --git a/vendors/milesight-iot/wt-series/wt304/wt304-decoder.js b/vendors/milesight-iot/wt-series/wt304/wt304-decoder.js index a5ce383..06aa9d7 100644 --- a/vendors/milesight-iot/wt-series/wt304/wt304-decoder.js +++ b/vendors/milesight-iot/wt-series/wt304/wt304-decoder.js @@ -27,6 +27,8 @@ function Decoder(bytes, port) { function milesightDeviceDecode(bytes) { var decoded = {}; + var result = {}; + var history = []; var unknown_command = 0; var counterObj = {}; @@ -879,16 +881,34 @@ function milesightDeviceDecode(bytes) { // 0:Schedule1, 1:Schedule2, 2:Schedule3, 3:Schedule4, 4:Schedule5, 5:Schedule6, 6:Schedule7, 7:Schedule8, 255:Reset All decoded.delete_schedule.type = readUInt8(bytes, counterObj, 1); break; + case 0xbf: + decoded.reset = readOnlyCommand(bytes, counterObj, 0); + break; case 0xbe: decoded.reboot = readOnlyCommand(bytes, counterObj, 0); break; + default: + unknown_command = 1; + break; } if (unknown_command) { throw new Error('unknown command: ' + command_id); } } - return decoded; + if (Object.keys(history).length > 0) { + result.history = history; + } else { + for (var k2 in decoded) { + if (decoded.hasOwnProperty(k2)) { + result[k2] = decoded[k2]; + } + } + } + + processTemperature(result); + + return result; } function readOnlyCommand(bytes) { @@ -955,6 +975,17 @@ function readInt16LE(allBytes, counterObj, end) { return ref > 0x7fff ? ref - 0x10000 : ref; } +function readUInt24LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); // 3 bytes expected + var value = (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; + return value & 0xffffff; +} + +function readInt24LE(allBytes, counterObj, end) { + var ref = readUInt24LE(allBytes, counterObj, end); + return ref > 0x7fffff ? ref - 0x1000000 : ref; +} + function readUInt32LE(allBytes, counterObj, end) { var bytes = readBytes(allBytes, counterObj, end); var value = (bytes[3] << 24) + (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; @@ -1039,7 +1070,7 @@ function extractBits(byte, startBit, endBit) { if (byte < 0 || byte > 0xffff) { throw new Error("byte must be in range 0..65535"); } - if (startBit < 0 || endBit > 16 || startBit >= endBit) { + if (startBit >= endBit) { throw new Error("invalid bit range"); } @@ -1069,49 +1100,145 @@ function insertArrayItem(array, item, idName) { } function readCommand(allBytes, counterObj, end) { - var bytes = readBytes(allBytes, counterObj, end); - var cmd = bytes - .map(function(b) { - var hex = b.toString(16); - return hex.length === 1 ? '0' + hex : hex; - }) - .join('') - .toLowerCase(); + var bytes = readBytes(allBytes, counterObj, end); + var cmd = bytes + .map(function(b) { + var hex = b.toString(16); + return hex.length === 1 ? '0' + hex : hex; + }) + .join('') + .toLowerCase(); - var map = cmdMap(); - for (var key in map) { - var xxs = []; - var isMatch = false; - if (key.length !== cmd.length) { - continue; - } - for (var i = 0; i < key.length; i += 2) { - var hexString = key.slice(i, i + 2); - var cmdString = cmd.slice(i, i + 2); - if (hexString === cmdString || hexString === 'xx') { - if (hexString === 'xx') { - xxs.push('.' + parseInt(cmdString, 16)); - } - isMatch = true; - continue; - } else { - isMatch = false; - break; - } - } - if (isMatch) { - var propertyId = map[key]; - if (propertyId.indexOf('._item') === -1) { - return propertyId; - } - var j = 0; - var result = propertyId.replace(/\._item/g, function() { - return xxs[j++]; - }); - return result; - } - } - return null; + var map = cmdMap(); + for (var key in map) { + var xxs = []; + var isMatch = false; + if (key.length !== cmd.length) { + continue; + } + for (var i = 0; i < key.length; i += 2) { + var hexString = key.slice(i, i + 2); + var cmdString = cmd.slice(i, i + 2); + if (hexString === cmdString || hexString === 'xx') { + if (hexString === 'xx') { + xxs.push('.' + parseInt(cmdString, 16)); + } + isMatch = true; + continue; + } else { + isMatch = false; + break; + } + } + if (isMatch) { + var propertyId = map[key]; + if (propertyId.indexOf('._item') === -1) { + return propertyId; + } + var j = 0; + var result = propertyId.replace(/\._item/g, function() { + return xxs[j++]; + }); + return result; + } + } + return null; +} + +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; +} + +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; +} + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } + + current[parts[parts.length - 1]] = value; + return obj; +} + +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); +} + +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); +} + +function getAllLeafPaths(obj, prefix) { + var paths = []; + + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } + } + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; + +} + +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); } function cmdMap() { @@ -1146,6 +1273,18 @@ function cmdMap() { "88": "d2d_master_enable", "89": "d2d_master_settings", "90": "relay_changes_report_enable", + "6000": "collection_interval.seconds_of_time", + "6001": "collection_interval.minutes_of_time", + "6200": "reporting_interval.seconds_of_time", + "6201": "reporting_interval.minutes_of_time", + "8100": "di_settings.card_control", + "8101": "di_settings.magnet_detection", + "8300": "window_opening_detection_settings.temperature_detection", + "8301": "window_opening_detection_settings.magnet_detection", + "8502": "temperature_source.lorawan_reception", + "8503": "temperature_source.d2d_reception", + "810000": "di_settings.card_control.system_control", + "810001": "di_settings.card_control.insertion_plan", "fe": "request_check_order", "f4": "request_full_inspection", "f400": "request_full_inspection.start_inspection", @@ -1169,8 +1308,33 @@ function cmdMap() { "07": "fan_control_info", "08": "execution_plan_id", "09": "temperature_alarm", + "0900": "temperature_alarm.collection_error", + "0901": "temperature_alarm.lower_range_error", + "0902": "temperature_alarm.over_range_error", + "0903": "temperature_alarm.no_data", + "0910": "temperature_alarm.lower_range_alarm_deactivation", + "0911": "temperature_alarm.lower_range_alarm_trigger", + "0912": "temperature_alarm.over_range_alarm_deactivation", + "0913": "temperature_alarm.over_range_alarm_trigger", + "0914": "temperature_alarm.within_range_alarm_deactivation", + "0915": "temperature_alarm.within_range_alarm_trigger", + "0916": "temperature_alarm.exceed_range_alarm_deactivation", + "0917": "temperature_alarm.exceed_range_alarm_trigger", + "0920": "temperature_alarm.persistent_low_temperature_alarm_deactivation", + "0921": "temperature_alarm.persistent_low_temperature_alarm_trigger", + "0922": "temperature_alarm.persistent_high_alarm_deactivation", + "0923": "temperature_alarm.persistent_high_alarm_trigger", + "0930": "temperature_alarm.anti_freeze_protection_deactivation", + "0931": "temperature_alarm.anti_freeze_protection_trigger", + "0932": "temperature_alarm.window_status_detection_deactivation", + "0933": "temperature_alarm.window_status_detection_trigger", "0a": "humidity_alarm", + "0a00": "humidity_alarm.collection_error", + "0a01": "humidity_alarm.lower_range_error", + "0a02": "humidity_alarm.over_range_error", + "0a03": "humidity_alarm.no_data", "0b": "target_temperature_alarm", + "0b03": "target_temperature_alarm.no_data", "c8": "device_status", "c4": "auto_p_enable", "6b": "heating_target_temperature", @@ -1203,6 +1367,12 @@ function cmdMap() { "7bxx04": "schedule_settings._item.cycle_settings", "7bxx04xx": "schedule_settings._item.cycle_settings._item", "7c": "interface_settings", + "7c00": "interface_settings.valve_4_pipe_10_v", + "7c01": "interface_settings.valve_2_pipe_10_v", + "7c02": "interface_settings.valve_2_pipe_10_v_fan_ec", + "7c03": "interface_settings.valve_4_pipe_2_wire_fan_ec", + "7c04": "interface_settings.valve_2_pipe_2_wire_fan_ec", + "7c05": "interface_settings.valve_2_pipe_3_wire_fan_ec", "7d": "valve_control_settings", "7d02": "valve_control_settings.control_interval", "7d00": "valve_control_settings.control_adjustment_range", @@ -1234,6 +1404,159 @@ function cmdMap() { "5d": "update_open_windows_state", "5e": "insert_schedule", "5f": "delete_schedule", + "bf": "reset", "be": "reboot" }; +} +function processTemperature(decoded) { + var allTemperatureProperties = { + "temperature": { + "precision": 2 + }, + "target_temperature": { + "precision": 2 + }, + "temperature_alarm.lower_range_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.lower_range_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.over_range_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.over_range_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.within_range_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.within_range_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.exceed_range_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.exceed_range_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.persistent_low_temperature_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.persistent_low_temperature_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.persistent_high_alarm_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.persistent_high_alarm_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.anti_freeze_protection_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.anti_freeze_protection_trigger.temperature": { + "precision": 2 + }, + "temperature_alarm.window_status_detection_deactivation.temperature": { + "precision": 2 + }, + "temperature_alarm.window_status_detection_trigger.temperature": { + "precision": 2 + }, + "heating_target_temperature": { + "precision": 2 + }, + "cooling_target_temperature": { + "precision": 2 + }, + "target_temperature_tolerance": { + "precision": 2 + }, + "heating_target_temperature_range.min": { + "precision": 2 + }, + "heating_target_temperature_range.max": { + "precision": 2 + }, + "cooling_target_temperature_range.min": { + "precision": 2 + }, + "cooling_target_temperature_range.max": { + "precision": 2 + }, + "temperature_control_dehumidification.temperature_tolerance": { + "precision": 2 + }, + "fan_auto_mode_temperature_range.speed_range_1": { + "precision": 2 + }, + "fan_auto_mode_temperature_range.speed_range_2": { + "precision": 2 + }, + "temperature_calibration_settings.calibration_value": { + "precision": 2 + }, + "temperature_alarm_settings.threshold_min": { + "precision": 2 + }, + "temperature_alarm_settings.threshold_max": { + "precision": 2 + }, + "high_temperature_alarm_settings.difference_in_temperature": { + "precision": 2 + }, + "low_temperature_alarm_settings.difference_in_temperature": { + "precision": 2 + }, + "schedule_settings._item.content.heat_target_temperature": { + "precision": 2 + }, + "schedule_settings._item.content.cool_target_temperature": { + "precision": 2 + }, + "schedule_settings._item.content.temperature_tolerance": { + "precision": 2 + }, + "valve_control_settings.control_adjustment_range": { + "precision": 2 + }, + "window_opening_detection_settings.temperature_detection.difference_in_temperature": { + "precision": 2 + }, + "freeze_protection_settings.target_temperature": { + "precision": 2 + }, + "send_temperature.temperature": { + "precision": 2 + } +}; + var leafPaths = getAllLeafPaths(decoded); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + if (hasPath(decoded, propertyId)) { + setPath(decoded, fahrenheitProperty, Number((getPath(decoded, propertyId) * 1.8 + 32).toFixed(allTemperatureProperties[newPropertyId].precision))); + setPath(decoded, celsiusProperty, Number(getPath(decoded, propertyId).toFixed(allTemperatureProperties[newPropertyId].precision))); + } + } + } + return decoded; } \ No newline at end of file diff --git a/vendors/milesight-iot/wt-series/wt304/wt304-encoder.js b/vendors/milesight-iot/wt-series/wt304/wt304-encoder.js index 39cdf48..353615a 100644 --- a/vendors/milesight-iot/wt-series/wt304/wt304-encoder.js +++ b/vendors/milesight-iot/wt-series/wt304/wt304-encoder.js @@ -26,6 +26,7 @@ function Encoder(obj, port) { /* eslint-enable */ function milesightDeviceEncode(payload) { + processTemperature(payload); var encoded = []; //0xfe if ('request_check_order' in payload) { @@ -80,7 +81,6 @@ function milesightDeviceEncode(payload) { var hex = Number(part).toString(16); while (hex.length < 2) { hex = '0' + hex; } pureNumber.push(hex); - console.log(pureNumber); formateStrParts.push('_item'); } else { formateStrParts.push(part); @@ -1425,6 +1425,12 @@ function milesightDeviceEncode(payload) { buffer.writeUInt8(payload.delete_schedule.type); encoded = encoded.concat(buffer.toBytes()); } + //0xbf + if ('reset' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xbf); + encoded = encoded.concat(buffer.toBytes()); + } //0xbe if ('reboot' in payload) { var buffer = new Buffer(); @@ -1463,6 +1469,14 @@ Buffer.prototype.writeInt16LE = function(value) { this._write(value < 0 ? value + 0x10000 : value, 2, true); }; +Buffer.prototype.writeUInt24LE = function(value) { + this._write(value, 3, true); +}; + +Buffer.prototype.writeInt24LE = function(value) { + this._write(value < 0 ? value + 0x1000000 : value, 3, true); +}; + Buffer.prototype.writeUInt32LE = function(value) { this._write(value, 4, true); }; @@ -1471,6 +1485,55 @@ Buffer.prototype.writeInt32LE = function(value) { this._write(value < 0 ? value + 0x100000000 : value, 4, true); }; +Buffer.prototype.writeFloatLE = function(value) { + var sign = (value < 0 || (value === 0 && 1 / value === -Infinity)) ? 1 : 0; + var absValue = Math.abs(value); + + if (absValue === 0) { + this._write(sign ? 0x80000000 : 0, 4, true); + return; + } else if (value !== value) { + this._write(0x7fc00000, 4, true); + return; + } else if (absValue === Infinity) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } + + var exponent = Math.floor(Math.log(absValue) / Math.LN2); + var normalized = absValue / Math.pow(2, exponent); + if (normalized < 1) { + exponent -= 1; + normalized *= 2; + } else if (normalized >= 2) { + exponent += 1; + normalized /= 2; + } + + var biasedExponent = exponent + 127; + var mantissaBits = 0; + if (biasedExponent <= 0) { + biasedExponent = 0; + mantissaBits = Math.round(absValue / Math.pow(2, -149)); + if (mantissaBits > 0x7fffff) { + mantissaBits = 0x7fffff; + } + } else { + mantissaBits = Math.round((normalized - 1) * 0x800000); + if (mantissaBits === 0x800000) { + biasedExponent += 1; + mantissaBits = 0; + } + if (biasedExponent >= 0xff) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } + } + + var floatBits = ((((sign << 31) >>> 0) | ((biasedExponent & 0xff) << 23) | (mantissaBits & 0x7fffff)) >>> 0); + this._write(floatBits, 4, true); +}; + Buffer.prototype.writeBytes = function(bytes, length, mustEqual) { if (mustEqual === undefined) mustEqual = false; if (length < bytes.length) { @@ -1559,6 +1622,100 @@ function isValid(value) { return value !== undefined && value !== null && value !== ''; } +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; +} + +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; +} + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } + + current[parts[parts.length - 1]] = value; + return obj; +} + +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); +} + +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); +} + +function getAllLeafPaths(obj, prefix) { + var paths = []; + + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } + } + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; +} + +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); +} function cmdMap() { return { @@ -1585,16 +1742,47 @@ function cmdMap() { "fan_control_info": "07", "execution_plan_id": "08", "temperature_alarm": "09", + "temperature_alarm.collection_error": "0900", + "temperature_alarm.lower_range_error": "0901", + "temperature_alarm.over_range_error": "0902", + "temperature_alarm.no_data": "0903", + "temperature_alarm.lower_range_alarm_deactivation": "0910", + "temperature_alarm.lower_range_alarm_trigger": "0911", + "temperature_alarm.over_range_alarm_deactivation": "0912", + "temperature_alarm.over_range_alarm_trigger": "0913", + "temperature_alarm.within_range_alarm_deactivation": "0914", + "temperature_alarm.within_range_alarm_trigger": "0915", + "temperature_alarm.exceed_range_alarm_deactivation": "0916", + "temperature_alarm.exceed_range_alarm_trigger": "0917", + "temperature_alarm.persistent_low_temperature_alarm_deactivation": "0920", + "temperature_alarm.persistent_low_temperature_alarm_trigger": "0921", + "temperature_alarm.persistent_high_alarm_deactivation": "0922", + "temperature_alarm.persistent_high_alarm_trigger": "0923", + "temperature_alarm.anti_freeze_protection_deactivation": "0930", + "temperature_alarm.anti_freeze_protection_trigger": "0931", + "temperature_alarm.window_status_detection_deactivation": "0932", + "temperature_alarm.window_status_detection_trigger": "0933", "humidity_alarm": "0a", + "humidity_alarm.collection_error": "0a00", + "humidity_alarm.lower_range_error": "0a01", + "humidity_alarm.over_range_error": "0a02", + "humidity_alarm.no_data": "0a03", "target_temperature_alarm": "0b", + "target_temperature_alarm.no_data": "0b03", "relay_status": "10", "device_status": "c8", "collection_interval": "60", + "collection_interval.seconds_of_time": "6000", + "collection_interval.minutes_of_time": "6001", "reporting_interval": "62", + "reporting_interval.seconds_of_time": "6200", + "reporting_interval.minutes_of_time": "6201", "auto_p_enable": "c4", "relay_changes_report_enable": "90", "temperature_unit": "63", "temperature_source": "85", + "temperature_source.lorawan_reception": "8502", + "temperature_source.d2d_reception": "8503", "system_status": "67", "mode_enable": "64", "temperature_control_mode": "68", @@ -1640,6 +1828,12 @@ function cmdMap() { "schedule_settings._item.cycle_settings": "7bxx04", "schedule_settings._item.cycle_settings._item": "7bxx04xx", "interface_settings": "7c", + "interface_settings.valve_4_pipe_10_v": "7c00", + "interface_settings.valve_2_pipe_10_v": "7c01", + "interface_settings.valve_2_pipe_10_v_fan_ec": "7c02", + "interface_settings.valve_4_pipe_2_wire_fan_ec": "7c03", + "interface_settings.valve_2_pipe_2_wire_fan_ec": "7c04", + "interface_settings.valve_2_pipe_3_wire_fan_ec": "7c05", "valve_control_settings": "7d", "valve_control_settings.control_interval": "7d02", "valve_control_settings.control_adjustment_range": "7d00", @@ -1652,8 +1846,14 @@ function cmdMap() { "valve_output_0v_enable": "8f", "di_enable": "80", "di_settings": "81", + "di_settings.card_control": "8100", + "di_settings.card_control.system_control": "810000", + "di_settings.card_control.insertion_plan": "810001", + "di_settings.magnet_detection": "8101", "window_opening_detection_enable": "82", "window_opening_detection_settings": "83", + "window_opening_detection_settings.temperature_detection": "8300", + "window_opening_detection_settings.magnet_detection": "8301", "freeze_protection_settings": "84", "d2d_pairing_enable": "86", "d2d_pairing_settings": "87", @@ -1680,6 +1880,168 @@ function cmdMap() { "update_open_windows_state": "5d", "insert_schedule": "5e", "delete_schedule": "5f", + "reset": "bf", "reboot": "be" }; +} +function processTemperature(payload) { + var allTemperatureProperties = { + "temperature": { + "coefficient": 0.01 + }, + "target_temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.lower_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.lower_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.over_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.over_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.within_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.within_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.exceed_range_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.exceed_range_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.persistent_low_temperature_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.persistent_low_temperature_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.persistent_high_alarm_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.persistent_high_alarm_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.anti_freeze_protection_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.anti_freeze_protection_trigger.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.window_status_detection_deactivation.temperature": { + "coefficient": 0.01 + }, + "temperature_alarm.window_status_detection_trigger.temperature": { + "coefficient": 0.01 + }, + "heating_target_temperature": { + "coefficient": 0.01 + }, + "cooling_target_temperature": { + "coefficient": 0.01 + }, + "target_temperature_tolerance": { + "coefficient": 0.01 + }, + "heating_target_temperature_range.min": { + "coefficient": 0.01 + }, + "heating_target_temperature_range.max": { + "coefficient": 0.01 + }, + "cooling_target_temperature_range.min": { + "coefficient": 0.01 + }, + "cooling_target_temperature_range.max": { + "coefficient": 0.01 + }, + "temperature_control_dehumidification.temperature_tolerance": { + "coefficient": 0.01 + }, + "fan_auto_mode_temperature_range.speed_range_1": { + "coefficient": 0.01 + }, + "fan_auto_mode_temperature_range.speed_range_2": { + "coefficient": 0.01 + }, + "temperature_calibration_settings.calibration_value": { + "coefficient": 0.01 + }, + "temperature_alarm_settings.threshold_min": { + "coefficient": 0.01 + }, + "temperature_alarm_settings.threshold_max": { + "coefficient": 0.01 + }, + "high_temperature_alarm_settings.difference_in_temperature": { + "coefficient": 0.01 + }, + "low_temperature_alarm_settings.difference_in_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content.heat_target_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content.cool_target_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content.temperature_tolerance": { + "coefficient": 0.01 + }, + "valve_control_settings.control_adjustment_range": { + "coefficient": 0.01 + }, + "window_opening_detection_settings.temperature_detection.difference_in_temperature": { + "coefficient": 0.01 + }, + "freeze_protection_settings.target_temperature": { + "coefficient": 0.01 + }, + "send_temperature.temperature": { + "coefficient": 0.01 + } +}; + var leafPaths = getAllLeafPaths(payload); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + var stringCoefficient = String(allTemperatureProperties[newPropertyId].coefficient); + var dotIndex = stringCoefficient.indexOf('.'); + var precision = dotIndex != -1 ? stringCoefficient.length - dotIndex - 1 : 0; + if (!hasPath(payload, propertyId)) { + if (hasPath(payload, fahrenheitProperty) && hasPath(payload, celsiusProperty)) { + throw new Error(fahrenheitProperty + ' and ' + celsiusProperty + ' cannot be in payload at the same time'); + } + if (hasPath(payload, fahrenheitProperty)) { + setPath(payload, propertyId, Number(((getPath(payload, fahrenheitProperty) - 32) / 1.8).toFixed(precision))); + } else if (hasPath(payload, celsiusProperty)) { + setPath(payload, propertyId, Number(getPath(payload, celsiusProperty).toFixed(precision))); + } + } + } + } + return payload; } \ No newline at end of file diff --git a/vendors/milesight-iot/wt-series/wt401/wt401-codec.json b/vendors/milesight-iot/wt-series/wt401/wt401-codec.json index fd3f58a..1dfb84c 100644 --- a/vendors/milesight-iot/wt-series/wt401/wt401-codec.json +++ b/vendors/milesight-iot/wt-series/wt401/wt401-codec.json @@ -1,1527 +1,3120 @@ { "version": "1.0.0", - "bytes": "", "object": [ { - "id": "tsl_version", - "name": "TSL Version", + "id": "battery", + "name": "Battery", "value": "", - "unit": "", + "unit": "%", "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 6, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 0, + 100 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT" }, { - "id": "product_sn", - "name": "Product SN", + "id": "battery_event.type", + "name": "Battery Event Type(Battery Event)", "value": "", "unit": "", "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", + "data_type": "NUMBER", + "value_type": "UINT8", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "version.hardware_version", - "name": "Hardware Version", - "value": "", + "id": "ble_enable", + "name": "Bluetooth Enable", + "value": "1", "unit": "", - "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 6, - "bacnet_type": "character_string_value_object", + "access_mode": "RW", + "data_type": "BOOL", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ], + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "version.firmware_version", - "name": "Firmware Version", + "id": "ble_event.type", + "name": "Bluetooth Event Type(Bluetooth Event)", "value": "", "unit": "", "access_mode": "R", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 16, - "bacnet_type": "character_string_value_object", + "data_type": "NUMBER", + "value_type": "UINT8", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "oem_id", - "name": "OEM ID", + "id": "ble_name", + "name": "Bluetooth Name", "value": "", "unit": "", - "access_mode": "R", + "max_length": 13, + "access_mode": "RW", "data_type": "TEXT", "value_type": "STRING", - "max_length": 2, "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "product_frequency_band", - "name": "Product Frequency Band", - "value": "", + "id": "ble_phone_name.length", + "name": "Length(BLE Phone Name)", + "value": "6", "unit": "", - "access_mode": "R", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 1, + 64 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "ble_phone_name.value" + ] + }, + { + "id": "ble_phone_name.value", + "name": "Name(BLE Phone Name)", + "value": "123456", + "unit": "", + "access_mode": "RW", "data_type": "TEXT", "value_type": "STRING", - "max_length": 16, + "max_length": 64, "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "ble_phone_name.length" + ] }, { - "id": "device_status", - "name": "Device Status", - "value": "", + "id": "button_custom_function.enable", + "name": "Enable(Button Custom Function)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "off" }, - { "value": 1, "name": "on" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "lorawan_class", - "name": "LoRaWAN Class Type", - "value": "", + "id": "button_custom_function.mode1", + "name": "Button1 Custom Function(Button Custom Function)", + "value": "1", "unit": "", - "access_mode": "R", + "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "Class A" }, - { "value": 1, "name": "Class B" }, - { "value": 2, "name": "Class C" }, - { "value": 3, "name": "Class CtoB" } + { + "value": 1, + "name": "Temperature Control Mode" + }, + { + "value": 2, + "name": "Fan Mode" + }, + { + "value": 3, + "name": "Schedule Switch" + }, + { + "value": 4, + "name": "Status Report" + }, + { + "value": 5, + "name": "Filter Cleaning Reset" + }, + { + "value": 6, + "name": "Button Event1" + }, + { + "value": 7, + "name": "Temperature Unit Switch" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "battery", - "name": "Battery", - "value": "100", - "unit": "%", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "UINT8", - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 98, - "bacnet_unit_type": "UNITS_PERCENT" - }, - { - "id": "temperature", - "name": "Temperature", - "value": "26", - "unit": "°C", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" - }, - { - "id": "humidity", - "name": "Humidity", - "value": "", - "unit": "%r.h.", - "access_mode": "R", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_input_object", - "bacnet_unit_type_id": 29, - "bacnet_unit_type": "UNITS_PERCENT_RELATIVE_HUMIDITY" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "temperature_control_mode", - "name": "Temperature Control Mode", - "value": "0", + "id": "button_custom_function.mode2", + "name": "Button2 Custom Function(Button Custom Function)", + "value": "2", "unit": "", - "access_mode": "R", + "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "heat" }, - { "value": 1, "name": "em heat" }, - { "value": 2, "name": "cool" }, - { "value": 3, "name": "auto" }, - { "value": 10, "name": "off" }, - { "value": 11, "name": "NA" } + { + "value": 1, + "name": "Temperature Control Mode" + }, + { + "value": 2, + "name": "Fan Mode" + }, + { + "value": 3, + "name": "Schedule Switch" + }, + { + "value": 4, + "name": "Status Report" + }, + { + "value": 5, + "name": "Filter Cleaning Reset" + }, + { + "value": 6, + "name": "Button Event2" + }, + { + "value": 7, + "name": "Temperature Unit Switch" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "fan_mode", - "name": "Fan Mode", + "id": "button_custom_function.mode3", + "name": "Button3 Custom Function(Button Custom Function)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "auto" }, - { "value": 1, "name": "circulate" }, - { "value": 2, "name": "on" }, - { "value": 3, "name": "low" }, - { "value": 4, "name": "medium" }, - { "value": 5, "name": "high" }, - { "value": 10, "name": "off" }, - { "value": 11, "name": "NA" } + { + "value": 0, + "name": "System On/Off" + }, + { + "value": 3, + "name": "Schedule Switch" + }, + { + "value": 4, + "name": "Status Report" + }, + { + "value": 5, + "name": "Filter Cleaning Reset" + }, + { + "value": 6, + "name": "Button Event3" + }, + { + "value": 7, + "name": "Temperature Unit Switch" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "execution_plan", - "name": "Execution Plan", + "id": "button_custom_function.subcmd", + "name": "Subcmd ID(Button Custom Function)", "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "plan_1" }, - { "value": 1, "name": "plan_2" }, - { "value": 2, "name": "plan_3" }, - { "value": 3, "name": "plan_4" }, - { "value": 4, "name": "plan_5" }, - { "value": 5, "name": "plan_6" }, - { "value": 6, "name": "plan_7" }, - { "value": 7, "name": "plan_8" }, - { "value": 8, "name": "plan_9" }, - { "value": 9, "name": "plan_10" }, - { "value": 10, "name": "plan_11" }, - { "value": 11, "name": "plan_12" }, - { "value": 12, "name": "plan_13" }, - { "value": 13, "name": "plan_14" }, - { "value": 14, "name": "plan_15" }, - { "value": 15, "name": "plan_16" }, - { "value": 255, "name": "not_executed" } - ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "celsius_minimum_dead_zone", + "name": "Celsius DeadBand", + "value": "5", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 30 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "target_temperature_1", - "name": "Target Temperature 1", + "id": "celsius_target_temperature1", + "name": "Celsius Target Temperature1", "value": "", "unit": "°C", "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", + "range": [ + 5, + 35 + ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "target_temperature_2", - "name": "Target Temperature 2", + "id": "celsius_target_temperature2", + "name": "Celsius Target Temperature2", "value": "", "unit": "°C", "access_mode": "R", "data_type": "NUMBER", "value_type": "FLOAT", + "range": [ + 5, + 35 + ], "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 62, "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "pir_status", - "name": "Occupied Status", + "id": "celsius_temperature", + "name": "Celsius Temperature", + "value": "", + "unit": "°C", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "children_lock_settings.button1_event", + "name": "Button Event 1 (Child Lock)", "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "vacant" }, - { "value": 1, "name": "occupied" }, - { "value": 2, "name": "night_occupied" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "ble_event", - "name": "BLE Event", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.button2_event", + "name": "Button Event 2 (Child Lock)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "none" }, - { "value": 1, "name": "peer_cancel" }, - { "value": 2, "name": "disconnect" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "power_bus_event", - "name": "Power Bus Event", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.button3_event", + "name": "Button Event 3 (Child Lock)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "none" }, - { "value": 1, "name": "communication_error" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "temperature_alarm", - "name": "Temperature Alarm", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.cancel_pair", + "name": "Cancel Pairing(Child Lock)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "collection_error" }, - { "value": 1, "name": "lower_range_error" }, - { "value": 2, "name": "over_range_error" }, - { "value": 3, "name": "no_data" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "humidity_alarm", - "name": "Humidity Alarm", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.enable", + "name": "Enable(Child Lock)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "collection_error" }, - { "value": 1, "name": "lower_range_error" }, - { "value": 2, "name": "over_range_error" }, - { "value": 3, "name": "no_data" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "button_event", - "name": "Button Event", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.fan_mode", + "name": "Fan Mode(Child Lock)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "F1" }, - { "value": 1, "name": "F2" }, - { "value": 2, "name": "F3" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "battery_event", - "name": "Battery Event", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.filter_clean_alarm_release", + "name": "Filter Clean Alarm Release(Child Lock)", + "value": "0", "unit": "", - "access_mode": "R", - "data_type": "ENUM", + "access_mode": "RW", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "recover" }, - { "value": 1, "name": "low_voltage" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "collection_interval.unit", - "name": "Collecting Interval (Unit)", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.plan_switch", + "name": "Schedule Switch(Child Lock)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "second" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "collection_interval.seconds_of_time", - "name": "Collecting Interval (Seconds)", - "value": "30", - "unit": "s", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": ["collection_interval.unit", "collection_interval.seconds_of_time", "collection_interval.minutes_of_time"] - }, - { - "id": "reporting_interval.unit", - "name": "Reporting Interval (Unit)", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.power_on_off", + "name": "Power On/Off(Child Lock)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", - "values": [ - { "value": 1, "name": "minute" } + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "reporting_interval.mode", - "name": "Reporting Interval (Mode)", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.reboot_reset", + "name": "Reboot&Reset(Child Lock)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "ble" }, - { "value": 1, "name": "lora" }, - { "value": 2, "name": "ble_and_lora" }, - { "value": 3, "name": "power_bus_and_lora" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "reporting_interval.minutes_of_time", - "name": "Reporting Interval (Minutes)", - "value": "30", - "unit": "min", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.reserved", + "name": "Reserved(Child Lock)", + "value": "0", + "unit": "", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", + "value_type": "UINT8", "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["reporting_interval.unit", "reporting_interval.mode", "reporting_interval.minutes_of_time"] - }, - { - "id": "intelligent_display_enable", - "name": "Smart Display", - "value": "1", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch" + ], + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ] + }, + { + "id": "children_lock_settings.status_report", + "name": "Status Report (Child Lock)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "temperature_unit", - "name": "Temperature Unit", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.system_on_off", + "name": "System On/Off(Child Lock)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "celsius" }, - { "value": 1, "name": "fahrenheit" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "temperature_control_mode_support.heat", - "name": "Temperature Control Mode Support (Heat)", - "value": "1", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.temp_down", + "name": "Temperature -(Child Lock)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["temperature_control_mode_support.em_heat", "temperature_control_mode_support.cool", "temperature_control_mode_support.auto"] - }, - { - "id": "temperature_control_mode_support.em_heat", - "name": "Temperature Control Mode Support (EM Heat)", - "value": "1", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.temp_up", + "name": "Temperature +(Child Lock)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["temperature_control_mode_support.heat", "temperature_control_mode_support.cool", "temperature_control_mode_support.auto"] - }, - { - "id": "temperature_control_mode_support.cool", - "name": "Temperature Control Mode Support (Cool)", - "value": "1", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.temperature_control_mode", + "name": "Temperature Control Mode(Child Lock)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["temperature_control_mode_support.heat", "temperature_control_mode_support.em_heat", "temperature_control_mode_support.auto"] - }, - { - "id": "temperature_control_mode_support.auto", - "name": "Temperature Control Mode Support (Auto)", - "value": "1", + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.temperature_unit_switch", + "children_lock_settings.reserved" + ] + }, + { + "id": "children_lock_settings.temperature_unit_switch", + "name": "Temperature Unit Switch(Child Lock)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["temperature_control_mode_support.heat", "temperature_control_mode_support.em_heat", "temperature_control_mode_support.cool"] + "reference": [ + "children_lock_settings.enable", + "children_lock_settings.temp_up", + "children_lock_settings.temp_down", + "children_lock_settings.system_on_off", + "children_lock_settings.fan_mode", + "children_lock_settings.temperature_control_mode", + "children_lock_settings.reboot_reset", + "children_lock_settings.power_on_off", + "children_lock_settings.cancel_pair", + "children_lock_settings.plan_switch", + "children_lock_settings.status_report", + "children_lock_settings.filter_clean_alarm_release", + "children_lock_settings.button1_event", + "children_lock_settings.button2_event", + "children_lock_settings.button3_event", + "children_lock_settings.reserved" + ] + }, + { + "id": "collection_interval.minutes_of_time", + "name": "Collecting Interval(Collecting Interval)", + "value": "1", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 1440 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "collection_interval.unit" + ] }, { - "id": "target_temperature_mode", - "name": "Target Temperature Mode", + "id": "collection_interval.seconds_of_time", + "name": "Collecting Interval(Collecting Interval)", + "value": "30", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 3600 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "collection_interval.unit" + ] + }, + { + "id": "collection_interval.unit", + "name": "Collecting Interval Unit(Collecting Interval)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "single_point" }, - { "value": 1, "name": "dual_point" } + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "target_temperature_resolution", - "name": "Target Temperature Resolution", - "value": "0", + "id": "communicate_interval.ble_lora.minutes_of_time", + "name": "BLE_LORA Communicate Interval(BLE_LORA Communicate Interval)", + "value": "1", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 1, + 30 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "communicate_interval.ble_lora.unit" + ] + }, + { + "id": "communicate_interval.ble_lora.seconds_of_time", + "name": "BLE_LORA Communicate Interval(BLE_LORA Communicate Interval)", + "value": "600", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 10, + 1800 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "communicate_interval.ble_lora.unit" + ] + }, + { + "id": "communicate_interval.ble_lora.unit", + "name": "BLE_LORA Communicate Interval Unit(BLE_LORA Communicate Interval)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "0.5" }, - { "value": 1, "name": "1" } + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "system_status", - "name": "System Status", - "value": "0", + "id": "communicate_interval.ble.minutes_of_time", + "name": "BLE Communicate Interval(BLE Communicate Interval)", + "value": "1", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 1, + 30 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "communicate_interval.ble.unit" + ] + }, + { + "id": "communicate_interval.ble.seconds_of_time", + "name": "BLE Communicate Interval(BLE Communicate Interval)", + "value": "600", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 10, + 1800 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "communicate_interval.ble.unit" + ] + }, + { + "id": "communicate_interval.ble.unit", + "name": "BLE Communicate Interval Unit(BLE Communicate Interval)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "off" }, - { "value": 1, "name": "on" } + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "temperature_control_mode_in_plan_enable", - "name": "Temperature Control Mode in Plan (Enable)", + "id": "communicate_interval.id", + "name": "Communicate Interval ID(Communicate Interval)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "BLE" + }, + { + "value": 1, + "name": "LORA" + }, + { + "value": 2, + "name": "BLE+LORA" + }, + { + "value": 3, + "name": "POWERBUS+LORA" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "target_temperature_settings.heat", - "name": "Target Temperature Settings (Heat)", - "value": "17", - "unit": "°C", + "id": "communicate_interval.lora.minutes_of_time", + "name": "LORA Communicate Interval(LORA Communicate Interval)", + "value": "1", + "unit": "min", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT8", + "range": [ + 1, + 30 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "communicate_interval.lora.unit" + ] }, { - "id": "target_temperature_settings.em_heat", - "name": "Target Temperature Settings (EM Heat)", - "value": "17", - "unit": "°C", + "id": "communicate_interval.lora.seconds_of_time", + "name": "LORA Communicate Interval(LORA Communicate Interval)", + "value": "600", + "unit": "s", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT16", + "range": [ + 10, + 1800 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "communicate_interval.lora.unit" + ] }, { - "id": "target_temperature_settings.cool", - "name": "Target Temperature Settings (Cool)", - "value": "28", - "unit": "°C", + "id": "communicate_interval.lora.unit", + "name": "LORA Communicate Interval Unit(LORA Communicate Interval)", + "value": "1", + "unit": "", "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "target_temperature_settings.auto", - "name": "Target Temperature Settings (Auto)", - "value": "23", - "unit": "°C", + "id": "communicate_interval.power_bus.minutes_of_time", + "name": "POWERBUS_LORA Communicate Interval(POWERBUS_LORA Communicate Interval)", + "value": "1", + "unit": "min", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT8", + "range": [ + 1, + 30 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "communicate_interval.power_bus.unit" + ] }, { - "id": "target_temperature_settings.auto_heat", - "name": "Target Temperature Settings (Auto-Heat)", - "value": "17", - "unit": "°C", + "id": "communicate_interval.power_bus.seconds_of_time", + "name": "POWERBUS_LORA Communicate Interval(POWERBUS_LORA Communicate Interval)", + "value": "600", + "unit": "s", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", + "value_type": "UINT16", + "range": [ + 10, + 1800 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "communicate_interval.power_bus.unit" + ] }, { - "id": "target_temperature_settings.auto_cool", - "name": "Target Temperature Settings (Auto-Cool)", - "value": "28", - "unit": "°C", + "id": "communicate_interval.power_bus.unit", + "name": "POWERBUS_LORA Communicate Interval Unit(POWERBUS_LORA Communicate Interval)", + "value": "1", + "unit": "", "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "dead_band", - "name": "Dead Band", - "value": "5", - "unit": "°C", + "id": "communication_mode", + "name": "Communication Mode", + "value": "1", + "unit": "", "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" - }, - { - "id": "target_temperature_range.heat.min", - "name": "Target Temperature Range (Heat Min)", - "value": "10", - "unit": "°C", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["target_temperature_range.heat.min", "target_temperature_range.heat.max"] - }, - { - "id": "target_temperature_range.heat.max", - "name": "Target Temperature Range (Heat Max)", - "value": "17", - "unit": "°C", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["target_temperature_range.heat.min", "target_temperature_range.heat.max"] - }, - { - "id": "target_temperature_range.em_heat.min", - "name": "Target Temperature Range (EM Heat Min)", - "value": "10", - "unit": "°C", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["target_temperature_range.em_heat.min", "target_temperature_range.em_heat.max"] - }, - { - "id": "target_temperature_range.em_heat.max", - "name": "Target Temperature Range (EM Heat Max)", - "value": "28", - "unit": "°C", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["target_temperature_range.em_heat.min", "target_temperature_range.em_heat.max"] - }, - - { - "id": "target_temperature_range.cool.min", - "name": "Target Temperature Range (Cool Min)", - "value": "23", - "unit": "°C", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["target_temperature_range.cool.min", "target_temperature_range.cool.max"] - }, - { - "id": "target_temperature_range.cool.max", - "name": "Target Temperature Range (Cool Max)", - "value": "35", - "unit": "°C", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["target_temperature_range.cool.min", "target_temperature_range.cool.max"] + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "BLE" + }, + { + "value": 1, + "name": "LoRa" + }, + { + "value": 2, + "name": "BLE+LoRa" + }, + { + "value": 3, + "name": "PowerBus+LoRa" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "target_temperature_range.auto.min", - "name": "Target Temperature Range (Auto Min)", + "id": "data_sync_timeout", + "name": "Data Timeout", "value": "10", - "unit": "°C", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["target_temperature_range.auto.min", "target_temperature_range.auto.max"] - }, - { - "id": "target_temperature_range.auto.max", - "name": "Target Temperature Range (Auto Max)", - "value": "35", - "unit": "°C", + "unit": "min", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["target_temperature_range.auto.min", "target_temperature_range.auto.max"] - }, - { - "id": "communicate_interval.unit", - "name": "Communicate Interval (Unit)", - "value": "", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", "value_type": "UINT8", - "values": [{ "value": 1, "name": "minute" }], - "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "range": [ + 1, + 60 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES" }, { - "id": "communicate_interval.mode", - "name": "Communicate Interval (Mode)", - "value": "", + "id": "data_sync_to_peer", + "name": "Temperature & Humidity Data Source", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "ble" }, - { "value": 1, "name": "lora" }, - { "value": 2, "name": "ble_and_lora" }, - { "value": 3, "name": "power_bus_and_lora" } + { + "value": 0, + "name": "Embedded Data" + }, + { + "value": 1, + "name": "External Receive" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "communicate_interval.minutes_of_time", - "name": "Communicate Interval (Minutes)", - "value": "30", + "id": "daylight_saving_time.daylight_saving_time_offset", + "name": "DST Bias(Daylight Saving Time)", + "value": "60", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", + "value_type": "UINT8", + "range": [ + 1, + 120 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 72, "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["communicate_interval.unit", "communicate_interval.mode", "communicate_interval.minutes_of_time"] + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] }, { - "id": "button_custom_function.enable", - "name": "Button Custom Function (Enable)", + "id": "daylight_saving_time.enable", + "name": "Daylight Saving Time(Daylight Saving Time)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] }, { - "id": "button_custom_function.button_1", - "name": "Button 1 Custom Function", - "value": "1", - "unit": "", + "id": "daylight_saving_time.end_hour_min", + "name": "Time(Daylight Saving Time)", + "value": "0", + "unit": "min", "access_mode": "RW", "data_type": "ENUM", - "value_type": "UINT8", + "value_type": "UINT16", "values": [ - { "value": 1, "name": "temperature_control_mode" }, - { "value": 2, "name": "fan_mode" }, - { "value": 3, "name": "plan_switch" }, - { "value": 4, "name": "status_report" }, - { "value": 5, "name": "filter_alarm_clean" }, - { "value": 6, "name": "button_value" }, - { "value": 7, "name": "temperature_unit_switch" } + { + "value": 0, + "name": "00:00" + }, + { + "value": 60, + "name": "01:00" + }, + { + "value": 120, + "name": "02:00" + }, + { + "value": 180, + "name": "03:00" + }, + { + "value": 240, + "name": "04:00" + }, + { + "value": 300, + "name": "05:00" + }, + { + "value": 360, + "name": "06:00" + }, + { + "value": 420, + "name": "07:00" + }, + { + "value": 480, + "name": "08:00" + }, + { + "value": 540, + "name": "09:00" + }, + { + "value": 600, + "name": "10:00" + }, + { + "value": 660, + "name": "11:00" + }, + { + "value": 720, + "name": "12:00" + }, + { + "value": 780, + "name": "13:00" + }, + { + "value": 840, + "name": "14:00" + }, + { + "value": 900, + "name": "15:00" + }, + { + "value": 960, + "name": "16:00" + }, + { + "value": 1020, + "name": "17:00" + }, + { + "value": 1080, + "name": "18:00" + }, + { + "value": 1140, + "name": "19:00" + }, + { + "value": 1200, + "name": "20:00" + }, + { + "value": 1260, + "name": "21:00" + }, + { + "value": 1320, + "name": "22:00" + }, + { + "value": 1380, + "name": "23:00" + } ], "bacnet_type": "multistate_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day" + ] }, { - "id": "button_custom_function.button_2", - "name": "Button 2 Custom Function", + "id": "daylight_saving_time.end_month", + "name": "Month(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 1, "name": "temperature_control_mode" }, - { "value": 2, "name": "fan_mode" }, - { "value": 3, "name": "plan_switch" }, - { "value": 4, "name": "status_report" }, - { "value": 5, "name": "filter_alarm_clean" }, - { "value": 6, "name": "button_value" }, - { "value": 7, "name": "temperature_unit_switch" } + { + "value": 1, + "name": "Jan." + }, + { + "value": 2, + "name": "Feb." + }, + { + "value": 3, + "name": "Mar." + }, + { + "value": 4, + "name": "Apr." + }, + { + "value": 5, + "name": "May" + }, + { + "value": 6, + "name": "Jun." + }, + { + "value": 7, + "name": "Jul." + }, + { + "value": 8, + "name": "Aug." + }, + { + "value": 9, + "name": "Sep." + }, + { + "value": 10, + "name": "Oct." + }, + { + "value": 11, + "name": "Nov." + }, + { + "value": 12, + "name": "Dec." + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] }, { - "id": "button_custom_function.button_3", - "name": "Button 3 Custom Function", + "id": "daylight_saving_time.end_week_day", + "name": "Week(Daylight Saving Time)", "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "system_status" }, - { "value": 3, "name": "plan_switch" }, - { "value": 4, "name": "status_report" }, - { "value": 5, "name": "filter_alarm_clean" }, - { "value": 6, "name": "button_value" }, - { "value": 7, "name": "temperature_unit_switch" } + { + "value": 1, + "name": "Mon." + }, + { + "value": 2, + "name": "Tues." + }, + { + "value": 3, + "name": "Wed." + }, + { + "value": 4, + "name": "Thurs." + }, + { + "value": 5, + "name": "Fri." + }, + { + "value": 6, + "name": "Sat." + }, + { + "value": 7, + "name": "Sun." + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_hour_min" + ] }, { - "id": "child_lock_settings.enable", - "name": "Child Lock Settings (Enable)", - "value": "0", + "id": "daylight_saving_time.end_week_num", + "name": "Number of Week(Daylight Saving Time)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 1, + "name": "1st" + }, + { + "value": 2, + "name": "2nd" + }, + { + "value": 3, + "name": "3rd" + }, + { + "value": 4, + "name": "4th" + }, + { + "value": 5, + "name": "last" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] }, { - "id": "child_lock_settings.temperature_up", - "name": "Child Lock Settings (Temperature Up)", + "id": "daylight_saving_time.start_hour_min", + "name": "Time(Daylight Saving Time)", "value": "0", - "unit": "", + "unit": "min", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", + "data_type": "ENUM", + "value_type": "UINT16", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "00:00" + }, + { + "value": 60, + "name": "01:00" + }, + { + "value": 120, + "name": "02:00" + }, + { + "value": 180, + "name": "03:00" + }, + { + "value": 240, + "name": "04:00" + }, + { + "value": 300, + "name": "05:00" + }, + { + "value": 360, + "name": "06:00" + }, + { + "value": 420, + "name": "07:00" + }, + { + "value": 480, + "name": "08:00" + }, + { + "value": 540, + "name": "09:00" + }, + { + "value": 600, + "name": "10:00" + }, + { + "value": 660, + "name": "11:00" + }, + { + "value": 720, + "name": "12:00" + }, + { + "value": 780, + "name": "13:00" + }, + { + "value": 840, + "name": "14:00" + }, + { + "value": 900, + "name": "15:00" + }, + { + "value": 960, + "name": "16:00" + }, + { + "value": 1020, + "name": "17:00" + }, + { + "value": 1080, + "name": "18:00" + }, + { + "value": 1140, + "name": "19:00" + }, + { + "value": 1200, + "name": "20:00" + }, + { + "value": 1260, + "name": "21:00" + }, + { + "value": 1320, + "name": "22:00" + }, + { + "value": 1380, + "name": "23:00" + } ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] }, { - "id": "child_lock_settings.temperature_down", - "name": "Child Lock Settings (Temperature Down)", - "value": "0", + "id": "daylight_saving_time.start_month", + "name": "Month(Daylight Saving Time)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 1, + "name": "Jan." + }, + { + "value": 2, + "name": "Feb." + }, + { + "value": 3, + "name": "Mar." + }, + { + "value": 4, + "name": "Apr." + }, + { + "value": 5, + "name": "May" + }, + { + "value": 6, + "name": "Jun." + }, + { + "value": 7, + "name": "Jul." + }, + { + "value": 8, + "name": "Aug." + }, + { + "value": 9, + "name": "Sep." + }, + { + "value": 10, + "name": "Oct." + }, + { + "value": 11, + "name": "Nov." + }, + { + "value": 12, + "name": "Dec." + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] }, { - "id": "child_lock_settings.system_on_off", - "name": "Child Lock Settings (System On/Off)", - "value": "0", + "id": "daylight_saving_time.start_week_day", + "name": "Week(Daylight Saving Time)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 1, + "name": "Mon." + }, + { + "value": 2, + "name": "Tues." + }, + { + "value": 3, + "name": "Wed." + }, + { + "value": 4, + "name": "Thurs." + }, + { + "value": 5, + "name": "Fri." + }, + { + "value": 6, + "name": "Sat." + }, + { + "value": 7, + "name": "Sun." + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_num", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] }, { - "id": "child_lock_settings.fan_mode", - "name": "Child Lock Settings (Fan Mode)", - "value": "0", + "id": "daylight_saving_time.start_week_num", + "name": "Number of Week(Daylight Saving Time)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 1, + "name": "1st" + }, + { + "value": 2, + "name": "2nd" + }, + { + "value": 3, + "name": "3rd" + }, + { + "value": 4, + "name": "4th" + }, + { + "value": 5, + "name": "last" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] - }, - { - "id": "child_lock_settings.temperature_control_mode", - "name": "Child Lock Settings (Temperature Control Mode)", - "value": "0", + "reference": [ + "daylight_saving_time.enable", + "daylight_saving_time.daylight_saving_time_offset", + "daylight_saving_time.start_month", + "daylight_saving_time.start_week_day", + "daylight_saving_time.start_hour_min", + "daylight_saving_time.end_month", + "daylight_saving_time.end_week_num", + "daylight_saving_time.end_week_day", + "daylight_saving_time.end_hour_min" + ] + }, + { + "id": "delete_task_plan.type", + "name": "Delete Schedule(Delete Schedule)", + "value": "255", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "W", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "Schedule1" + }, + { + "value": 1, + "name": "Schedule2" + }, + { + "value": 2, + "name": "Schedule3" + }, + { + "value": 3, + "name": "Schedule4" + }, + { + "value": 4, + "name": "Schedule5" + }, + { + "value": 5, + "name": "Schedule6" + }, + { + "value": 6, + "name": "Schedule7" + }, + { + "value": 7, + "name": "Schedule8" + }, + { + "value": 255, + "name": "Reset All" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] + "reference": [] }, { - "id": "child_lock_settings.reboot_reset", - "name": "Child Lock Settings (Reboot&Reset)", + "id": "execution_plan_id", + "name": "Schedule", "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "plan0" + }, + { + "value": 1, + "name": "plan1" + }, + { + "value": 2, + "name": "plan2" + }, + { + "value": 3, + "name": "plan3" + }, + { + "value": 4, + "name": "plan4" + }, + { + "value": 5, + "name": "plan5" + }, + { + "value": 6, + "name": "plan6" + }, + { + "value": 7, + "name": "plan7" + }, + { + "value": 8, + "name": "plan8" + }, + { + "value": 9, + "name": "plan9" + }, + { + "value": 10, + "name": "plan10" + }, + { + "value": 11, + "name": "plan11" + }, + { + "value": 12, + "name": "plan12" + }, + { + "value": 13, + "name": "plan13" + }, + { + "value": 14, + "name": "plan14" + }, + { + "value": 15, + "name": "plan15" + }, + { + "value": 255, + "name": "Not executed" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "child_lock_settings.power_on_off", - "name": "Child Lock Settings (Power On/Off)", - "value": "0", - "unit": "", + "id": "fahrenheit_minimum_dead_zone", + "name": "Fahrenheit DeadBand", + "value": "41", + "unit": "℉", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 33.8, + 86 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_target_temperature1", + "name": "Fahrenheit Target Temperature1", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_target_temperature2", + "name": "Fahrenheit Target Temperature2", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" + }, + { + "id": "fahrenheit_temperature", + "name": "Fahrenheit Temperature", + "value": "", + "unit": "℉", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -4, + 140 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT" }, { - "id": "child_lock_settings.cancel_pair", - "name": "Child Lock Settings (Cancel Pairing)", + "id": "fan_control_mode", + "name": "Fan Mode", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "auto" + }, + { + "value": 1, + "name": "circulate" + }, + { + "value": 2, + "name": "on" + }, + { + "value": 3, + "name": "low" + }, + { + "value": 4, + "name": "medium" + }, + { + "value": 5, + "name": "high" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "child_lock_settings.plan_switch", - "name": "Child Lock Settings (Plan Switch)", - "value": "0", + "id": "fan_enable.auto", + "name": "Auto(Fan Mode Enabled)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] - }, - { - "id": "child_lock_settings.status_report", - "name": "Child Lock Settings (Status Report)", - "value": "0", + "reference": [ + "fan_enable.circul", + "fan_enable.on", + "fan_enable.low", + "fan_enable.medium", + "fan_enable.high", + "fan_enable.reserved" + ] + }, + { + "id": "fan_enable.circul", + "name": "Circul(Fan Mode Enabled)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] - }, - { - "id": "child_lock_settings.release_filter_alarm", - "name": "Child Lock Settings (Release Filter Alarm)", - "value": "0", + "reference": [ + "fan_enable.auto", + "fan_enable.on", + "fan_enable.low", + "fan_enable.medium", + "fan_enable.high", + "fan_enable.reserved" + ] + }, + { + "id": "fan_enable.high", + "name": "High(Fan Mode Enabled)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] - }, - { - "id": "child_lock_settings.button_report_1", - "name": "Child Lock Settings (Button 1)", - "value": "0", + "reference": [ + "fan_enable.auto", + "fan_enable.circul", + "fan_enable.on", + "fan_enable.low", + "fan_enable.medium", + "fan_enable.reserved" + ] + }, + { + "id": "fan_enable.low", + "name": "Low(Fan Mode Enabled)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] - }, - { - "id": "child_lock_settings.button_report_2", - "name": "Child Lock Settings (Button 2)", - "value": "0", + "reference": [ + "fan_enable.auto", + "fan_enable.circul", + "fan_enable.on", + "fan_enable.medium", + "fan_enable.high", + "fan_enable.reserved" + ] + }, + { + "id": "fan_enable.medium", + "name": "Medium(Fan Mode Enabled)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_3", "child_lock_settings.temperature_unit_switch"] - }, - { - "id": "child_lock_settings.button_report_3", - "name": "Child Lock Settings (Button 3)", + "reference": [ + "fan_enable.auto", + "fan_enable.circul", + "fan_enable.on", + "fan_enable.low", + "fan_enable.high", + "fan_enable.reserved" + ] + }, + { + "id": "fan_enable.on", + "name": "On(Fan Mode Enabled)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.temperature_unit_switch"] - }, - { - "id": "child_lock_settings.temperature_unit_switch", - "name": "Child Lock Settings (Temperature Unit Switch)", + "reference": [ + "fan_enable.auto", + "fan_enable.circul", + "fan_enable.low", + "fan_enable.medium", + "fan_enable.high", + "fan_enable.reserved" + ] + }, + { + "id": "fan_enable.reserved", + "name": "Reserved(Fan Mode Enabled)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["child_lock_settings.enable", "child_lock_settings.temperature_up", "child_lock_settings.temperature_down", "child_lock_settings.system_on_off", "child_lock_settings.fan_mode", "child_lock_settings.temperature_control_mode", "child_lock_settings.reboot_reset", "child_lock_settings.power_on_off", "child_lock_settings.cancel_pair", "child_lock_settings.plan_switch", "child_lock_settings.status_report", "child_lock_settings.release_filter_alarm", "child_lock_settings.button_report_1", "child_lock_settings.button_report_2", "child_lock_settings.button_report_3"] - }, - { - "id": "screen_display_settings.plan_name", - "name": "Screen Display Settings (Schedule Name)", - "value": "1", + "reference": [ + "fan_enable.auto", + "fan_enable.circul", + "fan_enable.on", + "fan_enable.low", + "fan_enable.medium", + "fan_enable.high" + ], + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ] + }, + { + "id": "fan_error_alarm.mode", + "name": "Action(Fan Error Alarm)", + "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "W", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "clean alarm" + }, + { + "value": 1, + "name": "trigger alarm" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["screen_display_settings.ambient_temperature", "screen_display_settings.ambient_humidity", "screen_display_settings.target_temperature"] + "reference": [] }, { - "id": "screen_display_settings.ambient_temperature", - "name": "Screen Display Settings (Ambient Temperature)", - "value": "1", + "id": "fan_mode", + "name": "Fan Mode", + "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "auto" + }, + { + "value": 1, + "name": "circulate" + }, + { + "value": 2, + "name": "on" + }, + { + "value": 3, + "name": "low" + }, + { + "value": 4, + "name": "medium" + }, + { + "value": 5, + "name": "high" + }, + { + "value": 10, + "name": "off" + }, + { + "value": 11, + "name": "none/keep" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["screen_display_settings.plan_name", "screen_display_settings.ambient_humidity", "screen_display_settings.target_temperature"] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "screen_display_settings.ambient_humidity", - "name": "Screen Display Settings (Ambient Humidity)", - "value": "1", + "id": "filter_clean_alarm.mode", + "name": "Action(Filter Cleaning Alarm)", + "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "W", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "clean alarm" + }, + { + "value": 1, + "name": "report alarm" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["screen_display_settings.plan_name", "screen_display_settings.ambient_temperature", "screen_display_settings.target_temperature"] + "reference": [] }, { - "id": "screen_display_settings.target_temperature", - "name": "Screen Display Settings (Target Temperature)", - "value": "1", + "id": "frost_protection_alarm.mode", + "name": "Action(Frost Protection Alarm)", + "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "W", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "clean alarm" + }, + { + "value": 1, + "name": "trigger alarm" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["screen_display_settings.plan_name", "screen_display_settings.ambient_temperature", "screen_display_settings.ambient_humidity"] + "reference": [] }, - { - "id": "temperature_calibration_settings.enable", - "name": "Temperature Calibration Settings (Enable)", - "value": "0", + "id": "humidity", + "name": "Humidity", + "value": "", + "unit": "%", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 0, + 100 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT" + }, + { + "id": "humidity_alarm.type", + "name": "Alarm Type(Humidity Alarm)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "Humidity Collection Error" + }, + { + "value": 1, + "name": "Humidity Out of The Low Range" + }, + { + "value": 2, + "name": "Humidity Out of The High Range" + }, + { + "value": 3, + "name": "No Data" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["temperature_calibration_settings.enable", "temperature_calibration_settings.calibration_value"] + "reference": [] }, { - "id": "temperature_calibration_settings.calibration_value", - "name": "Temperature Calibration Settings (Calibration Value)", + "id": "humidity_calibration_settings.calibration_value", + "name": "Calibration Value(Humidity Calibration Settings)", "value": "0", - "unit": "°C", + "unit": "%", "access_mode": "RW", "data_type": "NUMBER", "value_type": "FLOAT", + "range": [ + -100, + 100 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", - "reference": ["temperature_calibration_settings.enable", "temperature_calibration_settings.calibration_value"] + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [ + "humidity_calibration_settings.enable" + ] }, - { "id": "humidity_calibration_settings.enable", - "name": "Humidity Calibration Settings (Enable)", + "name": "Humidity Calibration(Humidity Calibration Settings)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["humidity_calibration_settings.enable", "humidity_calibration_settings.calibration_value"] + "reference": [ + "humidity_calibration_settings.calibration_value" + ] }, { - "id": "humidity_calibration_settings.calibration_value", - "name": "Humidity Calibration Settings (Calibration Value)", + "id": "insert_temporary_plan.id", + "name": "Plan ID(Insert Temporary Plan)", "value": "0", - "unit": "%r.h.", - "access_mode": "RW", + "unit": "", + "access_mode": "W", "data_type": "NUMBER", - "value_type": "FLOAT", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 29, - "bacnet_unit_type": "UNITS_PERCENT_RELATIVE_HUMIDITY", - "reference": ["humidity_calibration_settings.enable", "humidity_calibration_settings.calibration_value"] + "value_type": "UINT8", + "range": [ + 0, + 15 + ], + "bacnet_type": "analog_output_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "data_sync_to_peer", - "name": "Data Sync to Peer", - "value": "0", + "id": "intelligent_display_enable", + "name": "Smart Display", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "embedded_data" }, - { "value": 1, "name": "external_receive" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "data_sync_timeout", - "name": "Data Timeout", - "value": "10", - "unit": "min", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES" - }, - { - "id": "unlock_combination_button_settings.button_1", - "name": "Unlock Combination Button Settings (Button 1)", - "value": "0", + "id": "key_event.type", + "name": "Event Type(Button Report)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "Button 1 Report" + }, + { + "value": 1, + "name": "Button 2 Report" + }, + { + "value": 2, + "name": "Button 3 Report" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["unlock_combination_button_settings.button_2", "unlock_combination_button_settings.button_3", "unlock_combination_button_settings.button_4", "unlock_combination_button_settings.button_5"] + "reference": [] }, { - "id": "unlock_combination_button_settings.button_2", - "name": "Unlock Combination Button Settings (Button 2)", + "id": "lorawan_configuration_settings.mode", + "name": "LoRaWAN Work Mode(LoRaWAN Settings)", "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "ClassA" + }, + { + "value": 1, + "name": "ClassB" + }, + { + "value": 2, + "name": "ClassC" + }, + { + "value": 3, + "name": "ClassC to B" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["unlock_combination_button_settings.button_1", "unlock_combination_button_settings.button_3", "unlock_combination_button_settings.button_4", "unlock_combination_button_settings.button_5"] + "reference": [] }, { - "id": "unlock_combination_button_settings.button_3", - "name": "Unlock Combination Button Settings (Button 3)", - "value": "0", + "id": "minimum_dead_zone", + "name": "DeadBand", + "value": "5", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 1, + 30 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "mode_enable.auto", + "name": "Auto(Temperature Control Mode Enable)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["unlock_combination_button_settings.button_1", "unlock_combination_button_settings.button_2", "unlock_combination_button_settings.button_4", "unlock_combination_button_settings.button_5"] + "reference": [ + "mode_enable.heat", + "mode_enable.em_heat", + "mode_enable.cool", + "mode_enable.reserved" + ] }, { - "id": "unlock_combination_button_settings.button_4", - "name": "Unlock Combination Button Settings (Button 4)", - "value": "0", + "id": "mode_enable.cool", + "name": "Cool(Temperature Control Mode Enable)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["unlock_combination_button_settings.button_1", "unlock_combination_button_settings.button_2", "unlock_combination_button_settings.button_3", "unlock_combination_button_settings.button_5"] + "reference": [ + "mode_enable.heat", + "mode_enable.em_heat", + "mode_enable.auto", + "mode_enable.reserved" + ] }, { - "id": "unlock_combination_button_settings.button_5", - "name": "Unlock Combination Button Settings (Button 5)", - "value": "0", + "id": "mode_enable.em_heat", + "name": "EM Heat(Temperature Control Mode Enable)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["unlock_combination_button_settings.button_1", "unlock_combination_button_settings.button_2", "unlock_combination_button_settings.button_3", "unlock_combination_button_settings.button_4"] + "reference": [ + "mode_enable.heat", + "mode_enable.cool", + "mode_enable.auto", + "mode_enable.reserved" + ] }, - { - "id": "temporary_unlock_settings.enable", - "name": "Temporary Unlock Settings (Enable)", - "value": "0", + "id": "mode_enable.heat", + "name": "Heat(Temperature Control Mode Enable)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["temporary_unlock_settings.enable", "temporary_unlock_settings.timeout"] + "reference": [ + "mode_enable.em_heat", + "mode_enable.cool", + "mode_enable.auto", + "mode_enable.reserved" + ] }, { - "id": "temporary_unlock_settings.timeout", - "name": "Temporary Unlock Settings (Timeout)", - "value": "30", - "unit": "s", + "id": "mode_enable.reserved", + "name": "Reserved(Temperature Control Mode Enable)", + "value": "", + "unit": "", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT16", + "value_type": "UINT8", "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 73, - "bacnet_unit_type": "UNITS_SECONDS", - "reference": ["temporary_unlock_settings.enable", "temporary_unlock_settings.timeout"] - }, - { - "id": "pir_config.enable", - "name": "PIR Detection Settings (Enable)", - "value": "1", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "mode_enable.heat", + "mode_enable.em_heat", + "mode_enable.cool", + "mode_enable.auto" + ], + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ] + }, + { + "id": "not_wired_alarm.mode", + "name": "Action(Not Wired Alarm)", + "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "W", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "clean alarm" + }, + { + "value": 1, + "name": "trigger alarm" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "pir_config.release_time", - "name": "PIR Detection Settings (Release Time)", - "value": "30", - "unit": "min", + "id": "oem_id", + "name": "OEM ID", + "value": "", + "unit": "", "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES" + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "pir_config.general_mode.detection_mode", - "name": "PIR Detection Settings (General Mode (Detection Mode))", + "id": "open_window_alarm.mode", + "name": "Action(Open Window Alarm)", "value": "0", "unit": "", - "access_mode": "RW", + "access_mode": "W", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "single" }, - { "value": 1, "name": "multiple" } + { + "value": 0, + "name": "clean alarm" + }, + { + "value": 1, + "name": "report alarm" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "pir_config.general_mode.period", - "name": "PIR Detection Settings (General Mode (Period))", - "value": "30", + "id": "origin_humidity", + "name": "External Humidity", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "origin_temperature", + "name": "External Temperature", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", + "unit": "", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "pir_common.check.period", + "name": "Duration(Trigger Condition)", + "value": "5", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT8", + "range": [ + 1, + 60 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 72, "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["pir_config.general_mode.period", "pir_config.general_mode.rate"] + "reference": [ + "pir_common.check.rate" + ] }, { - "id": "pir_config.general_mode.rate", - "name": "PIR Detection Settings (General Mode (Rate))", - "value": "", + "id": "pir_common.check.rate", + "name": "Trigger Ratio(Trigger Condition)", + "value": "50", + "unit": "%", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT8", + "range": [ + 1, + 100 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [ + "pir_common.check.period" + ] + }, + { + "id": "pir_common.cmd", + "name": "Common Cmd(Occupancy Detection)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "NUMBER", @@ -1529,1222 +3122,2696 @@ "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pir_config.general_mode.period", "pir_config.general_mode.rate"] + "reference": [] }, { - "id": "pir_config.eco_mode.enable", - "name": "PIR Detection Settings (Eco Mode (Enable))", - "value": "0", + "id": "pir_common.enable", + "name": "Occupancy Detection(Occupancy Detection)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "pir_config.eco_mode.occupied_plan", - "name": "PIR Detection Settings (Eco Mode Occupied Plan)", - "value": "0", + "id": "pir_common.mode", + "name": "Detection Mode(Occupancy Detection)", + "value": "", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "plan_1" }, - { "value": 1, "name": "plan_2" }, - { "value": 2, "name": "plan_3" }, - { "value": 3, "name": "plan_4" }, - { "value": 4, "name": "plan_5" }, - { "value": 5, "name": "plan_6" }, - { "value": 6, "name": "plan_7" }, - { "value": 7, "name": "plan_8" }, - { "value": 8, "name": "plan_9" }, - { "value": 9, "name": "plan_10" }, - { "value": 10, "name": "plan_11" }, - { "value": 11, "name": "plan_12" }, - { "value": 12, "name": "plan_13" }, - { "value": 13, "name": "plan_14" }, - { "value": 14, "name": "plan_15" }, - { "value": 15, "name": "plan_16" } + { + "value": 0, + "name": "Immediate Trigger" + }, + { + "value": 1, + "name": "Rule Trigger" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pir_config.eco_mode.occupied_plan", "pir_config.eco_mode.vacant_plan"] + "reference": [] }, { - "id": "pir_config.eco_mode.vacant_plan", - "name": "PIR Detection Settings (Eco Mode Vacant Plan)", - "value": "1", + "id": "pir_common.release_time", + "name": "Occupied to Vacant Delay(Occupancy Detection)", + "value": "30", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 360 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [] + }, + { + "id": "pir_energy.cmd", + "name": "Energy Cmd(Energy-saving Setting)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "plan_1" }, - { "value": 1, "name": "plan_2" }, - { "value": 2, "name": "plan_3" }, - { "value": 3, "name": "plan_4" }, - { "value": 4, "name": "plan_5" }, - { "value": 5, "name": "plan_6" }, - { "value": 6, "name": "plan_7" }, - { "value": 7, "name": "plan_8" }, - { "value": 8, "name": "plan_9" }, - { "value": 9, "name": "plan_10" }, - { "value": 10, "name": "plan_11" }, - { "value": 11, "name": "plan_12" }, - { "value": 12, "name": "plan_13" }, - { "value": 13, "name": "plan_14" }, - { "value": 14, "name": "plan_15" }, - { "value": 15, "name": "plan_16" } - ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pir_config.eco_mode.occupied_plan", "pir_config.eco_mode.vacant_plan"] + "reference": [] }, { - "id": "pir_config.night_mode.enable", - "name": "PIR Detection Settings (Night Mode (Enable))", - "value": "0", + "id": "pir_energy.enable", + "name": "Energy-Saving Enable(Energy-saving Setting)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "pir_config.night_mode.detection_mode", - "name": "PIR Detection Settings (Night Mode (Detection Mode))", + "id": "pir_energy.plan.occupied", + "name": "Occupied Execution(Energy Saving Plan)", "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "single" }, - { "value": 1, "name": "multiple" } + { + "value": 0, + "name": "plan0" + }, + { + "value": 1, + "name": "plan1" + }, + { + "value": 2, + "name": "plan2" + }, + { + "value": 3, + "name": "plan3" + }, + { + "value": 4, + "name": "plan4" + }, + { + "value": 5, + "name": "plan5" + }, + { + "value": 6, + "name": "plan6" + }, + { + "value": 7, + "name": "plan7" + }, + { + "value": 255, + "name": "Not executed" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "pir_energy.plan.unoccupied" + ] }, { - "id": "pir_config.night_mode.period", - "name": "PIR Detection Settings (Night Mode (Period))", - "value": "30", - "unit": "min", + "id": "pir_energy.plan.unoccupied", + "name": "Vacant Execution(Energy Saving Plan)", + "value": "1", + "unit": "", "access_mode": "RW", - "data_type": "NUMBER", + "data_type": "ENUM", "value_type": "UINT8", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["pir_config.night_mode.period", "pir_config.night_mode.rate"] - }, - { - "id": "pir_config.night_mode.rate", - "name": "PIR Detection Settings (Night Mode (Rate))", - "value": "", - "unit": "", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "bacnet_type": "analog_value_object", + "values": [ + { + "value": 0, + "name": "plan0" + }, + { + "value": 1, + "name": "plan1" + }, + { + "value": 2, + "name": "plan2" + }, + { + "value": 3, + "name": "plan3" + }, + { + "value": 4, + "name": "plan4" + }, + { + "value": 5, + "name": "plan5" + }, + { + "value": 6, + "name": "plan6" + }, + { + "value": 7, + "name": "plan7" + }, + { + "value": 255, + "name": "Not executed" + } + ], + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pir_config.night_mode.period", "pir_config.night_mode.rate"] + "reference": [ + "pir_energy.plan.occupied" + ] }, { - "id": "pir_config.night_mode.start_time", - "name": "PIR Detection Settings (Night Mode (Start Time))", - "value": "1260", + "id": "pir_night.check.period", + "name": "Duration(Trigger Condition)", + "value": "5", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT8", + "range": [ + 1, + 60 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 72, "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["pir_config.night_mode.start_time", "pir_config.night_mode.end_time"] + "reference": [ + "pir_night.check.rate" + ] }, { - "id": "pir_config.night_mode.end_time", - "name": "PIR Detection Settings (Night Mode (End Time))", - "value": "480", - "unit": "min", + "id": "pir_night.check.rate", + "name": "Trigger Ratio(Trigger Condition)", + "value": "50", + "unit": "%", "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT8", + "range": [ + 1, + 100 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["pir_config.night_mode.start_time", "pir_config.night_mode.end_time"] + "bacnet_unit_type_id": 98, + "bacnet_unit_type": "UNITS_PERCENT", + "reference": [ + "pir_night.check.period" + ] }, { - "id": "pir_config.night_mode.occupied_plan", - "name": "PIR Detection Settings (Night Mode (Occupied Plan))", - "value": "2", + "id": "pir_night.cmd", + "name": "Night Cmd(Night Occupancy Settings)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "ENUM", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "plan_1" }, - { "value": 1, "name": "plan_2" }, - { "value": 2, "name": "plan_3" }, - { "value": 3, "name": "plan_4" }, - { "value": 4, "name": "plan_5" }, - { "value": 5, "name": "plan_6" }, - { "value": 6, "name": "plan_7" }, - { "value": 7, "name": "plan_8" }, - { "value": 8, "name": "plan_9" }, - { "value": 9, "name": "plan_10" }, - { "value": 10, "name": "plan_11" }, - { "value": 11, "name": "plan_12" }, - { "value": 12, "name": "plan_13" }, - { "value": 13, "name": "plan_14" }, - { "value": 14, "name": "plan_15" }, - { "value": 15, "name": "plan_16" } - ], - "bacnet_type": "multistate_value_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["pir_config.night_mode.enable", "pir_config.night_mode.start_time", "pir_config.night_mode.end_time"] + "reference": [] }, { - "id": "ble_enable", - "name": "Bluetooth Enable", - "value": "1", + "id": "pir_night.enable", + "name": "Night Occupancy Settings(Night Occupancy Settings)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "external_temperature", - "name": "External Temperature", - "value": "25", - "unit": "°C", - "access_mode": "W", - "data_type": "NUMBER", - "value_type": "UINT8", - "bacnet_type": "analog_output_object", - "bacnet_unit_type_id": 62, - "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" - }, - { - "id": "external_humidity", - "name": "External Humidity", - "value": "50", - "unit": "%r.h.", - "access_mode": "W", - "data_type": "NUMBER", - "value_type": "UINT8", - "bacnet_type": "analog_output_object", - "bacnet_unit_type_id": 29, - "bacnet_unit_type": "UNITS_PERCENT_RELATIVE_HUMIDITY" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "fan_support_mode.auto", - "name": "Fan Support Mode (Auto)", - "value": "1", + "id": "pir_night.mode", + "name": "Detection Mode(Night Occupancy Settings)", + "value": "0", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "Immediate Trigger" + }, + { + "value": 1, + "name": "Rule Trigger" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["fan_support_mode.auto", "fan_support_mode.circulate", "fan_support_mode.on", "fan_support_mode.low", "fan_support_mode.medium", "fan_support_mode.high"] + "reference": [] }, { - "id": "fan_support_mode.circulate", - "name": "Fan Support Mode (Circulate)", - "value": "1", - "unit": "", + "id": "pir_night.night_time.start", + "name": "Start Time(Nighttime)", + "value": "1260", + "unit": "min", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 0, + 1439 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["fan_support_mode.auto", "fan_support_mode.on", "fan_support_mode.low", "fan_support_mode.medium", "fan_support_mode.high"] + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "pir_night.night_time.stop" + ] }, { - "id": "fan_support_mode.on", - "name": "Fan Support Mode (On)", - "value": "0", - "unit": "", + "id": "pir_night.night_time.stop", + "name": "Stop Time(Nighttime)", + "value": "480", + "unit": "min", "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 0, + 1439 ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["fan_support_mode.auto", "fan_support_mode.circulate", "fan_support_mode.low", "fan_support_mode.medium", "fan_support_mode.high"] + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "pir_night.night_time.start" + ] }, { - "id": "fan_support_mode.low", - "name": "Fan Support Mode (Low)", - "value": "1", + "id": "pir_night.occupied", + "name": "Night Occupied Execution(Night Occupancy Settings)", + "value": "2", "unit": "", "access_mode": "RW", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "plan0" + }, + { + "value": 1, + "name": "plan1" + }, + { + "value": 2, + "name": "plan2" + }, + { + "value": 3, + "name": "plan3" + }, + { + "value": 4, + "name": "plan4" + }, + { + "value": 5, + "name": "plan5" + }, + { + "value": 6, + "name": "plan6" + }, + { + "value": 7, + "name": "plan7" + }, + { + "value": 255, + "name": "Not executed" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["fan_support_mode.auto", "fan_support_mode.circulate", "fan_support_mode.on", "fan_support_mode.medium", "fan_support_mode.high"] + "reference": [] }, { - "id": "fan_support_mode.medium", - "name": "Fan Support Mode (Medium)", - "value": "1", + "id": "pir_status", + "name": "Occupied Status", + "value": "0", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } + { + "value": 0, + "name": "Vacant" + }, + { + "value": 1, + "name": "Occupied" + }, + { + "value": 2, + "name": "Night Occupied" + } ], - "bacnet_type": "binary_value_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["fan_support_mode.auto", "fan_support_mode.circulate", "fan_support_mode.on", "fan_support_mode.low", "fan_support_mode.high"] + "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "fan_support_mode.high", - "name": "Fan Support Mode (High)", - "value": "1", + "id": "power_bus_event.type", + "name": "Powerbus Event Type(Powerbus Event)", + "value": "", "unit": "", - "access_mode": "RW", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } - ], - "bacnet_type": "binary_value_object", + "bacnet_type": "analog_input_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["fan_support_mode.auto", "fan_support_mode.circulate", "fan_support_mode.on", "fan_support_mode.low", "fan_support_mode.medium"] + "reference": [] }, { - "id": "ble_name", - "name": "Bluetooth Name", + "id": "product_sn", + "name": "SN", "value": "", "unit": "", - "access_mode": "RW", + "access_mode": "R", "data_type": "TEXT", "value_type": "STRING", - "max_length": 32, + "max_length": 16, "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "ble_pair_info.address_type", - "name": "Bluetooth Pair Info (Address Type)", - "value": "0", - "unit": "", - "access_mode": "RW", - "data_type": "ENUM", + "id": "query_device_status", + "name": "Query Device Status", + "access_mode": "W", + "data_type": "BOOL", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "public" }, - { "value": 1, "name": "random" } - ], - "bacnet_type": "multistate_value_object", + "unit": "", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["ble_pair_info.address_type", "ble_pair_info.address", "ble_pair_info.name"] + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] }, { - "id": "ble_pair_info.address", - "name": "Bluetooth Pair Info (Address)", - "value": "", + "id": "reboot", + "name": "Reboot", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", "unit": "", - "access_mode": "RW", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 12, - "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["ble_pair_info.address_type", "ble_pair_info.address", "ble_pair_info.name"] + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] }, { - "id": "ble_pair_info.name", - "name": "Bluetooth Pair Info (Name)", - "value": "", + "id": "reconnect", + "name": "Network Reconnection", + "access_mode": "W", + "data_type": "BOOL", + "value_type": "UINT8", "unit": "", - "access_mode": "RW", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 32, - "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["ble_pair_info.address_type", "ble_pair_info.address", "ble_pair_info.name"] + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] + }, + { + "id": "reporting_interval.ble_lora.minutes_of_time", + "name": "Reporting Interval(BLE_LORA Reporting Interval)", + "value": "10", + "unit": "min", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 1440 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "reporting_interval.ble_lora.unit" + ] }, { - "id": "peer_ble_pair_info.address_type", - "name": "Peer Bluetooth Pair Info (Address Type)", - "value": "0", + "id": "reporting_interval.ble_lora.seconds_of_time", + "name": "Reporting Interval(BLE_LORA Reporting Interval)", + "value": "600", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 10, + 64800 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "reporting_interval.ble_lora.unit" + ] + }, + { + "id": "reporting_interval.ble_lora.unit", + "name": "Reporting Interval Unit(BLE_LORA Reporting Interval)", + "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "public" }, - { "value": 1, "name": "random" } + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["peer_ble_pair_info.address_type", "peer_ble_pair_info.address", "peer_ble_pair_info.name"] + "reference": [] }, { - "id": "peer_ble_pair_info.address", - "name": "Peer Bluetooth Pair Info (Address)", - "value": "", - "unit": "", + "id": "reporting_interval.ble.minutes_of_time", + "name": "Reporting Interval(BLE Reporting Interval)", + "value": "10", + "unit": "min", "access_mode": "RW", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 12, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["peer_ble_pair_info.address_type", "peer_ble_pair_info.address", "peer_ble_pair_info.name"] + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 1440 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES", + "reference": [ + "reporting_interval.ble.unit" + ] }, { - "id": "peer_ble_pair_info.name", - "name": "Peer Bluetooth Pair Info (Name)", - "value": "", - "unit": "", + "id": "reporting_interval.ble.seconds_of_time", + "name": "Reporting Interval(BLE Reporting Interval)", + "value": "600", + "unit": "s", "access_mode": "RW", - "data_type": "TEXT", - "value_type": "STRING", - "max_length": 32, - "bacnet_type": "character_string_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["peer_ble_pair_info.address_type", "peer_ble_pair_info.address", "peer_ble_pair_info.name"] + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 10, + 64800 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "reporting_interval.ble.unit" + ] }, { - "id": "communication_mode", - "name": "Communication Mode", + "id": "reporting_interval.ble.unit", + "name": "Reporting Interval Unit(BLE Reporting Interval)", "value": "1", "unit": "", "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "ble" }, - { "value": 1, "name": "lora" }, - { "value": 2, "name": "ble_and_lora" }, - { "value": 3, "name": "power_bus_and_lora" } + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "daylight_saving_time.enable", - "name": "Daylight Saving Time (Enable)", - "value": "", - "unit": "", - "access_mode": "RW", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "disable" }, - { "value": 1, "name": "enable" } - ], - "bacnet_type": "binary_value_object", - "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [] }, { - "id": "daylight_saving_time.offset", - "name": "Daylight Saving Time (Offset)", - "value": "", + "id": "reporting_interval.lora.minutes_of_time", + "name": "Reporting Interval(LORA Reporting Interval)", + "value": "10", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "INT16", + "value_type": "UINT16", + "range": [ + 1, + 1440 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 72, "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [ + "reporting_interval.lora.unit" + ] }, { - "id": "daylight_saving_time.start_month", - "name": "Daylight Saving Time (Start Month)", - "value": "", - "unit": "", + "id": "reporting_interval.lora.seconds_of_time", + "name": "Reporting Interval(LORA Reporting Interval)", + "value": "600", + "unit": "s", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "UINT16", + "range": [ + 10, + 64800 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "reporting_interval.lora.unit" + ] }, { - "id": "daylight_saving_time.start_week_num", - "name": "Daylight Saving Time (Start Week Num)", - "value": "", + "id": "reporting_interval.lora.unit", + "name": "Reporting Interval Unit(LORA Reporting Interval)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "NUMBER", + "data_type": "ENUM", "value_type": "UINT8", - "bacnet_type": "analog_value_object", + "values": [ + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } + ], + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [] }, { - "id": "daylight_saving_time.start_week_day", - "name": "Daylight Saving Time (Start Week Day)", - "value": "", - "unit": "", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] - }, - { - "id": "daylight_saving_time.start_hour_min", - "name": "Daylight Saving Time (Start Hour Min)", - "value": "", + "id": "reporting_interval.power_lora.minutes_of_time", + "name": "Reporting Interval(POWERBUS_LORA Reporting Interval)", + "value": "10", "unit": "min", "access_mode": "RW", "data_type": "NUMBER", "value_type": "UINT16", + "range": [ + 1, + 1440 + ], "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 72, "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] - }, - { - "id": "daylight_saving_time.end_month", - "name": "Daylight Saving Time (End Month)", - "value": "", - "unit": "", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT8", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [ + "reporting_interval.power_lora.unit" + ] }, { - "id": "daylight_saving_time.end_week_num", - "name": "Daylight Saving Time (End Week Num)", - "value": "", - "unit": "", + "id": "reporting_interval.power_lora.seconds_of_time", + "name": "Reporting Interval(POWERBUS_LORA Reporting Interval)", + "value": "600", + "unit": "s", "access_mode": "RW", "data_type": "NUMBER", - "value_type": "UINT8", + "value_type": "UINT16", + "range": [ + 10, + 64800 + ], "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "reporting_interval.power_lora.unit" + ] }, { - "id": "daylight_saving_time.end_week_day", - "name": "Daylight Saving Time (End Week Day)", - "value": "", + "id": "reporting_interval.power_lora.unit", + "name": "Reporting Interval Unit(POWERBUS_LORA Reporting Interval)", + "value": "1", "unit": "", "access_mode": "RW", - "data_type": "NUMBER", + "data_type": "ENUM", "value_type": "UINT8", - "bacnet_type": "analog_value_object", + "values": [ + { + "value": 0, + "name": "second" + }, + { + "value": 1, + "name": "min" + } + ], + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] - }, - { - "id": "daylight_saving_time.end_hour_min", - "name": "Daylight Saving Time (End Hour Min)", - "value": "", - "unit": "min", - "access_mode": "RW", - "data_type": "NUMBER", - "value_type": "UINT16", - "bacnet_type": "analog_value_object", - "bacnet_unit_type_id": 72, - "bacnet_unit_type": "UNITS_MINUTES", - "reference": ["daylight_saving_time.enable", "daylight_saving_time.offset", "daylight_saving_time.start_month", "daylight_saving_time.start_week_num", "daylight_saving_time.start_week_day", "daylight_saving_time.start_hour_min", "daylight_saving_time.end_month", "daylight_saving_time.end_week_num", "daylight_saving_time.end_week_day", "daylight_saving_time.end_hour_min"] + "reference": [] }, { - "id": "time_zone", - "name": "Time Zone", - "value": "", + "id": "reporting_interval.type", + "name": "Reporting Interval Type(Reporting Interval)", + "value": "0", "unit": "", "access_mode": "RW", "data_type": "ENUM", - "value_type": "INT16", + "value_type": "UINT8", "values": [ - { "value": -720, "name": "UTC-12" }, - { "value": -660, "name": "UTC-11" }, - { "value": -600, "name": "UTC-10" }, - { "value": -570, "name": "UTC-9:30" }, - { "value": -540, "name": "UTC-9" }, - { "value": -480, "name": "UTC-8" }, - { "value": -420, "name": "UTC-7" }, - { "value": -360, "name": "UTC-6" }, - { "value": -300, "name": "UTC-5" }, - { "value": -240, "name": "UTC-4" }, - { "value": -210, "name": "UTC-3:30" }, - { "value": -180, "name": "UTC-3" }, - { "value": -120, "name": "UTC-2" }, - { "value": -60, "name": "UTC-1" }, - { "value": 0, "name": "UTC" }, - { "value": 60, "name": "UTC+1" }, - { "value": 120, "name": "UTC+2" }, - { "value": 180, "name": "UTC+3" }, - { "value": 210, "name": "UTC+3:30" }, - { "value": 240, "name": "UTC+4" }, - { "value": 270, "name": "UTC+4:30" }, - { "value": 300, "name": "UTC+5" }, - { "value": 330, "name": "UTC+5:30" }, - { "value": 345, "name": "UTC+5:45" }, - { "value": 360, "name": "UTC+6" }, - { "value": 390, "name": "UTC+6:30" }, - { "value": 420, "name": "UTC+7" }, - { "value": 480, "name": "UTC+8" }, - { "value": 540, "name": "UTC+9" }, - { "value": 570, "name": "UTC+9:30" }, - { "value": 600, "name": "UTC+10" }, - { "value": 630, "name": "UTC+10:30" }, - { "value": 660, "name": "UTC+11" }, - { "value": 720, "name": "UTC+12" }, - { "value": 765, "name": "UTC+12:45" }, - { "value": 780, "name": "UTC+13" }, - { "value": 840, "name": "UTC+14" } + { + "value": 0, + "name": "BLE" + }, + { + "value": 1, + "name": "LORA" + }, + { + "value": 2, + "name": "BLE+LORA" + }, + { + "value": 3, + "name": "POWERBUS+lora" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "reset_ble_name", - "name": "Reset Bluetooth Name", - "value": "", + "id": "screen_display_settings.ambient_humi", + "name": "Ambient Humidity(Screen Display Settings)", + "value": "1", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "screen_display_settings.plan_name", + "screen_display_settings.ambient_temp", + "screen_display_settings.target_temp", + "screen_display_settings.reserved" + ] }, { - "id": "release_fan_alarm", - "name": "Release Fan Alarm", - "value": "", + "id": "screen_display_settings.ambient_temp", + "name": "Ambient Temperature(Screen Display Settings)", + "value": "1", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "screen_display_settings.plan_name", + "screen_display_settings.ambient_humi", + "screen_display_settings.target_temp", + "screen_display_settings.reserved" + ] }, { - "id": "trigger_fan_alarm", - "name": "Trigger Fan Alarm", - "value": "", + "id": "screen_display_settings.plan_name", + "name": "Schedule Name(Screen Display Settings)", + "value": "1", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "screen_display_settings.ambient_temp", + "screen_display_settings.ambient_humi", + "screen_display_settings.target_temp", + "screen_display_settings.reserved" + ] }, { - "id": "release_freeze_alarm", - "name": "Release Freeze Alarm", - "value": "", + "id": "screen_display_settings.reserved", + "name": "Reserved(Screen Display Settings)", + "value": "0", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "RW", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" - }, - { - "id": "trigger_freeze_alarm", - "name": "Trigger Freeze Alarm", - "value": "", + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "screen_display_settings.plan_name", + "screen_display_settings.ambient_temp", + "screen_display_settings.ambient_humi", + "screen_display_settings.target_temp" + ], + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ] + }, + { + "id": "screen_display_settings.target_temp", + "name": "Target Temperature(Screen Display Settings)", + "value": "1", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "screen_display_settings.plan_name", + "screen_display_settings.ambient_temp", + "screen_display_settings.ambient_humi", + "screen_display_settings.reserved" + ] }, { - "id": "release_no_wire_alarm", - "name": "Release No Wire Alarm", - "value": "", - "unit": "", + "id": "synchronize_time", + "name": "Time Synchronize", "access_mode": "W", "data_type": "BOOL", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "unit": "", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "bacnet_type": "binary_output_object", + "value": "", + "values": [ + { + "value": 0, + "name": "no" + }, + { + "value": 1, + "name": "yes" + } + ] }, { - "id": "trigger_no_wire_alarm", - "name": "Trigger No Wire Alarm", - "value": "", + "id": "system_status", + "name": "System On/Off", + "value": "0", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "RW", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "Off" + }, + { + "value": 1, + "name": "On" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "release_window_open_alarm", - "name": "Release Window Open Alarm", - "value": "", + "id": "system_status_control.mode", + "name": "Temperature Control Mode(System Status Control)", + "value": "0", "unit": "", "access_mode": "W", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "heat" + }, + { + "value": 1, + "name": "em heat" + }, + { + "value": 2, + "name": "cool" + }, + { + "value": 3, + "name": "auto" + }, + { + "value": 4, + "name": "dehumidify" + }, + { + "value": 5, + "name": "ventilation" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "system_status_control.on_off", + "system_status_control.temperature1", + "system_status_control.temperature2" + ] }, { - "id": "trigger_window_open_alarm", - "name": "Trigger Window Open Alarm", - "value": "", + "id": "system_status_control.on_off", + "name": "System On/Off(System Status Control)", + "value": "1", "unit": "", "access_mode": "W", - "data_type": "BOOL", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "system close" + }, + { + "value": 1, + "name": "system open" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "system_status_control.mode", + "system_status_control.temperature1", + "system_status_control.temperature2" + ] }, { - "id": "release_filter_alarm", - "name": "Release Filter Alarm", - "value": "", + "id": "system_status_control.temperature1", + "name": "Heat Temperature(System Status Control)", + "value": "17", "unit": "", "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 ], - "bacnet_type": "binary_output_object", + "bacnet_type": "analog_output_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "system_status_control.on_off", + "system_status_control.mode", + "system_status_control.temperature2" + ] }, { - "id": "trigger_filter_alarm", - "name": "Trigger Filter Alarm", - "value": "", + "id": "system_status_control.temperature2", + "name": "Cool Temperature(System Status Control)", + "value": "28", "unit": "", "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "data_type": "NUMBER", + "value_type": "FLOAT", + "bacnet_type": "analog_output_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "system_status_control.on_off", + "system_status_control.mode", + "system_status_control.temperature1" + ] }, { - "id": "insert_plan", - "name": "Insert Plan", - "value": "", + "id": "target_temperature_mode", + "name": "Target Temperature Mode", + "value": "0", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "plan_1" }, - { "value": 1, "name": "plan_2" }, - { "value": 2, "name": "plan_3" }, - { "value": 3, "name": "plan_4" }, - { "value": 4, "name": "plan_5" }, - { "value": 5, "name": "plan_6" }, - { "value": 6, "name": "plan_7" }, - { "value": 7, "name": "plan_8" }, - { "value": 8, "name": "plan_9" }, - { "value": 9, "name": "plan_10" }, - { "value": 10, "name": "plan_11" }, - { "value": 11, "name": "plan_12" }, - { "value": 12, "name": "plan_13" }, - { "value": 13, "name": "plan_14" }, - { "value": 14, "name": "plan_15" }, - { "value": 15, "name": "plan_16" } + { + "value": 0, + "name": "single" + }, + { + "value": 1, + "name": "dual" + } ], "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "cancel_ble_pair", - "name": "Cancel Bluetooth Pair", - "value": "", - "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + "id": "target_temperature_range.auto.celsius_max", + "name": "Celsius Max Value(Auto Target Temperature Range)", + "value": "35", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 ], - "bacnet_type": "binary_output_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.auto.min" + ] }, { - "id": "trigger_ble_pair", - "name": "Trigger Bluetooth Pair", - "value": "", - "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + "id": "target_temperature_range.auto.celsius_min", + "name": "Celsius Min Value(Auto Target Temperature Range)", + "value": "10", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 ], - "bacnet_type": "binary_output_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.auto.max" + ] + }, + { + "id": "target_temperature_range.auto.fahrenheit_max", + "name": "Fahrenheit Max Value(Auto Target Temperature Range)", + "value": "95", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "target_temperature_range.auto.min" + ] + }, + { + "id": "target_temperature_range.auto.fahrenheit_min", + "name": "Fahrenheit Min Value(Auto Target Temperature Range)", + "value": "50", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "target_temperature_range.auto.max" + ] + }, + { + "id": "target_temperature_range.auto.max", + "name": "Max Value(Auto Target Temperature Range)", + "value": "35", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.auto.min" + ] + }, + { + "id": "target_temperature_range.auto.min", + "name": "Min Value(Auto Target Temperature Range)", + "value": "10", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.auto.max" + ] + }, + { + "id": "target_temperature_range.cool.celsius_max", + "name": "Celsius Max Value(Cool Target Temperature Range)", + "value": "35", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.cool.min" + ] + }, + { + "id": "target_temperature_range.cool.celsius_min", + "name": "Celsius Min Value(Cool Target Temperature Range)", + "value": "23", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.cool.max" + ] + }, + { + "id": "target_temperature_range.cool.fahrenheit_max", + "name": "Fahrenheit Max Value(Cool Target Temperature Range)", + "value": "95", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "target_temperature_range.cool.min" + ] + }, + { + "id": "target_temperature_range.cool.fahrenheit_min", + "name": "Fahrenheit Min Value(Cool Target Temperature Range)", + "value": "73.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "target_temperature_range.cool.max" + ] + }, + { + "id": "target_temperature_range.cool.max", + "name": "Max Value(Cool Target Temperature Range)", + "value": "35", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.cool.min" + ] + }, + { + "id": "target_temperature_range.cool.min", + "name": "Min Value(Cool Target Temperature Range)", + "value": "23", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.cool.max" + ] + }, + { + "id": "target_temperature_range.em_heat.celsius_max", + "name": "Celsius Max Value(EM Heat Target Temperature Range)", + "value": "27", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.em_heat.min" + ] + }, + { + "id": "target_temperature_range.em_heat.celsius_min", + "name": "Celsius Min Value(EM Heat Target Temperature Range)", + "value": "10", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.em_heat.max" + ] + }, + { + "id": "target_temperature_range.em_heat.fahrenheit_max", + "name": "Fahrenheit Max Value(EM Heat Target Temperature Range)", + "value": "80.6", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "target_temperature_range.em_heat.min" + ] + }, + { + "id": "target_temperature_range.em_heat.fahrenheit_min", + "name": "Fahrenheit Min Value(EM Heat Target Temperature Range)", + "value": "50", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "target_temperature_range.em_heat.max" + ] + }, + { + "id": "target_temperature_range.em_heat.max", + "name": "Max Value(EM Heat Target Temperature Range)", + "value": "27", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.em_heat.min" + ] + }, + { + "id": "target_temperature_range.em_heat.min", + "name": "Min Value(EM Heat Target Temperature Range)", + "value": "10", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.em_heat.max" + ] + }, + { + "id": "target_temperature_range.heat.celsius_max", + "name": "Celsius Max Value(Heat Target Temperature Range)", + "value": "19", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.heat.min" + ] + }, + { + "id": "target_temperature_range.heat.celsius_min", + "name": "Celsius Min Value(Heat Target Temperature Range)", + "value": "10", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.heat.max" + ] + }, + { + "id": "target_temperature_range.heat.fahrenheit_max", + "name": "Fahrenheit Max Value(Heat Target Temperature Range)", + "value": "66.2", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "target_temperature_range.heat.min" + ] + }, + { + "id": "target_temperature_range.heat.fahrenheit_min", + "name": "Fahrenheit Min Value(Heat Target Temperature Range)", + "value": "50", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "target_temperature_range.heat.max" + ] + }, + { + "id": "target_temperature_range.heat.max", + "name": "Max Value(Heat Target Temperature Range)", + "value": "19", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.heat.min" + ] + }, + { + "id": "target_temperature_range.heat.min", + "name": "Min Value(Heat Target Temperature Range)", + "value": "10", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "target_temperature_range.heat.max" + ] + }, + { + "id": "target_temperature_range.id", + "name": "Target Temperature Range ID(Target Temperature Range)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "heat" + }, + { + "value": 1, + "name": "em heat" + }, + { + "value": 2, + "name": "cool" + }, + { + "value": 3, + "name": "auto" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "target_temperature_resolution", + "name": "Target Temperature Resolution", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "0.5" + }, + { + "value": 1, + "name": "1" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS" + }, + { + "id": "target_temperature_settings.auto", + "name": "Auto Target Temperature(Target Temperature Settings)", + "value": "23", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.auto_cool", + "name": "Auto-Cool Target Temperature(Target Temperature Settings)", + "value": "28", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.auto_heat", + "name": "Auto-Heat Target Temperature(Target Temperature Settings)", + "value": "17", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.celsius_auto", + "name": "Celsius Auto Target Temperature(Target Temperature Settings)", + "value": "23", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.celsius_auto_cool", + "name": "Celsius Auto-Cool Target Temperature(Target Temperature Settings)", + "value": "28", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.celsius_auto_heat", + "name": "Celsius Auto-Heat Target Temperature(Target Temperature Settings)", + "value": "17", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.celsius_cool", + "name": "Celsius Cool Target Temperature(Target Temperature Settings)", + "value": "28", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.celsius_em_heat", + "name": "Celsius EM Heat Target Temperature(Target Temperature Settings)", + "value": "25", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.celsius_heat", + "name": "Celsius Heat Target Temperature(Target Temperature Settings)", + "value": "17", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.cool", + "name": "Cool Target Temperature(Target Temperature Settings)", + "value": "28", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.em_heat", + "name": "EM Heat Target Temperature(Target Temperature Settings)", + "value": "25", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.fahrenheit_auto", + "name": "Fahrenheit Auto Target Temperature(Target Temperature Settings)", + "value": "73.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "target_temperature_settings.fahrenheit_auto_cool", + "name": "Fahrenheit Auto-Cool Target Temperature(Target Temperature Settings)", + "value": "82.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "target_temperature_settings.fahrenheit_auto_heat", + "name": "Fahrenheit Auto-Heat Target Temperature(Target Temperature Settings)", + "value": "62.6", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "target_temperature_settings.fahrenheit_cool", + "name": "Fahrenheit Cool Target Temperature(Target Temperature Settings)", + "value": "82.4", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "target_temperature_settings.fahrenheit_em_heat", + "name": "Fahrenheit EM Heat Target Temperature(Target Temperature Settings)", + "value": "77", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "target_temperature_settings.fahrenheit_heat", + "name": "Fahrenheit Heat Target Temperature(Target Temperature Settings)", + "value": "62.6", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 41, + 95 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [] + }, + { + "id": "target_temperature_settings.heat", + "name": "Heat Target Temperature(Target Temperature Settings)", + "value": "17", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [] + }, + { + "id": "target_temperature_settings.temperature_control_mode", + "name": "Temperature Control Mode(Target Temperature Settings)", + "value": "0", + "unit": "", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "UINT8", + "values": [ + { + "value": 0, + "name": "Heat Target Temperature" + }, + { + "value": 1, + "name": "EM Heat Target Temperature" + }, + { + "value": 2, + "name": "Cool Target Temperature" + }, + { + "value": 3, + "name": "Auto Target Temperature" + }, + { + "value": 4, + "name": "Auto-Heat Target Temperature" + }, + { + "value": 5, + "name": "Auto-Cool Target Temperature" + }, + { + "value": 6, + "name": "Dehumidify Target Temperature" + }, + { + "value": 7, + "name": "Ventilation Target Temperature" + } + ], + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 95, + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] + }, + { + "id": "target_temperature1", + "name": "Target Temperature1", + "value": "", + "unit": "°C", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "target_temperature2", + "name": "Target Temperature2", + "value": "", + "unit": "°C", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + 5, + 35 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" + }, + { + "id": "temperature", + "name": "Temperature", + "value": "", + "unit": "°C", + "access_mode": "R", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -20, + 60 + ], + "bacnet_type": "analog_input_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS" }, { - "id": "remove_plan.plan_1", - "name": "Remove Plan 1", + "id": "temperature_alarm.type", + "name": "Alarm Type(Temperature Alarm)", "value": "", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "Collection Error" + }, + { + "value": 1, + "name": "Exceed the Range Lower Limit" + }, + { + "value": 2, + "name": "Exceed the Range Upper Limit" + }, + { + "value": 3, + "name": "No Data" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "remove_plan.plan_2", - "name": "Remove Plan 2", - "value": "", - "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + "id": "temperature_calibration_settings.calibration_value", + "name": "Calibration Value(Temperature Calibration Settings)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -80, + 80 ], - "bacnet_type": "binary_output_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_calibration_settings.enable" + ] }, { - "id": "remove_plan.plan_3", - "name": "Remove Plan 3", - "value": "", - "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + "id": "temperature_calibration_settings.celsius_calibration_value", + "name": "Celsius Calibration Value(Temperature Calibration Settings)", + "value": "0", + "unit": "°C", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -80, + 80 ], - "bacnet_type": "binary_output_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 62, + "bacnet_unit_type": "UNITS_DEGREES_CELSIUS", + "reference": [ + "temperature_calibration_settings.enable" + ] }, { - "id": "remove_plan.plan_4", - "name": "Remove Plan 4", - "value": "", + "id": "temperature_calibration_settings.enable", + "name": "Temperature Calibration(Temperature Calibration Settings)", + "value": "0", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "temperature_calibration_settings.calibration_value" + ] }, { - "id": "remove_plan.plan_5", - "name": "Remove Plan 5", - "value": "", - "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + "id": "temperature_calibration_settings.fahrenheit_calibration_value", + "name": "Fahrenheit Calibration Value(Temperature Calibration Settings)", + "value": "32", + "unit": "℉", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "FLOAT", + "range": [ + -112, + 176 ], - "bacnet_type": "binary_output_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 64, + "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT", + "reference": [ + "temperature_calibration_settings.enable" + ] }, { - "id": "remove_plan.plan_6", - "name": "Remove Plan 6", - "value": "", + "id": "temperature_control_mode.mode", + "name": "Temperature Control Mode(Temperature Control Mode)", + "value": "0", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "RW", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "heat" + }, + { + "value": 1, + "name": "em heat" + }, + { + "value": 2, + "name": "cool" + }, + { + "value": 3, + "name": "auto" + }, + { + "value": 4, + "name": "dehumidify" + }, + { + "value": 5, + "name": "ventilation" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "remove_plan.plan_7", - "name": "Remove Plan 7", - "value": "", + "id": "temperature_control_mode.plan_mode_enable", + "name": "Plan Temperature Control Mode Enable(Temperature Control Mode)", + "value": "1", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "RW", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "remove_plan.plan_8", - "name": "Remove Plan 8", - "value": "", + "id": "temperature_control_mode.subcmd", + "name": "Subcmd ID(Temperature Control Mode)", + "value": "0", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "RW", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [] }, { - "id": "remove_plan.plan_9", - "name": "Remove Plan 9", - "value": "", + "id": "temperature_mode", + "name": "Temperature Control Mode", + "value": "0", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "R", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "heat" + }, + { + "value": 1, + "name": "em heat" + }, + { + "value": 2, + "name": "cool" + }, + { + "value": 3, + "name": "auto" + }, + { + "value": 4, + "name": "dehumidify" + }, + { + "value": 5, + "name": "ventilation" + }, + { + "value": 10, + "name": "off" + }, + { + "value": 11, + "name": "none" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "remove_plan.plan_10", - "name": "Remove Plan 10", - "value": "", + "id": "temperature_unit", + "name": "Temperature Unit", + "value": "0", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "RW", + "data_type": "ENUM", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "℃" + }, + { + "value": 1, + "name": "℉" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "multistate_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "remove_plan.plan_11", - "name": "Remove Plan 11", - "value": "", - "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", + "id": "time_zone", + "name": "Time Zone", + "value": "0", + "unit": "min", + "access_mode": "RW", + "data_type": "ENUM", + "value_type": "INT16", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": -720, + "name": "UTC-12(IDLW)" + }, + { + "value": -660, + "name": "UTC-11(SST)" + }, + { + "value": -600, + "name": "UTC-10(HST)" + }, + { + "value": -570, + "name": "UTC-9:30(MIT)" + }, + { + "value": -540, + "name": "UTC-9(AKST)" + }, + { + "value": -480, + "name": "UTC-8(PST)" + }, + { + "value": -420, + "name": "UTC-7(MST)" + }, + { + "value": -360, + "name": "UTC-6(CST)" + }, + { + "value": -300, + "name": "UTC-5(EST)" + }, + { + "value": -240, + "name": "UTC-4(AST)" + }, + { + "value": -210, + "name": "UTC-3:30(NST)" + }, + { + "value": -180, + "name": "UTC-3(BRT)" + }, + { + "value": -120, + "name": "UTC-2(FNT)" + }, + { + "value": -60, + "name": "UTC-1(CVT)" + }, + { + "value": 0, + "name": "UTC(WET)" + }, + { + "value": 60, + "name": "UTC+1(CET)" + }, + { + "value": 120, + "name": "UTC+2(EET)" + }, + { + "value": 180, + "name": "UTC+3(MSK)" + }, + { + "value": 210, + "name": "UTC+3:30(IRST)" + }, + { + "value": 240, + "name": "UTC+4(GST)" + }, + { + "value": 270, + "name": "UTC+4:30(AFT)" + }, + { + "value": 300, + "name": "UTC+5(PKT)" + }, + { + "value": 330, + "name": "UTC+5:30(IST)" + }, + { + "value": 345, + "name": "UTC+5:45(NPT)" + }, + { + "value": 360, + "name": "UTC+6(BHT)" + }, + { + "value": 390, + "name": "UTC+6:30(MMT)" + }, + { + "value": 420, + "name": "UTC+7(ICT)" + }, + { + "value": 480, + "name": "UTC+8(CT/CST)" + }, + { + "value": 540, + "name": "UTC+9(JST)" + }, + { + "value": 570, + "name": "UTC+9:30(ACST)" + }, + { + "value": 600, + "name": "UTC+10(AEST)" + }, + { + "value": 630, + "name": "UTC+10:30(LHST)" + }, + { + "value": 660, + "name": "UTC+11(VUT)" + }, + { + "value": 720, + "name": "UTC+12(NZST)" + }, + { + "value": 765, + "name": "UTC+12:45(CHAST)" + }, + { + "value": 780, + "name": "UTC+13(PHOT)" + }, + { + "value": 840, + "name": "UTC+14(LINT)" + } ], - "bacnet_type": "binary_output_object", - "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_type": "multistate_value_object", + "bacnet_unit_type_id": 72, + "bacnet_unit_type": "UNITS_MINUTES" }, { - "id": "remove_plan.plan_12", - "name": "Remove Plan 12", + "id": "tsl_version", + "name": "TSL Version", "value": "", "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, "bacnet_unit_type": "UNITS_NO_UNITS" }, { - "id": "remove_plan.plan_13", - "name": "Remove Plan 13", - "value": "", + "id": "unlock_button.enable", + "name": "Temporary Unlock Enable(Temporary Unlock)", + "value": "0", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "unlock_button.timeout" + ] }, { - "id": "remove_plan.plan_14", - "name": "Remove Plan 14", - "value": "", + "id": "unlock_button.timeout", + "name": "Temporary Unlock Time(Temporary Unlock)", + "value": "30", + "unit": "s", + "access_mode": "RW", + "data_type": "NUMBER", + "value_type": "UINT16", + "range": [ + 1, + 3600 + ], + "bacnet_type": "analog_value_object", + "bacnet_unit_type_id": 73, + "bacnet_unit_type": "UNITS_SECONDS", + "reference": [ + "unlock_button.enable" + ] + }, + { + "id": "unlock_combination_button_settings.button1", + "name": "Button 1(Temporary Unlock Button Combination)", + "value": "1", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "unlock_combination_button_settings.button2", + "unlock_combination_button_settings.button3", + "unlock_combination_button_settings.button4", + "unlock_combination_button_settings.button5", + "unlock_combination_button_settings.reserved" + ] }, { - "id": "remove_plan.plan_15", - "name": "Remove Plan 15", - "value": "", + "id": "unlock_combination_button_settings.button2", + "name": "Button 2(Temporary Unlock Button Combination)", + "value": "1", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "unlock_combination_button_settings.button1", + "unlock_combination_button_settings.button3", + "unlock_combination_button_settings.button4", + "unlock_combination_button_settings.button5", + "unlock_combination_button_settings.reserved" + ] }, { - "id": "remove_plan.plan_16", - "name": "Remove Plan 16", - "value": "", + "id": "unlock_combination_button_settings.button3", + "name": "Button 3(Temporary Unlock Button Combination)", + "value": "0", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "unlock_combination_button_settings.button1", + "unlock_combination_button_settings.button2", + "unlock_combination_button_settings.button4", + "unlock_combination_button_settings.button5", + "unlock_combination_button_settings.reserved" + ] }, { - "id": "remove_plan.reset", - "name": "Remove Plan (reset to default)", - "value": "", + "id": "unlock_combination_button_settings.button4", + "name": "Button 4(Temporary Unlock Button Combination)", + "value": "0", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "unlock_combination_button_settings.button1", + "unlock_combination_button_settings.button2", + "unlock_combination_button_settings.button3", + "unlock_combination_button_settings.button5", + "unlock_combination_button_settings.reserved" + ] }, { - "id": "reconnect", - "name": "Reconnect", - "value": "", + "id": "unlock_combination_button_settings.button5", + "name": "Button 5(Temporary Unlock Button Combination)", + "value": "0", "unit": "", - "access_mode": "W", + "access_mode": "RW", "data_type": "BOOL", "value_type": "UINT8", "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } ], - "bacnet_type": "binary_output_object", + "bacnet_type": "binary_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "unlock_combination_button_settings.button1", + "unlock_combination_button_settings.button2", + "unlock_combination_button_settings.button3", + "unlock_combination_button_settings.button4", + "unlock_combination_button_settings.reserved" + ] }, { - "id": "synchronize_time", - "name": "Synchronize Time", - "value": "", + "id": "unlock_combination_button_settings.reserved", + "name": "Reserved(Temporary Unlock Button Combination)", + "value": "0", "unit": "", - "access_mode": "W", - "data_type": "BOOL", + "access_mode": "RW", + "data_type": "NUMBER", "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "bacnet_type": "analog_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "unlock_combination_button_settings.button1", + "unlock_combination_button_settings.button2", + "unlock_combination_button_settings.button3", + "unlock_combination_button_settings.button4", + "unlock_combination_button_settings.button5" + ], + "values": [ + { + "value": 0, + "name": "disable" + }, + { + "value": 1, + "name": "enable" + } + ] }, { - "id": "query_device_status", - "name": "Query Device Status", + "id": "version.firmware_version", + "name": "Firmware Version(Product Version)", "value": "", "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 12, + "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "version.hardware_version" + ] }, { - "id": "reboot", - "name": "Reboot", + "id": "version.hardware_version", + "name": "Hardware Version(Product Version)", "value": "", "unit": "", - "access_mode": "W", - "data_type": "BOOL", - "value_type": "UINT8", - "values": [ - { "value": 0, "name": "no" }, - { "value": 1, "name": "yes" } - ], - "bacnet_type": "binary_output_object", + "access_mode": "R", + "data_type": "TEXT", + "value_type": "STRING", + "max_length": 4, + "bacnet_type": "character_string_value_object", "bacnet_unit_type_id": 95, - "bacnet_unit_type": "UNITS_NO_UNITS" + "bacnet_unit_type": "UNITS_NO_UNITS", + "reference": [ + "version.firmware_version" + ] } ] -} +} \ No newline at end of file diff --git a/vendors/milesight-iot/wt-series/wt401/wt401-decoder.js b/vendors/milesight-iot/wt-series/wt401/wt401-decoder.js index b689d20..cdb0279 100644 --- a/vendors/milesight-iot/wt-series/wt401/wt401-decoder.js +++ b/vendors/milesight-iot/wt-series/wt401/wt401-decoder.js @@ -5,939 +5,1275 @@ * * @product WT401 */ -var RAW_VALUE = 0x01; /* eslint no-redeclare: "off" */ /* eslint-disable */ // Chirpstack v4 function decodeUplink(input) { - var decoded = milesightDeviceDecode(input.bytes); - return { data: decoded }; + var decoded = milesightDeviceDecode(input.bytes); + return { data: decoded }; } // Chirpstack v3 function Decode(fPort, bytes) { - return milesightDeviceDecode(bytes); + return milesightDeviceDecode(bytes); } // The Things Network function Decoder(bytes, port) { - return milesightDeviceDecode(bytes); + return milesightDeviceDecode(bytes); } /* eslint-enable */ function milesightDeviceDecode(bytes) { - var decoded = {}; - - var unknown_command = 0; - for (var i = 0; i < bytes.length; ) { - var command_id = bytes[i++]; - - switch (command_id) { - // attribute - case 0xdf: - decoded.tsl_version = readProtocolVersion(bytes.slice(i, i + 2)); - i += 2; - break; - case 0xde: // ? - decoded.product_name = readString(bytes.slice(i, i + 32)); - i += 32; - break; - case 0xdd: // ? - decoded.product_pn = readString(bytes.slice(i, i + 32)); - i += 32; - break; - case 0xdb: - decoded.product_sn = readHexString(bytes.slice(i, i + 8)); - i += 8; - break; - case 0xda: - decoded.version = {}; - decoded.version.hardware_version = readHardwareVersion(bytes.slice(i, i + 2)); - decoded.version.firmware_version = readFirmwareVersion(bytes.slice(i + 2, i + 8)); - i += 8; - break; - case 0xd9: - decoded.oem_id = readHexString(bytes.slice(i, i + 2)); - i += 2; - break; - case 0xd8: - decoded.product_frequency_band = readString(bytes.slice(i, i + 16)); - i += 16; - break; - case 0xee: - decoded.device_request = 1; - i += 0; - break; - case 0xc8: - decoded.device_status = readDeviceStatus(bytes[i]); - i += 1; - break; - case 0xcf: - // skip 1 byte - decoded.lorawan_class = readLoRaWANClass(bytes[i + 1]); - i += 2; - break; - - // telemetry - case 0x00: - decoded.battery = readUInt8(bytes[i]); - i += 1; - break; - case 0x01: - decoded.temperature = readInt16LE(bytes.slice(i, i + 2)) / 100; - i += 2; - break; - case 0x02: - decoded.humidity = readUInt16LE(bytes.slice(i, i + 2)) / 10; - i += 2; - break; - case 0x03: - decoded.temperature_control_mode = readTemperatureControlMode(bytes[i]); - i += 1; - break; - case 0x04: - decoded.fan_mode = readFanMode(bytes[i]); - i += 1; - break; - case 0x05: - decoded.execution_plan = readPlan(readUInt8(bytes[i])); - i += 1; - break; - case 0x06: - decoded.target_temperature_1 = readInt16LE(bytes.slice(i, i + 2)) / 100; - i += 2; - break; - case 0x07: - decoded.target_temperature_2 = readInt16LE(bytes.slice(i, i + 2)) / 100; - i += 2; - break; - case 0x08: - decoded.pir_status = readPIRStatus(bytes[i]); - i += 1; - break; - case 0x09: - decoded.ble_event = readBleEvent(bytes[i]); - i += 1; - break; - case 0x0a: - decoded.power_bus_event = readPowerBusEvent(bytes[i]); - i += 1; - break; - case 0x0b: - decoded.temperature_alarm = readTemperatureAlarm(bytes[i]); - i += 1; - break; - case 0x0c: - decoded.humidity_alarm = readHumidityAlarm(bytes[i]); - i += 1; - break; - case 0x0d: - decoded.button_event = readButtonEvent(bytes[i]); - i += 1; - break; - case 0x0f: - decoded.battery_event = readBatteryEvent(bytes[i]); - i += 1; - break; - - // config - case 0x56: - decoded.peer_ble_pair_info = {}; - decoded.peer_ble_pair_info.address_type = readAddressType(bytes[i]); - decoded.peer_ble_pair_info.address = readHexString(bytes.slice(i + 1, i + 1 + 6)); - decoded.peer_ble_pair_info.name = readString(bytes.slice(i + 7, i + 7 + 32)); - i += 40; - break; - case 0x60: - var time_unit = readUInt8(bytes[i]); - decoded.collection_interval = {}; - decoded.collection_interval.unit = readTimeUnitType(time_unit); - if (time_unit === 0) { - decoded.collection_interval.seconds_of_time = readUInt16LE(bytes.slice(i + 1, i + 3)); - } else if (time_unit === 1) { - decoded.collection_interval.minutes_of_time = readUInt16LE(bytes.slice(i + 1, i + 3)); - } - i += 3; - break; - case 0x61: - decoded.reporting_interval = {}; - decoded.reporting_interval.mode = readReportingMode(bytes[i]); - decoded.reporting_interval.unit = readTimeUnitType(bytes[i + 1]); - var time_unit = readUInt8(bytes[i + 1]); - if (time_unit === 0) { - decoded.reporting_interval.seconds_of_time = readUInt16LE(bytes.slice(i + 2, i + 4)); - } else if (time_unit === 1) { - decoded.reporting_interval.minutes_of_time = readUInt16LE(bytes.slice(i + 2, i + 4)); - } - i += 4; - break; - case 0x62: - decoded.intelligent_display_enable = readEnableStatus(bytes[i]); - i += 1; - break; - case 0x63: - decoded.temperature_unit = readTemperatureUnit(bytes[i]); - i += 1; - break; - case 0x64: - var data = readUInt8(bytes[i]); - decoded.temperature_control_mode_support = {}; - var mode_bit_offset = { heat: 0, em_heat: 1, cool: 2, auto: 3 }; - for (var mode in mode_bit_offset) { - decoded.temperature_control_mode_support[mode] = readEnableStatus((data >> mode_bit_offset[mode]) & 0x01); - } - i += 1; - break; - case 0x65: - decoded.target_temperature_mode = readTargetTemperatureMode(bytes[i]); - i += 1; - break; - case 0x66: - decoded.target_temperature_resolution = readTargetTemperatureResolution(bytes[i]); - i += 1; - break; - case 0x67: - decoded.system_status = readSystemStatus(bytes[i]); - i += 1; - break; - case 0x68: - var data = readUInt8(bytes[i]); - if (data === 0x00) { - decoded.temperature_control_mode = readTemperatureControlMode(bytes[i + 1]); - } else if (data === 0x01) { - decoded.temperature_control_mode_in_plan_enable = readEnableStatus(bytes[i + 1]); - } - i += 2; - break; - case 0x69: - var data = readUInt8(bytes[i]); - var temperature = readInt16LE(bytes.slice(i + 1, i + 3)) / 100; - // heat - if (data === 0x00) { - decoded.target_temperature_settings = decoded.target_temperature_settings || {}; - decoded.target_temperature_settings.heat = temperature; - } - // em heat - else if (data === 0x01) { - decoded.target_temperature_settings = decoded.target_temperature_settings || {}; - decoded.target_temperature_settings.em_heat = temperature; - } - // cool - else if (data === 0x02) { - decoded.target_temperature_settings = decoded.target_temperature_settings || {}; - decoded.target_temperature_settings.cool = temperature; - } - // auto - else if (data === 0x03) { - decoded.target_temperature_settings = decoded.target_temperature_settings || {}; - decoded.target_temperature_settings.auto = temperature; - } - // dual (auto heat) - else if (data === 0x04) { - decoded.target_temperature_settings = decoded.target_temperature_settings || {}; - decoded.target_temperature_settings.auto_heat = temperature; - } - // dual (auto cool) - else if (data === 0x05) { - decoded.target_temperature_settings = decoded.target_temperature_settings || {}; - decoded.target_temperature_settings.auto_cool = temperature; - } - i += 3; - break; - case 0x6a: - decoded.dead_band = readInt16LE(bytes.slice(i, i + 2)) / 100; - i += 2; - break; - case 0x6b: - var data = readUInt8(bytes[i]); - var range = {}; - range.min = readInt16LE(bytes.slice(i + 1, i + 3)) / 100; - range.max = readInt16LE(bytes.slice(i + 3, i + 5)) / 100; - i += 5; - if (data === 0x00) { - decoded.target_temperature_range = decoded.target_temperature_range || {}; - decoded.target_temperature_range.heat = range; - } else if (data === 0x01) { - decoded.target_temperature_range = decoded.target_temperature_range || {}; - decoded.target_temperature_range.em_heat = range; - } else if (data === 0x02) { - decoded.target_temperature_range = decoded.target_temperature_range || {}; - decoded.target_temperature_range.cool = range; - } else if (data === 0x03) { - decoded.target_temperature_range = decoded.target_temperature_range || {}; - decoded.target_temperature_range.auto = range; - } - break; - case 0x6c: - decoded.communicate_interval = {}; - decoded.communicate_interval.mode = readReportingMode(bytes[i]); - decoded.communicate_interval.unit = readTimeUnitType(bytes[i + 1]); - var time_unit = readUInt8(bytes[i + 1]); - if (time_unit === 0) { - decoded.communicate_interval.seconds_of_time = readUInt16LE(bytes.slice(i + 2, i + 4)); - } else if (time_unit === 1) { - decoded.communicate_interval.minutes_of_time = readUInt16LE(bytes.slice(i + 2, i + 4)); - } - i += 4; - break; - case 0x71: - var data = readUInt8(bytes[i]); - decoded.button_custom_function = decoded.button_custom_function || {}; - if (data === 0x00) { - decoded.button_custom_function.enable = readEnableStatus(bytes[i + 1]); - } - // button 1 - else if (data === 0x01 || data === 0x02 || data === 0x03) { - var button_name = "button_" + data; - decoded.button_custom_function[button_name] = readButtonFunction(bytes[i + 1]); - } - i += 2; - break; - case 0x72: - var enable = readEnableStatus(bytes[i]); - var data = readUInt16LE(bytes.slice(i + 1, i + 3)); - decoded.child_lock_settings = {}; - decoded.child_lock_settings.enable = enable; - var button_bit_offset = { temperature_up: 0, temperature_down: 1, system_on_off: 2, fan_mode: 3, temperature_control_mode: 4, reboot_reset: 5, power_on_off: 6, cancel_pair: 7, plan_switch: 8, status_report: 9, release_filter_alarm: 10, button_report_1: 11, button_report_2: 12, button_report_3: 13, temperature_unit_switch: 14 }; - for (var button in button_bit_offset) { - decoded.child_lock_settings[button] = readEnableStatus((data >> button_bit_offset[button]) & 0x01); - } - i += 3; - break; - case 0x74: - decoded.fan_mode = readFanMode(bytes[i]); - i += 1; - break; - case 0x75: - decoded.screen_display_settings = decoded.screen_display_settings || {}; - var screen_object_data = readUInt8(bytes[i]); - var screen_object_bit_offset = { plan_name: 0, ambient_temperature: 1, ambient_humidity: 2, target_temperature: 3 }; - for (var key in screen_object_bit_offset) { - decoded.screen_display_settings[key] = readEnableStatus((screen_object_data >>> screen_object_bit_offset[key]) & 0x01); - } - i += 1; - break; - case 0x76: - decoded.temperature_calibration_settings = {}; - decoded.temperature_calibration_settings.enable = readEnableStatus(bytes[i]); - decoded.temperature_calibration_settings.calibration_value = readInt16LE(bytes.slice(i + 1, i + 3)) / 100; - i += 3; - break; - case 0x77: - decoded.humidity_calibration_settings = {}; - decoded.humidity_calibration_settings.enable = readEnableStatus(bytes[i]); - decoded.humidity_calibration_settings.calibration_value = readInt16LE(bytes.slice(i + 1, i + 3)) / 10; - i += 3; - break; - case 0x7b: - var plan_config = {}; - plan_config.plan_id = readUInt8(bytes[i]) + 1; - var data = readUInt8(bytes[i + 1]); - if (data === 0x00) { - plan_config.enable = readEnableStatus(bytes[i + 2]); - i += 3; - } else if (data === 0x01) { - plan_config.name_first = readString(bytes.slice(i + 2, i + 8)); - i += 8; - } else if (data === 0x02) { - plan_config.name_last = readString(bytes.slice(i + 2, i + 6)); - i += 6; - } else if (data === 0x03) { - plan_config.temperature_control_mode = readTemperatureControlMode(bytes[i + 2]); - plan_config.heat_target_temperature = readInt16LE(bytes.slice(i + 3, i + 5)) / 100; - plan_config.em_heat_target_temperature = readInt16LE(bytes.slice(i + 5, i + 7)) / 100; - plan_config.cool_target_temperature = readInt16LE(bytes.slice(i + 7, i + 9)) / 100; - i += 9; - } else if (data === 0x04) { - plan_config.fan_mode = readFanMode(bytes[i + 2]); - plan_config.auto_target_temperature = readInt16LE(bytes.slice(i + 3, i + 5)) / 100; - plan_config.auto_heat_target_temperature = readInt16LE(bytes.slice(i + 5, i + 7)) / 100; - plan_config.auto_cool_target_temperature = readInt16LE(bytes.slice(i + 7, i + 9)) / 100; - i += 9; - } - decoded.plan_config = decoded.plan_config || []; - decoded.plan_config.push(plan_config); - break; - case 0x7d: - decoded.data_sync_to_peer = readDataSource(bytes[i]); - i += 1; - break; - case 0x7e: - decoded.data_sync_timeout = readUInt8(bytes[i]); - i += 1; - break; - case 0x80: - var data = readUInt8(bytes[i]); - decoded.unlock_combination_button_settings = {}; - var button_bit_offset = { button_1: 0, button_2: 1, button_3: 2, button_4: 3, button_5: 4 }; - for (var button in button_bit_offset) { - decoded.unlock_combination_button_settings[button] = readEnableStatus((data >> button_bit_offset[button]) & 0x01); - } - i += 1; - break; - case 0x81: - decoded.temporary_unlock_settings = decoded.temporary_unlock_settings || {}; - decoded.temporary_unlock_settings.enable = readEnableStatus(bytes[i]); - decoded.temporary_unlock_settings.timeout = readUInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - break; - case 0x82: - var data = readUInt8(bytes[i]); - decoded.pir_config = decoded.pir_config || {}; - if (data === 0x01) { - decoded.pir_config.enable = readEnableStatus(bytes[i + 1]); - i += 2; - } else if (data === 0x02) { - decoded.pir_config.release_time = readUInt16LE(bytes.slice(i + 1, i + 3)); - i += 3; - } else if (data === 0x03) { - decoded.pir_config.general_mode = decoded.pir_config.general_mode || {}; - decoded.pir_config.general_mode.detection_mode = readPIRDetectionMode(bytes[i + 1]); - i += 2; - } else if (data === 0x04) { - decoded.pir_config.general_mode = decoded.pir_config.general_mode || {}; - decoded.pir_config.general_mode.period = readUInt8(bytes[i + 1]); - decoded.pir_config.general_mode.rate = readUInt8(bytes[i + 2]); - i += 3; - } - break; - case 0x83: - var data = readUInt8(bytes[i]); - decoded.pir_config = decoded.pir_config || {}; - if (data === 0x01) { - decoded.pir_config.eco_mode = decoded.pir_config.eco_mode || {}; - decoded.pir_config.eco_mode.enable = readEnableStatus(bytes[i + 1]); - i += 2; - } else if (data === 0x02) { - decoded.pir_config.eco_mode = decoded.pir_config.eco_mode || {}; - decoded.pir_config.eco_mode.occupied_plan = readPlan(readUInt8(bytes[i + 1])); - decoded.pir_config.eco_mode.vacant_plan = readPlan(readUInt8(bytes[i + 2])); - i += 3; - } - break; - case 0x84: - var data = readUInt8(bytes[i]); - decoded.pir_config = decoded.pir_config || {}; - if (data === 0x01) { - decoded.pir_config.night_mode = decoded.pir_config.night_mode || {}; - decoded.pir_config.night_mode.enable = readEnableStatus(bytes[i + 1]); - i += 2; - } else if (data === 0x02) { - decoded.pir_config.night_mode = decoded.pir_config.night_mode || {}; - decoded.pir_config.night_mode.detection_mode = readPIRDetectionMode(bytes[i + 1]); - i += 2; - } else if (data === 0x03) { - decoded.pir_config.night_mode = decoded.pir_config.night_mode || {}; - decoded.pir_config.night_mode.period = readUInt8(bytes[i + 1]); - decoded.pir_config.night_mode.rate = readUInt8(bytes[i + 2]); - i += 3; - } else if (data === 0x04) { - decoded.pir_config.night_mode = decoded.pir_config.night_mode || {}; - decoded.pir_config.night_mode.start_time = readUInt16LE(bytes.slice(i + 1, i + 3)); - decoded.pir_config.night_mode.end_time = readUInt16LE(bytes.slice(i + 3, i + 5)); - i += 5; - } else if (data === 0x05) { - decoded.pir_config.night_mode = decoded.pir_config.night_mode || {}; - decoded.pir_config.night_mode.occupied_plan = readPlan(readUInt8(bytes[i + 1])); - i += 2; - } - break; - case 0x85: - decoded.ble_enable = readEnableStatus(bytes[i]); - i += 1; - break; - case 0x86: - decoded.external_temperature = readInt16LE(bytes.slice(i, i + 2)) / 100; - i += 2; - break; - case 0x87: - decoded.external_humidity = readInt16LE(bytes.slice(i, i + 2)) / 10; - i += 2; - break; - case 0x88: - var data = readUInt8(bytes[i]); - decoded.fan_support_mode = {}; - var mode_bit_offset = { auto: 0, circulate: 1, on: 2, low: 3, medium: 4, high: 5 }; - for (var mode in mode_bit_offset) { - decoded.fan_support_mode[mode] = readEnableStatus((data >> mode_bit_offset[mode]) & 0x01); - } - i += 1; - break; - case 0x8b: - decoded.ble_name = readString(bytes.slice(i, i + 32)); - i += 32; - break; - case 0x8c: - decoded.ble_pair_info = {}; - decoded.ble_pair_info.address_type = readAddressType(bytes[i]); - decoded.ble_pair_info.address = readHexString(bytes.slice(i + 1, i + 1 + 6)); - decoded.ble_pair_info.name = readString(bytes.slice(i + 7, i + 7 + 32)); - i += 40; - break; - case 0x8d: - decoded.communication_mode = readCommunicationMode(bytes[i]); - i += 1; - break; - case 0xc6: - decoded.daylight_saving_time = {}; - decoded.daylight_saving_time.enable = readEnableStatus(bytes[i]); - decoded.daylight_saving_time.offset = readUInt8(bytes[i + 1]); - decoded.daylight_saving_time.start_month = readUInt8(bytes[i + 2]); - var start_day_value = readUInt8(bytes[i + 3]); - decoded.daylight_saving_time.start_week_num = (start_day_value >>> 4) & 0x0f; - decoded.daylight_saving_time.start_week_day = (start_day_value >>> 0) & 0x0f; - decoded.daylight_saving_time.start_hour_min = readUInt16LE(bytes.slice(i + 4, i + 6)); - decoded.daylight_saving_time.end_month = readUInt8(bytes[i + 6]); - var end_day_value = readUInt8(bytes[i + 7]); - decoded.daylight_saving_time.end_week_num = (end_day_value >>> 4) & 0x0f; - decoded.daylight_saving_time.end_week_day = (end_day_value >>> 0) & 0x0f; - decoded.daylight_saving_time.end_hour_min = readUInt16LE(bytes.slice(i + 8, i + 10)); - i += 10; - break; - case 0xc7: - decoded.time_zone = readTimeZone(readInt16LE(bytes.slice(i, i + 2))); - i += 2; - break; - - // service - case 0x54: - decoded.reset_ble_name = readYesNoStatus(1); - break; - case 0x55: - var data = readUInt8(bytes[i]); - if (data === 0x00) { - decoded.release_fan_alarm = readYesNoStatus(1); - } else if (data === 0x01) { - decoded.trigger_fan_alarm = readYesNoStatus(1); - } - i += 1; - break; - case 0x57: - var data = readUInt8(bytes[i]); - if (data === 0x00) { - decoded.release_freeze_alarm = readYesNoStatus(1); - } else if (data === 0x01) { - decoded.trigger_freeze_alarm = readYesNoStatus(1); - } - i += 1; - break; - case 0x58: - var data = readUInt8(bytes[i]); - if (data === 0x00) { - decoded.release_no_wire_alarm = readYesNoStatus(1); - } else if (data === 0x01) { - decoded.trigger_no_wire_alarm = readYesNoStatus(1); - } - i += 1; - break; - case 0x5a: - var data = readUInt8(bytes[i]); - if (data === 0x00) { - decoded.release_window_open_alarm = readYesNoStatus(1); - } else if (data === 0x01) { - decoded.trigger_window_open_alarm = readYesNoStatus(1); - } - i += 1; - break; - case 0x5b: - var data = readUInt8(bytes[i]); - if (data === 0x00) { - decoded.release_filter_alarm = readYesNoStatus(1); - } else if (data === 0x01) { - decoded.trigger_filter_alarm = readYesNoStatus(1); - } - i += 1; - break; - case 0x5c: - decoded.insert_plan = readPlan(readUInt8(bytes[i])); - i += 1; - break; - case 0x5e: - var data = readUInt8(bytes[i]); - if (data === 0x00) { - decoded.cancel_ble_pair = readYesNoStatus(1); - } else if (data === 0x01) { - decoded.trigger_ble_pair = readYesNoStatus(1); - } - i += 1; - break; - case 0x5f: - decoded.remove_plan = decoded.remove_plan || {}; - var plan_data = readUInt8(bytes[i]); - var plan_offset = { 0: "plan_1", 1: "plan_2", 2: "plan_3", 3: "plan_4", 4: "plan_5", 5: "plan_6", 6: "plan_7", 7: "plan_8", 8: "plan_9", 9: "plan_10", 10: "plan_11", 11: "plan_12", 12: "plan_13", 13: "plan_14", 14: "plan_15", 15: "plan_16", 255: "reset" }; - decoded.remove_plan[plan_offset[plan_data]] = readYesNoStatus(1); - i += 1; - break; - case 0xb6: - decoded.reconnect = readYesNoStatus(1); - break; - case 0xb8: - decoded.synchronize_time = readYesNoStatus(1); - break; - case 0xb9: - decoded.query_device_status = readYesNoStatus(1); - break; - case 0xbe: - decoded.reboot = readYesNoStatus(1); - break; - case 0x59: - decoded.system_status_control = decoded.system_status_control || {}; - // 0:system close, 1:system open - decoded.system_status_control.on_off = readUInt8(bytes[i]); - // 0:heat, 1:em heat, 2:cool, 3:auto - decoded.system_status_control.mode = readUInt8(bytes.slice(i + 1, i + 2)); - decoded.system_status_control.temperature1 = readInt16LE(bytes.slice(i + 2, i + 4)) / 100; - decoded.system_status_control.temperature2 = readInt16LE(bytes.slice(i + 4, i + 6)) / 100; - i += 6; - break; - - // control frame - case 0xef: - var cmd_data = readUInt8(bytes[i]); - var cmd_result = (cmd_data >>> 4) & 0x0f; - var cmd_length = cmd_data & 0x0f; - var cmd_id = readHexString(bytes.slice(i + 1, i + 1 + cmd_length)); - var cmd_header = readHexString(bytes.slice(i + 1, i + 2)); - i += 1 + cmd_length; - - var response = {}; - response.result = readCmdResult(cmd_result); - response.cmd_id = cmd_id; - response.cmd_name = readCmdName(cmd_header); - - decoded.request_result = decoded.request_result || []; - decoded.request_result.push(response); - break; - case 0xfe: - decoded.frame = readUInt8(bytes[i]); - i += 1; - break; - default: - unknown_command = 1; - break; - } - - if (unknown_command) { - throw new Error("unknown command: " + command_id); - } - } + var decoded = {}; + var result = {}; + var history = []; - return decoded; -} + var unknown_command = 0; + var counterObj = {}; + for (counterObj.i = 0; counterObj.i < bytes.length; ) { + var command_id = bytes[counterObj.i++]; + switch (command_id) { + case 0xff: + decoded.check_sequence_number_reply = decoded.check_sequence_number_reply || {}; + decoded.check_sequence_number_reply.sequence_number = readUInt8(bytes, counterObj, 1); + break; + case 0xfe: + decoded.check_order_reply = readOnlyCommand(bytes, counterObj, 1); + break; + case 0xef: + decoded.ans = decoded.ans || []; + var ans_item = {}; + var bitOptions = readUInt8(bytes, counterObj, 1); + // 0:success, 1:unknow, 2:error order, 3:error passwd, 4:error read params, 5:error write params, 6:error read, 7:error write, 8:error read apply, 9:error write apply + ans_item.result = extractBits(bitOptions, 4, 8); + ans_item.length = extractBits(bitOptions, 0, 4); + ans_item.id = readCommand(bytes, counterObj, ans_item.length); + decoded.ans.push(ans_item); + break; + case 0xee: + decoded.all_configurations_request_by_device = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xcf: + decoded.lorawan_configuration_settings = decoded.lorawan_configuration_settings || {}; + var lorawan_configuration_settings_command = readUInt8(bytes, counterObj, 1); + if (lorawan_configuration_settings_command == 0x00) { + // 0:ClassA, 1:ClassB, 2:ClassC, 3:ClassC to B + decoded.lorawan_configuration_settings.mode = readUInt8(bytes, counterObj, 1); + } + break; + case 0xdf: + decoded.tsl_version = readProtocolVersion(readBytes(bytes, counterObj, 2)); + break; + case 0xde: + decoded.product_name = readString(bytes, counterObj, 32); + break; + case 0xdd: + decoded.product_pn = readString(bytes, counterObj, 32); + break; + case 0xdb: + decoded.product_sn = readHexString(bytes, counterObj, 8); + break; + case 0xda: + decoded.version = decoded.version || {}; + decoded.version.hardware_version = readHardwareVersion(readBytes(bytes, counterObj, 2)); + decoded.version.firmware_version = readFirmwareVersion(readBytes(bytes, counterObj, 6)); + break; + case 0xd9: + decoded.oem_id = readHexString(bytes, counterObj, 2); + break; + case 0xd8: + decoded.product_frequency_band = readString(bytes, counterObj, 16); + break; + case 0xd5: + decoded.ble_phone_name = decoded.ble_phone_name || {}; + decoded.ble_phone_name.length = readUInt8(bytes, counterObj, 1); + decoded.ble_phone_name.value = readString(bytes, counterObj, decoded.ble_phone_name.length); + break; + case 0x00: + decoded.battery = readUInt8(bytes, counterObj, 1); + break; + case 0x01: + decoded.temperature = readInt16LE(bytes, counterObj, 2) / 100; + break; + case 0x02: + decoded.humidity = readUInt16LE(bytes, counterObj, 2) / 10; + break; + case 0x08: + // 0:Vacant, 1:Occupied, 2:Night Occupied + decoded.pir_status = readUInt8(bytes, counterObj, 1); + break; + case 0x03: + // 0:heat, 1:em heat, 2:cool, 3:auto, 4:dehumidify, 5:ventilation, 10:off, 11:none + decoded.temperature_mode = readUInt8(bytes, counterObj, 1); + break; + case 0x06: + decoded.target_temperature1 = readInt16LE(bytes, counterObj, 2) / 100; + break; + case 0x07: + decoded.target_temperature2 = readInt16LE(bytes, counterObj, 2) / 100; + break; + case 0x04: + // 0:auto, 1:circulate, 2:on, 3:low, 4:medium, 5:high, 10:off, 11:none/keep + decoded.fan_mode = readUInt8(bytes, counterObj, 1); + break; + case 0x05: + // 0:plan0, 1:plan1, 2:plan2, 3:plan3, 4:plan4, 5:plan5, 6:plan6, 7:plan7, 8:plan8, 9:plan9, 10:plan10, 11:plan11, 12:plan12, 13:plan13, 14:plan14, 15:plan15, 255:Not executed + decoded.execution_plan_id = readUInt8(bytes, counterObj, 1); + break; + case 0x0b: + decoded.temperature_alarm = decoded.temperature_alarm || {}; + decoded.temperature_alarm.type = readUInt8(bytes, counterObj, 1); + break; + case 0x0c: + decoded.humidity_alarm = decoded.humidity_alarm || {}; + decoded.humidity_alarm.type = readUInt8(bytes, counterObj, 1); + break; + case 0x09: + decoded.ble_event = decoded.ble_event || {}; + decoded.ble_event.type = readUInt8(bytes, counterObj, 1); + break; + case 0x0a: + decoded.power_bus_event = decoded.power_bus_event || {}; + decoded.power_bus_event.type = readUInt8(bytes, counterObj, 1); + break; + case 0x0d: + decoded.key_event = decoded.key_event || {}; + decoded.key_event.type = readUInt8(bytes, counterObj, 1); + if (decoded.key_event.type == 0x00) { + decoded.key_event.f1 = decoded.key_event.f1 || {}; + } + if (decoded.key_event.type == 0x01) { + decoded.key_event.f2 = decoded.key_event.f2 || {}; + } + if (decoded.key_event.type == 0x02) { + decoded.key_event.f3 = decoded.key_event.f3 || {}; + } + break; + case 0x0f: + decoded.battery_event = decoded.battery_event || {}; + decoded.battery_event.type = readUInt8(bytes, counterObj, 1); + break; + case 0x60: + decoded.collection_interval = decoded.collection_interval || {}; + // 0:second, 1:min + decoded.collection_interval.unit = readUInt8(bytes, counterObj, 1); + if (decoded.collection_interval.unit == 0x00) { + decoded.collection_interval.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.collection_interval.unit == 0x01) { + decoded.collection_interval.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + break; + case 0x8d: + // 0:BLE, 1:LoRa, 2:BLE+LoRa, 3:PowerBus+LoRa + decoded.communication_mode = readUInt8(bytes, counterObj, 1); + break; + case 0x61: + decoded.reporting_interval = decoded.reporting_interval || {}; + // 0:BLE, 1:LORA, 2:BLE+LORA, 3:POWERBUS+lora + var reporting_interval_type = readUInt8(bytes, counterObj, 1); + if (reporting_interval_type == 0x00) { + decoded.reporting_interval.ble = decoded.reporting_interval.ble || {}; + // 0:second, 1:min + decoded.reporting_interval.ble.unit = readUInt8(bytes, counterObj, 1); + if (decoded.reporting_interval.ble.unit == 0x00) { + decoded.reporting_interval.ble.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.reporting_interval.ble.unit == 0x01) { + decoded.reporting_interval.ble.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + } + if (reporting_interval_type == 0x01) { + decoded.reporting_interval.lora = decoded.reporting_interval.lora || {}; + // 0:second, 1:min + decoded.reporting_interval.lora.unit = readUInt8(bytes, counterObj, 1); + if (decoded.reporting_interval.lora.unit == 0x00) { + decoded.reporting_interval.lora.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.reporting_interval.lora.unit == 0x01) { + decoded.reporting_interval.lora.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + } + if (reporting_interval_type == 0x02) { + decoded.reporting_interval.ble_lora = decoded.reporting_interval.ble_lora || {}; + // 0:second, 1:min + decoded.reporting_interval.ble_lora.unit = readUInt8(bytes, counterObj, 1); + if (decoded.reporting_interval.ble_lora.unit == 0x00) { + decoded.reporting_interval.ble_lora.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.reporting_interval.ble_lora.unit == 0x01) { + decoded.reporting_interval.ble_lora.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + } + if (reporting_interval_type == 0x03) { + decoded.reporting_interval.power_lora = decoded.reporting_interval.power_lora || {}; + // 0:second, 1:min + decoded.reporting_interval.power_lora.unit = readUInt8(bytes, counterObj, 1); + if (decoded.reporting_interval.power_lora.unit == 0x00) { + decoded.reporting_interval.power_lora.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.reporting_interval.power_lora.unit == 0x01) { + decoded.reporting_interval.power_lora.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + } + break; + case 0x6c: + decoded.communicate_interval = decoded.communicate_interval || {}; + // 0:BLE, 1:LORA, 2:BLE+LORA, 3:POWERBUS+LORA + var communicate_interval_id = readUInt8(bytes, counterObj, 1); + if (communicate_interval_id == 0x00) { + decoded.communicate_interval.ble = decoded.communicate_interval.ble || {}; + // 0:second, 1:min + decoded.communicate_interval.ble.unit = readUInt8(bytes, counterObj, 1); + if (decoded.communicate_interval.ble.unit == 0x00) { + decoded.communicate_interval.ble.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.communicate_interval.ble.unit == 0x01) { + decoded.communicate_interval.ble.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + } + if (communicate_interval_id == 0x01) { + decoded.communicate_interval.lora = decoded.communicate_interval.lora || {}; + // 0:second, 1:min + decoded.communicate_interval.lora.unit = readUInt8(bytes, counterObj, 1); + if (decoded.communicate_interval.lora.unit == 0x00) { + decoded.communicate_interval.lora.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.communicate_interval.lora.unit == 0x01) { + decoded.communicate_interval.lora.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + } + if (communicate_interval_id == 0x02) { + decoded.communicate_interval.ble_lora = decoded.communicate_interval.ble_lora || {}; + // 0:second, 1:min + decoded.communicate_interval.ble_lora.unit = readUInt8(bytes, counterObj, 1); + if (decoded.communicate_interval.ble_lora.unit == 0x00) { + decoded.communicate_interval.ble_lora.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.communicate_interval.ble_lora.unit == 0x01) { + decoded.communicate_interval.ble_lora.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + } + if (communicate_interval_id == 0x03) { + decoded.communicate_interval.power_bus = decoded.communicate_interval.power_bus || {}; + // 0:second, 1:min + decoded.communicate_interval.power_bus.unit = readUInt8(bytes, counterObj, 1); + if (decoded.communicate_interval.power_bus.unit == 0x00) { + decoded.communicate_interval.power_bus.seconds_of_time = readUInt16LE(bytes, counterObj, 2); + } + if (decoded.communicate_interval.power_bus.unit == 0x01) { + decoded.communicate_interval.power_bus.minutes_of_time = readUInt16LE(bytes, counterObj, 2); + } + } + break; + case 0xc8: + // 0:Power Off, 1:Power On + decoded.device_status = readUInt8(bytes, counterObj, 1); + break; + case 0x63: + // 0:℃, 1:℉ + decoded.temperature_unit = readUInt8(bytes, counterObj, 1); + break; + case 0x7d: + // 0:Embedded Data, 1:External Receive + decoded.data_sync_to_peer = readUInt8(bytes, counterObj, 1); + break; + case 0x7e: + decoded.data_sync_timeout = readUInt8(bytes, counterObj, 1); + break; + case 0x85: + // 0:disable, 1:enable + decoded.ble_enable = readUInt8(bytes, counterObj, 1); + break; + case 0x8b: + decoded.ble_name = readString(bytes, counterObj, 32); + break; + case 0x67: + // 0:Off, 1:On + decoded.system_status = readUInt8(bytes, counterObj, 1); + break; + case 0x64: + decoded.mode_enable = decoded.mode_enable || {}; + var bitOptions = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:enable + decoded.mode_enable.heat = extractBits(bitOptions, 0, 1); + // 0:disable, 1:enable + decoded.mode_enable.em_heat = extractBits(bitOptions, 1, 2); + // 0:disable, 1:enable + decoded.mode_enable.cool = extractBits(bitOptions, 2, 3); + // 0:disable, 1:enable + decoded.mode_enable.auto = extractBits(bitOptions, 3, 4); + decoded.mode_enable.reserved = extractBits(bitOptions, 6, 8); + break; + case 0x88: + decoded.fan_enable = decoded.fan_enable || {}; + var bitOptions = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:enable + decoded.fan_enable.auto = extractBits(bitOptions, 0, 1); + // 0:disable, 1:enable + decoded.fan_enable.circul = extractBits(bitOptions, 1, 2); + // 0:disable, 1:enable + decoded.fan_enable.on = extractBits(bitOptions, 2, 3); + // 0:disable, 1:enable + decoded.fan_enable.low = extractBits(bitOptions, 3, 4); + // 0:disable, 1:enable + decoded.fan_enable.medium = extractBits(bitOptions, 4, 5); + // 0:disable, 1:enable + decoded.fan_enable.high = extractBits(bitOptions, 5, 6); + decoded.fan_enable.reserved = extractBits(bitOptions, 6, 8); + break; + case 0x68: + decoded.temperature_control_mode = decoded.temperature_control_mode || {}; + var temperature_control_mode_subcmd = readUInt8(bytes, counterObj, 1); + if (temperature_control_mode_subcmd == 0x00) { + // 0:heat, 1:em heat, 2:cool, 3:auto, 4:dehumidify, 5:ventilation + decoded.temperature_control_mode.mode = readUInt8(bytes, counterObj, 1); + } + if (temperature_control_mode_subcmd == 0x01) { + // 0:disable, 1:enable + decoded.temperature_control_mode.plan_mode_enable = readUInt8(bytes, counterObj, 1); + } + break; + case 0x65: + // 0:single, 1:dual + decoded.target_temperature_mode = readUInt8(bytes, counterObj, 1); + break; + case 0x66: + // 0:0.5, 1:1 + decoded.target_temperature_resolution = readUInt8(bytes, counterObj, 1); + break; + case 0x69: + decoded.target_temperature_settings = decoded.target_temperature_settings || {}; + var target_temperature_settings_temperature_control_mode = readUInt8(bytes, counterObj, 1); + if (target_temperature_settings_temperature_control_mode == 0x00) { + decoded.target_temperature_settings.heat = readInt16LE(bytes, counterObj, 2) / 100; + } + if (target_temperature_settings_temperature_control_mode == 0x01) { + decoded.target_temperature_settings.em_heat = readInt16LE(bytes, counterObj, 2) / 100; + } + if (target_temperature_settings_temperature_control_mode == 0x02) { + decoded.target_temperature_settings.cool = readInt16LE(bytes, counterObj, 2) / 100; + } + if (target_temperature_settings_temperature_control_mode == 0x03) { + decoded.target_temperature_settings.auto = readInt16LE(bytes, counterObj, 2) / 100; + } + if (target_temperature_settings_temperature_control_mode == 0x04) { + decoded.target_temperature_settings.auto_heat = readInt16LE(bytes, counterObj, 2) / 100; + } + if (target_temperature_settings_temperature_control_mode == 0x05) { + decoded.target_temperature_settings.auto_cool = readInt16LE(bytes, counterObj, 2) / 100; + } + break; + case 0x6a: + decoded.minimum_dead_zone = readUInt16LE(bytes, counterObj, 2) / 100; + break; + case 0x6b: + decoded.target_temperature_range = decoded.target_temperature_range || {}; + // 0:heat, 1:em heat, 2:cool, 3:auto + var target_temperature_range_id = readUInt8(bytes, counterObj, 1); + if (target_temperature_range_id == 0x00) { + decoded.target_temperature_range.heat = decoded.target_temperature_range.heat || {}; + decoded.target_temperature_range.heat.min = readInt16LE(bytes, counterObj, 2) / 100; + decoded.target_temperature_range.heat.max = readInt16LE(bytes, counterObj, 2) / 100; + } + if (target_temperature_range_id == 0x01) { + decoded.target_temperature_range.em_heat = decoded.target_temperature_range.em_heat || {}; + decoded.target_temperature_range.em_heat.min = readInt16LE(bytes, counterObj, 2) / 100; + decoded.target_temperature_range.em_heat.max = readInt16LE(bytes, counterObj, 2) / 100; + } + if (target_temperature_range_id == 0x02) { + decoded.target_temperature_range.cool = decoded.target_temperature_range.cool || {}; + decoded.target_temperature_range.cool.min = readInt16LE(bytes, counterObj, 2) / 100; + decoded.target_temperature_range.cool.max = readInt16LE(bytes, counterObj, 2) / 100; + } + if (target_temperature_range_id == 0x03) { + decoded.target_temperature_range.auto = decoded.target_temperature_range.auto || {}; + decoded.target_temperature_range.auto.min = readInt16LE(bytes, counterObj, 2) / 100; + decoded.target_temperature_range.auto.max = readInt16LE(bytes, counterObj, 2) / 100; + } + break; + case 0x74: + // 0:auto, 1:circulate, 2:on, 3:low, 4:medium, 5:high + decoded.fan_control_mode = readUInt8(bytes, counterObj, 1); + break; + case 0x82: + decoded.pir_common = decoded.pir_common || {}; + var pir_common_cmd = readUInt8(bytes, counterObj, 1); + if (pir_common_cmd == 0x01) { + // 0:disable, 1:enable + decoded.pir_common.enable = readUInt8(bytes, counterObj, 1); + } + if (pir_common_cmd == 0x02) { + decoded.pir_common.release_time = readUInt16LE(bytes, counterObj, 2); + } + if (pir_common_cmd == 0x03) { + // 0:Immediate Trigger, 1:Rule Trigger + decoded.pir_common.mode = readUInt8(bytes, counterObj, 1); + } + if (pir_common_cmd == 0x04) { + decoded.pir_common.check = decoded.pir_common.check || {}; + decoded.pir_common.check.period = readUInt8(bytes, counterObj, 1); + decoded.pir_common.check.rate = readUInt8(bytes, counterObj, 1); + } + break; + case 0x83: + decoded.pir_energy = decoded.pir_energy || {}; + var pir_energy_cmd = readUInt8(bytes, counterObj, 1); + if (pir_energy_cmd == 0x01) { + // 0:disable, 1:enable + decoded.pir_energy.enable = readUInt8(bytes, counterObj, 1); + } + if (pir_energy_cmd == 0x02) { + decoded.pir_energy.plan = decoded.pir_energy.plan || {}; + // 0:plan0, 1:plan1, 2:plan2, 3:plan3, 4:plan4, 5:plan5, 6:plan6, 7:plan7, 255:Not executed + decoded.pir_energy.plan.occupied = readUInt8(bytes, counterObj, 1); + // 0:plan0, 1:plan1, 2:plan2, 3:plan3, 4:plan4, 5:plan5, 6:plan6, 7:plan7, 255:Not executed + decoded.pir_energy.plan.unoccupied = readUInt8(bytes, counterObj, 1); + } + break; + case 0x84: + decoded.pir_night = decoded.pir_night || {}; + var pir_night_cmd = readUInt8(bytes, counterObj, 1); + if (pir_night_cmd == 0x01) { + // 0:disable, 1:enable + decoded.pir_night.enable = readUInt8(bytes, counterObj, 1); + } + if (pir_night_cmd == 0x04) { + decoded.pir_night.night_time = decoded.pir_night.night_time || {}; + decoded.pir_night.night_time.start = readUInt16LE(bytes, counterObj, 2); + decoded.pir_night.night_time.stop = readUInt16LE(bytes, counterObj, 2); + } + if (pir_night_cmd == 0x05) { + // 0:plan0, 1:plan1, 2:plan2, 3:plan3, 4:plan4, 5:plan5, 6:plan6, 7:plan7, 255:Not executed + decoded.pir_night.occupied = readUInt8(bytes, counterObj, 1); + } + if (pir_night_cmd == 0x02) { + // 0:Immediate Trigger, 1:Rule Trigger + decoded.pir_night.mode = readUInt8(bytes, counterObj, 1); + } + if (pir_night_cmd == 0x03) { + decoded.pir_night.check = decoded.pir_night.check || {}; + decoded.pir_night.check.period = readUInt8(bytes, counterObj, 1); + decoded.pir_night.check.rate = readUInt8(bytes, counterObj, 1); + } + break; + case 0x75: + decoded.screen_display_settings = decoded.screen_display_settings || {}; + var bitOptions = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:enable + decoded.screen_display_settings.plan_name = extractBits(bitOptions, 0, 1); + // 0:disable, 1:enable + decoded.screen_display_settings.ambient_temp = extractBits(bitOptions, 1, 2); + // 0:disable, 1:enable + decoded.screen_display_settings.ambient_humi = extractBits(bitOptions, 2, 3); + // 0:disable, 1:enable + decoded.screen_display_settings.target_temp = extractBits(bitOptions, 3, 4); + decoded.screen_display_settings.reserved = extractBits(bitOptions, 4, 8); + break; + case 0x71: + decoded.button_custom_function = decoded.button_custom_function || {}; + var button_custom_function_subcmd = readUInt8(bytes, counterObj, 1); + if (button_custom_function_subcmd == 0x00) { + decoded.button_custom_function.enable = readInt8(bytes, counterObj, 1); + } + if (button_custom_function_subcmd == 0x01) { + // 1:Temperature Control Mode, 2:Fan Mode, 3:Schedule Switch, 4:Status Report, 5:Filter Cleaning Reset, 6:Button Event1, 7:Temperature Unit Switch + decoded.button_custom_function.mode1 = readUInt8(bytes, counterObj, 1); + } + if (button_custom_function_subcmd == 0x02) { + // 1:Temperature Control Mode, 2:Fan Mode, 3:Schedule Switch, 4:Status Report, 5:Filter Cleaning Reset, 6:Button Event2, 7:Temperature Unit Switch + decoded.button_custom_function.mode2 = readUInt8(bytes, counterObj, 1); + } + if (button_custom_function_subcmd == 0x03) { + // 0:System On/Off, 3:Schedule Switch, 4:Status Report, 5:Filter Cleaning Reset, 6:Button Event3, 7:Temperature Unit Switch + decoded.button_custom_function.mode3 = readUInt8(bytes, counterObj, 1); + } + break; + case 0x72: + decoded.children_lock_settings = decoded.children_lock_settings || {}; + // 0:disable, 1:enable + decoded.children_lock_settings.enable = readUInt8(bytes, counterObj, 1); + var bitOptions = readUInt16LE(bytes, counterObj, 2); + decoded.children_lock_settings.temp_up = extractBits(bitOptions, 0, 1); + decoded.children_lock_settings.temp_down = extractBits(bitOptions, 1, 2); + decoded.children_lock_settings.system_on_off = extractBits(bitOptions, 2, 3); + decoded.children_lock_settings.fan_mode = extractBits(bitOptions, 3, 4); + decoded.children_lock_settings.temperature_control_mode = extractBits(bitOptions, 4, 5); + decoded.children_lock_settings.reboot_reset = extractBits(bitOptions, 5, 6); + decoded.children_lock_settings.power_on_off = extractBits(bitOptions, 6, 7); + decoded.children_lock_settings.cancel_pair = extractBits(bitOptions, 7, 8); + decoded.children_lock_settings.plan_switch = extractBits(bitOptions, 8, 9); + decoded.children_lock_settings.status_report = extractBits(bitOptions, 9, 10); + decoded.children_lock_settings.filter_clean_alarm_release = extractBits(bitOptions, 10, 11); + decoded.children_lock_settings.button1_event = extractBits(bitOptions, 11, 12); + decoded.children_lock_settings.button2_event = extractBits(bitOptions, 12, 13); + decoded.children_lock_settings.button3_event = extractBits(bitOptions, 13, 14); + decoded.children_lock_settings.temperature_unit_switch = extractBits(bitOptions, 14, 15); + decoded.children_lock_settings.reserved = extractBits(bitOptions, 15, 16); + break; + case 0x81: + decoded.unlock_button = decoded.unlock_button || {}; + // 0:disable, 1:enable + decoded.unlock_button.enable = readUInt8(bytes, counterObj, 1); + decoded.unlock_button.timeout = readUInt16LE(bytes, counterObj, 2); + break; + case 0x80: + decoded.unlock_combination_button_settings = decoded.unlock_combination_button_settings || {}; + var bitOptions = readUInt8(bytes, counterObj, 1); + // 0:disable, 1:enable + decoded.unlock_combination_button_settings.button1 = extractBits(bitOptions, 0, 1); + // 0:disable, 1:enable + decoded.unlock_combination_button_settings.button2 = extractBits(bitOptions, 1, 2); + // 0:disable, 1:enable + decoded.unlock_combination_button_settings.button3 = extractBits(bitOptions, 2, 3); + // 0:disable, 1:enable + decoded.unlock_combination_button_settings.button4 = extractBits(bitOptions, 3, 4); + // 0:disable, 1:enable + decoded.unlock_combination_button_settings.button5 = extractBits(bitOptions, 4, 5); + decoded.unlock_combination_button_settings.reserved = extractBits(bitOptions, 5, 8); + break; + case 0x62: + // 0:disable, 1:enable + decoded.intelligent_display_enable = readUInt8(bytes, counterObj, 1); + break; + case 0xc7: + decoded.time_zone = readInt16LE(bytes, counterObj, 2); + break; + case 0xc6: + decoded.daylight_saving_time = decoded.daylight_saving_time || {}; + // 0:disable, 1:enable + decoded.daylight_saving_time.enable = readUInt8(bytes, counterObj, 1); + decoded.daylight_saving_time.daylight_saving_time_offset = readUInt8(bytes, counterObj, 1); + // 1:Jan., 2:Feb., 3:Mar., 4:Apr., 5:May, 6:Jun., 7:Jul., 8:Aug., 9:Sep., 10:Oct., 11:Nov., 12:Dec. + decoded.daylight_saving_time.start_month = readUInt8(bytes, counterObj, 1); + var bitOptions = readUInt8(bytes, counterObj, 1); + // 1:1st, 2: 2nd, 3: 3rd, 4: 4th, 5: last + decoded.daylight_saving_time.start_week_num = extractBits(bitOptions, 4, 8); + // 1:Mon., 2:Tues., 3:Wed., 4:Thurs., 5:Fri., 6:Sat., 7:Sun. + decoded.daylight_saving_time.start_week_day = extractBits(bitOptions, 0, 4); + decoded.daylight_saving_time.start_hour_min = readUInt16LE(bytes, counterObj, 2); + // 1:Jan., 2:Feb., 3:Mar., 4:Apr., 5:May, 6:Jun., 7:Jul., 8:Aug., 9:Sep., 10:Oct., 11:Nov., 12:Dec. + decoded.daylight_saving_time.end_month = readUInt8(bytes, counterObj, 1); + var bitOptions = readUInt8(bytes, counterObj, 1); + // 1:1st, 2: 2nd, 3: 3rd, 4: 4th, 5: last + decoded.daylight_saving_time.end_week_num = extractBits(bitOptions, 4, 8); + // 1:Mon., 2:Tues., 3:Wed., 4:Thurs., 5:Fri., 6:Sat., 7:Sun. + decoded.daylight_saving_time.end_week_day = extractBits(bitOptions, 0, 4); + decoded.daylight_saving_time.end_hour_min = readUInt16LE(bytes, counterObj, 2); + break; + case 0x76: + decoded.temperature_calibration_settings = decoded.temperature_calibration_settings || {}; + // 0:disable, 1:enable + decoded.temperature_calibration_settings.enable = readUInt8(bytes, counterObj, 1); + decoded.temperature_calibration_settings.calibration_value = readInt16LE(bytes, counterObj, 2) / 100; + break; + case 0x77: + decoded.humidity_calibration_settings = decoded.humidity_calibration_settings || {}; + // 0:disable, 1:enable + decoded.humidity_calibration_settings.enable = readUInt8(bytes, counterObj, 1); + decoded.humidity_calibration_settings.calibration_value = readInt16LE(bytes, counterObj, 2) / 10; + break; + case 0x7b: + decoded.schedule_settings = decoded.schedule_settings || []; + var id = readUInt8(bytes, counterObj, 1); + var schedule_settings_item = pickArrayItem(decoded.schedule_settings, id, 'id'); + schedule_settings_item.id = id; + insertArrayItem(decoded.schedule_settings, schedule_settings_item, 'id'); + var schedule_settings_item_command = readUInt8(bytes, counterObj, 1); + if (schedule_settings_item_command == 0x00) { + // 0:disable, 1:enable + schedule_settings_item.enable = readUInt8(bytes, counterObj, 1); + } + if (schedule_settings_item_command == 0x01) { + schedule_settings_item.name_first = readString(bytes, counterObj, 6); + } + if (schedule_settings_item_command == 0x02) { + schedule_settings_item.name_last = readString(bytes, counterObj, 4); + } + if (schedule_settings_item_command == 0x03) { + schedule_settings_item.content1 = schedule_settings_item.content1 || {}; + // 0:heat, 1:em heat, 2:cool, 3:auto, 10:off + schedule_settings_item.content1.tstat_mode = readUInt8(bytes, counterObj, 1); + schedule_settings_item.content1.heat_target_temperature = readInt16LE(bytes, counterObj, 2) / 100; + schedule_settings_item.content1.em_heat_target_temperature = readInt16LE(bytes, counterObj, 2) / 100; + schedule_settings_item.content1.cool_target_temperature = readInt16LE(bytes, counterObj, 2) / 100; + } + if (schedule_settings_item_command == 0x04) { + schedule_settings_item.content2 = schedule_settings_item.content2 || {}; + // 0:auto, 1:circulate, 2:on, 3:low, 4:medium, 5:high, 10:off + schedule_settings_item.content2.fan_mode = readUInt8(bytes, counterObj, 1); + schedule_settings_item.content2.auto_target_temperature = readInt16LE(bytes, counterObj, 2) / 100; + schedule_settings_item.content2.auto_heat_target_temperature = readInt16LE(bytes, counterObj, 2) / 100; + schedule_settings_item.content2.auto_cool_target_temperature = readInt16LE(bytes, counterObj, 2) / 100; + } + break; + case 0x59: + decoded.system_status_control = decoded.system_status_control || {}; + // 0:system close, 1:system open + decoded.system_status_control.on_off = readUInt8(bytes, counterObj, 1); + // 0:heat, 1:em heat, 2:cool, 3:auto, 4:dehumidify, 5:ventilation + decoded.system_status_control.mode = readUInt8(bytes, counterObj, 1); + decoded.system_status_control.temperature1 = readInt16LE(bytes, counterObj, 2) / 100; + decoded.system_status_control.temperature2 = readInt16LE(bytes, counterObj, 2) / 100; + break; + case 0x86: + decoded.origin_temperature = readInt16LE(bytes, counterObj, 2) / 100; + break; + case 0x87: + decoded.origin_humidity = readUInt16LE(bytes, counterObj, 2) / 10; + break; + case 0x5c: + decoded.insert_temporary_plan = decoded.insert_temporary_plan || {}; + decoded.insert_temporary_plan.id = readUInt8(bytes, counterObj, 1); + break; + case 0x55: + decoded.fan_error_alarm = decoded.fan_error_alarm || {}; + // 0:clean alarm, 1:trigger alarm + decoded.fan_error_alarm.mode = readUInt8(bytes, counterObj, 1); + break; + case 0x5b: + decoded.filter_clean_alarm = decoded.filter_clean_alarm || {}; + // 0:clean alarm, 1:report alarm + decoded.filter_clean_alarm.mode = readUInt8(bytes, counterObj, 1); + break; + case 0x57: + decoded.frost_protection_alarm = decoded.frost_protection_alarm || {}; + // 0:clean alarm, 1:trigger alarm + decoded.frost_protection_alarm.mode = readUInt8(bytes, counterObj, 1); + break; + case 0x5a: + decoded.open_window_alarm = decoded.open_window_alarm || {}; + // 0:clean alarm, 1:report alarm + decoded.open_window_alarm.mode = readUInt8(bytes, counterObj, 1); + break; + case 0x58: + decoded.not_wired_alarm = decoded.not_wired_alarm || {}; + // 0:clean alarm, 1:trigger alarm + decoded.not_wired_alarm.mode = readUInt8(bytes, counterObj, 1); + break; + case 0xbe: + decoded.reboot = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xb9: + decoded.query_device_status = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xb8: + decoded.synchronize_time = readOnlyCommand(bytes, counterObj, 0); + break; + case 0xb6: + decoded.reconnect = readOnlyCommand(bytes, counterObj, 0); + break; + case 0x5f: + decoded.delete_task_plan = decoded.delete_task_plan || {}; + // 0:Schedule1, 1:Schedule2, 2:Schedule3, 3:Schedule4, 4:Schedule5, 5:Schedule6, 6:Schedule7, 7:Schedule8, 255:Reset All + decoded.delete_task_plan.type = readUInt8(bytes, counterObj, 1); + break; + default: + unknown_command = 1; + break; + } + if (unknown_command) { + throw new Error('unknown command: ' + command_id); + } + } -function readProtocolVersion(bytes) { - var major = (bytes[0] & 0xff).toString(16); - var minor = (bytes[1] & 0xff).toString(16); - return "v" + major + "." + minor; -} + if (Object.keys(history).length > 0) { + result.history = history; + } else { + for (var k2 in decoded) { + if (decoded.hasOwnProperty(k2)) { + result[k2] = decoded[k2]; + } + } + } -function readHardwareVersion(bytes) { - var major = (bytes[0] & 0xff).toString(16); - var minor = (bytes[1] & 0xff).toString(16); - return "v" + major + "." + minor; -} + processTemperature(result); -function readFirmwareVersion(bytes) { - var major = (bytes[0] & 0xff).toString(16); - var minor = (bytes[1] & 0xff).toString(16); - var release = (bytes[2] & 0xff).toString(16); - var alpha = (bytes[3] & 0xff).toString(16); - var unit_test = (bytes[4] & 0xff).toString(16); - var test = (bytes[5] & 0xff).toString(16); + return result; +} - var version = "v" + major + "." + minor; - if (release !== "0") version += "-r" + release; - if (alpha !== "0") version += "-a" + alpha; - if (unit_test !== "0") version += "-u" + unit_test; - if (test !== "0") version += "-t" + test; - return version; +function readOnlyCommand(bytes) { + return 1; } -function readDeviceStatus(type) { - var device_status_map = { 0: "off", 1: "on" }; - return getValue(device_status_map, type); +function readUnknownDataType(allBytes, counterObj, end) { + throw new Error('Unknown data type encountered. Please Contact Developer.'); } -function readLoRaWANClass(type) { - var lorawan_class_map = { - 0: "Class A", - 1: "Class B", - 2: "Class C", - 3: "Class CtoB", - }; - return getValue(lorawan_class_map, type); +function readBytes(allBytes, counterObj, end) { + var bytes = allBytes.slice(counterObj.i, counterObj.i + end); + counterObj.i += end; + return bytes; } -function readYesNoStatus(type) { - var yes_no_map = { 0: "no", 1: "yes" }; - return getValue(yes_no_map, type); +function readProtocolVersion(bytes) { + var major = bytes[0] & 0xff; + var minor = bytes[1] & 0xff; + return 'v' + major + '.' + minor; } -function readEnableStatus(status) { - var status_map = { 0: "disable", 1: "enable" }; - return getValue(status_map, status); +function readHardwareVersion(bytes) { + var major = bytes[0] & 0xff; + var minor = bytes[1] & 0xff; + return 'v' + major + '.' + minor; } -function readSystemStatus(status) { - var status_map = { 0: "off", 1: "on" }; - return getValue(status_map, status); +function readFirmwareVersion(bytes) { + var major = bytes[0] & 0xff; + var minor = bytes[1] & 0xff; + var release = bytes[2] & 0xff; + var alpha = bytes[3] & 0xff; + var unit_test = bytes[4] & 0xff; + var test = bytes[5] & 0xff; + + var version = 'v' + major + '.' + minor; + if (release !== 0) version += '-r' + release; + if (alpha !== 0) version += '-a' + alpha; + if (unit_test !== 0) version += '-u' + unit_test; + if (test !== 0) version += '-t' + test; + return version; } -function readTemperatureControlMode(mode) { - var mode_map = { 0: "heat", 1: "em_heat", 2: "cool", 3: "auto", 10: "off", 11: "NA" }; - return getValue(mode_map, mode); +/* eslint-disable */ +function readUInt8(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + return bytes[0] & 0xff; } -function readFanMode(mode) { - var mode_map = { 0: "auto", 1: "circulate", 2: "on", 3: "low", 4: "medium", 5: "high", 10: "off", 11: "NA" }; - return getValue(mode_map, mode); +function readInt8(allBytes, counterObj, end) { + var ref = readUInt8(allBytes, counterObj, end); + return ref > 0x7f ? ref - 0x100 : ref; } -function readPIRStatus(status) { - var status_map = { 0: "vacant", 1: "occupied", 2: "night_occupied" }; - return getValue(status_map, status); +function readUInt16LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var value = (bytes[1] << 8) + bytes[0]; + return value & 0xffff; } -function readBleEvent(event) { - var event_map = { 0: "none", 1: "peer_cancel", 2: "disconnect" }; - return getValue(event_map, event); +function readInt16LE(allBytes, counterObj, end) { + var ref = readUInt16LE(allBytes, counterObj, end); + return ref > 0x7fff ? ref - 0x10000 : ref; } -function readPowerBusEvent(event) { - var event_map = { 0: "none", 1: "communication_error" }; - return getValue(event_map, event); +function readUInt24LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); // 3 bytes expected + var value = (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; + return value & 0xffffff; } -function readTemperatureAlarm(type) { - var type_map = { 0: "collection_error", 1: "lower_range_error", 2: "over_range_error", 3: "no_data" }; - return getValue(type_map, type); +function readInt24LE(allBytes, counterObj, end) { + var ref = readUInt24LE(allBytes, counterObj, end); + return ref > 0x7fffff ? ref - 0x1000000 : ref; } -function readHumidityAlarm(type) { - var type_map = { 0: "collection_error", 1: "lower_range_error", 2: "over_range_error", 3: "no_data" }; - return getValue(type_map, type); +function readUInt32LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var value = (bytes[3] << 24) + (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; + return (value & 0xffffffff) >>> 0; } -function readButtonEvent(event) { - var event_map = { 0: "F1", 1: "F2", 2: "F3" }; - return getValue(event_map, event); +function readInt32LE(allBytes, counterObj, end) { + var ref = readUInt32LE(allBytes, counterObj, end); + return ref > 0x7fffffff ? ref - 0x100000000 : ref; } -function readBatteryEvent(event) { - var event_map = { 0: "recover", 1: "low_voltage" }; - return getValue(event_map, event); +function readFloat16LE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var bits = (bytes[1] << 8) | bytes[0]; + var sign = bits >>> 15 === 0 ? 1.0 : -1.0; + var e = (bits >>> 10) & 0x1f; + var m = e === 0 ? (bits & 0x3ff) << 1 : (bits & 0x3ff) | 0x400; + var f = sign * m * Math.pow(2, e - 25); + + var n = Number(f.toFixed(2)); + return n; } -function readTimeUnitType(type) { - var unit_map = { 0: "second", 1: "minute" }; - return getValue(unit_map, type); +function readFloatLE(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var bits = (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; + var sign = bits >>> 31 === 0 ? 1.0 : -1.0; + var e = (bits >>> 23) & 0xff; + var m = e === 0 ? (bits & 0x7fffff) << 1 : (bits & 0x7fffff) | 0x800000; + var f = sign * m * Math.pow(2, e - 150); + return f; } -function readReportingMode(mode) { - var mode_map = { 0: "ble", 1: "lora", 2: "ble_and_lora", 3: "power_bus_and_lora" }; - return getValue(mode_map, mode); +function readString(allBytes, counterObj, end) { + var str = ""; + var bytes = readBytes(allBytes, counterObj, end); + var i = 0; + var byte1, byte2, byte3, byte4; + while (i < bytes.length) { + byte1 = bytes[i++]; + if (byte1 <= 0x7f) { + str += String.fromCharCode(byte1); + } else if (byte1 <= 0xdf) { + byte2 = bytes[i++]; + str += String.fromCharCode(((byte1 & 0x1f) << 6) | (byte2 & 0x3f)); + } else if (byte1 <= 0xef) { + byte2 = bytes[i++]; + byte3 = bytes[i++]; + str += String.fromCharCode(((byte1 & 0x0f) << 12) | ((byte2 & 0x3f) << 6) | (byte3 & 0x3f)); + } else if (byte1 <= 0xf7) { + byte2 = bytes[i++]; + byte3 = bytes[i++]; + byte4 = bytes[i++]; + var codepoint = ((byte1 & 0x07) << 18) | ((byte2 & 0x3f) << 12) | ((byte3 & 0x3f) << 6) | (byte4 & 0x3f); + codepoint -= 0x10000; + str += String.fromCharCode((codepoint >> 10) + 0xd800); + str += String.fromCharCode((codepoint & 0x3ff) + 0xdc00); + } + } + return str.replace(/\u0000+$/g, ''); } -function readTemperatureUnit(type) { - var unit_map = { 0: "celsius", 1: "fahrenheit" }; - return getValue(unit_map, type); +function readHexString(allBytes, counterObj, end) { + var temp = []; + var bytes = readBytes(allBytes, counterObj, end); + for (var idx = 0; idx < bytes.length; idx++) { + temp.push(("0" + (bytes[idx] & 0xff).toString(16)).slice(-2)); + } + return temp.join("").replace(/\u0000+$/g, ''); } -function readTargetTemperatureMode(type) { - var mode_map = { 0: "single_point", 1: "dual_point" }; - return getValue(mode_map, type); +function readHexStringLE(allBytes, counterObj, end) { + var temp = []; + var bytes = readBytes(allBytes, counterObj, end); + for (var idx = bytes.length - 1; idx >= 0; idx--) { + temp.push(("0" + (bytes[idx] & 0xff).toString(16)).slice(-2)); + } + return temp.join("").replace(/\u0000+$/g, ''); } -function readTargetTemperatureResolution(type) { - var resolution_map = { 0: "0.5", 1: "1" }; - return getValue(resolution_map, type); +function extractBits(byte, startBit, endBit) { + if (byte < 0 || byte > 0xffff) { + throw new Error("byte must be in range 0..65535"); + } + if (startBit >= endBit) { + throw new Error("invalid bit range"); + } + + var width = endBit - startBit; + var mask = (1 << width) - 1; + return (byte >>> startBit) & mask; } -function readButtonFunction(type) { - var function_map = { 0: "system_status", 1: "temperature_control_mode", 2: "fan_mode", 3: "plan_switch", 4: "status_report", 5: "release_filter_alarm", 6: "button_value", 7: "temperature_unit_switch" }; - return getValue(function_map, type); +function pickArrayItem(array, index, idName) { + for (var i = 0; i < array.length; i++) { + if (array[i][idName] === index) { + return array[i]; + } + } + + return {}; } -function readDataSource(type) { - var data_source_map = { 0: "embedded_data", 1: "external_receive" }; - return getValue(data_source_map, type); +function insertArrayItem(array, item, idName) { + for (var i = 0; i < array.length; i++) { + if (array[i][idName] === item[idName]) { + array[i] = item; + return; + } + } + array.push(item); } -function readTimeZone(time_zone) { - var timezone_map = { "-720": "UTC-12", "-660": "UTC-11", "-600": "UTC-10", "-570": "UTC-9:30", "-540": "UTC-9", "-480": "UTC-8", "-420": "UTC-7", "-360": "UTC-6", "-300": "UTC-5", "-240": "UTC-4", "-210": "UTC-3:30", "-180": "UTC-3", "-120": "UTC-2", "-60": "UTC-1", 0: "UTC", 60: "UTC+1", 120: "UTC+2", 180: "UTC+3", 210: "UTC+3:30", 240: "UTC+4", 270: "UTC+4:30", 300: "UTC+5", 330: "UTC+5:30", 345: "UTC+5:45", 360: "UTC+6", 390: "UTC+6:30", 420: "UTC+7", 480: "UTC+8", 540: "UTC+9", 570: "UTC+9:30", 600: "UTC+10", 630: "UTC+10:30", 660: "UTC+11", 720: "UTC+12", 765: "UTC+12:45", 780: "UTC+13", 840: "UTC+14" }; - return getValue(timezone_map, time_zone); +function readCommand(allBytes, counterObj, end) { + var bytes = readBytes(allBytes, counterObj, end); + var cmd = bytes + .map(function(b) { + var hex = b.toString(16); + return hex.length === 1 ? '0' + hex : hex; + }) + .join('') + .toLowerCase(); + + var map = cmdMap(); + for (var key in map) { + var xxs = []; + var isMatch = false; + if (key.length !== cmd.length) { + continue; + } + for (var i = 0; i < key.length; i += 2) { + var hexString = key.slice(i, i + 2); + var cmdString = cmd.slice(i, i + 2); + if (hexString === cmdString || hexString === 'xx') { + if (hexString === 'xx') { + xxs.push('.' + parseInt(cmdString, 16)); + } + isMatch = true; + continue; + } else { + isMatch = false; + break; + } + } + if (isMatch) { + var propertyId = map[key]; + if (propertyId.indexOf('._item') === -1) { + return propertyId; + } + var j = 0; + var result = propertyId.replace(/\._item/g, function() { + return xxs[j++]; + }); + return result; + } + } + return null; } -function readAddressType(type) { - var address_type_map = { 0: "public", 1: "random" }; - return getValue(address_type_map, type); +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; } -function readCommunicationMode(mode) { - var mode_map = { 0: "ble", 1: "lora", 2: "ble_and_lora", 3: "power_bus_and_lora" }; - return getValue(mode_map, mode); +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; } + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } -function readPIRDetectionMode(mode) { - var mode_map = { 0: "single", 1: "multiple" }; - return getValue(mode_map, mode); + current[parts[parts.length - 1]] = value; + return obj; } -function readPlan(id) { - var id_map = { 0: "plan_1", 1: "plan_2", 2: "plan_3", 3: "plan_4", 4: "plan_5", 5: "plan_6", 6: "plan_7", 7: "plan_8", 8: "plan_9", 9: "plan_10", 10: "plan_11", 11: "plan_12", 12: "plan_13", 13: "plan_14", 14: "plan_15", 15: "plan_16", 255: "none" }; - return getValue(id_map, id); +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); } -// -// -// -// -// -function readCmdResult(type) { - var result_map = { 0: "success", 1: "parsing error", 2: "order error", 3: "password error", 4: "read params error", 5: "write params error", 6: "read execution error", 7: "write execution error", 8: "read apply error", 9: "write apply error", 10: "associative error" }; - return getValue(result_map, type); +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); } -function readCmdName(type) { - var name_map = { - 56: { level: 1, name: "combine_command" }, - 60: { level: 1, name: "collection_interval" }, - 61: { level: 1, name: "reporting_interval" }, - 62: { level: 1, name: "intelligent_display_enable" }, - 63: { level: 1, name: "temperature_unit" }, - 64: { level: 1, name: "temperature_control_mode_support" }, - 65: { level: 1, name: "target_temperature_mode" }, - 66: { level: 1, name: "target_temperature_resolution" }, - 67: { level: 1, name: "system_status" }, - 68: { level: 2, name: "temperature_control_mode" }, - 69: { level: 2, name: "target_temperature_settings" }, - "6a": { level: 1, name: "dead_band" }, - "6b": { level: 2, name: "target_temperature_range" }, - 71: { level: 2, name: "button_custom_function" }, - 72: { level: 1, name: "child_lock_settings" }, - 74: { level: 1, name: "fan_mode" }, - 75: { level: 1, name: "screen_display_settings" }, - 76: { level: 1, name: "temperature_calibration_settings" }, - 77: { level: 1, name: "humidity_calibration_settings" }, - "7d": { level: 1, name: "data_sync_to_peer" }, - "7e": { level: 1, name: "data_sync_timeout" }, - 80: { level: 1, name: "unlock_combination_button_settings" }, - 81: { level: 1, name: "temporary_unlock_settings" }, - 82: { level: 2, name: "pir_config" }, - 85: { level: 1, name: "ble_enable" }, - 86: { level: 1, name: "external_temperature" }, - 87: { level: 1, name: "external_humidity" }, - 88: { level: 1, name: "fan_support_mode" }, - "8b": { level: 1, name: "ble_name" }, - "8c": { level: 1, name: "ble_pair_info" }, - "8d": { level: 1, name: "communication_mode" }, - c6: { level: 1, name: "daylight_saving_time" }, - c7: { level: 1, name: "time_zone" }, - }; +function getAllLeafPaths(obj, prefix) { + var paths = []; - var data = name_map[type]; - if (data === undefined) return "unknown"; - return data.name; + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } + } + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; + } -/* eslint-disable */ -function readUInt8(bytes) { - return bytes & 0xff; -} - -function readInt8(bytes) { - var ref = readUInt8(bytes); - return ref > 0x7f ? ref - 0x100 : ref; -} - -function readUInt16LE(bytes) { - var value = (bytes[1] << 8) + bytes[0]; - return value & 0xffff; -} - -function readInt16LE(bytes) { - var ref = readUInt16LE(bytes); - return ref > 0x7fff ? ref - 0x10000 : ref; -} - -function readUInt32LE(bytes) { - var value = (bytes[3] << 24) + (bytes[2] << 16) + (bytes[1] << 8) + bytes[0]; - return (value & 0xffffffff) >>> 0; -} - -function readInt32LE(bytes) { - var ref = readUInt32LE(bytes); - return ref > 0x7fffffff ? ref - 0x100000000 : ref; -} - -function readFloat16LE(bytes) { - var bits = (bytes[1] << 8) | bytes[0]; - var sign = bits >>> 15 === 0 ? 1.0 : -1.0; - var e = (bits >>> 10) & 0x1f; - var m = e === 0 ? (bits & 0x3ff) << 1 : (bits & 0x3ff) | 0x400; - var f = sign * m * Math.pow(2, e - 25); - - var n = Number(f.toFixed(2)); - return n; -} - -function readFloatLE(bytes) { - var bits = (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; - var sign = bits >>> 31 === 0 ? 1.0 : -1.0; - var e = (bits >>> 23) & 0xff; - var m = e === 0 ? (bits & 0x7fffff) << 1 : (bits & 0x7fffff) | 0x800000; - var f = sign * m * Math.pow(2, e - 150); - return f; -} - -function readString(bytes) { - var str = ""; - var i = 0; - var byte1, byte2, byte3, byte4; - while (i < bytes.length) { - byte1 = bytes[i++]; - if (byte1 <= 0x7f) { - str += String.fromCharCode(byte1); - } else if (byte1 <= 0xdf) { - byte2 = bytes[i++]; - str += String.fromCharCode(((byte1 & 0x1f) << 6) | (byte2 & 0x3f)); - } else if (byte1 <= 0xef) { - byte2 = bytes[i++]; - byte3 = bytes[i++]; - str += String.fromCharCode(((byte1 & 0x0f) << 12) | ((byte2 & 0x3f) << 6) | (byte3 & 0x3f)); - } else if (byte1 <= 0xf7) { - byte2 = bytes[i++]; - byte3 = bytes[i++]; - byte4 = bytes[i++]; - var codepoint = ((byte1 & 0x07) << 18) | ((byte2 & 0x3f) << 12) | ((byte3 & 0x3f) << 6) | (byte4 & 0x3f); - codepoint -= 0x10000; - str += String.fromCharCode((codepoint >> 10) + 0xd800); - str += String.fromCharCode((codepoint & 0x3ff) + 0xdc00); - } - } - return str; +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); } -function readHexString(bytes) { - var temp = []; - for (var idx = 0; idx < bytes.length; idx++) { - temp.push(("0" + (bytes[idx] & 0xff).toString(16)).slice(-2)); - } - return temp.join(""); +function cmdMap() { + return { + "55": "fan_error_alarm", + "57": "frost_protection_alarm", + "58": "not_wired_alarm", + "59": "system_status_control", + "60": "collection_interval", + "61": "reporting_interval", + "62": "intelligent_display_enable", + "63": "temperature_unit", + "64": "mode_enable", + "65": "target_temperature_mode", + "66": "target_temperature_resolution", + "67": "system_status", + "68": "temperature_control_mode", + "69": "target_temperature_settings", + "71": "button_custom_function", + "72": "children_lock_settings", + "74": "fan_control_mode", + "75": "screen_display_settings", + "76": "temperature_calibration_settings", + "77": "humidity_calibration_settings", + "80": "unlock_combination_button_settings", + "81": "unlock_button", + "82": "pir_common", + "83": "pir_energy", + "84": "pir_night", + "85": "ble_enable", + "86": "origin_temperature", + "87": "origin_humidity", + "88": "fan_enable", + "6000": "collection_interval.seconds_of_time", + "6001": "collection_interval.minutes_of_time", + "6100": "reporting_interval.ble", + "6101": "reporting_interval.lora", + "6102": "reporting_interval.ble_lora", + "6103": "reporting_interval.power_lora", + "6800": "temperature_control_mode.mode", + "6801": "temperature_control_mode.plan_mode_enable", + "6900": "target_temperature_settings.heat", + "6901": "target_temperature_settings.em_heat", + "6902": "target_temperature_settings.cool", + "6903": "target_temperature_settings.auto", + "6904": "target_temperature_settings.auto_heat", + "6905": "target_temperature_settings.auto_cool", + "7100": "button_custom_function.enable", + "7101": "button_custom_function.mode1", + "7102": "button_custom_function.mode2", + "7103": "button_custom_function.mode3", + "8201": "pir_common.enable", + "8202": "pir_common.release_time", + "8203": "pir_common.mode", + "8204": "pir_common.check", + "8301": "pir_energy.enable", + "8302": "pir_energy.plan", + "8401": "pir_night.enable", + "8402": "pir_night.mode", + "8403": "pir_night.check", + "8404": "pir_night.night_time", + "8405": "pir_night.occupied", + "610000": "reporting_interval.ble.seconds_of_time", + "610001": "reporting_interval.ble.minutes_of_time", + "610100": "reporting_interval.lora.seconds_of_time", + "610101": "reporting_interval.lora.minutes_of_time", + "610200": "reporting_interval.ble_lora.seconds_of_time", + "610201": "reporting_interval.ble_lora.minutes_of_time", + "610300": "reporting_interval.power_lora.seconds_of_time", + "610301": "reporting_interval.power_lora.minutes_of_time", + "ff": "request_check_sequence_number", + "fe": "request_check_order", + "ef": "request_command_queries", + "ee": "request_query_all_configurations", + "cf": "lorawan_configuration_settings", + "cf00": "lorawan_configuration_settings.mode", + "df": "tsl_version", + "de": "product_name", + "dd": "product_pn", + "db": "product_sn", + "da": "version", + "d9": "oem_id", + "d8": "product_frequency_band", + "d5": "ble_phone_name", + "00": "battery", + "01": "temperature", + "02": "humidity", + "08": "pir_status", + "03": "temperature_mode", + "06": "target_temperature1", + "07": "target_temperature2", + "04": "fan_mode", + "05": "execution_plan_id", + "0b": "temperature_alarm", + "0c": "humidity_alarm", + "09": "ble_event", + "0a": "power_bus_event", + "0d": "key_event", + "0d00": "key_event.f1", + "0d01": "key_event.f2", + "0d02": "key_event.f3", + "0f": "battery_event", + "8d": "communication_mode", + "6c": "communicate_interval", + "6c00": "communicate_interval.ble", + "6c0000": "communicate_interval.ble.seconds_of_time", + "6c0001": "communicate_interval.ble.minutes_of_time", + "6c01": "communicate_interval.lora", + "6c0100": "communicate_interval.lora.seconds_of_time", + "6c0101": "communicate_interval.lora.minutes_of_time", + "6c02": "communicate_interval.ble_lora", + "6c0200": "communicate_interval.ble_lora.seconds_of_time", + "6c0201": "communicate_interval.ble_lora.minutes_of_time", + "6c03": "communicate_interval.power_bus", + "6c0300": "communicate_interval.power_bus.seconds_of_time", + "6c0301": "communicate_interval.power_bus.minutes_of_time", + "c8": "device_status", + "7d": "data_sync_to_peer", + "7e": "data_sync_timeout", + "8b": "ble_name", + "6a": "minimum_dead_zone", + "6b": "target_temperature_range", + "6b00": "target_temperature_range.heat", + "6b01": "target_temperature_range.em_heat", + "6b02": "target_temperature_range.cool", + "6b03": "target_temperature_range.auto", + "c7": "time_zone", + "c6": "daylight_saving_time", + "7b": "schedule_settings", + "7bxx": "schedule_settings._item", + "7bxx00": "schedule_settings._item.enable", + "7bxx01": "schedule_settings._item.name_first", + "7bxx02": "schedule_settings._item.name_last", + "7bxx03": "schedule_settings._item.content1", + "7bxx04": "schedule_settings._item.content2", + "5c": "insert_temporary_plan", + "5b": "filter_clean_alarm", + "5a": "open_window_alarm", + "be": "reboot", + "b9": "query_device_status", + "b8": "synchronize_time", + "b6": "reconnect", + "5f": "delete_task_plan" + }; } - -function readHexStringLE(bytes) { - var temp = []; - for (var idx = bytes.length - 1; idx >= 0; idx--) { - temp.push(("0" + (bytes[idx] & 0xff).toString(16)).slice(-2)); +function processTemperature(decoded) { + var allTemperatureProperties = { + "temperature": { + "precision": 1 + }, + "target_temperature1": { + "precision": 1 + }, + "target_temperature2": { + "precision": 1 + }, + "target_temperature_settings.heat": { + "precision": null + }, + "target_temperature_settings.em_heat": { + "precision": null + }, + "target_temperature_settings.cool": { + "precision": null + }, + "target_temperature_settings.auto": { + "precision": null + }, + "target_temperature_settings.auto_heat": { + "precision": null + }, + "target_temperature_settings.auto_cool": { + "precision": null + }, + "minimum_dead_zone": { + "precision": 1 + }, + "target_temperature_range.heat.min": { + "precision": 1 + }, + "target_temperature_range.heat.max": { + "precision": 1 + }, + "target_temperature_range.em_heat.min": { + "precision": 1 + }, + "target_temperature_range.em_heat.max": { + "precision": 1 + }, + "target_temperature_range.cool.min": { + "precision": 1 + }, + "target_temperature_range.cool.max": { + "precision": 1 + }, + "target_temperature_range.auto.min": { + "precision": 1 + }, + "target_temperature_range.auto.max": { + "precision": 1 + }, + "temperature_calibration_settings.calibration_value": { + "precision": 2 + }, + "schedule_settings._item.content1.heat_target_temperature": { + "precision": 1 + }, + "schedule_settings._item.content1.em_heat_target_temperature": { + "precision": 1 + }, + "schedule_settings._item.content1.cool_target_temperature": { + "precision": 1 + }, + "schedule_settings._item.content2.auto_target_temperature": { + "precision": 1 + }, + "schedule_settings._item.content2.auto_heat_target_temperature": { + "precision": 1 + }, + "schedule_settings._item.content2.auto_cool_target_temperature": { + "precision": 1 + }, + "origin_temperature": { + "precision": 1 } - return temp.join(""); -} - -function getValue(map, key) { - if (RAW_VALUE) return key; - var value = map[key]; - if (!value) value = "unknown"; - return value; +}; + var leafPaths = getAllLeafPaths(decoded); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + if (hasPath(decoded, propertyId)) { + setPath(decoded, fahrenheitProperty, Number((getPath(decoded, propertyId) * 1.8 + 32).toFixed(allTemperatureProperties[newPropertyId].precision))); + setPath(decoded, celsiusProperty, Number(getPath(decoded, propertyId).toFixed(allTemperatureProperties[newPropertyId].precision))); + } + } + } + return decoded; } \ No newline at end of file diff --git a/vendors/milesight-iot/wt-series/wt401/wt401-encoder.js b/vendors/milesight-iot/wt-series/wt401/wt401-encoder.js index 83b1ab1..951aebd 100644 --- a/vendors/milesight-iot/wt-series/wt401/wt401-encoder.js +++ b/vendors/milesight-iot/wt-series/wt401/wt401-encoder.js @@ -5,2378 +5,1829 @@ * * @product WT401 */ -var RAW_VALUE = 0x01; -var WITH_QUERY_CMD = 0x01; /* eslint no-redeclare: "off" */ /* eslint-disable */ // Chirpstack v4 function encodeDownlink(input) { - var encoded = milesightDeviceEncode(input.data); - return { bytes: encoded }; + var encoded = milesightDeviceEncode(input.data); + return { bytes: encoded }; } // Chirpstack v3 function Encode(fPort, obj) { - return milesightDeviceEncode(obj); + return milesightDeviceEncode(obj); } // The Things Network function Encoder(obj, port) { - return milesightDeviceEncode(obj); + return milesightDeviceEncode(obj); } /* eslint-enable */ function milesightDeviceEncode(payload) { - var encoded = []; - - if ("frame" in payload) { - encoded = encoded.concat(setFrame(payload.frame)); - } - if ("collection_interval" in payload) { - var cmd_buffer = setCollectionInterval(payload.collection_interval); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("reporting_interval" in payload) { - var cmd_buffer = setReportingInterval(payload.reporting_interval); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("intelligent_display_enable" in payload) { - var cmd_buffer = setIntelligentDisplayEnable(payload.intelligent_display_enable); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("temperature_unit" in payload) { - var cmd_buffer = setTemperatureUnit(payload.temperature_unit); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("temperature_control_mode_support" in payload) { - var cmd_buffer = setTemperatureControlModeSupport(payload.temperature_control_mode_support); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("target_temperature_mode" in payload) { - var cmd_buffer = setTargetTemperatureMode(payload.target_temperature_mode); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("target_temperature_resolution" in payload) { - var cmd_buffer = setTargetTemperatureResolution(payload.target_temperature_resolution); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("system_status" in payload) { - var cmd_buffer = setSystemStatus(payload.system_status); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("temperature_control_mode" in payload) { - var cmd_buffer = setTemperatureControlMode(payload.temperature_control_mode); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("temperature_control_mode_in_plan_enable" in payload) { - var cmd_buffer = setTemperatureControlModeInPlanEnable(payload.temperature_control_mode_in_plan_enable); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("target_temperature_settings" in payload) { - var cmd_buffer = setTargetTemperature(payload.target_temperature_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("dead_band" in payload) { - var cmd_buffer = setDeadBand(payload.dead_band); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("target_temperature_range" in payload) { - var cmd_buffer = setTargetTemperatureRange(payload.target_temperature_range); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("communicate_interval" in payload) { - var cmd_buffer = setCommunicateInterval(payload.communicate_interval); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("button_custom_function" in payload) { - var cmd_buffer = setButtonCustomFunction(payload.button_custom_function); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("child_lock_settings" in payload) { - var cmd_buffer = setChildLockSettings(payload.child_lock_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("fan_mode" in payload) { - var cmd_buffer = setFanMode(payload.fan_mode); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("screen_display_settings" in payload) { - var cmd_buffer = setScreenObjectSettings(payload.screen_display_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("temperature_calibration_settings" in payload) { - var cmd_buffer = setTemperatureCalibrationSettings(payload.temperature_calibration_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("humidity_calibration_settings" in payload) { - var cmd_buffer = setHumidityCalibrationSettings(payload.humidity_calibration_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("plan_config" in payload) { - for (var i = 0; i < payload.plan_config.length; i++) { - var cmd_buffer = setPlanConfig(payload.plan_config[i]); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - } - if ('system_status_control' in payload) { - var buffer = new Buffer(7); - buffer.writeUInt8(0x59); - // 0:system close, 1:system open - buffer.writeUInt8(payload.system_status_control.on_off); - // 0:heat, 1:em heat, 2:cool, 3:auto - buffer.writeUInt8(payload.system_status_control.mode); - buffer.writeInt16LE(payload.system_status_control.temperature1 * 100); - buffer.writeInt16LE(payload.system_status_control.temperature2 * 100); - encoded = encoded.concat(buffer.toBytes()); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(buffer.toBytes())) : encoded; + processTemperature(payload); + var encoded = []; + //0xff + if ('request_check_sequence_number' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xff); + if (payload.request_check_sequence_number.sequence_number < 0 || payload.request_check_sequence_number.sequence_number > 255) { + throw new Error('request_check_sequence_number.sequence_number must be between 0 and 255'); + } + buffer.writeUInt8(payload.request_check_sequence_number.sequence_number); + encoded = encoded.concat(buffer.toBytes()); } - if ("data_sync_to_peer" in payload) { - var cmd_buffer = setDataSyncToPeer(payload.data_sync_to_peer); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("data_sync_timeout" in payload) { - var cmd_buffer = setDataSyncTimeout(payload.data_sync_timeout); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("unlock_combination_button_settings" in payload) { - var cmd_buffer = setUnlockCombinationButtonSettings(payload.unlock_combination_button_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("temporary_unlock_settings" in payload) { - var cmd_buffer = setTemporaryUnlockSettings(payload.temporary_unlock_settings); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("pir_config" in payload) { - var cmd_buffer = setPirConfig(payload.pir_config); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("ble_enable" in payload) { - var cmd_buffer = setBleEnable(payload.ble_enable); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("external_temperature" in payload) { - var cmd_buffer = setExternalTemperature(payload.external_temperature); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("external_humidity" in payload) { - var cmd_buffer = setExternalHumidity(payload.external_humidity); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("fan_support_mode" in payload) { - var cmd_buffer = setFanSupportMode(payload.fan_support_mode); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("ble_name" in payload) { - var cmd_buffer = setBleName(payload.ble_name); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("ble_pair_info" in payload) { - var cmd_buffer = setBlePairInfo(payload.ble_pair_info); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("communication_mode" in payload) { - var cmd_buffer = setCommunicationMode(payload.communication_mode); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("daylight_saving_time" in payload) { - var cmd_buffer = setDaylightSavingTimeSettings(payload.daylight_saving_time); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("time_zone" in payload) { - var cmd_buffer = setTimeZone(payload.time_zone); - encoded = encoded.concat(cmd_buffer); - encoded = WITH_QUERY_CMD ? encoded.concat(setQueryCmd(cmd_buffer)) : encoded; - } - if ("reset_ble_name" in payload) { - var cmd_buffer = resetBleName(payload.reset_ble_name); - encoded = encoded.concat(cmd_buffer); - } - if ("trigger_fan_alarm" in payload) { - var cmd_buffer = triggerFanAlarm(payload.trigger_fan_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("release_fan_alarm" in payload) { - var cmd_buffer = releaseFanAlarm(payload.release_fan_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("trigger_freeze_alarm" in payload) { - var cmd_buffer = triggerFreezeAlarm(payload.trigger_freeze_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("release_freeze_alarm" in payload) { - var cmd_buffer = releaseFreezeAlarm(payload.release_freeze_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("peer_ble_pair_info" in payload) { - var cmd_buffer = setPeerBlePairInfo(payload.peer_ble_pair_info); - encoded = encoded.concat(cmd_buffer); - } - if ("trigger_no_wire_alarm" in payload) { - var cmd_buffer = triggerNoWireAlarm(payload.trigger_no_wire_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("release_no_wire_alarm" in payload) { - var cmd_buffer = releaseNoWireAlarm(payload.release_no_wire_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("trigger_window_open_alarm" in payload) { - var cmd_buffer = triggerWindowOpenAlarm(payload.trigger_window_open_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("release_window_open_alarm" in payload) { - var cmd_buffer = releaseWindowOpenAlarm(payload.release_window_open_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("trigger_filter_alarm" in payload) { - var cmd_buffer = triggerFilterAlarm(payload.trigger_filter_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("release_filter_alarm" in payload) { - var cmd_buffer = releaseFilterAlarm(payload.release_filter_alarm); - encoded = encoded.concat(cmd_buffer); - } - if ("insert_plan" in payload) { - var cmd_buffer = insertPlan(payload.insert_plan); - encoded = encoded.concat(cmd_buffer); - } - if ("trigger_ble_pair" in payload) { - var cmd_buffer = triggerBlePair(payload.trigger_ble_pair); - encoded = encoded.concat(cmd_buffer); - } - if ("cancel_ble_pair" in payload) { - var cmd_buffer = cancelBlePair(payload.cancel_ble_pair); - encoded = encoded.concat(cmd_buffer); - } - if ("remove_plan" in payload) { - var cmd_buffer = removePlan(payload.remove_plan); - encoded = encoded.concat(cmd_buffer); - } - if ("reconnect" in payload) { - var cmd_buffer = reconnect(payload.reconnect); - encoded = encoded.concat(cmd_buffer); - } - if ("synchronize_time" in payload) { - var cmd_buffer = synchronizeTime(payload.synchronize_time); - encoded = encoded.concat(cmd_buffer); - } - if ("query_device_status" in payload) { - var cmd_buffer = queryDeviceStatus(payload.query_device_status); - encoded = encoded.concat(cmd_buffer); - } - if ("reboot" in payload) { - var cmd_buffer = reboot(payload.reboot); - encoded = encoded.concat(cmd_buffer); - } - - return encoded; -} - -/** - * Set frame - * @param {number} frame values: (0: normal, 1: debug) - * @example { "frame": 0 } - */ -function setFrame(frame) { - var buffer = new Buffer(2); - buffer.writeUInt8(0xfe); - buffer.writeUInt8(frame); - return buffer.toBytes(); -} - -/** - * Set collection interval - * @param {object} collection_interval - * @param {number} collection_interval.unit values: (0: second, 1: minute) - * @param {number} collection_interval.seconds_of_time unit: second, range: [1, 2600], default: 30s - * @param {number} collection_interval.minutes_of_time unit: minute, range: [1, 1440], default: 1min - * @example { "collection_interval": { "unit": 0, "seconds_of_time": 300 } } - */ -function setCollectionInterval(collection_interval) { - var unit = collection_interval.unit; - var seconds_of_time = collection_interval.seconds_of_time; - var minutes_of_time = collection_interval.minutes_of_time; - - var unit_map = { 0: "second", 1: "minute" }; - var unit_values = getValues(unit_map); - if (unit_values.indexOf(unit) === -1) { - throw new Error("collection_interval.unit must be one of " + unit_values.join(", ")); - } - if (getValue(unit_map, unit) === 0 && (seconds_of_time < 1 || seconds_of_time > 3600)) { - throw new Error("collection_interval.seconds_of_time must be between 1 and 3600 when collection_interval.unit is second"); - } - if (getValue(unit_map, unit) === 1 && (minutes_of_time < 1 || minutes_of_time > 1440)) { - throw new Error("collection_interval.minutes_of_time must be between 1 and 1440 when collection_interval.unit is minute"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x60); - buffer.writeUInt8(getValue(unit_map, unit)); - buffer.writeUInt16LE(getValue(unit_map, unit) === 0 ? seconds_of_time : minutes_of_time); - return buffer.toBytes(); -} - -/** - * Set report interval - * @param {object} reporting_interval - * @param {object} reporting_interval.mode values: (0: ble, 1: lora, 2: ble_and_lora, 3: power_bus_and_lora) - * @param {number} reporting_interval.minutes_of_time unit: minute, range: [1, 1440], default: 10min - * @example { "reporting_interval": { "mode": 0, "minutes_of_time": 10 } } - */ -function setReportingInterval(reporting_interval) { - var mode = reporting_interval.mode; - var minutes_of_time = reporting_interval.minutes_of_time; - - var mode_map = { 0: "ble", 1: "lora", 2: "ble_and_lora", 3: "power_bus_and_lora" }; - var mode_values = getValues(mode_map); - if (mode_values.indexOf(mode) === -1) { - throw new Error("reporting_interval.mode must be one of " + mode_values.join(", ")); - } - - if ((minutes_of_time < 1 || minutes_of_time > 1440)) { - throw new Error("reporting_interval.minutes_of_time must be between 1 and 1440 when reporting_interval.mode is ble"); - } - - var buffer = new Buffer(5); - buffer.writeUInt8(0x61); - buffer.writeUInt8(getValue(mode_map, mode)); - buffer.writeUInt8(0x01); // minute - buffer.writeUInt16LE(minutes_of_time); - return buffer.toBytes(); -} - -/** - * Set intelligent display enable - * @param {number} intelligent_display_enable values: (0: disable, 1: enable) - * @example { "intelligent_display_enable": 1 } - */ -function setIntelligentDisplayEnable(intelligent_display_enable) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(intelligent_display_enable) === -1) { - throw new Error("intelligent_display_enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x62); - buffer.writeUInt8(getValue(enable_map, intelligent_display_enable)); - return buffer.toBytes(); -} - -/** - * Set temperature unit - * @param {number} temperature_unit values: (0: celsius, 1: fahrenheit) - * @example { "temperature_unit": 0 } - */ -function setTemperatureUnit(temperature_unit) { - var unit_map = { 0: "celsius", 1: "fahrenheit" }; - var unit_values = getValues(unit_map); - if (unit_values.indexOf(temperature_unit) === -1) { - throw new Error("temperature_unit must be one of " + unit_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x63); - buffer.writeUInt8(getValue(unit_map, temperature_unit)); - return buffer.toBytes(); -} - -/** - * Set temperature control mode support - * @param {object} temperature_control_mode_support - * @param {number} temperature_control_mode_support.heat values: (0: disable, 1: enable) - * @param {number} temperature_control_mode_support.em_heat values: (0: disable, 1: enable) - * @param {number} temperature_control_mode_support.cool values: (0: disable, 1: enable) - * @param {number} temperature_control_mode_support.auto values: (0: disable, 1: enable) - * @example { "temperature_control_mode_support": { "heat": 1, "em_heat": 1, "cool": 1, "auto": 1 } } - */ -function setTemperatureControlModeSupport(temperature_control_mode_support) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - - var data = 0x00; - var mode_bit_offset = { heat: 0, em_heat: 1, cool: 2, auto: 3 }; - for (var mode in mode_bit_offset) { - if (enable_values.indexOf(temperature_control_mode_support[mode]) === -1) { - throw new Error("temperature_control_mode_support[" + mode + "] must be one of " + enable_values.join(", ")); - } - data |= getValue(enable_map, temperature_control_mode_support[mode]) << mode_bit_offset[mode]; - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x64); - buffer.writeUInt8(data); - return buffer.toBytes(); -} - -/** - * Set target temperature mode - * @param {number} target_temperature_mode values: (0: single_point, 1: dual_point) - * @example { "target_temperature_mode": 0 } - */ -function setTargetTemperatureMode(target_temperature_mode) { - var mode_map = { 0: "single_point", 1: "dual_point" }; - var mode_values = getValues(mode_map); - if (mode_values.indexOf(target_temperature_mode) === -1) { - throw new Error("target_temperature_mode must be one of " + mode_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x65); - buffer.writeUInt8(getValue(mode_map, target_temperature_mode)); - return buffer.toBytes(); -} - -/** - * Set target temperature resolution - * @param {number} target_temperature_resolution values: (0: 0.5, 1: 1) - * @example { "target_temperature_resolution": 0 } - */ -function setTargetTemperatureResolution(target_temperature_resolution) { - var resolution_map = { 0: "0.5", 1: "1" }; - var resolution_values = getValues(resolution_map); - if (resolution_values.indexOf(target_temperature_resolution) === -1) { - throw new Error("target_temperature_resolution must be one of " + resolution_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x66); - buffer.writeUInt8(getValue(resolution_map, target_temperature_resolution)); - return buffer.toBytes(); -} - -/** - * Set system status - * @param {number} system_status values: (0: off, 1: on) - * @example { "system_status": 0 } - */ -function setSystemStatus(system_status) { - var on_off_status = { 0: "off", 1: "on" }; - var on_off_values = getValues(on_off_status); - if (on_off_values.indexOf(system_status) === -1) { - throw new Error("system_status must be one of " + on_off_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x67); - buffer.writeUInt8(getValue(on_off_status, system_status)); - return buffer.toBytes(); -} - -/** - * Set temperature control mode - * @param {number} temperature_control_mode values: (0: heat, 1: em_heat, 2: cool, 3: auto) - * @example { "temperature_control_mode": 0 } - */ -function setTemperatureControlMode(temperature_control_mode) { - var mode_map = { 0: "heat", 1: "em_heat", 2: "cool", 3: "auto" }; - var mode_values = getValues(mode_map); - if (mode_values.indexOf(temperature_control_mode) === -1) { - throw new Error("temperature_control_mode must be one of " + mode_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x68); - buffer.writeUInt8(0x00); - buffer.writeUInt8(getValue(mode_map, temperature_control_mode)); - return buffer.toBytes(); -} - -/** - * Set temperature control mode in plan enable - * @param {number} temperature_control_mode_in_plan_enable values: (0: disable, 1: enable) - * @example { "temperature_control_mode_in_plan_enable": 0 } - */ -function setTemperatureControlModeInPlanEnable(temperature_control_mode_in_plan_enable) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(temperature_control_mode_in_plan_enable) === -1) { - throw new Error("temperature_control_mode_in_plan_enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x68); - buffer.writeUInt8(0x01); - buffer.writeUInt8(getValue(enable_map, temperature_control_mode_in_plan_enable)); - return buffer.toBytes(); -} - -/** - * Set target temperature - * @param {object} target_temperature_settings - * @param {number} target_temperature_settings.heat unit: celsius, range: [5, 35] - * @param {number} target_temperature_settings.em_heat unit: celsius, range: [5, 35] - * @param {number} target_temperature_settings.cool unit: celsius, range: [5, 35] - * @param {number} target_temperature_settings.auto unit: celsius, range: [5, 35] - * @param {number} target_temperature_settings.auto_heat unit: celsius, range: [5, 35] - * @param {number} target_temperature_settings.auto_cool unit: celsius, range: [5, 35] - * @example { "target_temperature_settings": { "heat": 20, "em_heat": 20, "cool": 20, "auto": 20 } } - */ -function setTargetTemperature(target_temperature_settings) { - var data = []; - if ("heat" in target_temperature_settings) { - if (target_temperature_settings.heat < 5 || target_temperature_settings.heat > 35) { - throw new Error("target_temperature_settings.heat must be between 5 and 35"); - } - var buffer = new Buffer(4); - buffer.writeUInt8(0x69); - buffer.writeUInt8(0x00); // heat mode - buffer.writeInt16LE(target_temperature_settings.heat * 100); - data = data.concat(buffer.toBytes()); - } - if ("em_heat" in target_temperature_settings) { - if (target_temperature_settings.em_heat < 5 || target_temperature_settings.em_heat > 35) { - throw new Error("target_temperature_settings.em_heat must be between 5 and 35"); - } - var buffer = new Buffer(4); - buffer.writeUInt8(0x69); - buffer.writeUInt8(0x01); // em heat mode - buffer.writeInt16LE(target_temperature_settings.em_heat * 100); - data = data.concat(buffer.toBytes()); - } - if ("cool" in target_temperature_settings) { - if (target_temperature_settings.cool < 5 || target_temperature_settings.cool > 35) { - throw new Error("target_temperature_settings.cool must be between 5 and 35"); - } - var buffer = new Buffer(4); - buffer.writeUInt8(0x69); - buffer.writeUInt8(0x02); // cool mode - buffer.writeInt16LE(target_temperature_settings.cool * 100); - data = data.concat(buffer.toBytes()); - } - if ("auto" in target_temperature_settings) { - if (target_temperature_settings.auto < 5 || target_temperature_settings.auto > 35) { - throw new Error("target_temperature_settings.auto must be between 5 and 35"); - } - var buffer = new Buffer(4); - buffer.writeUInt8(0x69); - buffer.writeUInt8(0x03); // auto mode - buffer.writeInt16LE(target_temperature_settings.auto * 100); - data = data.concat(buffer.toBytes()); - } - if ("auto_heat" in target_temperature_settings) { - if (target_temperature_settings.auto_heat < 5 || target_temperature_settings.auto_heat > 35) { - throw new Error("target_temperature_settings.auto_heat must be between 5 and 35"); - } - var buffer = new Buffer(4); - buffer.writeUInt8(0x69); - buffer.writeUInt8(0x04); // auto heat mode - buffer.writeInt16LE(target_temperature_settings.auto_heat * 100); - data = data.concat(buffer.toBytes()); - } - if ("auto_cool" in target_temperature_settings) { - if (target_temperature_settings.auto_cool < 5 || target_temperature_settings.auto_cool > 35) { - throw new Error("target_temperature_settings.auto_cool must be between 5 and 35"); - } - var buffer = new Buffer(4); - buffer.writeUInt8(0x69); - buffer.writeUInt8(0x05); // auto cool mode - buffer.writeInt16LE(target_temperature_settings.auto_cool * 100); - data = data.concat(buffer.toBytes()); - } - return data; -} - -/** - * Set dead band - * @param {number} dead_band unit: celsius, range: [1, 30] - * @example { "dead_band": 1 } - */ -function setDeadBand(dead_band) { - if (dead_band < 1 || dead_band > 30) { - throw new Error("dead_band must be between 1 and 30"); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x6a); - buffer.writeInt16LE(dead_band * 100); - return buffer.toBytes(); -} - -/** - * Set target temperature range - * @param {object} target_temperature_range - * @param {object} target_temperature_range.heat - * @param {number} target_temperature_range.heat.min unit: celsius, range: [5, 35] - * @param {number} target_temperature_range.heat.max unit: celsius, range: [5, 35] - * @param {object} target_temperature_range.em_heat - * @param {number} target_temperature_range.em_heat.min unit: celsius, range: [5, 35] - * @param {number} target_temperature_range.em_heat.max unit: celsius, range: [5, 35] - * @param {object} target_temperature_range.cool - * @param {number} target_temperature_range.cool.min unit: celsius, range: [5, 35] - * @param {number} target_temperature_range.cool.max unit: celsius, range: [5, 35] - * @param {object} target_temperature_range.auto - * @param {number} target_temperature_range.auto.min unit: celsius, range: [5, 35] - * @param {number} target_temperature_range.auto.max unit: celsius, range: [5, 35] - * @example { "target_temperature_range": { "heat": { "min": 5, "max": 35 }, "em_heat": { "min": 5, "max": 35 }, "cool": { "min": 5, "max": 35 }, "auto": { "min": 5, "max": 35 } } } - */ -function setTargetTemperatureRange(target_temperature_range) { - var data = []; - if ("heat" in target_temperature_range) { - if (target_temperature_range.heat.min < 5 || target_temperature_range.heat.min > 35) { - throw new Error("target_temperature_range.heat.min must be between 5 and 35"); - } - if (target_temperature_range.heat.max < 5 || target_temperature_range.heat.max > 35) { - throw new Error("target_temperature_range.heat.max must be between 5 and 35"); - } - var buffer = new Buffer(6); - buffer.writeUInt8(0x6b); - buffer.writeUInt8(0x00); // heat mode - buffer.writeInt16LE(target_temperature_range.heat.min * 100); - buffer.writeInt16LE(target_temperature_range.heat.max * 100); - data = data.concat(buffer.toBytes()); - } - if ("em_heat" in target_temperature_range) { - if (target_temperature_range.em_heat.min < 5 || target_temperature_range.em_heat.min > 35) { - throw new Error("target_temperature_range.em_heat.min must be between 5 and 35"); - } - if (target_temperature_range.em_heat.max < 5 || target_temperature_range.em_heat.max > 35) { - throw new Error("target_temperature_range.em_heat.max must be between 5 and 35"); - } - var buffer = new Buffer(6); - buffer.writeUInt8(0x6b); - buffer.writeUInt8(0x01); // em heat mode - buffer.writeInt16LE(target_temperature_range.em_heat.min * 100); - buffer.writeInt16LE(target_temperature_range.em_heat.max * 100); - data = data.concat(buffer.toBytes()); - } - if ("cool" in target_temperature_range) { - if (target_temperature_range.cool.min < 5 || target_temperature_range.cool.min > 35) { - throw new Error("target_temperature_range.cool.min must be between 5 and 35"); - } - if (target_temperature_range.cool.max < 5 || target_temperature_range.cool.max > 35) { - throw new Error("target_temperature_range.cool.max must be between 5 and 35"); - } - var buffer = new Buffer(6); - buffer.writeUInt8(0x6b); - buffer.writeUInt8(0x02); // cool mode - buffer.writeInt16LE(target_temperature_range.cool.min * 100); - buffer.writeInt16LE(target_temperature_range.cool.max * 100); - data = data.concat(buffer.toBytes()); - } - if ("auto" in target_temperature_range) { - if (target_temperature_range.auto.min < 5 || target_temperature_range.auto.min > 35) { - throw new Error("target_temperature_range.auto.min must be between 5 and 35"); - } - if (target_temperature_range.auto.max < 5 || target_temperature_range.auto.max > 35) { - throw new Error("target_temperature_range.auto.max must be between 5 and 35"); - } - var buffer = new Buffer(6); - buffer.writeUInt8(0x6b); - buffer.writeUInt8(0x03); // auto mode - buffer.writeInt16LE(target_temperature_range.auto.min * 100); - buffer.writeInt16LE(target_temperature_range.auto.max * 100); - data = data.concat(buffer.toBytes()); - } - - return data; -} - -/** - * Set communicate interval - * @param {object} communicate_interval - * @param {object} communicate_interval.mode values: (0: ble, 1: lora, 2: ble_and_lora, 3: power_bus_and_lora) - * @param {number} communicate_interval.minutes_of_time unit: minute, range: [1, 30] - * @example { "communicate_interval": { "mode": 0, "minutes_of_time": 10 } } - */ -function setCommunicateInterval(communicate_interval) { - var mode = communicate_interval.mode; - var minutes_of_time = communicate_interval.minutes_of_time || 0; - - var mode_map = { 0: "ble", 1: "lora", 2: "ble_and_lora", 3: "power_bus_and_lora" }; - var mode_values = getValues(mode_map); - if (mode_values.indexOf(mode) === -1) { - throw new Error("communicate_interval.mode must be one of " + mode_values.join(", ")); - } - if (minutes_of_time < 1 || minutes_of_time > 30) { - throw new Error("communicate_interval.minutes_of_time must be between 1 and 30"); - } - - var buffer = new Buffer(5); - buffer.writeUInt8(0x6c); - buffer.writeUInt8(getValue(mode_map, mode)); - buffer.writeUInt8(0x01); // minute - buffer.writeUInt16LE(minutes_of_time); - return buffer.toBytes(); -} - -/** - * Set button custom function - * @param {object} button_custom_function - * @param {number} button_custom_function.enable values: (0: disable, 1: enable) - * @param {number} button_custom_function.button_1 values: (1: temperature_control_mode, 2: fan_mode, 3: plan_switch, 4: status_report, 5: release_filter_alarm, 6: button_value, 7: temperature_unit_switch) - * @param {number} button_custom_function.button_2 values: (1: temperature_control_mode, 2: fan_mode, 3: plan_switch, 4: status_report, 5: release_filter_alarm, 6: button_value, 7: temperature_unit_switch) - * @param {number} button_custom_function.button_3 values: (1: temperature_control_mode, 2: fan_mode, 3: plan_switch, 4: status_report, 5: release_filter_alarm, 6: button_value, 7: temperature_unit_switch) - * @example { "button_custom_function": { "enable": 0, "button_1": 0, "button_2": 0, "button_3": 0 } } - */ -function setButtonCustomFunction(button_custom_function) { - var data = []; - if ("enable" in button_custom_function) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(button_custom_function.enable) === -1) { - throw new Error("button_custom_function.enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x71); - buffer.writeUInt8(0x00); // enable - buffer.writeUInt8(getValue(enable_map, button_custom_function.enable)); - data = data.concat(buffer.toBytes()); - } - var function_map = { 1: "temperature_control_mode", 2: "fan_mode", 3: "plan_switch", 4: "status_report", 5: "release_filter_alarm", 6: "button_value", 7: "temperature_unit_switch" }; - var function_values = getValues(function_map); - if ("button_1" in button_custom_function) { - if (function_values.indexOf(button_custom_function.button_1) === -1) { - throw new Error("button_custom_function.button_1 must be one of " + function_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x71); - buffer.writeUInt8(0x01); // button 1 - buffer.writeUInt8(getValue(function_map, button_custom_function.button_1)); - data = data.concat(buffer.toBytes()); - } - if ("button_2" in button_custom_function) { - if (function_values.indexOf(button_custom_function.button_2) === -1) { - throw new Error("button_custom_function.button_2 must be one of " + function_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x71); - buffer.writeUInt8(0x02); // button 2 - buffer.writeUInt8(getValue(function_map, button_custom_function.button_2)); - data = data.concat(buffer.toBytes()); - } - var function_2_map = { 0: "system_status", 3: "plan_switch", 4: "status_report", 5: "release_filter_alarm", 6: "button_value", 7: "temperature_unit_switch" }; - var function_2_values = getValues(function_2_map); - if ("button_3" in button_custom_function) { - if (function_2_values.indexOf(button_custom_function.button_3) === -1) { - throw new Error("button_custom_function.button_3 must be one of " + function_2_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x71); - buffer.writeUInt8(0x03); // button 3s - buffer.writeUInt8(getValue(function_2_map, button_custom_function.button_3)); - data = data.concat(buffer.toBytes()); - } - return data; -} - -/** - * Set child lock settings - * @param {object} child_lock_settings - * @param {number} child_lock_settings.enable values: (0: disable, 1: enable) - * @param {number} child_lock_settings.temperature_up values: (0: disable, 1: enable) - * @param {number} child_lock_settings.temperature_down values: (0: disable, 1: enable) - * @param {number} child_lock_settings.system_on_off values: (0: disable, 1: enable) - * @param {number} child_lock_settings.fan_mode values: (0: disable, 1: enable) - * @param {number} child_lock_settings.temperature_control_mode values: (0: disable, 1: enable) - * @param {number} child_lock_settings.reboot_reset values: (0: disable, 1: enable) - * @param {number} child_lock_settings.power_on_off values: (0: disable, 1: enable) - * @param {number} child_lock_settings.cancel_pair values: (0: disable, 1: enable) - * @param {number} child_lock_settings.plan_switch values: (0: disable, 1: enable) - * @param {number} child_lock_settings.status_report values: (0: disable, 1: enable) - * @param {number} child_lock_settings.release_filter_alarm values: (0: disable, 1: enable) - * @param {number} child_lock_settings.button_report_1 values: (0: disable, 1: enable) - * @param {number} child_lock_settings.button_report_2 values: (0: disable, 1: enable) - * @param {number} child_lock_settings.button_report_3 values: (0: disable, 1: enable) - * @param {number} child_lock_settings.temperature_unit_switch values: (0: disable, 1: enable) - * @example { "child_lock_settings": { "enable": 0, "button_1": 0, "button_2": 0, "button_3": 0 } } - */ -function setChildLockSettings(child_lock_settings) { - var enable = child_lock_settings.enable; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("child_lock_settings.enable must be one of " + enable_values.join(", ")); - } - - var data = 0x00; - var button_bit_offset = { temperature_up: 0, temperature_down: 1, system_on_off: 2, fan_mode: 3, temperature_control_mode: 4, reboot_reset: 5, power_on_off: 6, cancel_pair: 7, plan_switch: 8, status_report: 9, release_filter_alarm: 10, button_report_1: 11, button_report_2: 12, button_report_3: 13, temperature_unit_switch: 14 }; - for (var button in button_bit_offset) { - if (button in child_lock_settings) { - if (enable_values.indexOf(child_lock_settings[button]) === -1) { - throw new Error("child_lock_settings." + button + " must be one of " + enable_values.join(", ")); - } - data |= getValue(enable_map, child_lock_settings[button]) << button_bit_offset[button]; - } - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x72); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt16LE(data); - return buffer.toBytes(); -} - -/** - * Set fan mode - * @param {number} fan_mode values: (0: auto, 1: circulate, 2: on, 3: low, 4: medium, 5: high) - * @example { "fan_mode": 0 } - */ -function setFanMode(fan_mode) { - var fan_mode_map = { 0: "auto", 1: "circulate", 2: "on", 3: "low", 4: "medium", 5: "high" }; - var fan_mode_values = getValues(fan_mode_map); - if (fan_mode_values.indexOf(fan_mode) === -1) { - throw new Error("fan_mode must be one of " + fan_mode_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x74); - buffer.writeUInt8(getValue(fan_mode_map, fan_mode)); - return buffer.toBytes(); -} - -/** - * Set screen object settings - * @param {object} screen_display_settings - * @param {number} screen_display_settings.plan_name values: (0: disable, 1: enable) - * @param {number} screen_display_settings.ambient_temperature values: (0: disable, 1: enable) - * @param {number} screen_display_settings.ambient_humidity values: (0: disable, 1: enable) - * @param {number} screen_display_settings.target_temperature values: (0: disable, 1: enable) - * @example { "screen_display_settings": { "plan_name": 0, "ambient_temperature": 0, "ambient_humidity": 0, "target_temperature": 0 } } - */ -function setScreenObjectSettings(screen_display_settings) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - - var data = 0x00; - var object_bit_offset = { plan_name: 0, ambient_temperature: 1, ambient_humidity: 2, target_temperature: 3 }; - for (var object in object_bit_offset) { - if (object in screen_display_settings) { - if (enable_values.indexOf(screen_display_settings[object]) === -1) { - throw new Error("screen_display_settings." + object + " must be one of " + enable_values.join(", ")); - } - data |= getValue(enable_map, screen_display_settings[object]) << object_bit_offset[object]; - } - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x75); - buffer.writeUInt8(data); - return buffer.toBytes(); -} - -/** - * Set temperature calibration settings - * @param {object} temperature_calibration_settings - * @param {number} temperature_calibration_settings.enable values: (0: disable, 1: enable) - * @param {number} temperature_calibration_settings.calibration_value unit: celsius, range: [-80, 80] - * @example { "temperature_calibration_settings": { "enable": 0, "calibration_value": 0 } } - */ -function setTemperatureCalibrationSettings(temperature_calibration_settings) { - var enable = temperature_calibration_settings.enable; - var calibration_value = temperature_calibration_settings.calibration_value; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("temperature_calibration_settings.enable must be one of " + enable_values.join(", ")); - } - if (calibration_value < -80 || calibration_value > 80) { - throw new Error("temperature_calibration_settings.calibration_value must be between -80 and 80"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x76); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt16LE(calibration_value * 100); - return buffer.toBytes(); -} - -/** - * Set humidity calibration settings - * @param {object} humidity_calibration_settings - * @param {number} humidity_calibration_settings.enable values: (0: disable, 1: enable) - * @param {number} humidity_calibration_settings.calibration_value unit: %RH, range: [-100, 100] - * @example { "humidity_calibration_settings": { "enable": 0, "calibration_value": 0 } } - */ -function setHumidityCalibrationSettings(humidity_calibration_settings) { - var enable = humidity_calibration_settings.enable; - var calibration_value = humidity_calibration_settings.calibration_value; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("humidity_calibration_settings.enable must be one of " + enable_values.join(", ")); - } - if (calibration_value < -100 || calibration_value > 100) { - throw new Error("humidity_calibration_settings.calibration_value must be between -100 and 100"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x77); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeInt16LE(calibration_value * 10); - return buffer.toBytes(); -} - -/** - * Set plan config - * @param {object} plan_config - * @param {number} plan_config.plan_id range: [1, 16] - * @param {number} plan_config.enable values: (0: disable, 1: enable) - * @param {string} plan_config.name_first range: [0, 10] - * @param {string} plan_config.name_last range: [0, 10] - * @param {number} plan_config.temperature_control_mode values: (0: heat, 1: em_heat, 2: cool, 3: auto, 10: off) - * @param {number} plan_config.heat_target_temperature range: [5, 35] - * @param {number} plan_config.em_heat_target_temperature range: [5, 35] - * @param {number} plan_config.cool_target_temperature range: [5, 35] - * @param {number} plan_config.fan_mode values: (0: auto, 1: circulate, 2: on, 3: low, 4: medium, 5: high, 10: off) - * @param {number} plan_config.auto_target_temperature range: [5, 35] - * @param {number} plan_config.auto_heat_target_temperature range: [5, 35] - * @param {number} plan_config.auto_cool_target_temperature range: [5, 35] - * @example { "plan_config": [{ "plan_id": 1, "enable": 0, "name_first": "plan 1", "name_last": "plan 1", "temperature_control_mode": 0, "heat_target_temperature": 5, "em_heat_target_temperature": 5, "cool_target_temperature": 5, "fan_mode": 0, "auto_target_temperature": 5, "auto_heat_target_temperature": 5, "auto_cool_target_temperature": 5 }] } - */ -function setPlanConfig(plan_config) { - var plan_id = plan_config.plan_id; - if (plan_id < 1 || plan_id > 16) { - throw new Error("plan_config.plan_id must be between 1 and 16"); - } - - var data = []; - if ("enable" in plan_config) { - data = data.concat(setPlanEnable(plan_id - 1, plan_config.enable)); - } - if ("name_first" in plan_config) { - data = data.concat(setPlanNameFirst(plan_id - 1, plan_config.name_first)); - } - if ("name_last" in plan_config) { - data = data.concat(setPlanNameLast(plan_id - 1, plan_config.name_last)); - } - if ("temperature_control_mode" in plan_config && "heat_target_temperature" in plan_config && "em_heat_target_temperature" in plan_config && "cool_target_temperature" in plan_config) { - data = data.concat(setPlanTargetTemperature1(plan_id - 1, plan_config)); - } - if ("fan_mode" in plan_config && "auto_target_temperature" in plan_config && "auto_heat_target_temperature" in plan_config && "auto_cool_target_temperature" in plan_config) { - data = data.concat(setPlanTargetTemperature2(plan_id - 1, plan_config)); - } - - return data; -} - -/** - * Set plan enable - * @param {number} plan_id range: [1, 16] - * @param {number} enable values: (0: disable, 1: enable) - */ -function setPlanEnable(plan_id, enable) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("plan_config._item.enable must be one of " + enable_values.join(", ")); - } - var buffer = new Buffer(4); - buffer.writeUInt8(0x7b); - buffer.writeUInt8(plan_id); - buffer.writeUInt8(0x00); // enable sub-command - buffer.writeUInt8(getValue(enable_map, enable)); - return buffer.toBytes(); -} - -/** - * Set plan name first - * @param {number} plan_id range: [1, 16] - * @param {string} name_first range: [0, 10] - */ -function setPlanNameFirst(plan_id, name_first) { - var name = encodeUtf8(name_first); - if (name.length > 12) { - throw new Error("plan_config._item.name_first must be less than 12 characters"); - } - - var buffer = new Buffer(9); - buffer.writeUInt8(0x7b); - buffer.writeUInt8(plan_id); - buffer.writeUInt8(0x01); // name1 sub-command - buffer.writeBytes(name); - return buffer.toBytes(); -} - -/** - * Set plan name last - * @param {number} plan_id range: [1, 16] - * @param {string} name_last range: [0, 10] - */ -function setPlanNameLast(plan_id, name_last) { - var name = encodeUtf8(name_last); - if (name.length > 8) { - throw new Error("plan_config._item.name_last must be less than 8 characters"); - } - - var buffer = new Buffer(7); - buffer.writeUInt8(0x7b); - buffer.writeUInt8(plan_id); - buffer.writeUInt8(0x02); // name2 sub-command - buffer.writeBytes(name); - return buffer.toBytes(); -} - -/** - * Set plan target temperature 1 - * @param {number} plan_id range: [1, 16] - * @param {object} plan_config - * @param {number} plan_config.temperature_control_mode values: (0: heat, 1: em_heat, 2: cool, 3: auto, 10: off) - * @param {number} plan_config.heat_target_temperature range: [5, 35] - * @param {number} plan_config.em_heat_target_temperature range: [5, 35] - * @param {number} plan_config.cool_target_temperature range: [5, 35] - */ -function setPlanTargetTemperature1(plan_id, plan_config) { - var temperature_control_mode = plan_config.temperature_control_mode; - var heat_target_temperature = plan_config.heat_target_temperature; - var em_heat_target_temperature = plan_config.em_heat_target_temperature; - var cool_target_temperature = plan_config.cool_target_temperature; - - var temperature_control_map = { 0: "heat", 1: "em_heat", 2: "cool", 3: "auto", 10: "off" }; - var temperature_control_values = getValues(temperature_control_map); - if (temperature_control_values.indexOf(temperature_control_mode) === -1) { - throw new Error("plan_config._item.temperature_control_mode must be one of " + temperature_control_values.join(", ")); - } - if (heat_target_temperature < 5 || heat_target_temperature > 35) { - throw new Error("plan_config._item.heat_target_temperature must be between 5 and 35"); - } - if (em_heat_target_temperature < 5 || em_heat_target_temperature > 35) { - throw new Error("plan_config._item.em_heat_target_temperature must be between 5 and 35"); - } - if (cool_target_temperature < 5 || cool_target_temperature > 35) { - throw new Error("plan_config._item.cool_target_temperature must be between 5 and 35"); - } - - var buffer = new Buffer(10); - buffer.writeUInt8(0x7b); - buffer.writeUInt8(plan_id); - buffer.writeUInt8(0x03); // target temperature1 sub-command - buffer.writeUInt8(getValue(temperature_control_map, temperature_control_mode)); - buffer.writeInt16LE(heat_target_temperature * 100); - buffer.writeInt16LE(em_heat_target_temperature * 100); - buffer.writeInt16LE(cool_target_temperature * 100); - return buffer.toBytes(); -} - -/** - * Set plan target temperature 2 - * @param {number} plan_id range: [1, 16] - * @param {object} plan_config - * @param {number} plan_config.fan_mode values: (0: auto, 1: circulate, 2: on, 3: low, 4: medium, 5: high, 10: off) - * @param {number} plan_config.auto_target_temperature range: [5, 35] - * @param {number} plan_config.auto_heat_target_temperature range: [5, 35] - * @param {number} plan_config.auto_cool_target_temperature range: [5, 35] - */ -function setPlanTargetTemperature2(plan_id, plan_config) { - var fan_mode = plan_config.fan_mode; - var auto_target_temperature = plan_config.auto_target_temperature; - var auto_heat_target_temperature = plan_config.auto_heat_target_temperature; - var auto_cool_target_temperature = plan_config.auto_cool_target_temperature; - - var fan_mode_map = { 0: "auto", 1: "circulate", 2: "on", 3: "low", 4: "medium", 5: "high", 10: "off" }; - var fan_mode_values = getValues(fan_mode_map); - if (fan_mode_values.indexOf(fan_mode) === -1) { - throw new Error("plan_config._item.fan_mode must be one of " + fan_mode_values.join(", ")); - } - if (auto_target_temperature < 5 || auto_target_temperature > 35) { - throw new Error("plan_config._item.auto_target_temperature must be between 5 and 35"); - } - if (auto_heat_target_temperature < 5 || auto_heat_target_temperature > 35) { - throw new Error("plan_config._item.auto_heat_target_temperature must be between 5 and 35"); - } - if (auto_cool_target_temperature < 5 || auto_cool_target_temperature > 35) { - throw new Error("plan_config._item.auto_cool_target_temperature must be between 5 and 35"); - } - - var buffer = new Buffer(10); - buffer.writeUInt8(0x7b); - buffer.writeUInt8(plan_id); - buffer.writeUInt8(0x04); // target temperature2 sub-command - buffer.writeUInt8(getValue(fan_mode_map, fan_mode)); - buffer.writeInt16LE(auto_target_temperature * 100); - buffer.writeInt16LE(auto_heat_target_temperature * 100); - buffer.writeInt16LE(auto_cool_target_temperature * 100); - return buffer.toBytes(); -} - -/** - * Set data sync to peer - * @param {number} data_sync_to_peer values: (0: embedded_data, 1: external_receive) - * @example { "data_sync_to_peer": 0 } - */ -function setDataSyncToPeer(data_sync_to_peer) { - var data_sync_to_peer_map = { 0: "embedded_data", 1: "external_receive" }; - var data_sync_to_peer_values = getValues(data_sync_to_peer_map); - if (data_sync_to_peer_values.indexOf(data_sync_to_peer) === -1) { - throw new Error("data_sync_to_peer must be one of " + data_sync_to_peer_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x7d); - buffer.writeUInt8(getValue(data_sync_to_peer_map, data_sync_to_peer)); - return buffer.toBytes(); -} - -/** - * Set data sync timeout - * @param {number} data_sync_timeout unit: minute, range: [1, 60] - * @example { "data_sync_timeout": 1 } - */ -function setDataSyncTimeout(data_sync_timeout) { - if (data_sync_timeout < 1 || data_sync_timeout > 60) { - throw new Error("data_sync_timeout must be between 1 and 60"); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x7e); - buffer.writeUInt8(data_sync_timeout); - return buffer.toBytes(); -} - -/** - * Set unlock combination button settings - * @param {object} unlock_combination_button_settings - * @param {number} unlock_combination_button_settings.button_1 values: (0: disable, 1: enable) - * @param {number} unlock_combination_button_settings.button_2 values: (0: disable, 1: enable) - * @param {number} unlock_combination_button_settings.button_3 values: (0: disable, 1: enable) - * @param {number} unlock_combination_button_settings.button_4 values: (0: disable, 1: enable) - * @param {number} unlock_combination_button_settings.button_5 values: (0: disable, 1: enable) - * @example { "unlock_combination_button_settings": { "button_1": 0, "button_2": 0, "button_3": 0, "button_4": 0, "button_5": 0 } } - */ -function setUnlockCombinationButtonSettings(unlock_combination_button_settings) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - - var data = 0x00; - var button_bit_offset = { button_1: 0, button_2: 1, button_3: 2, button_4: 3, button_5: 4 }; - for (var button in button_bit_offset) { - if (button in unlock_combination_button_settings) { - if (enable_values.indexOf(unlock_combination_button_settings[button]) === -1) { - throw new Error("unlock_combination_button_settings." + button + " must be one of " + enable_values.join(", ")); - } - data |= getValue(enable_map, unlock_combination_button_settings[button]) << button_bit_offset[button]; - } - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x80); - buffer.writeUInt8(data); - return buffer.toBytes(); -} - -/** - * Set temporary unlock settings - * @param {object} temporary_unlock_settings - * @param {number} temporary_unlock_settings.enable values: (0: disable, 1: enable) - * @param {number} temporary_unlock_settings.timeout unit: second, range: [1, 3600] - * @example { "temporary_unlock_settings": { "enable": 0, "timeout": 1 } } - */ -function setTemporaryUnlockSettings(temporary_unlock_settings) { - var enable = temporary_unlock_settings.enable; - var timeout = temporary_unlock_settings.timeout; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("temporary_unlock_settings.enable must be one of " + enable_values.join(", ")); - } - if (timeout < 1 || timeout > 3600) { - throw new Error("temporary_unlock_settings.timeout must be between 1 and 3600"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x81); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt16LE(timeout); - return buffer.toBytes(); -} - -/** - * Set PIR config - * @param {object} pir_config - * @param {number} pir_config.enable values: (0: disable, 1: enable) - * @param {number} pir_config.release_time unit: second, range: [1, 3600] - * @param {object} pir_config.general_mode - * @param {object} pir_config.eco_mode - * @param {object} pir_config.night_mode - */ -function setPirConfig(pir_config) { - var data = []; - if ("enable" in pir_config) { - data = data.concat(setPirEnable(pir_config)); - } - if ("release_time" in pir_config) { - data = data.concat(setPirReleaseTime(pir_config)); - } - if ("general_mode" in pir_config) { - data = data.concat(setPirGeneralMode(pir_config)); - } - if ("eco_mode" in pir_config) { - data = data.concat(setPirEcoMode(pir_config)); - } - if ("night_mode" in pir_config) { - data = data.concat(setPirNightMode(pir_config)); - } - return data; -} - -/** - * Set PIR enable - * @param {object} pir_config - * @param {number} pir_config.enable values: (0: disable, 1: enable) - * @example { "pir_config": { "enable": 0 } } - */ -function setPirEnable(pir_config) { - var enable = pir_config.enable; - - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("pir_config.enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x82); - buffer.writeUInt8(0x01); // enable - buffer.writeUInt8(getValue(enable_map, enable)); - return buffer.toBytes(); -} - -/** - * Set PIR release time - * @param {object} pir_config - * @param {number} pir_config.release_time unit: minute, range: [1, 360] - */ -function setPirReleaseTime(pir_config) { - var release_time = pir_config.release_time; - if (release_time < 1 || release_time > 360) { - throw new Error("pir_config.release_time must be between 1 and 360"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x82); - buffer.writeUInt8(0x02); // release time - buffer.writeUInt16LE(release_time); - return buffer.toBytes(); -} - -/** - * Set PIR general mode - * @param {object} pir_config - * @param {number} pir_config.general_mode.detection_mode values: (0: single, 1: multiple) - * @example { "pir_config": { "general_mode": { "detection_mode": 0 } } } - */ -function setPirGeneralMode(pir_config) { - var data = []; - if ("detection_mode" in pir_config.general_mode) { - data = data.concat(setPirGeneralModeDetectionMode(pir_config)); - } - if ("period" in pir_config.general_mode && "rate" in pir_config.general_mode) { - data = data.concat(setPirGeneralModePeriodAndRate(pir_config)); - } - return data; -} - -function setPirGeneralModeDetectionMode(pir_config) { - var general_mode = pir_config.general_mode; - var detection_mode = general_mode.detection_mode; - var detection_mode_map = { 0: "single", 1: "multiple" }; - var detection_mode_values = getValues(detection_mode_map); - if (detection_mode_values.indexOf(detection_mode) === -1) { - throw new Error("pir_config.general_mode.detection_mode must be one of " + detection_mode_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x82); - buffer.writeUInt8(0x03); // general mode - buffer.writeUInt8(getValue(detection_mode_map, detection_mode)); - return buffer.toBytes(); -} - -/** - * Set PIR general mode period and rate - * @param {object} pir_config - * @param {number} pir_config.general_mode.period unit: second, range: [1, 60] - * @param {number} pir_config.general_mode.rate unit: %, range: [1, 100] - * @example { "pir_config": { "general_mode": { "period": 1, "rate": 0 } } } - */ -function setPirGeneralModePeriodAndRate(pir_config) { - var general_mode = pir_config.general_mode; - var period = general_mode.period; - var rate = general_mode.rate; - - if (period < 1 || period > 60) { - throw new Error("pir_config.general_mode.period must be between 1 and 60"); - } - if (rate < 1 || rate > 100) { - throw new Error("pir_config.general_mode.rate must be between 1 and 100"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x82); - buffer.writeUInt8(0x04); // general mode - buffer.writeUInt8(period); - buffer.writeUInt8(rate); - return buffer.toBytes(); -} - -/** - * Set PIR eco mode - * @param {object} pir_config - * @param {number} pir_config.eco_mode.enable values: (0: disable, 1: enable) - * @param {number} pir_config.eco_mode.occupied_plan values: (0: disable, 1: enable) - * @param {number} pir_config.eco_mode.vacant_plan values: (0: disable, 1: enable) - * @example { "pir_config": { "eco_mode": { "enable": 0, "occupied_plan": 0, "vacant_plan": 0 } } } - */ -function setPirEcoMode(pir_config) { - var data = []; - if ("enable" in pir_config.eco_mode) { - data = data.concat(setPirEcoModeEnable(pir_config)); - } - if ("occupied_plan" in pir_config.eco_mode && "vacant_plan" in pir_config.eco_mode) { - data = data.concat(setPirEcoModeOccupiedAndVacantPlan(pir_config)); - } - return data; -} - -/** - * Set PIR eco mode enable - * @param {object} pir_config - * @param {number} pir_config.eco_mode.enable values: (0: disable, 1: enable) - * @example { "pir_config": { "eco_mode": { "enable": 0 } } } - */ -function setPirEcoModeEnable(pir_config) { - var eco_mode = pir_config.eco_mode; - var enable = eco_mode.enable; - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("pir_config.eco_mode.enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x83); - buffer.writeUInt8(0x01); // enable - buffer.writeUInt8(getValue(enable_map, enable)); - return buffer.toBytes(); -} - -/** - * Set PIR eco mode occupied and vacant plan - * @param {object} pir_config - * @param {number} pir_config.eco_mode.occupied_plan values: (0: plan_1, 1: plan_2, 2: plan_3, 3: plan_4, 4: plan_5, 5: plan_6, 6: plan_7, 7: plan_8, 8: plan_9, 9: plan_10, 10: plan_11, 11: plan_12, 12: plan_13, 13: plan_14, 14: plan_15, 15: plan_16, 255: none) - * @param {number} pir_config.eco_mode.vacant_plan values: (0: plan_1, 1: plan_2, 2: plan_3, 3: plan_4, 4: plan_5, 5: plan_6, 6: plan_7, 7: plan_8, 8: plan_9, 9: plan_10, 10: plan_11, 11: plan_12, 12: plan_13, 13: plan_14, 14: plan_15, 15: plan_16) - * @example { "pir_config": { "eco_mode": { "occupied_plan": 0, "vacant_plan": 0 } } } - */ -function setPirEcoModeOccupiedAndVacantPlan(pir_config) { - var eco_mode = pir_config.eco_mode; - var occupied_plan = eco_mode.occupied_plan; - var vacant_plan = eco_mode.vacant_plan; - - var plan_map = { 0: "plan_1", 1: "plan_2", 2: "plan_3", 3: "plan_4", 4: "plan_5", 5: "plan_6", 6: "plan_7", 7: "plan_8", 8: "plan_9", 9: "plan_10", 10: "plan_11", 11: "plan_12", 12: "plan_13", 13: "plan_14", 14: "plan_15", 15: "plan_16", 255: "none" }; - var plan_values = getValues(plan_map); - if (plan_values.indexOf(occupied_plan) === -1 || plan_values.indexOf(vacant_plan) === -1) { - throw new Error("pir_config.eco_mode.occupied_plan and pir_config.eco_mode.vacant_plan must be one of " + plan_values.join(", ")); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x83); - buffer.writeUInt8(0x02); // occupied and vacant plan - buffer.writeUInt8(getValue(plan_map, occupied_plan)); - buffer.writeUInt8(getValue(plan_map, vacant_plan)); - return buffer.toBytes(); -} - -function setPirNightMode(pir_config) { - var data = []; - if ("enable" in pir_config.night_mode) { - data = data.concat(setPirNightModeEnable(pir_config)); - } - if ("detection_mode" in pir_config.night_mode) { - data = data.concat(setPirNightModeDetectionMode(pir_config)); - } - if ("period" in pir_config.night_mode && "rate" in pir_config.night_mode) { - data = data.concat(setPirNightModePeriodAndRate(pir_config)); - } - if ("start_time" in pir_config.night_mode && "end_time" in pir_config.night_mode) { - data = data.concat(setPirNightModeStartTimeAndEndTime(pir_config)); - } - if ("occupied_plan" in pir_config.night_mode) { - data = data.concat(setPirNightModeOccupiedPlan(pir_config)); - } - return data; -} - -/** - * Set PIR night mode enable - * @param {object} pir_config - * @param {number} pir_config.night_mode.enable values: (0: disable, 1: enable) - * @example { "pir_config": { "night_mode": { "enable": 0 } } } - */ -function setPirNightModeEnable(pir_config) { - var night_mode = pir_config.night_mode; - var enable = night_mode.enable; - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("pir_config.night_mode.enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x84); - buffer.writeUInt8(0x01); // enable - buffer.writeUInt8(getValue(enable_map, enable)); - return buffer.toBytes(); -} - -/** - * Set PIR night mode detection mode - * @param {object} pir_config - * @param {number} pir_config.night_mode.detection_mode values: (0: single, 1: multiple) - * @example { "pir_config": { "night_mode": { "detection_mode": 0 } } } - */ -function setPirNightModeDetectionMode(pir_config) { - var night_mode = pir_config.night_mode; - var detection_mode = night_mode.detection_mode; - var detection_mode_map = { 0: "single", 1: "multiple" }; - var detection_mode_values = getValues(detection_mode_map); - if (detection_mode_values.indexOf(detection_mode) === -1) { - throw new Error("pir_config.night_mode.detection_mode must be one of " + detection_mode_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x84); - buffer.writeUInt8(0x02); // detection mode - buffer.writeUInt8(getValue(detection_mode_map, detection_mode)); - return buffer.toBytes(); -} - -/** - * Set PIR night mode period and rate - * @param {object} pir_config - * @param {number} pir_config.night_mode.period unit: second, range: [1, 60] - * @param {number} pir_config.night_mode.rate unit: %, range: [1, 100] - * @example { "pir_config": { "night_mode": { "period": 1, "rate": 0 } } } - */ -function setPirNightModePeriodAndRate(pir_config) { - var night_mode = pir_config.night_mode; - var period = night_mode.period; - var rate = night_mode.rate; - - if (period < 1 || period > 60) { - throw new Error("pir_config.night_mode.period must be between 1 and 60"); - } - if (rate < 1 || rate > 100) { - throw new Error("pir_config.night_mode.rate must be between 1 and 100"); - } - - var buffer = new Buffer(4); - buffer.writeUInt8(0x84); - buffer.writeUInt8(0x03); // period and rate - buffer.writeUInt8(period); - buffer.writeUInt8(rate); - return buffer.toBytes(); -} - -/** - * Set PIR night mode start and end time - * @param {object} pir_config - * @param {number} pir_config.night_mode.start_time unit: minute, range: [0, 1439] - * @param {number} pir_config.night_mode.end_time unit: minute, range: [0, 1439] - * @example { "pir_config": { "night_mode": { "start_time": 0, "end_time": 1439 } } } - */ -function setPirNightModeStartTimeAndEndTime(pir_config) { - var night_mode = pir_config.night_mode; - var start_time = night_mode.start_time; - var end_time = night_mode.end_time; - - if (start_time < 0 || start_time > 1439) { - throw new Error("pir_config.night_mode.start_time must be between 0 and 1439"); - } - if (end_time < 0 || end_time > 1439) { - throw new Error("pir_config.night_mode.end_time must be between 0 and 1439"); - } - - var buffer = new Buffer(6); - buffer.writeUInt8(0x84); - buffer.writeUInt8(0x04); // start and end time - buffer.writeUInt16LE(start_time); - buffer.writeUInt16LE(end_time); - return buffer.toBytes(); -} - -/** - * Set PIR night mode occupied plan - * @param {object} pir_config - * @param {number} pir_config.night_mode.occupied_plan values: (0: plan_1, 1: plan_2, 2: plan_3, 3: plan_4, 4: plan_5, 5: plan_6, 6: plan_7, 7: plan_8, 8: plan_9, 9: plan_10, 10: plan_11, 11: plan_12, 12: plan_13, 13: plan_14, 14: plan_15, 15: plan_16, 255: none) - * @example { "pir_config": { "night_mode": { "occupied_plan": 0 } } } - */ -function setPirNightModeOccupiedPlan(pir_config) { - var night_mode = pir_config.night_mode; - var occupied_plan = night_mode.occupied_plan; - - var plan_map = { 0: "plan_1", 1: "plan_2", 2: "plan_3", 3: "plan_4", 4: "plan_5", 5: "plan_6", 6: "plan_7", 7: "plan_8", 8: "plan_9", 9: "plan_10", 10: "plan_11", 11: "plan_12", 12: "plan_13", 13: "plan_14", 14: "plan_15", 15: "plan_16", 255: "none" }; - var plan_values = getValues(plan_map); - if (plan_values.indexOf(occupied_plan) === -1) { - throw new Error("pir_config.night_mode.occupied_plan must be one of " + plan_values.join(", ")); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x84); - buffer.writeUInt8(0x05); // occupied plan - buffer.writeUInt8(getValue(plan_map, occupied_plan)); - return buffer.toBytes(); -} - -/** - * Set BLE enable - * @param {number} ble_enable values: (0: disable, 1: enable) - * @example { "ble_enable": 0 } - */ -function setBleEnable(ble_enable) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(ble_enable) === -1) { - throw new Error("ble_enable must be one of " + enable_values.join(", ")); - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x85); - buffer.writeUInt8(getValue(enable_map, ble_enable)); - return buffer.toBytes(); -} - -/** - * Set external temperature - * @param {number} external_temperature unit: °C, range: [-20, 60] - * @example { "external_temperature": 20 } - */ -function setExternalTemperature(external_temperature) { - if (external_temperature < -20 || external_temperature > 60) { - throw new Error("external_temperature must be between -20 and 60"); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x86); - buffer.writeInt16LE(external_temperature * 100); - return buffer.toBytes(); -} - -/** - * Set external humidity - * @param {number} external_humidity unit: %r.h., range: [0, 100] - * @example { "external_humidity": 50 } - */ -function setExternalHumidity(external_humidity) { - if (external_humidity < 0 || external_humidity > 100) { - throw new Error("external_humidity must be between 0 and 100"); - } - - var buffer = new Buffer(3); - buffer.writeUInt8(0x87); - buffer.writeInt16LE(external_humidity * 10); - return buffer.toBytes(); -} - -/** - * Set fan support mode - * @param {object} fan_support_mode - * @param {number} fan_support_mode.auto values: (0: disable, 1: enable) - * @param {number} fan_support_mode.circulate values: (0: disable, 1: enable) - * @param {number} fan_support_mode.on values: (0: disable, 1: enable) - * @param {number} fan_support_mode.low values: (0: disable, 1: enable) - * @param {number} fan_support_mode.medium values: (0: disable, 1: enable) - * @param {number} fan_support_mode.high values: (0: disable, 1: enable) - * @example { "fan_support_mode": { "auto": 0, "circulate": 0, "on": 0, "low": 0, "medium": 0, "high": 0 } } - */ -function setFanSupportMode(fan_support_mode) { - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - - var data = 0x00; - var mode_offset = { auto: 0, circulate: 1, on: 2, low: 3, medium: 4, high: 5 }; - for (var mode in mode_offset) { - if (mode in fan_support_mode) { - if (enable_values.indexOf(fan_support_mode[mode]) === -1) { - throw new Error("fan_support_mode." + mode + " must be one of " + enable_values.join(", ")); - } - data |= getValue(enable_map, fan_support_mode[mode]) << mode_offset[mode]; - } - } - - var buffer = new Buffer(2); - buffer.writeUInt8(0x88); - buffer.writeUInt8(data); - return buffer.toBytes(); -} - -/** - * Set BLE name - * @param {string} ble_name length: [0, 32] - * @example { "ble_name": "WT401-123456" } - */ -function setBleName(ble_name) { - var name = encodeUtf8(ble_name); - if (name.length > 32) { - throw new Error("ble_name must be less than 32 characters"); - } - - var buffer = new Buffer(33); - buffer.writeUInt8(0x8b); - buffer.writeBytes(name); - return buffer.toBytes(); -} - -/** - * Set BLE pair info - * @param {object} ble_pair_info - * @param {number} ble_pair_info.address_type values: (0: public, 1: random) - * @param {string} ble_pair_info.address length: 12 - * @param {string} ble_pair_info.name length: [0, 32] - * @example { "ble_pair_info": { "address_type": 0, "address": "123456789012", "name": "WT401-123456" } } - */ -function setBlePairInfo(ble_pair_info) { - var address_type = ble_pair_info.address_type; - var address = ble_pair_info.address; - var name = ble_pair_info.name; - - var address_type_map = { 0: "public", 1: "random" }; - var address_type_values = getValues(address_type_map); - if (address_type_values.indexOf(address_type) === -1) { - throw new Error("ble_pair_info.address_type must be one of " + address_type_values.join(", ")); - } - if (address.length !== 12) { - throw new Error("ble_pair_info.address must be 12 characters"); - } - var ble_name = encodeUtf8(name); - if (ble_name.length > 32) { - throw new Error("ble_pair_info.name must be less than 32 characters"); - } + //0xfe + if ('request_check_order' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xfe); + if (payload.request_check_order.order < 0 || payload.request_check_order.order > 255) { + throw new Error('request_check_order.order must be between 0 and 255'); + } + buffer.writeUInt8(payload.request_check_order.order); + encoded = encoded.concat(buffer.toBytes()); + } + //0xef + if ('req' in payload) { + var buffer = new Buffer(); + var reqList = payload.req; + for (var idx = 0; idx < reqList.length; idx++) { + var req_command = reqList[idx]; + var pureNumber = []; + var formateStrParts = []; + + req_command.split('.').forEach(function(part) { + if (/^[0-9]+$/.test(part)) { + // padStart ES5 兼容 + var hex = Number(part).toString(16); + while (hex.length < 2) { hex = '0' + hex; } + pureNumber.push(hex); + formateStrParts.push('_item'); + } else { + formateStrParts.push(part); + } + }); + + var formateStr = formateStrParts.join('.'); + var hexString = cmdMap()[formateStr]; + + if (hexString && hexString.indexOf('xx') !== -1) { + var i = 0; + hexString = hexString.replace(/xx/g, function() { + return pureNumber[i++]; + }); + } + + if (hexString) { + var length = hexString.length / 2; + buffer.writeUInt8(0xef); + buffer.writeUInt8(length); + buffer.writeHexString(hexString, length, true); + } + } + encoded = encoded.concat(buffer.toBytes()); + } + //0xee + if ('request_query_all_configurations' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xee); + encoded = encoded.concat(buffer.toBytes()); + } + //0xcf + if ('lorawan_configuration_settings' in payload) { + var buffer = new Buffer(); + if (isValid(payload.lorawan_configuration_settings.mode)) { + buffer.writeUInt8(0xcf); + // 0:ClassA, 1:ClassB, 2:ClassC, 3:ClassC to B + buffer.writeUInt8(0x00); + // 0:ClassA, 1:ClassB, 2:ClassC, 3:ClassC to B + buffer.writeUInt8(payload.lorawan_configuration_settings.mode); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0xde + if ('product_name' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xde); + buffer.writeString(payload.product_name, 32); + encoded = encoded.concat(buffer.toBytes()); + } + //0xdd + if ('product_pn' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xdd); + buffer.writeString(payload.product_pn, 32); + encoded = encoded.concat(buffer.toBytes()); + } + //0xdb + if ('product_sn' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xdb); + buffer.writeHexString(payload.product_sn, 8); + encoded = encoded.concat(buffer.toBytes()); + } + //0xd9 + if ('oem_id' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xd9); + buffer.writeHexString(payload.oem_id, 2); + encoded = encoded.concat(buffer.toBytes()); + } + //0xd8 + if ('product_frequency_band' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xd8); + buffer.writeString(payload.product_frequency_band, 16); + encoded = encoded.concat(buffer.toBytes()); + } + //0xd5 + if ('ble_phone_name' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xd5); + if (payload.ble_phone_name.length < 1 || payload.ble_phone_name.length > 64) { + throw new Error('ble_phone_name.length must be between 1 and 64'); + } + buffer.writeUInt8(payload.ble_phone_name.length); + buffer.writeString(payload.ble_phone_name.value, payload.ble_phone_name.length, true); + encoded = encoded.concat(buffer.toBytes()); + } + //0x00 + if ('battery' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x00); + if (payload.battery < 0 || payload.battery > 100) { + throw new Error('battery must be between 0 and 100'); + } + buffer.writeUInt8(payload.battery); + encoded = encoded.concat(buffer.toBytes()); + } + //0x01 + if ('temperature' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x01); + if (payload.temperature < -20 || payload.temperature > 60) { + throw new Error('temperature must be between -20 and 60'); + } + buffer.writeInt16LE(payload.temperature * 100); + encoded = encoded.concat(buffer.toBytes()); + } + //0x02 + if ('humidity' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x02); + if (payload.humidity < 0 || payload.humidity > 100) { + throw new Error('humidity must be between 0 and 100'); + } + buffer.writeUInt16LE(payload.humidity * 10); + encoded = encoded.concat(buffer.toBytes()); + } + //0x08 + if ('pir_status' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x08); + if (payload.pir_status < 0 || payload.pir_status > 2) { + throw new Error('pir_status must be between 0 and 2'); + } + // 0:Vacant, 1:Occupied, 2:Night Occupied + buffer.writeUInt8(payload.pir_status); + encoded = encoded.concat(buffer.toBytes()); + } + //0x03 + if ('temperature_mode' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x03); + // 0:heat, 1:em heat, 2:cool, 3:auto, 4:dehumidify, 5:ventilation, 10:off, 11:none + buffer.writeUInt8(payload.temperature_mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0x06 + if ('target_temperature1' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x06); + if (payload.target_temperature1 < 5 || payload.target_temperature1 > 35) { + throw new Error('target_temperature1 must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature1 * 100); + encoded = encoded.concat(buffer.toBytes()); + } + //0x07 + if ('target_temperature2' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x07); + if (payload.target_temperature2 < 5 || payload.target_temperature2 > 35) { + throw new Error('target_temperature2 must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature2 * 100); + encoded = encoded.concat(buffer.toBytes()); + } + //0x04 + if ('fan_mode' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x04); + // 0:auto, 1:circulate, 2:on, 3:low, 4:medium, 5:high, 10:off, 11:none/keep + buffer.writeUInt8(payload.fan_mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0x05 + if ('execution_plan_id' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x05); + if (payload.execution_plan_id < 0 || payload.execution_plan_id > 16) { + throw new Error('execution_plan_id must be between 0 and 16'); + } + // 0:plan0, 1:plan1, 2:plan2, 3:plan3, 4:plan4, 5:plan5, 6:plan6, 7:plan7, 8:plan8, 9:plan9, 10:plan10, 11:plan11, 12:plan12, 13:plan13, 14:plan14, 15:plan15, 255:Not executed + buffer.writeUInt8(payload.execution_plan_id); + encoded = encoded.concat(buffer.toBytes()); + } + //0x0b + if ('temperature_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0b); + buffer.writeUInt8(payload.temperature_alarm.type); + encoded = encoded.concat(buffer.toBytes()); + } + //0x0c + if ('humidity_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0c); + buffer.writeUInt8(payload.humidity_alarm.type); + encoded = encoded.concat(buffer.toBytes()); + } + //0x09 + if ('ble_event' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x09); + buffer.writeUInt8(payload.ble_event.type); + encoded = encoded.concat(buffer.toBytes()); + } + //0x0a + if ('power_bus_event' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0a); + buffer.writeUInt8(payload.power_bus_event.type); + encoded = encoded.concat(buffer.toBytes()); + } + //0x0d + if ('key_event' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0d); + buffer.writeUInt8(payload.key_event.type); + if (payload.key_event.type == 0x00) { + } + if (payload.key_event.type == 0x01) { + } + if (payload.key_event.type == 0x02) { + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x0f + if ('battery_event' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x0f); + buffer.writeUInt8(payload.battery_event.type); + encoded = encoded.concat(buffer.toBytes()); + } + //0x60 + if ('collection_interval' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x60); + // 0:second, 1:min + buffer.writeUInt8(payload.collection_interval.unit); + if (payload.collection_interval.unit == 0x00) { + if (payload.collection_interval.seconds_of_time < 1 || payload.collection_interval.seconds_of_time > 3600) { + throw new Error('collection_interval.seconds_of_time must be between 1 and 3600'); + } + buffer.writeUInt16LE(payload.collection_interval.seconds_of_time); + } + if (payload.collection_interval.unit == 0x01) { + if (payload.collection_interval.minutes_of_time < 1 || payload.collection_interval.minutes_of_time > 1440) { + throw new Error('collection_interval.minutes_of_time must be between 1 and 1440'); + } + buffer.writeUInt16LE(payload.collection_interval.minutes_of_time); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x8d + if ('communication_mode' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x8d); + if (payload.communication_mode < 0 || payload.communication_mode > 3) { + throw new Error('communication_mode must be between 0 and 3'); + } + // 0:BLE, 1:LoRa, 2:BLE+LoRa, 3:PowerBus+LoRa + buffer.writeUInt8(payload.communication_mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0x61 + if ('reporting_interval' in payload) { + var buffer = new Buffer(); + if (isValid(payload.reporting_interval.ble)) { + buffer.writeUInt8(0x61); + buffer.writeUInt8(0x00); + // 0:second, 1:min + buffer.writeUInt8(payload.reporting_interval.ble.unit); + if (payload.reporting_interval.ble.unit == 0x00) { + if (payload.reporting_interval.ble.seconds_of_time < 10 || payload.reporting_interval.ble.seconds_of_time > 64800) { + throw new Error('reporting_interval.ble.seconds_of_time must be between 10 and 64800'); + } + buffer.writeUInt16LE(payload.reporting_interval.ble.seconds_of_time); + } + if (payload.reporting_interval.ble.unit == 0x01) { + if (payload.reporting_interval.ble.minutes_of_time < 1 || payload.reporting_interval.ble.minutes_of_time > 1440) { + throw new Error('reporting_interval.ble.minutes_of_time must be between 1 and 1440'); + } + buffer.writeUInt16LE(payload.reporting_interval.ble.minutes_of_time); + } + } + if (isValid(payload.reporting_interval.lora)) { + buffer.writeUInt8(0x61); + buffer.writeUInt8(0x01); + // 0:second, 1:min + buffer.writeUInt8(payload.reporting_interval.lora.unit); + if (payload.reporting_interval.lora.unit == 0x00) { + if (payload.reporting_interval.lora.seconds_of_time < 10 || payload.reporting_interval.lora.seconds_of_time > 64800) { + throw new Error('reporting_interval.lora.seconds_of_time must be between 10 and 64800'); + } + buffer.writeUInt16LE(payload.reporting_interval.lora.seconds_of_time); + } + if (payload.reporting_interval.lora.unit == 0x01) { + if (payload.reporting_interval.lora.minutes_of_time < 1 || payload.reporting_interval.lora.minutes_of_time > 1440) { + throw new Error('reporting_interval.lora.minutes_of_time must be between 1 and 1440'); + } + buffer.writeUInt16LE(payload.reporting_interval.lora.minutes_of_time); + } + } + if (isValid(payload.reporting_interval.ble_lora)) { + buffer.writeUInt8(0x61); + buffer.writeUInt8(0x02); + // 0:second, 1:min + buffer.writeUInt8(payload.reporting_interval.ble_lora.unit); + if (payload.reporting_interval.ble_lora.unit == 0x00) { + if (payload.reporting_interval.ble_lora.seconds_of_time < 10 || payload.reporting_interval.ble_lora.seconds_of_time > 64800) { + throw new Error('reporting_interval.ble_lora.seconds_of_time must be between 10 and 64800'); + } + buffer.writeUInt16LE(payload.reporting_interval.ble_lora.seconds_of_time); + } + if (payload.reporting_interval.ble_lora.unit == 0x01) { + if (payload.reporting_interval.ble_lora.minutes_of_time < 1 || payload.reporting_interval.ble_lora.minutes_of_time > 1440) { + throw new Error('reporting_interval.ble_lora.minutes_of_time must be between 1 and 1440'); + } + buffer.writeUInt16LE(payload.reporting_interval.ble_lora.minutes_of_time); + } + } + if (isValid(payload.reporting_interval.power_lora)) { + buffer.writeUInt8(0x61); + buffer.writeUInt8(0x03); + // 0:second, 1:min + buffer.writeUInt8(payload.reporting_interval.power_lora.unit); + if (payload.reporting_interval.power_lora.unit == 0x00) { + if (payload.reporting_interval.power_lora.seconds_of_time < 10 || payload.reporting_interval.power_lora.seconds_of_time > 64800) { + throw new Error('reporting_interval.power_lora.seconds_of_time must be between 10 and 64800'); + } + buffer.writeUInt16LE(payload.reporting_interval.power_lora.seconds_of_time); + } + if (payload.reporting_interval.power_lora.unit == 0x01) { + if (payload.reporting_interval.power_lora.minutes_of_time < 1 || payload.reporting_interval.power_lora.minutes_of_time > 1440) { + throw new Error('reporting_interval.power_lora.minutes_of_time must be between 1 and 1440'); + } + buffer.writeUInt16LE(payload.reporting_interval.power_lora.minutes_of_time); + } + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x6c + if ('communicate_interval' in payload) { + var buffer = new Buffer(); + if (isValid(payload.communicate_interval.ble)) { + buffer.writeUInt8(0x6c); + buffer.writeUInt8(0x00); + // 0:second, 1:min + buffer.writeUInt8(payload.communicate_interval.ble.unit); + if (payload.communicate_interval.ble.unit == 0x00) { + if (payload.communicate_interval.ble.seconds_of_time < 10 || payload.communicate_interval.ble.seconds_of_time > 1800) { + throw new Error('communicate_interval.ble.seconds_of_time must be between 10 and 1800'); + } + buffer.writeUInt16LE(payload.communicate_interval.ble.seconds_of_time); + } + if (payload.communicate_interval.ble.unit == 0x01) { + if (payload.communicate_interval.ble.minutes_of_time < 1 || payload.communicate_interval.ble.minutes_of_time > 30) { + throw new Error('communicate_interval.ble.minutes_of_time must be between 1 and 30'); + } + buffer.writeUInt16LE(payload.communicate_interval.ble.minutes_of_time); + } + } + if (isValid(payload.communicate_interval.lora)) { + buffer.writeUInt8(0x6c); + buffer.writeUInt8(0x01); + // 0:second, 1:min + buffer.writeUInt8(payload.communicate_interval.lora.unit); + if (payload.communicate_interval.lora.unit == 0x00) { + if (payload.communicate_interval.lora.seconds_of_time < 10 || payload.communicate_interval.lora.seconds_of_time > 1800) { + throw new Error('communicate_interval.lora.seconds_of_time must be between 10 and 1800'); + } + buffer.writeUInt16LE(payload.communicate_interval.lora.seconds_of_time); + } + if (payload.communicate_interval.lora.unit == 0x01) { + if (payload.communicate_interval.lora.minutes_of_time < 1 || payload.communicate_interval.lora.minutes_of_time > 30) { + throw new Error('communicate_interval.lora.minutes_of_time must be between 1 and 30'); + } + buffer.writeUInt16LE(payload.communicate_interval.lora.minutes_of_time); + } + } + if (isValid(payload.communicate_interval.ble_lora)) { + buffer.writeUInt8(0x6c); + buffer.writeUInt8(0x02); + // 0:second, 1:min + buffer.writeUInt8(payload.communicate_interval.ble_lora.unit); + if (payload.communicate_interval.ble_lora.unit == 0x00) { + if (payload.communicate_interval.ble_lora.seconds_of_time < 10 || payload.communicate_interval.ble_lora.seconds_of_time > 1800) { + throw new Error('communicate_interval.ble_lora.seconds_of_time must be between 10 and 1800'); + } + buffer.writeUInt16LE(payload.communicate_interval.ble_lora.seconds_of_time); + } + if (payload.communicate_interval.ble_lora.unit == 0x01) { + if (payload.communicate_interval.ble_lora.minutes_of_time < 1 || payload.communicate_interval.ble_lora.minutes_of_time > 30) { + throw new Error('communicate_interval.ble_lora.minutes_of_time must be between 1 and 30'); + } + buffer.writeUInt16LE(payload.communicate_interval.ble_lora.minutes_of_time); + } + } + if (isValid(payload.communicate_interval.power_bus)) { + buffer.writeUInt8(0x6c); + buffer.writeUInt8(0x03); + // 0:second, 1:min + buffer.writeUInt8(payload.communicate_interval.power_bus.unit); + if (payload.communicate_interval.power_bus.unit == 0x00) { + if (payload.communicate_interval.power_bus.seconds_of_time < 10 || payload.communicate_interval.power_bus.seconds_of_time > 1800) { + throw new Error('communicate_interval.power_bus.seconds_of_time must be between 10 and 1800'); + } + buffer.writeUInt16LE(payload.communicate_interval.power_bus.seconds_of_time); + } + if (payload.communicate_interval.power_bus.unit == 0x01) { + if (payload.communicate_interval.power_bus.minutes_of_time < 1 || payload.communicate_interval.power_bus.minutes_of_time > 30) { + throw new Error('communicate_interval.power_bus.minutes_of_time must be between 1 and 30'); + } + buffer.writeUInt16LE(payload.communicate_interval.power_bus.minutes_of_time); + } + } + encoded = encoded.concat(buffer.toBytes()); + } + //0xc8 + if ('device_status' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xc8); + // 0:Power Off, 1:Power On + buffer.writeUInt8(payload.device_status); + encoded = encoded.concat(buffer.toBytes()); + } + //0x63 + if ('temperature_unit' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x63); + // 0:℃, 1:℉ + buffer.writeUInt8(payload.temperature_unit); + encoded = encoded.concat(buffer.toBytes()); + } + //0x7d + if ('data_sync_to_peer' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x7d); + // 0:Embedded Data, 1:External Receive + buffer.writeUInt8(payload.data_sync_to_peer); + encoded = encoded.concat(buffer.toBytes()); + } + //0x7e + if ('data_sync_timeout' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x7e); + if (payload.data_sync_timeout < 1 || payload.data_sync_timeout > 60) { + throw new Error('data_sync_timeout must be between 1 and 60'); + } + buffer.writeUInt8(payload.data_sync_timeout); + encoded = encoded.concat(buffer.toBytes()); + } + //0x85 + if ('ble_enable' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x85); + // 0:disable, 1:enable + buffer.writeUInt8(payload.ble_enable); + encoded = encoded.concat(buffer.toBytes()); + } + //0x8b + if ('ble_name' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x8b); + buffer.writeString(payload.ble_name, 32); + encoded = encoded.concat(buffer.toBytes()); + } + //0x67 + if ('system_status' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x67); + // 0:Off, 1:On + buffer.writeUInt8(payload.system_status); + encoded = encoded.concat(buffer.toBytes()); + } + //0x64 + if ('mode_enable' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x64); + var bitOptions = 0; + // 0:disable, 1:enable + bitOptions |= payload.mode_enable.heat << 0; - var buffer = new Buffer(40); - buffer.writeUInt8(0x8c); - buffer.writeUInt8(getValue(address_type_map, address_type)); - buffer.writeHexString(address); - buffer.writeBytes(ble_name); - return buffer.toBytes(); -} + // 0:disable, 1:enable + bitOptions |= payload.mode_enable.em_heat << 1; -/** - * Set communication mode - * @param {number} communication_mode values: (0: ble, 1: lora, 2: ble_and_lora, 3: power_bus_and_lora) - * @example { "communication_mode": 0 } - */ -function setCommunicationMode(communication_mode) { - var mode_map = { 0: "ble", 1: "lora", 2: "ble_and_lora", 3: "power_bus_and_lora" }; - var mode_values = getValues(mode_map); - if (mode_values.indexOf(communication_mode) === -1) { - throw new Error("communication_mode must be one of " + mode_values.join(", ")); - } + // 0:disable, 1:enable + bitOptions |= payload.mode_enable.cool << 2; - var buffer = new Buffer(2); - buffer.writeUInt8(0x8d); - buffer.writeUInt8(getValue(mode_map, communication_mode)); - return buffer.toBytes(); -} + // 0:disable, 1:enable + bitOptions |= payload.mode_enable.auto << 3; -/** - * Set daylight saving time settings - * @param {object} daylight_saving_time - * @param {number} daylight_saving_time.enable values: (0: disable, 1: enable) - * @param {number} daylight_saving_time.offset unit: minute - * @param {number} daylight_saving_time.start_month values: (1: January, 2: February, 3: March, 4: April, 5: May, 6: June, 7: July, 8: August, 9: September, 10: October, 11: November, 12: December) - * @param {number} daylight_saving_time.start_week_num values: (1: First week, 2: Second week, 3: Third week, 4: Fourth week, 5: Last week) - * @param {number} daylight_saving_time.start_week_day values: (1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday, 7: Sunday) - * @param {number} daylight_saving_time.start_hour_min unit: minutes - * @param {number} daylight_saving_time.end_month values: (1: January, 2: February, 3: March, 4: April, 5: May, 6: June, 7: July, 8: August, 9: September, 10: October, 11: November, 12: December) - * @param {number} daylight_saving_time.end_week_num values: (1: First week, 2: Second week, 3: Third week, 4: Fourth week, 5: Last week) - * @param {number} daylight_saving_time.end_week_day values: (1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday, 7: Sunday) - * @param {number} daylight_saving_time.end_hour_min unit: minute - * @example { "daylight_saving_time": { "enable": 1, "offset": 60, "start_month": 3, "start_week": 1, "start_day": 1, "start_time": 0, "end_month": 11, "end_week": 4, "end_day": 7, "end_time": 120 } } - */ -function setDaylightSavingTimeSettings(daylight_saving_time) { - var enable = daylight_saving_time.enable; - var offset = daylight_saving_time.offset; - var start_month = daylight_saving_time.start_month; - var start_week_num = daylight_saving_time.start_week_num; - var start_week_day = daylight_saving_time.start_week_day; - var start_hour_min = daylight_saving_time.start_hour_min; - var end_month = daylight_saving_time.end_month; - var end_week_num = daylight_saving_time.end_week_num; - var end_week_day = daylight_saving_time.end_week_day; - var end_hour_min = daylight_saving_time.end_hour_min; - - if (offset < 1 || offset > 120) { - throw new Error('daylight_saving_time.offset must be between 1 and 120'); - } + bitOptions |= payload.mode_enable.reserved << 6; + buffer.writeUInt8(bitOptions); - var enable_map = { 0: "disable", 1: "enable" }; - var enable_values = getValues(enable_map); - if (enable_values.indexOf(enable) === -1) { - throw new Error("daylight_saving_time.enable must be one of " + enable_values.join(", ")); - } - var month_values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; - if (month_values.indexOf(start_month) === -1 || month_values.indexOf(end_month) === -1) { - throw new Error("daylight_saving_time.start_month and end_month must be one of " + month_values.join(", ")); - } - var week_values = [1, 2, 3, 4, 5]; - if (week_values.indexOf(start_week_num) === -1 || week_values.indexOf(end_week_num) === -1) { - throw new Error("daylight_saving_time.start_week_num and end_week_num must be one of " + week_values.join(", ")); - } - var day_values = [1, 2, 3, 4, 5, 6, 7]; - if (day_values.indexOf(start_week_day) === -1 || day_values.indexOf(end_week_day) === -1) { - throw new Error("daylight_saving_time.start_week_day and end_week_day must be one of " + day_values.join(", ")); - } + encoded = encoded.concat(buffer.toBytes()); + } + //0x88 + if ('fan_enable' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x88); + var bitOptions = 0; + // 0:disable, 1:enable + bitOptions |= payload.fan_enable.auto << 0; - if (start_hour_min < 0 || start_hour_min > 1380) { - throw new Error('daylight_saving_time.start_hour_min must be between 0 and 1380'); - } + // 0:disable, 1:enable + bitOptions |= payload.fan_enable.circul << 1; - if (end_month < 1 || end_month > 12) { - throw new Error('daylight_saving_time.end_month must be between 1 and 12'); - } + // 0:disable, 1:enable + bitOptions |= payload.fan_enable.on << 2; - if (end_hour_min < 0 || end_hour_min > 1380) { - throw new Error('daylight_saving_time.end_hour_min must be between 0 and 1380'); - } + // 0:disable, 1:enable + bitOptions |= payload.fan_enable.low << 3; - var start_day_value = (start_week_num << 4) | start_week_day; - var end_day_value = (end_week_num << 4) | end_week_day; - - var buffer = new Buffer(11); - buffer.writeUInt8(0xc6); - buffer.writeUInt8(getValue(enable_map, enable)); - buffer.writeUInt8(offset); - buffer.writeUInt8(start_month); - buffer.writeUInt8(start_day_value); - buffer.writeUInt16LE(start_hour_min); - buffer.writeUInt8(end_month); - buffer.writeUInt8(end_day_value); - buffer.writeUInt16LE(end_hour_min); - return buffer.toBytes(); -} + // 0:disable, 1:enable + bitOptions |= payload.fan_enable.medium << 4; -/** - * Set time zone - * @param {number} time_zone unit: minute, convert: "hh:mm" -> "hh * 60 + mm", values: ( -720: UTC-12, -660: UTC-11, -600: UTC-10, -570: UTC-9:30, -540: UTC-9, -480: UTC-8, -420: UTC-7, -360: UTC-6, -300: UTC-5, -240: UTC-4, -210: UTC-3:30, -180: UTC-3, -120: UTC-2, -60: UTC-1, 0: UTC, 60: UTC+1, 120: UTC+2, 180: UTC+3, 240: UTC+4, 300: UTC+5, 360: UTC+6, 420: UTC+7, 480: UTC+8, 540: UTC+9, 570: UTC+9:30, 600: UTC+10, 660: UTC+11, 720: UTC+12, 765: UTC+12:45, 780: UTC+13, 840: UTC+14 ) - * @example { "time_zone": 480 } - */ -function setTimeZone(time_zone) { - var timezone_map = { "-720": "UTC-12", "-660": "UTC-11", "-600": "UTC-10", "-570": "UTC-9:30", "-540": "UTC-9", "-480": "UTC-8", "-420": "UTC-7", "-360": "UTC-6", "-300": "UTC-5", "-240": "UTC-4", "-210": "UTC-3:30", "-180": "UTC-3", "-120": "UTC-2", "-60": "UTC-1", 0: "UTC", 60: "UTC+1", 120: "UTC+2", 180: "UTC+3", 210: "UTC+3:30", 240: "UTC+4", 270: "UTC+4:30", 300: "UTC+5", 330: "UTC+5:30", 345: "UTC+5:45", 360: "UTC+6", 390: "UTC+6:30", 420: "UTC+7", 480: "UTC+8", 540: "UTC+9", 570: "UTC+9:30", 600: "UTC+10", 630: "UTC+10:30", 660: "UTC+11", 720: "UTC+12", 765: "UTC+12:45", 780: "UTC+13", 840: "UTC+14" }; - var timezone_values = getValues(timezone_map); - if (timezone_values.indexOf(time_zone) === -1) { - throw new Error("time_zone must be one of " + timezone_values.join(", ")); - } + // 0:disable, 1:enable + bitOptions |= payload.fan_enable.high << 5; - var buffer = new Buffer(3); - buffer.writeUInt8(0xc7); - buffer.writeInt16LE(getValue(timezone_map, time_zone)); - return buffer.toBytes(); -} + bitOptions |= payload.fan_enable.reserved << 6; + buffer.writeUInt8(bitOptions); -/** - * Reset BLE name - * @param {number} reset_ble_name values: (0: no, 1: yes) - * @example { "reset_ble_name": 0 } - */ -function resetBleName(reset_ble_name) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(reset_ble_name) === -1) { - throw new Error("reset_ble_name must be one of " + yes_no_values.join(", ")); - } + encoded = encoded.concat(buffer.toBytes()); + } + //0x68 + if ('temperature_control_mode' in payload) { + var buffer = new Buffer(); + if (isValid(payload.temperature_control_mode.mode)) { + buffer.writeUInt8(0x68); + // 0:heat, 1:em heat, 2:cool, 3:auto, 4:dehumidify, 5:ventilation + buffer.writeUInt8(0x00); + if (payload.temperature_control_mode.mode < 0 || payload.temperature_control_mode.mode > 5) { + throw new Error('temperature_control_mode.mode must be between 0 and 5'); + } + // 0:heat, 1:em heat, 2:cool, 3:auto, 4:dehumidify, 5:ventilation + buffer.writeUInt8(payload.temperature_control_mode.mode); + } + if (isValid(payload.temperature_control_mode.plan_mode_enable)) { + buffer.writeUInt8(0x68); + // 0:disable, 1:enable + buffer.writeUInt8(0x01); + // 0:disable, 1:enable + buffer.writeUInt8(payload.temperature_control_mode.plan_mode_enable); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x65 + if ('target_temperature_mode' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x65); + // 0:single, 1:dual + buffer.writeUInt8(payload.target_temperature_mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0x66 + if ('target_temperature_resolution' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x66); + // 0:0.5, 1:1 + buffer.writeUInt8(payload.target_temperature_resolution); + encoded = encoded.concat(buffer.toBytes()); + } + //0x69 + if ('target_temperature_settings' in payload) { + var buffer = new Buffer(); + if (isValid(payload.target_temperature_settings.heat)) { + buffer.writeUInt8(0x69); + buffer.writeUInt8(0x00); + if (payload.target_temperature_settings.heat < 5 || payload.target_temperature_settings.heat > 35) { + throw new Error('target_temperature_settings.heat must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_settings.heat * 100); + } + if (isValid(payload.target_temperature_settings.em_heat)) { + buffer.writeUInt8(0x69); + buffer.writeUInt8(0x01); + if (payload.target_temperature_settings.em_heat < 5 || payload.target_temperature_settings.em_heat > 35) { + throw new Error('target_temperature_settings.em_heat must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_settings.em_heat * 100); + } + if (isValid(payload.target_temperature_settings.cool)) { + buffer.writeUInt8(0x69); + buffer.writeUInt8(0x02); + if (payload.target_temperature_settings.cool < 5 || payload.target_temperature_settings.cool > 35) { + throw new Error('target_temperature_settings.cool must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_settings.cool * 100); + } + if (isValid(payload.target_temperature_settings.auto)) { + buffer.writeUInt8(0x69); + buffer.writeUInt8(0x03); + if (payload.target_temperature_settings.auto < 5 || payload.target_temperature_settings.auto > 35) { + throw new Error('target_temperature_settings.auto must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_settings.auto * 100); + } + if (isValid(payload.target_temperature_settings.auto_heat)) { + buffer.writeUInt8(0x69); + buffer.writeUInt8(0x04); + if (payload.target_temperature_settings.auto_heat < 5 || payload.target_temperature_settings.auto_heat > 35) { + throw new Error('target_temperature_settings.auto_heat must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_settings.auto_heat * 100); + } + if (isValid(payload.target_temperature_settings.auto_cool)) { + buffer.writeUInt8(0x69); + buffer.writeUInt8(0x05); + if (payload.target_temperature_settings.auto_cool < 5 || payload.target_temperature_settings.auto_cool > 35) { + throw new Error('target_temperature_settings.auto_cool must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_settings.auto_cool * 100); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x6a + if ('minimum_dead_zone' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x6a); + if (payload.minimum_dead_zone < 1 || payload.minimum_dead_zone > 30) { + throw new Error('minimum_dead_zone must be between 1 and 30'); + } + buffer.writeUInt16LE(payload.minimum_dead_zone * 100); + encoded = encoded.concat(buffer.toBytes()); + } + //0x6b + if ('target_temperature_range' in payload) { + var buffer = new Buffer(); + if (isValid(payload.target_temperature_range.heat)) { + buffer.writeUInt8(0x6b); + buffer.writeUInt8(0x00); + if (payload.target_temperature_range.heat.min < 5 || payload.target_temperature_range.heat.min > 35) { + throw new Error('target_temperature_range.heat.min must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_range.heat.min * 100); + if (payload.target_temperature_range.heat.max < 5 || payload.target_temperature_range.heat.max > 35) { + throw new Error('target_temperature_range.heat.max must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_range.heat.max * 100); + } + if (isValid(payload.target_temperature_range.em_heat)) { + buffer.writeUInt8(0x6b); + buffer.writeUInt8(0x01); + if (payload.target_temperature_range.em_heat.min < 5 || payload.target_temperature_range.em_heat.min > 35) { + throw new Error('target_temperature_range.em_heat.min must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_range.em_heat.min * 100); + if (payload.target_temperature_range.em_heat.max < 5 || payload.target_temperature_range.em_heat.max > 35) { + throw new Error('target_temperature_range.em_heat.max must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_range.em_heat.max * 100); + } + if (isValid(payload.target_temperature_range.cool)) { + buffer.writeUInt8(0x6b); + buffer.writeUInt8(0x02); + if (payload.target_temperature_range.cool.min < 5 || payload.target_temperature_range.cool.min > 35) { + throw new Error('target_temperature_range.cool.min must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_range.cool.min * 100); + if (payload.target_temperature_range.cool.max < 5 || payload.target_temperature_range.cool.max > 35) { + throw new Error('target_temperature_range.cool.max must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_range.cool.max * 100); + } + if (isValid(payload.target_temperature_range.auto)) { + buffer.writeUInt8(0x6b); + buffer.writeUInt8(0x03); + if (payload.target_temperature_range.auto.min < 5 || payload.target_temperature_range.auto.min > 35) { + throw new Error('target_temperature_range.auto.min must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_range.auto.min * 100); + if (payload.target_temperature_range.auto.max < 5 || payload.target_temperature_range.auto.max > 35) { + throw new Error('target_temperature_range.auto.max must be between 5 and 35'); + } + buffer.writeInt16LE(payload.target_temperature_range.auto.max * 100); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x74 + if ('fan_control_mode' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x74); + if (payload.fan_control_mode < 0 || payload.fan_control_mode > 5) { + throw new Error('fan_control_mode must be between 0 and 5'); + } + // 0:auto, 1:circulate, 2:on, 3:low, 4:medium, 5:high + buffer.writeUInt8(payload.fan_control_mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0x82 + if ('pir_common' in payload) { + var buffer = new Buffer(); + if (isValid(payload.pir_common.enable)) { + buffer.writeUInt8(0x82); + // 0:disable, 1:enable + buffer.writeUInt8(0x01); + if (payload.pir_common.enable < 0 || payload.pir_common.enable > 1) { + throw new Error('pir_common.enable must be between 0 and 1'); + } + // 0:disable, 1:enable + buffer.writeUInt8(payload.pir_common.enable); + } + if (isValid(payload.pir_common.release_time)) { + buffer.writeUInt8(0x82); + buffer.writeUInt8(0x02); + if (payload.pir_common.release_time < 1 || payload.pir_common.release_time > 360) { + throw new Error('pir_common.release_time must be between 1 and 360'); + } + buffer.writeUInt16LE(payload.pir_common.release_time); + } + if (isValid(payload.pir_common.mode)) { + buffer.writeUInt8(0x82); + // 0:Immediate Trigger, 1:Rule Trigger + buffer.writeUInt8(0x03); + // 0:Immediate Trigger, 1:Rule Trigger + buffer.writeUInt8(payload.pir_common.mode); + } + if (isValid(payload.pir_common.check)) { + buffer.writeUInt8(0x82); + buffer.writeUInt8(0x04); + if (payload.pir_common.check.period < 1 || payload.pir_common.check.period > 60) { + throw new Error('pir_common.check.period must be between 1 and 60'); + } + buffer.writeUInt8(payload.pir_common.check.period); + if (payload.pir_common.check.rate < 1 || payload.pir_common.check.rate > 100) { + throw new Error('pir_common.check.rate must be between 1 and 100'); + } + buffer.writeUInt8(payload.pir_common.check.rate); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x83 + if ('pir_energy' in payload) { + var buffer = new Buffer(); + if (isValid(payload.pir_energy.enable)) { + buffer.writeUInt8(0x83); + // 0:disable, 1:enable + buffer.writeUInt8(0x01); + if (payload.pir_energy.enable < 0 || payload.pir_energy.enable > 1) { + throw new Error('pir_energy.enable must be between 0 and 1'); + } + // 0:disable, 1:enable + buffer.writeUInt8(payload.pir_energy.enable); + } + if (isValid(payload.pir_energy.plan)) { + buffer.writeUInt8(0x83); + buffer.writeUInt8(0x02); + if (payload.pir_energy.plan.occupied < 0 || payload.pir_energy.plan.occupied > 255) { + throw new Error('pir_energy.plan.occupied must be between 0 and 255'); + } + // 0:plan0, 1:plan1, 2:plan2, 3:plan3, 4:plan4, 5:plan5, 6:plan6, 7:plan7, 255:Not executed + buffer.writeUInt8(payload.pir_energy.plan.occupied); + if (payload.pir_energy.plan.unoccupied < 0 || payload.pir_energy.plan.unoccupied > 255) { + throw new Error('pir_energy.plan.unoccupied must be between 0 and 255'); + } + // 0:plan0, 1:plan1, 2:plan2, 3:plan3, 4:plan4, 5:plan5, 6:plan6, 7:plan7, 255:Not executed + buffer.writeUInt8(payload.pir_energy.plan.unoccupied); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x84 + if ('pir_night' in payload) { + var buffer = new Buffer(); + if (isValid(payload.pir_night.enable)) { + buffer.writeUInt8(0x84); + // 0:disable, 1:enable + buffer.writeUInt8(0x01); + if (payload.pir_night.enable < 0 || payload.pir_night.enable > 1) { + throw new Error('pir_night.enable must be between 0 and 1'); + } + // 0:disable, 1:enable + buffer.writeUInt8(payload.pir_night.enable); + } + if (isValid(payload.pir_night.night_time)) { + buffer.writeUInt8(0x84); + buffer.writeUInt8(0x04); + if (payload.pir_night.night_time.start < 0 || payload.pir_night.night_time.start > 1439) { + throw new Error('pir_night.night_time.start must be between 0 and 1439'); + } + buffer.writeUInt16LE(payload.pir_night.night_time.start); + if (payload.pir_night.night_time.stop < 0 || payload.pir_night.night_time.stop > 1439) { + throw new Error('pir_night.night_time.stop must be between 0 and 1439'); + } + buffer.writeUInt16LE(payload.pir_night.night_time.stop); + } + if (isValid(payload.pir_night.occupied)) { + buffer.writeUInt8(0x84); + // 0:plan0, 1:plan1, 2:plan2, 3:plan3, 4:plan4, 5:plan5, 6:plan6, 7:plan7, 255:Not executed + buffer.writeUInt8(0x05); + if (payload.pir_night.occupied < 0 || payload.pir_night.occupied > 255) { + throw new Error('pir_night.occupied must be between 0 and 255'); + } + // 0:plan0, 1:plan1, 2:plan2, 3:plan3, 4:plan4, 5:plan5, 6:plan6, 7:plan7, 255:Not executed + buffer.writeUInt8(payload.pir_night.occupied); + } + if (isValid(payload.pir_night.mode)) { + buffer.writeUInt8(0x84); + // 0:Immediate Trigger, 1:Rule Trigger + buffer.writeUInt8(0x02); + // 0:Immediate Trigger, 1:Rule Trigger + buffer.writeUInt8(payload.pir_night.mode); + } + if (isValid(payload.pir_night.check)) { + buffer.writeUInt8(0x84); + buffer.writeUInt8(0x03); + if (payload.pir_night.check.period < 1 || payload.pir_night.check.period > 60) { + throw new Error('pir_night.check.period must be between 1 and 60'); + } + buffer.writeUInt8(payload.pir_night.check.period); + if (payload.pir_night.check.rate < 1 || payload.pir_night.check.rate > 100) { + throw new Error('pir_night.check.rate must be between 1 and 100'); + } + buffer.writeUInt8(payload.pir_night.check.rate); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x75 + if ('screen_display_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x75); + var bitOptions = 0; + // 0:disable, 1:enable + bitOptions |= payload.screen_display_settings.plan_name << 0; - if (getValue(yes_no_map, reset_ble_name) === 0) { - return []; - } - return [0x54]; -} + // 0:disable, 1:enable + bitOptions |= payload.screen_display_settings.ambient_temp << 1; -/** - * Set trigger fan alarm - * @param {number} trigger_fan_alarm values: (0: no, 1: yes) - * @example { "trigger_fan_alarm": 1 } - */ -function triggerFanAlarm(trigger_fan_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(trigger_fan_alarm) === -1) { - throw new Error("trigger_fan_alarm must be one of " + yes_no_values.join(", ")); - } + // 0:disable, 1:enable + bitOptions |= payload.screen_display_settings.ambient_humi << 2; - if (getValue(yes_no_map, trigger_fan_alarm) === 0) { - return []; - } - return [0x55, 0x01]; -} + // 0:disable, 1:enable + bitOptions |= payload.screen_display_settings.target_temp << 3; -/** - * Release fan alarm - * @param {number} release_fan_alarm values: (0: no, 1: yes) - * @example { "release_fan_alarm": 1 } - */ -function releaseFanAlarm(release_fan_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(release_fan_alarm) === -1) { - throw new Error("release_fan_alarm must be one of " + yes_no_values.join(", ")); - } + bitOptions |= payload.screen_display_settings.reserved << 4; + buffer.writeUInt8(bitOptions); - if (getValue(yes_no_map, release_fan_alarm) === 0) { - return []; - } - return [0x55, 0x00]; -} + encoded = encoded.concat(buffer.toBytes()); + } + //0x71 + if ('button_custom_function' in payload) { + var buffer = new Buffer(); + if (isValid(payload.button_custom_function.enable)) { + buffer.writeUInt8(0x71); + // 0:disable, 1:enable + buffer.writeUInt8(0x00); + buffer.writeInt8(payload.button_custom_function.enable); + } + if (isValid(payload.button_custom_function.mode1)) { + buffer.writeUInt8(0x71); + // 1:Temperature Control Mode, 2:Fan Mode, 3:Schedule Switch, 4:Status Report, 5:Filter Cleaning Reset, 6:Button Event1, 7:Temperature Unit Switch + buffer.writeUInt8(0x01); + // 1:Temperature Control Mode, 2:Fan Mode, 3:Schedule Switch, 4:Status Report, 5:Filter Cleaning Reset, 6:Button Event1, 7:Temperature Unit Switch + buffer.writeUInt8(payload.button_custom_function.mode1); + } + if (isValid(payload.button_custom_function.mode2)) { + buffer.writeUInt8(0x71); + // 1:Temperature Control Mode, 2:Fan Mode, 3:Schedule Switch, 4:Status Report, 5:Filter Cleaning Reset, 6:Button Event2, 7:Temperature Unit Switch + buffer.writeUInt8(0x02); + // 1:Temperature Control Mode, 2:Fan Mode, 3:Schedule Switch, 4:Status Report, 5:Filter Cleaning Reset, 6:Button Event2, 7:Temperature Unit Switch + buffer.writeUInt8(payload.button_custom_function.mode2); + } + if (isValid(payload.button_custom_function.mode3)) { + buffer.writeUInt8(0x71); + // 0:System On/Off, 3:Schedule Switch, 4:Status Report, 5:Filter Cleaning Reset, 6:Button Event3, 7:Temperature Unit Switch + buffer.writeUInt8(0x03); + // 0:System On/Off, 3:Schedule Switch, 4:Status Report, 5:Filter Cleaning Reset, 6:Button Event3, 7:Temperature Unit Switch + buffer.writeUInt8(payload.button_custom_function.mode3); + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x72 + if ('children_lock_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x72); + // 0:disable, 1:enable + buffer.writeUInt8(payload.children_lock_settings.enable); + var bitOptions = 0; + bitOptions |= payload.children_lock_settings.temp_up << 0; -/** - * Set peer BLE pair info - * @param {object} peer_ble_pair_info - * @param {number} peer_ble_pair_info.address_type values: (0: public, 1: random) - * @param {string} peer_ble_pair_info.address length: 12 - * @param {string} peer_ble_pair_info.name length: [0, 32] - * @example { "peer_ble_pair_info": { "address_type": 0, "address": "123456789012", "name": "WT401-123456" } } - */ -function setPeerBlePairInfo(peer_ble_pair_info) { - var address_type = peer_ble_pair_info.address_type; - var address = peer_ble_pair_info.address; - var name = peer_ble_pair_info.name; - - var address_type_map = { 0: "public", 1: "random" }; - var address_type_values = getValues(address_type_map); - if (address_type_values.indexOf(address_type) === -1) { - throw new Error("peer_ble_pair_info.address_type must be one of " + address_type_values.join(", ")); - } - if (address.length !== 12) { - throw new Error("peer_ble_pair_info.address must be 12 characters"); - } - var ble_name = encodeUtf8(name); - if (ble_name.length > 32) { - throw new Error("peer_ble_pair_info.name must be less than 32 characters"); - } + bitOptions |= payload.children_lock_settings.temp_down << 1; - var buffer = new Buffer(40); - buffer.writeUInt8(0x56); - buffer.writeUInt8(getValue(address_type_map, address_type)); - buffer.writeHexString(address); - buffer.writeBytes(ble_name); - return buffer.toBytes(); -} + bitOptions |= payload.children_lock_settings.system_on_off << 2; -/** - * Trigger freeze alarm - * @param {number} trigger_freeze_alarm values: (0: no, 1: yes) - * @example { "trigger_freeze_alarm": 1 } - */ -function triggerFreezeAlarm(trigger_freeze_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(trigger_freeze_alarm) === -1) { - throw new Error("trigger_freeze_alarm must be one of " + yes_no_values.join(", ")); - } + bitOptions |= payload.children_lock_settings.fan_mode << 3; - if (getValue(yes_no_map, trigger_freeze_alarm) === 0) { - return []; - } - return [0x57, 0x01]; -} + bitOptions |= payload.children_lock_settings.temperature_control_mode << 4; -/** - * Release freeze alarm - * @param {number} release_freeze_alarm values: (0: no, 1: yes) - * @example { "release_freeze_alarm": 1 } - */ -function releaseFreezeAlarm(release_freeze_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(release_freeze_alarm) === -1) { - throw new Error("release_freeze_alarm must be one of " + yes_no_values.join(", ")); - } + bitOptions |= payload.children_lock_settings.reboot_reset << 5; - if (getValue(yes_no_map, release_freeze_alarm) === 0) { - return []; - } - return [0x57, 0x00]; -} + bitOptions |= payload.children_lock_settings.power_on_off << 6; -/** - * Trigger no wire alarm - * @param {number} trigger_no_wire_alarm values: (0: no, 1: yes) - * @example { "trigger_no_wire_alarm": 1 } - */ -function triggerNoWireAlarm(trigger_no_wire_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(trigger_no_wire_alarm) === -1) { - throw new Error("trigger_no_wire_alarm must be one of " + yes_no_values.join(", ")); - } + bitOptions |= payload.children_lock_settings.cancel_pair << 7; - if (getValue(yes_no_map, trigger_no_wire_alarm) === 0) { - return []; - } - return [0x58, 0x01]; -} + bitOptions |= payload.children_lock_settings.plan_switch << 8; -/** - * Release no wire alarm - * @param {number} release_no_wire_alarm values: (0: no, 1: yes) - * @example { "release_no_wire_alarm": 1 } - */ -function releaseNoWireAlarm(release_no_wire_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(release_no_wire_alarm) === -1) { - throw new Error("release_no_wire_alarm must be one of " + yes_no_values.join(", ")); - } + bitOptions |= payload.children_lock_settings.status_report << 9; - if (getValue(yes_no_map, release_no_wire_alarm) === 0) { - return []; - } - return [0x58, 0x00]; -} + bitOptions |= payload.children_lock_settings.filter_clean_alarm_release << 10; -/** - * Trigger window open alarm - * @param {number} trigger_window_open_alarm values: (0: no, 1: yes) - * @example { "trigger_window_open_alarm": 1 } - */ -function triggerWindowOpenAlarm(trigger_window_open_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(trigger_window_open_alarm) === -1) { - throw new Error("trigger_window_open_alarm must be one of " + yes_no_values.join(", ")); - } + bitOptions |= payload.children_lock_settings.button1_event << 11; - if (getValue(yes_no_map, trigger_window_open_alarm) === 0) { - return []; - } - return [0x5a, 0x01]; -} + bitOptions |= payload.children_lock_settings.button2_event << 12; -/** - * Release window open alarm - * @param {number} release_window_open_alarm values: (0: no, 1: yes) - * @example { "release_window_open_alarm": 1 } - */ -function releaseWindowOpenAlarm(release_window_open_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(release_window_open_alarm) === -1) { - throw new Error("release_window_open_alarm must be one of " + yes_no_values.join(", ")); - } + bitOptions |= payload.children_lock_settings.button3_event << 13; - if (getValue(yes_no_map, release_window_open_alarm) === 0) { - return []; - } - return [0x5a, 0x00]; -} + bitOptions |= payload.children_lock_settings.temperature_unit_switch << 14; -/** - * Trigger filter alarm - * @param {number} trigger_filter_alarm values: (0: no, 1: yes) - * @example { "trigger_filter_alarm": 1 } - */ -function triggerFilterAlarm(trigger_filter_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(trigger_filter_alarm) === -1) { - throw new Error("trigger_filter_alarm must be one of " + yes_no_values.join(", ")); - } + bitOptions |= payload.children_lock_settings.reserved << 15; + buffer.writeUInt16LE(bitOptions); - if (getValue(yes_no_map, trigger_filter_alarm) === 0) { - return []; - } - return [0x5b, 0x01]; -} + encoded = encoded.concat(buffer.toBytes()); + } + //0x81 + if ('unlock_button' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x81); + // 0:disable, 1:enable + buffer.writeUInt8(payload.unlock_button.enable); + if (payload.unlock_button.timeout < 1 || payload.unlock_button.timeout > 3600) { + throw new Error('unlock_button.timeout must be between 1 and 3600'); + } + buffer.writeUInt16LE(payload.unlock_button.timeout); + encoded = encoded.concat(buffer.toBytes()); + } + //0x80 + if ('unlock_combination_button_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x80); + var bitOptions = 0; + // 0:disable, 1:enable + bitOptions |= payload.unlock_combination_button_settings.button1 << 0; -/** - * Release filter alarm - * @param {number} release_filter_alarm values: (0: no, 1: yes) - * @example { "release_filter_alarm": 1 } - */ -function releaseFilterAlarm(release_filter_alarm) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(release_filter_alarm) === -1) { - throw new Error("release_filter_alarm must be one of " + yes_no_values.join(", ")); - } + // 0:disable, 1:enable + bitOptions |= payload.unlock_combination_button_settings.button2 << 1; - if (getValue(yes_no_map, release_filter_alarm) === 0) { - return []; - } - return [0x5b, 0x00]; -} + // 0:disable, 1:enable + bitOptions |= payload.unlock_combination_button_settings.button3 << 2; -/** - * Insert plan id - * @param {number} insert_plan values: (0: plan_1, 1: plan_2, 2: plan_3, 3: plan_4, 4: plan_5, 5: plan_6, 6: plan_7, 7: plan_8, 8: plan_9, 9: plan_10, 10: plan_11, 11: plan_12, 12: plan_13, 13: plan_14, 14: plan_15, 15: plan_16) - * @example { "insert_plan": 0 } - */ -function insertPlan(insert_plan) { - var plan_id_map = { 0: "plan_1", 1: "plan_2", 2: "plan_3", 3: "plan_4", 4: "plan_5", 5: "plan_6", 6: "plan_7", 7: "plan_8", 8: "plan_9", 9: "plan_10", 10: "plan_11", 11: "plan_12", 12: "plan_13", 13: "plan_14", 14: "plan_15", 15: "plan_16" }; - var plan_id_values = getValues(plan_id_map); - if (plan_id_values.indexOf(insert_plan) === -1) { - throw new Error("insert_plan must be one of " + plan_id_values.join(", ")); - } + // 0:disable, 1:enable + bitOptions |= payload.unlock_combination_button_settings.button4 << 3; - var buffer = new Buffer(2); - buffer.writeUInt8(0x5c); - buffer.writeUInt8(getValue(plan_id_map, insert_plan)); - return buffer.toBytes(); -} + // 0:disable, 1:enable + bitOptions |= payload.unlock_combination_button_settings.button5 << 4; -/** - * Trigger BLE pair - * @param {number} trigger_ble_pair values: (0: no, 1: yes) - * @example { "trigger_ble_pair": 1 } - */ -function triggerBlePair(trigger_ble_pair) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(trigger_ble_pair) === -1) { - throw new Error("trigger_ble_pair must be one of " + yes_no_values.join(", ")); - } + bitOptions |= payload.unlock_combination_button_settings.reserved << 5; + buffer.writeUInt8(bitOptions); - if (getValue(yes_no_map, trigger_ble_pair) === 0) { - return []; - } - return [0x5e, 0x01]; + encoded = encoded.concat(buffer.toBytes()); + } + //0x62 + if ('intelligent_display_enable' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x62); + // 0:disable, 1:enable + buffer.writeUInt8(payload.intelligent_display_enable); + encoded = encoded.concat(buffer.toBytes()); + } + //0xc7 + if ('time_zone' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xc7); + if (payload.time_zone < -720 || payload.time_zone > 840) { + throw new Error('time_zone must be between -720 and 840'); + } + buffer.writeInt16LE(payload.time_zone); + encoded = encoded.concat(buffer.toBytes()); + } + //0xc6 + if ('daylight_saving_time' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xc6); + // 0:disable, 1:enable + buffer.writeUInt8(payload.daylight_saving_time.enable); + if (payload.daylight_saving_time.daylight_saving_time_offset < 1 || payload.daylight_saving_time.daylight_saving_time_offset > 120) { + throw new Error('daylight_saving_time.daylight_saving_time_offset must be between 1 and 120'); + } + buffer.writeUInt8(payload.daylight_saving_time.daylight_saving_time_offset); + if (payload.daylight_saving_time.start_month < 1 || payload.daylight_saving_time.start_month > 12) { + throw new Error('daylight_saving_time.start_month must be between 1 and 12'); + } + // 1:Jan., 2:Feb., 3:Mar., 4:Apr., 5:May, 6:Jun., 7:Jul., 8:Aug., 9:Sep., 10:Oct., 11:Nov., 12:Dec. + buffer.writeUInt8(payload.daylight_saving_time.start_month); + var bitOptions = 0; + // 1:1st, 2: 2nd, 3: 3rd, 4: 4th, 5: last + bitOptions |= payload.daylight_saving_time.start_week_num << 4; + + // 1:Mon., 2:Tues., 3:Wed., 4:Thurs., 5:Fri., 6:Sat., 7:Sun. + bitOptions |= payload.daylight_saving_time.start_week_day << 0; + buffer.writeUInt8(bitOptions); + + if (payload.daylight_saving_time.start_hour_min < 0 || payload.daylight_saving_time.start_hour_min > 1380) { + throw new Error('daylight_saving_time.start_hour_min must be between 0 and 1380'); + } + buffer.writeUInt16LE(payload.daylight_saving_time.start_hour_min); + if (payload.daylight_saving_time.end_month < 1 || payload.daylight_saving_time.end_month > 12) { + throw new Error('daylight_saving_time.end_month must be between 1 and 12'); + } + // 1:Jan., 2:Feb., 3:Mar., 4:Apr., 5:May, 6:Jun., 7:Jul., 8:Aug., 9:Sep., 10:Oct., 11:Nov., 12:Dec. + buffer.writeUInt8(payload.daylight_saving_time.end_month); + var bitOptions = 0; + // 1:1st, 2: 2nd, 3: 3rd, 4: 4th, 5: last + bitOptions |= payload.daylight_saving_time.end_week_num << 4; + + // 1:Mon., 2:Tues., 3:Wed., 4:Thurs., 5:Fri., 6:Sat., 7:Sun. + bitOptions |= payload.daylight_saving_time.end_week_day << 0; + buffer.writeUInt8(bitOptions); + + if (payload.daylight_saving_time.end_hour_min < 0 || payload.daylight_saving_time.end_hour_min > 1380) { + throw new Error('daylight_saving_time.end_hour_min must be between 0 and 1380'); + } + buffer.writeUInt16LE(payload.daylight_saving_time.end_hour_min); + encoded = encoded.concat(buffer.toBytes()); + } + //0x76 + if ('temperature_calibration_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x76); + // 0:disable, 1:enable + buffer.writeUInt8(payload.temperature_calibration_settings.enable); + if (payload.temperature_calibration_settings.calibration_value < -80 || payload.temperature_calibration_settings.calibration_value > 80) { + throw new Error('temperature_calibration_settings.calibration_value must be between -80 and 80'); + } + buffer.writeInt16LE(payload.temperature_calibration_settings.calibration_value * 100); + encoded = encoded.concat(buffer.toBytes()); + } + //0x77 + if ('humidity_calibration_settings' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x77); + // 0:disable, 1:enable + buffer.writeUInt8(payload.humidity_calibration_settings.enable); + if (payload.humidity_calibration_settings.calibration_value < -100 || payload.humidity_calibration_settings.calibration_value > 100) { + throw new Error('humidity_calibration_settings.calibration_value must be between -100 and 100'); + } + buffer.writeInt16LE(payload.humidity_calibration_settings.calibration_value * 10); + encoded = encoded.concat(buffer.toBytes()); + } + //0x7b + if ('schedule_settings' in payload) { + var buffer = new Buffer(); + for (var schedule_settings_id = 0; schedule_settings_id < (payload.schedule_settings && payload.schedule_settings.length); schedule_settings_id++) { + var schedule_settings_item = payload.schedule_settings[schedule_settings_id]; + var schedule_settings_item_id = schedule_settings_item.id; + if (isValid(schedule_settings_item.enable)) { + buffer.writeUInt8(0x7b); + buffer.writeUInt8(schedule_settings_item_id); + // 0:disable, 1:enable + buffer.writeUInt8(0x00); + // 0:disable, 1:enable + buffer.writeUInt8(schedule_settings_item.enable); + } + if (isValid(schedule_settings_item.name_first)) { + buffer.writeUInt8(0x7b); + buffer.writeUInt8(schedule_settings_item_id); + buffer.writeUInt8(0x01); + buffer.writeString(schedule_settings_item.name_first, 6); + } + if (isValid(schedule_settings_item.name_last)) { + buffer.writeUInt8(0x7b); + buffer.writeUInt8(schedule_settings_item_id); + buffer.writeUInt8(0x02); + buffer.writeString(schedule_settings_item.name_last, 4); + } + if (isValid(schedule_settings_item.content1)) { + buffer.writeUInt8(0x7b); + buffer.writeUInt8(schedule_settings_item_id); + buffer.writeUInt8(0x03); + if (schedule_settings_item.content1.tstat_mode < 0 || schedule_settings_item.content1.tstat_mode > 255) { + throw new Error('content1.tstat_mode must be between 0 and 255'); + } + // 0:heat, 1:em heat, 2:cool, 3:auto, 10:off + buffer.writeUInt8(schedule_settings_item.content1.tstat_mode); + if (schedule_settings_item.content1.heat_target_temperature < 5 || schedule_settings_item.content1.heat_target_temperature > 35) { + throw new Error('content1.heat_target_temperature must be between 5 and 35'); + } + buffer.writeInt16LE(schedule_settings_item.content1.heat_target_temperature * 100); + if (schedule_settings_item.content1.em_heat_target_temperature < 5 || schedule_settings_item.content1.em_heat_target_temperature > 35) { + throw new Error('content1.em_heat_target_temperature must be between 5 and 35'); + } + buffer.writeInt16LE(schedule_settings_item.content1.em_heat_target_temperature * 100); + if (schedule_settings_item.content1.cool_target_temperature < 5 || schedule_settings_item.content1.cool_target_temperature > 35) { + throw new Error('content1.cool_target_temperature must be between 5 and 35'); + } + buffer.writeInt16LE(schedule_settings_item.content1.cool_target_temperature * 100); + } + if (isValid(schedule_settings_item.content2)) { + buffer.writeUInt8(0x7b); + buffer.writeUInt8(schedule_settings_item_id); + buffer.writeUInt8(0x04); + if (schedule_settings_item.content2.fan_mode < 0 || schedule_settings_item.content2.fan_mode > 255) { + throw new Error('content2.fan_mode must be between 0 and 255'); + } + // 0:auto, 1:circulate, 2:on, 3:low, 4:medium, 5:high, 10:off + buffer.writeUInt8(schedule_settings_item.content2.fan_mode); + if (schedule_settings_item.content2.auto_target_temperature < 5 || schedule_settings_item.content2.auto_target_temperature > 35) { + throw new Error('content2.auto_target_temperature must be between 5 and 35'); + } + buffer.writeInt16LE(schedule_settings_item.content2.auto_target_temperature * 100); + if (schedule_settings_item.content2.auto_heat_target_temperature < 5 || schedule_settings_item.content2.auto_heat_target_temperature > 35) { + throw new Error('content2.auto_heat_target_temperature must be between 5 and 35'); + } + buffer.writeInt16LE(schedule_settings_item.content2.auto_heat_target_temperature * 100); + if (schedule_settings_item.content2.auto_cool_target_temperature < 5 || schedule_settings_item.content2.auto_cool_target_temperature > 35) { + throw new Error('content2.auto_cool_target_temperature must be between 5 and 35'); + } + buffer.writeInt16LE(schedule_settings_item.content2.auto_cool_target_temperature * 100); + } + } + encoded = encoded.concat(buffer.toBytes()); + } + //0x59 + if ('system_status_control' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x59); + // 0:system close, 1:system open + buffer.writeUInt8(payload.system_status_control.on_off); + if (payload.system_status_control.mode < 0 || payload.system_status_control.mode > 5) { + throw new Error('system_status_control.mode must be between 0 and 5'); + } + // 0:heat, 1:em heat, 2:cool, 3:auto, 4:dehumidify, 5:ventilation + buffer.writeUInt8(payload.system_status_control.mode); + if (payload.system_status_control.temperature1 < 5 || payload.system_status_control.temperature1 > 35) { + throw new Error('system_status_control.temperature1 must be between 5 and 35'); + } + buffer.writeInt16LE(payload.system_status_control.temperature1 * 100); + buffer.writeInt16LE(payload.system_status_control.temperature2 * 100); + encoded = encoded.concat(buffer.toBytes()); + } + //0x86 + if ('origin_temperature' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x86); + if (payload.origin_temperature < -20 || payload.origin_temperature > 60) { + throw new Error('origin_temperature must be between -20 and 60'); + } + buffer.writeInt16LE(payload.origin_temperature * 100); + encoded = encoded.concat(buffer.toBytes()); + } + //0x87 + if ('origin_humidity' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x87); + if (payload.origin_humidity < 0 || payload.origin_humidity > 100) { + throw new Error('origin_humidity must be between 0 and 100'); + } + buffer.writeUInt16LE(payload.origin_humidity * 10); + encoded = encoded.concat(buffer.toBytes()); + } + //0x5c + if ('insert_temporary_plan' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x5c); + if (payload.insert_temporary_plan.id < 0 || payload.insert_temporary_plan.id > 15) { + throw new Error('insert_temporary_plan.id must be between 0 and 15'); + } + buffer.writeUInt8(payload.insert_temporary_plan.id); + encoded = encoded.concat(buffer.toBytes()); + } + //0x55 + if ('fan_error_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x55); + // 0:clean alarm, 1:trigger alarm + buffer.writeUInt8(payload.fan_error_alarm.mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0x5b + if ('filter_clean_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x5b); + // 0:clean alarm, 1:report alarm + buffer.writeUInt8(payload.filter_clean_alarm.mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0x57 + if ('frost_protection_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x57); + // 0:clean alarm, 1:trigger alarm + buffer.writeUInt8(payload.frost_protection_alarm.mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0x5a + if ('open_window_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x5a); + // 0:clean alarm, 1:report alarm + buffer.writeUInt8(payload.open_window_alarm.mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0x58 + if ('not_wired_alarm' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x58); + // 0:clean alarm, 1:trigger alarm + buffer.writeUInt8(payload.not_wired_alarm.mode); + encoded = encoded.concat(buffer.toBytes()); + } + //0xbe + if ('reboot' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xbe); + encoded = encoded.concat(buffer.toBytes()); + } + //0xb9 + if ('query_device_status' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xb9); + encoded = encoded.concat(buffer.toBytes()); + } + //0xb8 + if ('synchronize_time' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xb8); + encoded = encoded.concat(buffer.toBytes()); + } + //0xb6 + if ('reconnect' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0xb6); + encoded = encoded.concat(buffer.toBytes()); + } + //0x5f + if ('delete_task_plan' in payload) { + var buffer = new Buffer(); + buffer.writeUInt8(0x5f); + if (payload.delete_task_plan.type < 0 || payload.delete_task_plan.type > 255) { + throw new Error('delete_task_plan.type must be between 0 and 255'); + } + // 0:Schedule1, 1:Schedule2, 2:Schedule3, 3:Schedule4, 4:Schedule5, 5:Schedule6, 6:Schedule7, 7:Schedule8, 255:Reset All + buffer.writeUInt8(payload.delete_task_plan.type); + encoded = encoded.concat(buffer.toBytes()); + } + return encoded; } -/** - * Cancel BLE pair - * @param {number} cancel_ble_pair values: (0: no, 1: yes) - * @example { "cancel_ble_pair": 1 } - */ -function cancelBlePair(cancel_ble_pair) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(cancel_ble_pair) === -1) { - throw new Error("cancel_ble_pair must be one of " + yes_no_values.join(", ")); - } - - if (getValue(yes_no_map, cancel_ble_pair) === 0) { - return []; - } - return [0x5e, 0x00]; +function Buffer() { + this.buffer = new Array(); } -/** - * Remove plan - * @param {object} remove_plan - * @param {number} remove_plan.plan_1 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_2 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_3 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_4 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_5 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_6 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_7 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_8 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_9 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_10 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_11 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_12 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_13 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_14 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_15 values: (0: no, 1: yes) - * @param {number} remove_plan.plan_16 values: (0: no, 1: yes) - * @param {number} remove_plan.all values: (0: no, 1: yes) - * @example { "remove_plan": { "plan_1": 1, "plan_2": 0, "plan_3": 1, "plan_4": 0, "plan_5": 1, "plan_6": 0, "plan_7": 1, "plan_8": 0, "plan_9": 1, "plan_10": 0, "plan_11": 1, "plan_12": 0, "plan_13": 1, "plan_14": 0, "plan_15": 1, "plan_16": 0, "reset": 1 } } - * @example { "remove_plan": { "all": 1 } } - */ -function removePlan(remove_plan) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - - var data = []; - var plan_offset = { plan_1: 0, plan_2: 1, plan_3: 2, plan_4: 3, plan_5: 4, plan_6: 5, plan_7: 6, plan_8: 7, plan_9: 8, plan_10: 9, plan_11: 10, plan_12: 11, plan_13: 12, plan_14: 13, plan_15: 14, plan_16: 15, reset: 255 }; - for (var plan in plan_offset) { - if (plan in remove_plan) { - if (yes_no_values.indexOf(remove_plan[plan]) === -1) { - throw new Error("remove_plan." + plan + " must be one of " + yes_no_values.join(", ")); - } - if (getValue(yes_no_map, remove_plan[plan]) === 0) { - continue; - } - data = data.concat([0x5f, plan_offset[plan]]); - } - } +Buffer.prototype._write = function(value, byteLength, isLittleEndian) { + value = Math.round(value); + var offset = 0; + for (var index = 0; index < byteLength; index++) { + offset = isLittleEndian ? index << 3 : (byteLength - 1 - index) << 3; + this.buffer.push((value >> offset) & 0xff); + } +}; - return data; -} +Buffer.prototype.writeUInt8 = function(value) { + this._write(value, 1, true); +}; -/** - * Reconnect - * @param {number} reconnect values: (0: no, 1: yes) - * @example { "reconnect": 1 } - */ -function reconnect(reconnect) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(reconnect) === -1) { - throw new Error("reconnect must be one of " + yes_no_values.join(", ")); - } +Buffer.prototype.writeInt8 = function(value) { + this._write(value < 0 ? value + 0x100 : value, 1, true); +}; - if (getValue(yes_no_map, reconnect) === 0) { - return []; - } - return [0xb6]; -} +Buffer.prototype.writeUInt16LE = function(value) { + this._write(value, 2, true); +}; -/** - * Synchronize time - * @param {number} synchronize_time values: (0: no, 1: yes) - * @example { "synchronize_time": 1 } - */ -function synchronizeTime(synchronize_time) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(synchronize_time) === -1) { - throw new Error("synchronize_time must be one of " + yes_no_values.join(", ")); - } +Buffer.prototype.writeInt16LE = function(value) { + this._write(value < 0 ? value + 0x10000 : value, 2, true); +}; - if (getValue(yes_no_map, synchronize_time) === 0) { - return []; - } - return [0xb8]; -} +Buffer.prototype.writeUInt24LE = function(value) { + this._write(value, 3, true); +}; -/** - * Query device status - * @param {number} query_device_status values: (0: no, 1: yes) - * @example { "query_device_status": 1 } - */ -function queryDeviceStatus(query_device_status) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(query_device_status) === -1) { - throw new Error("query_device_status must be one of " + yes_no_values.join(", ")); - } +Buffer.prototype.writeInt24LE = function(value) { + this._write(value < 0 ? value + 0x1000000 : value, 3, true); +}; - if (getValue(yes_no_map, query_device_status) === 0) { - return []; - } - return [0xb9]; -} +Buffer.prototype.writeUInt32LE = function(value) { + this._write(value, 4, true); +}; -/** - * Reboot - * @param {number} reboot values: (0: no, 1: yes) - * @example { "reboot": 1 } - */ -function reboot(reboot) { - var yes_no_map = { 0: "no", 1: "yes" }; - var yes_no_values = getValues(yes_no_map); - if (yes_no_values.indexOf(reboot) === -1) { - throw new Error("reboot must be one of " + yes_no_values.join(", ")); - } +Buffer.prototype.writeInt32LE = function(value) { + this._write(value < 0 ? value + 0x100000000 : value, 4, true); +}; - if (getValue(yes_no_map, reboot) === 0) { - return []; - } - return [0xbe]; -} +Buffer.prototype.writeFloatLE = function(value) { + var sign = (value < 0 || (value === 0 && 1 / value === -Infinity)) ? 1 : 0; + var absValue = Math.abs(value); + + if (absValue === 0) { + this._write(sign ? 0x80000000 : 0, 4, true); + return; + } else if (value !== value) { + this._write(0x7fc00000, 4, true); + return; + } else if (absValue === Infinity) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } -function setQueryCmd(bytes) { - var name_map = { - "56": { level: 1, name: "combine_command" }, - "60": { level: 1, name: "collection_interval" }, - "61": { level: 1, name: "reporting_interval" }, - "62": { level: 1, name: "intelligent_display_enable" }, - "63": { level: 1, name: "temperature_unit" }, - "64": { level: 1, name: "temperature_control_mode_support" }, - "65": { level: 1, name: "target_temperature_mode" }, - "66": { level: 1, name: "target_temperature_resolution" }, - "67": { level: 1, name: "system_status" }, - "68": { level: 2, name: "temperature_control_mode" }, - "69": { level: 2, name: "target_temperature_settings" }, - "6a": { level: 1, name: "dead_band" }, - "6b": { level: 2, name: "target_temperature_range" }, - "71": { level: 2, name: "button_custom_function" }, - "72": { level: 1, name: "child_lock_settings" }, - "74": { level: 1, name: "fan_mode" }, - "75": { level: 1, name: "screen_display_settings" }, - "76": { level: 1, name: "temperature_calibration_settings" }, - "77": { level: 1, name: "humidity_calibration_settings" }, - "7d": { level: 1, name: "data_sync_to_peer" }, - "7e": { level: 1, name: "data_sync_timeout" }, - "80": { level: 1, name: "unlock_combination_button_settings" }, - "81": { level: 1, name: "temporary_unlock_settings" }, - "82": { level: 2, name: "pir_config" }, - "85": { level: 1, name: "ble_enable" }, - "86": { level: 1, name: "external_temperature" }, - "87": { level: 1, name: "external_humidity" }, - "88": { level: 1, name: "fan_support_mode" }, - "8b": { level: 1, name: "ble_name" }, - "8c": { level: 1, name: "ble_pair_info" }, - "8d": { level: 1, name: "communication_mode" }, - "c6": { level: 1, name: "daylight_saving_time" }, - "c7": { level: 1, name: "time_zone" }, - }; - - var cmd = readHexString(bytes.slice(0, 1)); - var cmd_level = name_map[cmd].level; - - if (cmd_level != 0) { - var buffer = new Buffer(2 + cmd_level); - buffer.writeUInt8(0xef); - buffer.writeUInt8(cmd_level); - buffer.writeBytes(bytes.slice(0, cmd_level)); - return buffer.toBytes(); - } - return []; -} + var exponent = Math.floor(Math.log(absValue) / Math.LN2); + var normalized = absValue / Math.pow(2, exponent); + if (normalized < 1) { + exponent -= 1; + normalized *= 2; + } else if (normalized >= 2) { + exponent += 1; + normalized /= 2; + } -function getValues(map) { - var values = []; - for (var key in map) { - values.push(RAW_VALUE ? parseInt(key) : map[key]); - } - return values; -} + var biasedExponent = exponent + 127; + var mantissaBits = 0; + if (biasedExponent <= 0) { + biasedExponent = 0; + mantissaBits = Math.round(absValue / Math.pow(2, -149)); + if (mantissaBits > 0x7fffff) { + mantissaBits = 0x7fffff; + } + } else { + mantissaBits = Math.round((normalized - 1) * 0x800000); + if (mantissaBits === 0x800000) { + biasedExponent += 1; + mantissaBits = 0; + } + if (biasedExponent >= 0xff) { + this._write((((sign << 31) >>> 0) | 0x7f800000) >>> 0, 4, true); + return; + } + } -function getValue(map, value) { - if (RAW_VALUE) return value; - for (var key in map) { - if (map[key] === value) { - return parseInt(key); - } - } - throw new Error("not match in " + JSON.stringify(map)); -} + var floatBits = ((((sign << 31) >>> 0) | ((biasedExponent & 0xff) << 23) | (mantissaBits & 0x7fffff)) >>> 0); + this._write(floatBits, 4, true); +}; -function Buffer(size) { - this.buffer = new Array(size); - this.offset = 0; +Buffer.prototype.writeBytes = function(bytes, length, mustEqual) { + if (mustEqual === undefined) mustEqual = false; + if (length < bytes.length) { + throw new Error('bytes length is greater than length'); + } + if (mustEqual && bytes.length != length) { + throw new Error('bytes length is not equal to length'); + } - for (var i = 0; i < size; i++) { - this.buffer[i] = 0; - } -} + for (var i = 0; i < bytes.length; i++) { + this.buffer.push(bytes[i]); + } -Buffer.prototype._write = function (value, byteLength, isLittleEndian) { - value = Math.round(value); - var offset = 0; - for (var index = 0; index < byteLength; index++) { - offset = isLittleEndian ? index << 3 : (byteLength - 1 - index) << 3; - this.buffer[this.offset + index] = (value >> offset) & 0xff; - } + if (length > bytes.length) { + for (var i = bytes.length; i < length; i++) { + this.buffer.push(0); + } + } }; -Buffer.prototype.writeUInt8 = function (value) { - this._write(value, 1, true); - this.offset += 1; +Buffer.prototype.writeHexString = function(hexString, length, mustEqual) { + if (mustEqual === undefined) mustEqual = false; + var bytes = []; + for (var i = 0; i < hexString.length; i += 2) { + bytes.push(parseInt(hexString.substr(i, 2), 16)); + } + if (mustEqual && bytes.length != length) { + throw new Error('hex string length is not equal to length'); + } + this.writeBytes(bytes, length); }; -Buffer.prototype.writeInt8 = function (value) { - this._write(value < 0 ? value + 0x100 : value, 1, true); - this.offset += 1; +Buffer.prototype.writeString = function(str, length, mustEqual) { + if (mustEqual === undefined) mustEqual = false; + var bytes = encodeUtf8(str); + if (mustEqual && bytes.length != length) { + throw new Error('string length is not equal to length'); + } + this.writeBytes(bytes, length); }; -Buffer.prototype.writeUInt16LE = function (value) { - this._write(value, 2, true); - this.offset += 2; +Buffer.prototype.writeUnknownDataType = function(val) { + throw new Error('Unknown data type encountered. Please Contact Developer.'); }; -Buffer.prototype.writeInt16LE = function (value) { - this._write(value < 0 ? value + 0x10000 : value, 2, true); - this.offset += 2; +Buffer.prototype.writeHexStringReverse = function(hexString, length, mustEqual) { + if (mustEqual === undefined) mustEqual = false; + var bytes = []; + for (var i = hexString.length - 2; i >= 0; i -= 2) { + bytes.push(parseInt(hexString.substr(i, 2), 16)); + } + if (mustEqual && bytes.length != length) { + throw new Error('hex string length is not equal to length'); + } + this.writeBytes(bytes, length); }; -Buffer.prototype.writeUInt32LE = function (value) { - this._write(value, 4, true); - this.offset += 4; +Buffer.prototype.toBytes = function() { + return this.buffer; }; -Buffer.prototype.writeInt32LE = function (value) { - this._write(value < 0 ? value + 0x100000000 : value, 4, true); - this.offset += 4; -}; +function encodeUtf8(str) { + var byteArray = []; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + if (charCode < 0x80) { + byteArray.push(charCode); + } else if (charCode < 0x800) { + byteArray.push(0xc0 | (charCode >> 6)); + byteArray.push(0x80 | (charCode & 0x3f)); + } else if (charCode < 0x10000) { + byteArray.push(0xe0 | (charCode >> 12)); + byteArray.push(0x80 | ((charCode >> 6) & 0x3f)); + byteArray.push(0x80 | (charCode & 0x3f)); + } else if (charCode < 0x200000) { + byteArray.push(0xf0 | (charCode >> 18)); + byteArray.push(0x80 | ((charCode >> 12) & 0x3f)); + byteArray.push(0x80 | ((charCode >> 6) & 0x3f)); + byteArray.push(0x80 | (charCode & 0x3f)); + } + } + return byteArray; +} -Buffer.prototype.writeBytes = function (bytes) { - for (var i = 0; i < bytes.length; i++) { - this.buffer[this.offset + i] = bytes[i]; - } - this.offset += bytes.length; -}; +function isValid(value) { + return value !== undefined && value !== null && value !== ''; +} -Buffer.prototype.writeHexString = function (hexString) { - var bytes = []; - for (var i = 0; i < hexString.length; i += 2) { - bytes.push(parseInt(hexString.substr(i, 2), 16)); - } - this.writeBytes(bytes); -}; +function hasPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + if (!current || !(parts[i] in current)) { + return false; + } + current = current[parts[i]]; + } + + return true; +} + +function getPath(obj, path) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length; i++) { + var key = parts[i]; + + if (!current || !(key in current)) { + return null; + } + + current = current[key]; + } + + return current; +} + + +function setPath(obj, path, value) { + var parts = path.split('.'); + var current = obj; + + for (var i = 0; i < parts.length - 1; i++) { + var key = parts[i]; + + if (!(key in current) || typeof current[key] !== 'object') { + current[key] = {}; + } + + current = current[key]; + } -Buffer.prototype.writeHexStringReverse = function (hexString) { - var bytes = []; - for (var i = hexString.length - 2; i >= 0; i -= 2) { - bytes.push(parseInt(hexString.substr(i, 2), 16)); - } - this.writeBytes(bytes); -}; + current[parts[parts.length - 1]] = value; + return obj; +} -Buffer.prototype.toBytes = function () { - return this.buffer; -}; +function convertName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = prefix + '_' + lastPart; + return parts.join('.'); +} -function encodeUtf8(str) { - var byteArray = []; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i); - if (charCode < 0x80) { - byteArray.push(charCode); - } else if (charCode < 0x800) { - byteArray.push(0xc0 | (charCode >> 6)); - byteArray.push(0x80 | (charCode & 0x3f)); - } else if (charCode < 0x10000) { - byteArray.push(0xe0 | (charCode >> 12)); - byteArray.push(0x80 | ((charCode >> 6) & 0x3f)); - byteArray.push(0x80 | (charCode & 0x3f)); - } else if (charCode < 0x200000) { - byteArray.push(0xf0 | (charCode >> 18)); - byteArray.push(0x80 | ((charCode >> 12) & 0x3f)); - byteArray.push(0x80 | ((charCode >> 6) & 0x3f)); - byteArray.push(0x80 | (charCode & 0x3f)); - } - } - return byteArray; +function recoverName(propertyId, prefix) { + var parts = propertyId.split('.'); + var lastPart = parts[parts.length - 1]; + parts[parts.length - 1] = lastPart.replace(prefix + '_', ''); + return parts.join('.'); } -function readHexString(bytes) { - var temp = []; - for (var idx = 0; idx < bytes.length; idx++) { - temp.push(("0" + (bytes[idx] & 0xff).toString(16)).slice(-2)); +function getAllLeafPaths(obj, prefix) { + var paths = []; + + function recurse(current, path) { + if (Array.isArray(current)) { + current.forEach(function (item, index) { + var newPath = path ? (path + "." + index) : String(index); + recurse(item, newPath); + }); + + } else if (typeof current === 'object' && current !== null) { + for (var key in current) { + if (Object.prototype.hasOwnProperty.call(current, key)) { + var newPath = path ? (path + "." + key) : key; + recurse(current[key], newPath); + } + } + + } else { + paths.push(path); + } + } + + recurse(obj, ""); + return paths; +} + +function isInteger(str) { + return typeof str === 'string' && /^[0-9]+$/.test(str); +} + +function cmdMap() { + return { + "request_check_sequence_number": "ff", + "request_check_order": "fe", + "request_command_queries": "ef", + "request_query_all_configurations": "ee", + "lorawan_configuration_settings": "cf", + "lorawan_configuration_settings.mode": "cf00", + "tsl_version": "df", + "product_name": "de", + "product_pn": "dd", + "product_sn": "db", + "version": "da", + "oem_id": "d9", + "product_frequency_band": "d8", + "ble_phone_name": "d5", + "battery": "00", + "temperature": "01", + "humidity": "02", + "pir_status": "08", + "temperature_mode": "03", + "target_temperature1": "06", + "target_temperature2": "07", + "fan_mode": "04", + "execution_plan_id": "05", + "temperature_alarm": "0b", + "humidity_alarm": "0c", + "ble_event": "09", + "power_bus_event": "0a", + "key_event": "0d", + "key_event.f1": "0d00", + "key_event.f2": "0d01", + "key_event.f3": "0d02", + "battery_event": "0f", + "collection_interval": "60", + "collection_interval.seconds_of_time": "6000", + "collection_interval.minutes_of_time": "6001", + "communication_mode": "8d", + "reporting_interval": "61", + "reporting_interval.ble": "6100", + "reporting_interval.ble.seconds_of_time": "610000", + "reporting_interval.ble.minutes_of_time": "610001", + "reporting_interval.lora": "6101", + "reporting_interval.lora.seconds_of_time": "610100", + "reporting_interval.lora.minutes_of_time": "610101", + "reporting_interval.ble_lora": "6102", + "reporting_interval.ble_lora.seconds_of_time": "610200", + "reporting_interval.ble_lora.minutes_of_time": "610201", + "reporting_interval.power_lora": "6103", + "reporting_interval.power_lora.seconds_of_time": "610300", + "reporting_interval.power_lora.minutes_of_time": "610301", + "communicate_interval": "6c", + "communicate_interval.ble": "6c00", + "communicate_interval.ble.seconds_of_time": "6c0000", + "communicate_interval.ble.minutes_of_time": "6c0001", + "communicate_interval.lora": "6c01", + "communicate_interval.lora.seconds_of_time": "6c0100", + "communicate_interval.lora.minutes_of_time": "6c0101", + "communicate_interval.ble_lora": "6c02", + "communicate_interval.ble_lora.seconds_of_time": "6c0200", + "communicate_interval.ble_lora.minutes_of_time": "6c0201", + "communicate_interval.power_bus": "6c03", + "communicate_interval.power_bus.seconds_of_time": "6c0300", + "communicate_interval.power_bus.minutes_of_time": "6c0301", + "device_status": "c8", + "temperature_unit": "63", + "data_sync_to_peer": "7d", + "data_sync_timeout": "7e", + "ble_enable": "85", + "ble_name": "8b", + "system_status": "67", + "mode_enable": "64", + "fan_enable": "88", + "temperature_control_mode": "68", + "temperature_control_mode.mode": "6800", + "temperature_control_mode.plan_mode_enable": "6801", + "target_temperature_mode": "65", + "target_temperature_resolution": "66", + "target_temperature_settings": "69", + "target_temperature_settings.heat": "6900", + "target_temperature_settings.em_heat": "6901", + "target_temperature_settings.cool": "6902", + "target_temperature_settings.auto": "6903", + "target_temperature_settings.auto_heat": "6904", + "target_temperature_settings.auto_cool": "6905", + "minimum_dead_zone": "6a", + "target_temperature_range": "6b", + "target_temperature_range.heat": "6b00", + "target_temperature_range.em_heat": "6b01", + "target_temperature_range.cool": "6b02", + "target_temperature_range.auto": "6b03", + "fan_control_mode": "74", + "pir_common": "82", + "pir_common.enable": "8201", + "pir_common.release_time": "8202", + "pir_common.mode": "8203", + "pir_common.check": "8204", + "pir_energy": "83", + "pir_energy.enable": "8301", + "pir_energy.plan": "8302", + "pir_night": "84", + "pir_night.enable": "8401", + "pir_night.night_time": "8404", + "pir_night.occupied": "8405", + "pir_night.mode": "8402", + "pir_night.check": "8403", + "screen_display_settings": "75", + "button_custom_function": "71", + "button_custom_function.enable": "7100", + "button_custom_function.mode1": "7101", + "button_custom_function.mode2": "7102", + "button_custom_function.mode3": "7103", + "children_lock_settings": "72", + "unlock_button": "81", + "unlock_combination_button_settings": "80", + "intelligent_display_enable": "62", + "time_zone": "c7", + "daylight_saving_time": "c6", + "temperature_calibration_settings": "76", + "humidity_calibration_settings": "77", + "schedule_settings": "7b", + "schedule_settings._item": "7bxx", + "schedule_settings._item.enable": "7bxx00", + "schedule_settings._item.name_first": "7bxx01", + "schedule_settings._item.name_last": "7bxx02", + "schedule_settings._item.content1": "7bxx03", + "schedule_settings._item.content2": "7bxx04", + "system_status_control": "59", + "origin_temperature": "86", + "origin_humidity": "87", + "insert_temporary_plan": "5c", + "fan_error_alarm": "55", + "filter_clean_alarm": "5b", + "frost_protection_alarm": "57", + "open_window_alarm": "5a", + "not_wired_alarm": "58", + "reboot": "be", + "query_device_status": "b9", + "synchronize_time": "b8", + "reconnect": "b6", + "delete_task_plan": "5f" + }; +} +function processTemperature(payload) { + var allTemperatureProperties = { + "temperature": { + "coefficient": 0.01 + }, + "target_temperature1": { + "coefficient": 0.01 + }, + "target_temperature2": { + "coefficient": 0.01 + }, + "target_temperature_settings.heat": { + "coefficient": 0.01 + }, + "target_temperature_settings.em_heat": { + "coefficient": 0.01 + }, + "target_temperature_settings.cool": { + "coefficient": 0.01 + }, + "target_temperature_settings.auto": { + "coefficient": 0.01 + }, + "target_temperature_settings.auto_heat": { + "coefficient": 0.01 + }, + "target_temperature_settings.auto_cool": { + "coefficient": 0.01 + }, + "minimum_dead_zone": { + "coefficient": 0.01 + }, + "target_temperature_range.heat.min": { + "coefficient": 0.01 + }, + "target_temperature_range.heat.max": { + "coefficient": 0.01 + }, + "target_temperature_range.em_heat.min": { + "coefficient": 0.01 + }, + "target_temperature_range.em_heat.max": { + "coefficient": 0.01 + }, + "target_temperature_range.cool.min": { + "coefficient": 0.01 + }, + "target_temperature_range.cool.max": { + "coefficient": 0.01 + }, + "target_temperature_range.auto.min": { + "coefficient": 0.01 + }, + "target_temperature_range.auto.max": { + "coefficient": 0.01 + }, + "temperature_calibration_settings.calibration_value": { + "coefficient": 0.01 + }, + "schedule_settings._item.content1.heat_target_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content1.em_heat_target_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content1.cool_target_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content2.auto_target_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content2.auto_heat_target_temperature": { + "coefficient": 0.01 + }, + "schedule_settings._item.content2.auto_cool_target_temperature": { + "coefficient": 0.01 + }, + "origin_temperature": { + "coefficient": 0.01 } - return temp.join(""); +}; + var leafPaths = getAllLeafPaths(payload); + for (var i = 0; i < leafPaths.length; i++) { + var propertyId = leafPaths[i]; + var propertyParts = propertyId.split('.'); + var newPropertyParts = [] + for (var j = 0; j < propertyParts.length; j++) { + var part = propertyParts[j]; + if (isInteger(part)) { + newPropertyParts.push('_item'); + } else { + newPropertyParts.push(part); + } + } + var newPropertyId = newPropertyParts.join('.'); + newPropertyId = recoverName(newPropertyId, 'fahrenheit'); + newPropertyId = recoverName(newPropertyId, 'celsius'); + propertyId = recoverName(propertyId, 'fahrenheit'); + propertyId = recoverName(propertyId, 'celsius'); + if (allTemperatureProperties[newPropertyId]) { + var fahrenheitProperty = convertName(propertyId, 'fahrenheit'); + var celsiusProperty = convertName(propertyId, 'celsius'); + var stringCoefficient = String(allTemperatureProperties[newPropertyId].coefficient); + var dotIndex = stringCoefficient.indexOf('.'); + var precision = dotIndex != -1 ? stringCoefficient.length - dotIndex - 1 : 0; + if (!hasPath(payload, propertyId)) { + if (hasPath(payload, fahrenheitProperty) && hasPath(payload, celsiusProperty)) { + throw new Error(fahrenheitProperty + ' and ' + celsiusProperty + ' cannot be in payload at the same time'); + } + if (hasPath(payload, fahrenheitProperty)) { + setPath(payload, propertyId, Number(((getPath(payload, fahrenheitProperty) - 32) / 1.8).toFixed(precision))); + } else if (hasPath(payload, celsiusProperty)) { + setPath(payload, propertyId, Number(getPath(payload, celsiusProperty).toFixed(precision))); + } + } + } + } + return payload; } \ No newline at end of file diff --git a/version.json b/version.json index ede36b1..1acdd08 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { - "date": "2026-03-30", - "version": "1.5.32", + "date": "2026-03-31", + "version": "1.5.33", "vendors": "vendors.json", "link": "https://github.com/Milesight-IoT/codec/archive/refs/heads/release.zip" }