wyzeapy.payload_factory API documentation

# wyzeapy.payload_factory

View Source

      1#  Copyright (c) 2021. Mulliken, LLC - All Rights Reserved
      2#  You may use, distribute and modify this code under the terms
      3#  of the attached license. You should have received a copy of
      4#  the license with this file. If not, please write to:
      5#  katie@mulliken.net to receive a copy
      6import time
      7from typing import Any, Dict
      8
      9from .const import FORD_APP_KEY
     10from .crypto import ford_create_signature
     11
     12
     13def ford_create_payload(access_token: str, payload: Dict[str, Any],
     14                        url_path: str, request_method: str) -> Dict[str, Any]:
     15    payload["access_token"] = access_token
     16    payload["key"] = FORD_APP_KEY
     17    payload["timestamp"] = str(int(time.time() * 1000))
     18    payload["sign"] = ford_create_signature(url_path, request_method, payload)
     19    return payload
     20
     21
     22def olive_create_get_payload(device_mac: str, keys: str) -> Dict[str, Any]:
     23    nonce = int(time.time() * 1000)
     24
     25    return {
     26        'keys': keys,
     27        'did': device_mac,
     28        'nonce': nonce
     29    }
     30
     31
     32def olive_create_post_payload(device_mac: str, device_model: str, prop_key: str, value: Any) -> Dict[str, Any]:
     33    nonce = int(time.time() * 1000)
     34
     35    return {
     36        "did": device_mac,
     37        "model": device_model,
     38        "props": {
     39            prop_key: value
     40        },
     41        "is_sub_device": 0,
     42        "nonce": str(nonce)
     43    }
     44
     45
     46def olive_create_hms_payload() -> Dict[str, str]:
     47    nonce = int(time.time() * 1000)
     48
     49    return {
     50        "group_id": "hms",
     51        "nonce": str(nonce)
     52    }
     53
     54
     55def olive_create_user_info_payload() -> Dict[str, str]:
     56    nonce = int(time.time() * 1000)
     57
     58    return {
     59        "nonce": str(nonce)
     60    }
     61
     62
     63def olive_create_hms_get_payload(hms_id: str) -> Dict[str, str]:
     64    nonce = int(time.time() * 1000)
     65    return {
     66        "hms_id": hms_id,
     67        "nonce": str(nonce)
     68    }
     69
     70
     71def olive_create_hms_patch_payload(hms_id: str) -> Dict[str, Any]:
     72    return {
     73        "hms_id": hms_id
     74    }
     75
     76
     77def devicemgmt_create_capabilities_payload(type: str, value: str):
     78    match type:
     79        case "floodlight":
     80            return {
     81                "iid": 4,
     82                "name": "floodlight",
     83                "properties": [
     84                    {
     85                        "prop": "on",
     86                        "value": value
     87                    }
     88                ]
     89            }
     90        case "spotlight":
     91            return {
     92                "iid": 5,
     93                "name": "spotlight",
     94                "properties": [
     95                    {
     96                        "prop": "on",
     97                        "value": value
     98                    }
     99                ]
    100            }
    101        case "power":
    102            return {
    103                "functions": [
    104                    {
    105                        "in": {
    106                            "wakeup-live-view": "1"
    107                        },
    108                        "name": value
    109                    }
    110                ],
    111                "iid": 1,
    112                "name": "iot-device"
    113            }
    114        case "siren":
    115            return {
    116                "functions": [
    117                    {
    118                        "in": {},
    119                        "name": value
    120                    }
    121                ],
    122                "name": "siren"
    123            }
    124        case _:
    125            raise NotImplementedError(f"No action of type ({type}) has been implemented.")
    126
    127
    128def devicemgmt_get_iot_props_list(model: str):
    129    match model:
    130        case "LD_CFP": # Floodlight Pro
    131            return [
    132                {
    133                    "iid": 2,
    134                    "name": "camera",
    135                    "properties": [
    136                        "motion-detect",
    137                        "resolution",
    138                        "bit-rate",
    139                        "live-stream-mode",
    140                        "recording-mode",
    141                        "frame-rate",
    142                        "night-shot",
    143                        "night-shot-state",
    144                        "rotate-angle",
    145                        "time-watermark",
    146                        "logo-watermark",
    147                        "recording-trigger-source",
    148                        "recording-content-type",
    149                        "motion-push",
    150                        "speaker",
    151                        "microphone",
    152                        "unusual-sound-push",
    153                        "flip",
    154                        "motion-detect-recording",
    155                        "cool-down-interval",
    156                        "infrared-mode",
    157                        "sound-collection-on",
    158                        "live-stream-protocol",
    159                        "ai-push",
    160                        "voice-template",
    161                        "motion-category"
    162                    ]
    163                },
    164                {
    165                    "iid": 3,
    166                    "name": "device-info",
    167                    "properties": [
    168                        "device-id",
    169                        "device-model",
    170                        "firmware-ver",
    171                        "mac",
    172                        "timezone",
    173                        "lat",
    174                        "ip",
    175                        "lon",
    176                        "hardware-ver",
    177                        "public-ip"
    178                    ]
    179                },
    180                {
    181                    "iid": 1,
    182                    "name": "iot-device",
    183                    "properties": [
    184                        "iot-state",
    185                        "iot-power",
    186                        "push-switch"
    187                    ]
    188                },
    189                {
    190                    "iid": 9,
    191                    "name": "camera-ai",
    192                    "properties": [
    193                        "smart-detection-type",
    194                        "on"
    195                    ]
    196                },
    197                {
    198                    "iid": 4,
    199                    "name": "floodlight",
    200                    "properties": [
    201                        "on",
    202                        "enabled",
    203                        "mode",
    204                        "trigger-source",
    205                        "brightness",
    206                        "light-on-duration",
    207                        "voice-template",
    208                        "motion-warning-switch",
    209                        "motion-activate-light-switch",
    210                        "motion-activate-light-schedule",
    211                        "motion-activate-brightness",
    212                        "ambient-light-switch",
    213                        "ambient-light-schedule",
    214                        "ambient-light-brightness",
    215                        "motion-tag",
    216                        "light-model",
    217                        "flash-with-siren"
    218                    ]
    219                },
    220                {
    221                    "iid": 11,
    222                    "name": "indicator-light",
    223                    "properties": [
    224                        "on",
    225                        "mode",
    226                        "brightness",
    227                        "color",
    228                        "color-temperature"
    229                    ]
    230                },
    231                {
    232                    "iid": 8,
    233                    "name": "memory-card-management",
    234                    "properties": [
    235                        "storage-used-space",
    236                        "storage-total-space",
    237                        "storage-status",
    238                        "sd-card-playback-enabled"
    239                    ]
    240                },
    241                {
    242                    "iid": 6,
    243                    "name": "motion-detection",
    244                    "properties": [
    245                        "sensitivity-motion",
    246                        "on",
    247                        "motion-zone",
    248                        "motion-zone-selected-block",
    249                        "motion-zone-block-size",
    250                        "motion-tag",
    251                        "edge-detection-type",
    252                        "motion-warning-switch",
    253                        "motion-warning-tone",
    254                        "motion-warning-interval",
    255                        "motion-warning-schedule",
    256                        "motion-warning-sound",
    257                        "motion-warning-trigger-setting"
    258                    ]
    259                },
    260                {
    261                    "iid": 7,
    262                    "name": "siren",
    263                    "properties": [
    264                        "state"
    265                    ]
    266                },
    267                {
    268                    "iid": 5,
    269                    "name": "wifi",
    270                    "properties": [
    271                        "on",
    272                        "signal-strength",
    273                        "wifi-ssid",
    274                        "wifi-encrypted-password"
    275                    ]
    276                }
    277            ]
    278        case "AN_RSCW": # Battery Cam pro
    279            return [
    280                {
    281                    "iid": 2,
    282                    "name": "camera",
    283                    "properties": [
    284                        "motion-detect",
    285                        "resolution",
    286                        "bit-rate",
    287                        "live-stream-mode",
    288                        "recording-mode",
    289                        "frame-rate",
    290                        "night-shot",
    291                        "night-shot-state",
    292                        "time-watermark",
    293                        "logo-watermark",
    294                        "cool-down-interval",
    295                        "recording-content-type",
    296                        "video-length-limit",
    297                        "motion-push",
    298                        "speaker",
    299                        "unusual-sound-push",
    300                        "microphone",
    301                        "infrared-mode",
    302                        "motion-detect-recording",
    303                        "live-stream-protocol",
    304                        "recording-resolution",
    305                        "recording-start-time",
    306                        "recording-schedule-duration",
    307                        "voice-template",
    308                        "rotate-angle",
    309                        "sound-collection-on",
    310                        "ai-push"
    311                    ]
    312                },
    313                {
    314                    "iid": 3,
    315                    "name": "device-info",
    316                    "properties": [
    317                        "device-id",
    318                        "device-model",
    319                        "firmware-ver",
    320                        "mac",
    321                        "timezone",
    322                        "lat",
    323                        "ip",
    324                        "lon",
    325                        "company-code",
    326                        "device-setting-channel",
    327                        "network-connection-mode",
    328                        "hardware-ver",
    329                        "public-ip"
    330                    ]
    331                },
    332                {
    333                    "iid": 1,
    334                    "name": "iot-device",
    335                    "properties": [
    336                        "iot-state",
    337                        "iot-power",
    338                        "push-switch",
    339                        "mqtt-check"
    340                    ]
    341                },
    342                {
    343                    "iid": 7,
    344                    "name": "battery",
    345                    "properties": [
    346                        "battery-level",
    347                        "low-battery-push",
    348                        "power-source",
    349                        "charging-status",
    350                        "power-saving"
    351                    ]
    352                },
    353                {
    354                    "iid": 12,
    355                    "name": "camera-ai",
    356                    "properties": [
    357                        "smart-detection-type",
    358                        "on"
    359                    ]
    360                },
    361                {
    362                    "iid": 8,
    363                    "name": "indicator-light",
    364                    "properties": [
    365                        "on",
    366                        "mode"
    367                    ]
    368                },
    369                {
    370                    "iid": 6,
    371                    "name": "memory-card-management",
    372                    "properties": [
    373                        "storage-used-space",
    374                        "storage-total-space",
    375                        "storage-status",
    376                        "sd-card-playback-enabled"
    377                    ]
    378                },
    379                {
    380                    "iid": 11,
    381                    "name": "motion-detection",
    382                    "properties": [
    383                        "sensitivity-motion",
    384                        "on",
    385                        "area-length",
    386                        "motion-zone",
    387                        "motion-zone-block-size",
    388                        "motion-zone-selected-block",
    389                        "edge-detection-type",
    390                        "motion-tag"
    391                    ]
    392                },
    393                {
    394                    "iid": 4,
    395                    "name": "siren",
    396                    "properties": [
    397                        "state",
    398                        "siren-on-ts"
    399                    ]
    400                },
    401                {
    402                    "iid": 14,
    403                    "name": "solar-panel",
    404                    "properties": [
    405                        "enabled",
    406                        "on"
    407                    ]
    408                },
    409                {
    410                    "iid": 5,
    411                    "name": "spotlight",
    412                    "properties": [
    413                        "on",
    414                        "enabled",
    415                        "brightness",
    416                        "motion-activate-light-switch",
    417                        "sunset-to-sunrise",
    418                        "motion-activate-light-schedule",
    419                        "trigger-source"
    420                    ]
    421                },
    422                {
    423                    "iid": 9,
    424                    "name": "wifi",
    425                    "properties": [
    426                        "on",
    427                        "signal-strength",
    428                        "wifi-ssid",
    429                        "wifi-encrypted-password"
    430                    ]
    431                }
    432            ]
    433        case "GW_GC1": # OG
    434            return [
    435                {
    436                    "iid": 2,
    437                    "name": "camera",
    438                    "properties": [
    439                        "motion-detect",
    440                        "resolution",
    441                        "bit-rate",
    442                        "live-stream-mode",
    443                        "recording-mode",
    444                        "frame-rate",
    445                        "night-shot",
    446                        "night-shot-state",
    447                        "time-watermark",
    448                        "logo-watermark",
    449                        "cool-down-interval",
    450                        "recording-content-type",
    451                        "video-length-limit",
    452                        "motion-push",
    453                        "speaker",
    454                        "unusual-sound-push",
    455                        "microphone",
    456                        "infrared-mode",
    457                        "motion-detect-recording",
    458                        "live-stream-protocol",
    459                        "recording-resolution",
    460                        "recording-start-time",
    461                        "recording-schedule-duration",
    462                        "voice-template",
    463                        "rotate-angle",
    464                        "sound-collection-on",
    465                        "ai-push"
    466                    ]
    467                },
    468                {
    469                    "iid": 3,
    470                    "name": "device-info",
    471                    "properties": [
    472                        "device-id",
    473                        "device-model",
    474                        "firmware-ver",
    475                        "mac",
    476                        "timezone",
    477                        "lat",
    478                        "ip",
    479                        "lon",
    480                        "company-code",
    481                        "device-setting-channel",
    482                        "network-connection-mode",
    483                        "hardware-ver",
    484                        "public-ip"
    485                    ]
    486                },
    487                {
    488                    "iid": 1,
    489                    "name": "iot-device",
    490                    "properties": [
    491                        "iot-state",
    492                        "iot-power",
    493                        "push-switch",
    494                        "mqtt-check"
    495                    ]
    496                },
    497                {
    498                    "iid": 12,
    499                    "name": "camera-ai",
    500                    "properties": [
    501                        "smart-detection-type",
    502                        "on"
    503                    ]
    504                },
    505                {
    506                    "iid": 8,
    507                    "name": "indicator-light",
    508                    "properties": [
    509                        "on",
    510                        "mode"
    511                    ]
    512                },
    513                {
    514                    "iid": 6,
    515                    "name": "memory-card-management",
    516                    "properties": [
    517                        "storage-used-space",
    518                        "storage-total-space",
    519                        "storage-status",
    520                        "sd-card-playback-enabled"
    521                    ]
    522                },
    523                {
    524                    "iid": 11,
    525                    "name": "motion-detection",
    526                    "properties": [
    527                        "sensitivity-motion",
    528                        "on",
    529                        "area-length",
    530                        "motion-zone",
    531                        "motion-zone-block-size",
    532                        "motion-zone-selected-block",
    533                        "edge-detection-type",
    534                        "motion-tag"
    535                    ]
    536                },
    537                {
    538                    "iid": 4,
    539                    "name": "siren",
    540                    "properties": [
    541                        "state",
    542                        "siren-on-ts"
    543                    ]
    544                },
    545                {
    546                    "iid": 5,
    547                    "name": "spotlight",
    548                    "properties": [
    549                        "on",
    550                        "enabled",
    551                        "brightness",
    552                        "motion-activate-light-switch",
    553                        "sunset-to-sunrise",
    554                        "motion-activate-light-schedule",
    555                        "trigger-source"
    556                    ]
    557                },
    558                {
    559                    "iid": 9,
    560                    "name": "wifi",
    561                    "properties": [
    562                        "on",
    563                        "signal-strength",
    564                        "wifi-ssid",
    565                        "wifi-encrypted-password"
    566                    ]
    567                }
    568            ]
    569        case _:
    570            raise NotImplementedError(f"No iot props for model ({model}) have been defined.")

def ford_create_payload( access_token: str, payload: Dict[str, Any], url_path: str, request_method: str) -> Dict[str, Any]: View Source

    14def ford_create_payload(access_token: str, payload: Dict[str, Any],
    15                        url_path: str, request_method: str) -> Dict[str, Any]:
    16    payload["access_token"] = access_token
    17    payload["key"] = FORD_APP_KEY
    18    payload["timestamp"] = str(int(time.time() * 1000))
    19    payload["sign"] = ford_create_signature(url_path, request_method, payload)
    20    return payload

def olive_create_get_payload(device_mac: str, keys: str) -> Dict[str, Any]: View Source

    23def olive_create_get_payload(device_mac: str, keys: str) -> Dict[str, Any]:
    24    nonce = int(time.time() * 1000)
    25
    26    return {
    27        'keys': keys,
    28        'did': device_mac,
    29        'nonce': nonce
    30    }

def olive_create_post_payload( device_mac: str, device_model: str, prop_key: str, value: Any) -> Dict[str, Any]: View Source

    33def olive_create_post_payload(device_mac: str, device_model: str, prop_key: str, value: Any) -> Dict[str, Any]:
    34    nonce = int(time.time() * 1000)
    35
    36    return {
    37        "did": device_mac,
    38        "model": device_model,
    39        "props": {
    40            prop_key: value
    41        },
    42        "is_sub_device": 0,
    43        "nonce": str(nonce)
    44    }

def olive_create_hms_payload() -> Dict[str, str]: View Source

    47def olive_create_hms_payload() -> Dict[str, str]:
    48    nonce = int(time.time() * 1000)
    49
    50    return {
    51        "group_id": "hms",
    52        "nonce": str(nonce)
    53    }

def olive_create_user_info_payload() -> Dict[str, str]: View Source

    56def olive_create_user_info_payload() -> Dict[str, str]:
    57    nonce = int(time.time() * 1000)
    58
    59    return {
    60        "nonce": str(nonce)
    61    }

def olive_create_hms_get_payload(hms_id: str) -> Dict[str, str]: View Source

    64def olive_create_hms_get_payload(hms_id: str) -> Dict[str, str]:
    65    nonce = int(time.time() * 1000)
    66    return {
    67        "hms_id": hms_id,
    68        "nonce": str(nonce)
    69    }

def olive_create_hms_patch_payload(hms_id: str) -> Dict[str, Any]: View Source

    72def olive_create_hms_patch_payload(hms_id: str) -> Dict[str, Any]:
    73    return {
    74        "hms_id": hms_id
    75    }

def devicemgmt_create_capabilities_payload(type: str, value: str): View Source

     78def devicemgmt_create_capabilities_payload(type: str, value: str):
     79    match type:
     80        case "floodlight":
     81            return {
     82                "iid": 4,
     83                "name": "floodlight",
     84                "properties": [
     85                    {
     86                        "prop": "on",
     87                        "value": value
     88                    }
     89                ]
     90            }
     91        case "spotlight":
     92            return {
     93                "iid": 5,
     94                "name": "spotlight",
     95                "properties": [
     96                    {
     97                        "prop": "on",
     98                        "value": value
     99                    }
    100                ]
    101            }
    102        case "power":
    103            return {
    104                "functions": [
    105                    {
    106                        "in": {
    107                            "wakeup-live-view": "1"
    108                        },
    109                        "name": value
    110                    }
    111                ],
    112                "iid": 1,
    113                "name": "iot-device"
    114            }
    115        case "siren":
    116            return {
    117                "functions": [
    118                    {
    119                        "in": {},
    120                        "name": value
    121                    }
    122                ],
    123                "name": "siren"
    124            }
    125        case _:
    126            raise NotImplementedError(f"No action of type ({type}) has been implemented.")

def devicemgmt_get_iot_props_list(model: str): View Source

    129def devicemgmt_get_iot_props_list(model: str):
    130    match model:
    131        case "LD_CFP": # Floodlight Pro
    132            return [
    133                {
    134                    "iid": 2,
    135                    "name": "camera",
    136                    "properties": [
    137                        "motion-detect",
    138                        "resolution",
    139                        "bit-rate",
    140                        "live-stream-mode",
    141                        "recording-mode",
    142                        "frame-rate",
    143                        "night-shot",
    144                        "night-shot-state",
    145                        "rotate-angle",
    146                        "time-watermark",
    147                        "logo-watermark",
    148                        "recording-trigger-source",
    149                        "recording-content-type",
    150                        "motion-push",
    151                        "speaker",
    152                        "microphone",
    153                        "unusual-sound-push",
    154                        "flip",
    155                        "motion-detect-recording",
    156                        "cool-down-interval",
    157                        "infrared-mode",
    158                        "sound-collection-on",
    159                        "live-stream-protocol",
    160                        "ai-push",
    161                        "voice-template",
    162                        "motion-category"
    163                    ]
    164                },
    165                {
    166                    "iid": 3,
    167                    "name": "device-info",
    168                    "properties": [
    169                        "device-id",
    170                        "device-model",
    171                        "firmware-ver",
    172                        "mac",
    173                        "timezone",
    174                        "lat",
    175                        "ip",
    176                        "lon",
    177                        "hardware-ver",
    178                        "public-ip"
    179                    ]
    180                },
    181                {
    182                    "iid": 1,
    183                    "name": "iot-device",
    184                    "properties": [
    185                        "iot-state",
    186                        "iot-power",
    187                        "push-switch"
    188                    ]
    189                },
    190                {
    191                    "iid": 9,
    192                    "name": "camera-ai",
    193                    "properties": [
    194                        "smart-detection-type",
    195                        "on"
    196                    ]
    197                },
    198                {
    199                    "iid": 4,
    200                    "name": "floodlight",
    201                    "properties": [
    202                        "on",
    203                        "enabled",
    204                        "mode",
    205                        "trigger-source",
    206                        "brightness",
    207                        "light-on-duration",
    208                        "voice-template",
    209                        "motion-warning-switch",
    210                        "motion-activate-light-switch",
    211                        "motion-activate-light-schedule",
    212                        "motion-activate-brightness",
    213                        "ambient-light-switch",
    214                        "ambient-light-schedule",
    215                        "ambient-light-brightness",
    216                        "motion-tag",
    217                        "light-model",
    218                        "flash-with-siren"
    219                    ]
    220                },
    221                {
    222                    "iid": 11,
    223                    "name": "indicator-light",
    224                    "properties": [
    225                        "on",
    226                        "mode",
    227                        "brightness",
    228                        "color",
    229                        "color-temperature"
    230                    ]
    231                },
    232                {
    233                    "iid": 8,
    234                    "name": "memory-card-management",
    235                    "properties": [
    236                        "storage-used-space",
    237                        "storage-total-space",
    238                        "storage-status",
    239                        "sd-card-playback-enabled"
    240                    ]
    241                },
    242                {
    243                    "iid": 6,
    244                    "name": "motion-detection",
    245                    "properties": [
    246                        "sensitivity-motion",
    247                        "on",
    248                        "motion-zone",
    249                        "motion-zone-selected-block",
    250                        "motion-zone-block-size",
    251                        "motion-tag",
    252                        "edge-detection-type",
    253                        "motion-warning-switch",
    254                        "motion-warning-tone",
    255                        "motion-warning-interval",
    256                        "motion-warning-schedule",
    257                        "motion-warning-sound",
    258                        "motion-warning-trigger-setting"
    259                    ]
    260                },
    261                {
    262                    "iid": 7,
    263                    "name": "siren",
    264                    "properties": [
    265                        "state"
    266                    ]
    267                },
    268                {
    269                    "iid": 5,
    270                    "name": "wifi",
    271                    "properties": [
    272                        "on",
    273                        "signal-strength",
    274                        "wifi-ssid",
    275                        "wifi-encrypted-password"
    276                    ]
    277                }
    278            ]
    279        case "AN_RSCW": # Battery Cam pro
    280            return [
    281                {
    282                    "iid": 2,
    283                    "name": "camera",
    284                    "properties": [
    285                        "motion-detect",
    286                        "resolution",
    287                        "bit-rate",
    288                        "live-stream-mode",
    289                        "recording-mode",
    290                        "frame-rate",
    291                        "night-shot",
    292                        "night-shot-state",
    293                        "time-watermark",
    294                        "logo-watermark",
    295                        "cool-down-interval",
    296                        "recording-content-type",
    297                        "video-length-limit",
    298                        "motion-push",
    299                        "speaker",
    300                        "unusual-sound-push",
    301                        "microphone",
    302                        "infrared-mode",
    303                        "motion-detect-recording",
    304                        "live-stream-protocol",
    305                        "recording-resolution",
    306                        "recording-start-time",
    307                        "recording-schedule-duration",
    308                        "voice-template",
    309                        "rotate-angle",
    310                        "sound-collection-on",
    311                        "ai-push"
    312                    ]
    313                },
    314                {
    315                    "iid": 3,
    316                    "name": "device-info",
    317                    "properties": [
    318                        "device-id",
    319                        "device-model",
    320                        "firmware-ver",
    321                        "mac",
    322                        "timezone",
    323                        "lat",
    324                        "ip",
    325                        "lon",
    326                        "company-code",
    327                        "device-setting-channel",
    328                        "network-connection-mode",
    329                        "hardware-ver",
    330                        "public-ip"
    331                    ]
    332                },
    333                {
    334                    "iid": 1,
    335                    "name": "iot-device",
    336                    "properties": [
    337                        "iot-state",
    338                        "iot-power",
    339                        "push-switch",
    340                        "mqtt-check"
    341                    ]
    342                },
    343                {
    344                    "iid": 7,
    345                    "name": "battery",
    346                    "properties": [
    347                        "battery-level",
    348                        "low-battery-push",
    349                        "power-source",
    350                        "charging-status",
    351                        "power-saving"
    352                    ]
    353                },
    354                {
    355                    "iid": 12,
    356                    "name": "camera-ai",
    357                    "properties": [
    358                        "smart-detection-type",
    359                        "on"
    360                    ]
    361                },
    362                {
    363                    "iid": 8,
    364                    "name": "indicator-light",
    365                    "properties": [
    366                        "on",
    367                        "mode"
    368                    ]
    369                },
    370                {
    371                    "iid": 6,
    372                    "name": "memory-card-management",
    373                    "properties": [
    374                        "storage-used-space",
    375                        "storage-total-space",
    376                        "storage-status",
    377                        "sd-card-playback-enabled"
    378                    ]
    379                },
    380                {
    381                    "iid": 11,
    382                    "name": "motion-detection",
    383                    "properties": [
    384                        "sensitivity-motion",
    385                        "on",
    386                        "area-length",
    387                        "motion-zone",
    388                        "motion-zone-block-size",
    389                        "motion-zone-selected-block",
    390                        "edge-detection-type",
    391                        "motion-tag"
    392                    ]
    393                },
    394                {
    395                    "iid": 4,
    396                    "name": "siren",
    397                    "properties": [
    398                        "state",
    399                        "siren-on-ts"
    400                    ]
    401                },
    402                {
    403                    "iid": 14,
    404                    "name": "solar-panel",
    405                    "properties": [
    406                        "enabled",
    407                        "on"
    408                    ]
    409                },
    410                {
    411                    "iid": 5,
    412                    "name": "spotlight",
    413                    "properties": [
    414                        "on",
    415                        "enabled",
    416                        "brightness",
    417                        "motion-activate-light-switch",
    418                        "sunset-to-sunrise",
    419                        "motion-activate-light-schedule",
    420                        "trigger-source"
    421                    ]
    422                },
    423                {
    424                    "iid": 9,
    425                    "name": "wifi",
    426                    "properties": [
    427                        "on",
    428                        "signal-strength",
    429                        "wifi-ssid",
    430                        "wifi-encrypted-password"
    431                    ]
    432                }
    433            ]
    434        case "GW_GC1": # OG
    435            return [
    436                {
    437                    "iid": 2,
    438                    "name": "camera",
    439                    "properties": [
    440                        "motion-detect",
    441                        "resolution",
    442                        "bit-rate",
    443                        "live-stream-mode",
    444                        "recording-mode",
    445                        "frame-rate",
    446                        "night-shot",
    447                        "night-shot-state",
    448                        "time-watermark",
    449                        "logo-watermark",
    450                        "cool-down-interval",
    451                        "recording-content-type",
    452                        "video-length-limit",
    453                        "motion-push",
    454                        "speaker",
    455                        "unusual-sound-push",
    456                        "microphone",
    457                        "infrared-mode",
    458                        "motion-detect-recording",
    459                        "live-stream-protocol",
    460                        "recording-resolution",
    461                        "recording-start-time",
    462                        "recording-schedule-duration",
    463                        "voice-template",
    464                        "rotate-angle",
    465                        "sound-collection-on",
    466                        "ai-push"
    467                    ]
    468                },
    469                {
    470                    "iid": 3,
    471                    "name": "device-info",
    472                    "properties": [
    473                        "device-id",
    474                        "device-model",
    475                        "firmware-ver",
    476                        "mac",
    477                        "timezone",
    478                        "lat",
    479                        "ip",
    480                        "lon",
    481                        "company-code",
    482                        "device-setting-channel",
    483                        "network-connection-mode",
    484                        "hardware-ver",
    485                        "public-ip"
    486                    ]
    487                },
    488                {
    489                    "iid": 1,
    490                    "name": "iot-device",
    491                    "properties": [
    492                        "iot-state",
    493                        "iot-power",
    494                        "push-switch",
    495                        "mqtt-check"
    496                    ]
    497                },
    498                {
    499                    "iid": 12,
    500                    "name": "camera-ai",
    501                    "properties": [
    502                        "smart-detection-type",
    503                        "on"
    504                    ]
    505                },
    506                {
    507                    "iid": 8,
    508                    "name": "indicator-light",
    509                    "properties": [
    510                        "on",
    511                        "mode"
    512                    ]
    513                },
    514                {
    515                    "iid": 6,
    516                    "name": "memory-card-management",
    517                    "properties": [
    518                        "storage-used-space",
    519                        "storage-total-space",
    520                        "storage-status",
    521                        "sd-card-playback-enabled"
    522                    ]
    523                },
    524                {
    525                    "iid": 11,
    526                    "name": "motion-detection",
    527                    "properties": [
    528                        "sensitivity-motion",
    529                        "on",
    530                        "area-length",
    531                        "motion-zone",
    532                        "motion-zone-block-size",
    533                        "motion-zone-selected-block",
    534                        "edge-detection-type",
    535                        "motion-tag"
    536                    ]
    537                },
    538                {
    539                    "iid": 4,
    540                    "name": "siren",
    541                    "properties": [
    542                        "state",
    543                        "siren-on-ts"
    544                    ]
    545                },
    546                {
    547                    "iid": 5,
    548                    "name": "spotlight",
    549                    "properties": [
    550                        "on",
    551                        "enabled",
    552                        "brightness",
    553                        "motion-activate-light-switch",
    554                        "sunset-to-sunrise",
    555                        "motion-activate-light-schedule",
    556                        "trigger-source"
    557                    ]
    558                },
    559                {
    560                    "iid": 9,
    561                    "name": "wifi",
    562                    "properties": [
    563                        "on",
    564                        "signal-strength",
    565                        "wifi-ssid",
    566                        "wifi-encrypted-password"
    567                    ]
    568                }
    569            ]
    570        case _:
    571            raise NotImplementedError(f"No iot props for model ({model}) have been defined.")