Skip to content

Add Dafang camera (isa.camera.df3) support #996

@Dorozhko

Description

@Dorozhko

Device information:

https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:camera:0000A01C:isa-df3:1

miiocli -d -o json_pretty device --ip 192.168.1.121 --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx raw_command miIO.info 2>&1

INFO:miio.cli:Debug mode active
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x03\x8c\x8e\x06\xcaC' (total 16) value = Container: length = 32 unknown = 0 device_id = unhexlify('038c8e06') ts = 2021-03-28 18:26:11 offset1 = 0 offset2 = 16 length = 16 checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16) DEBUG:miio.miioprotocol:Discovered 038c8e06 with ts: 2021-03-28 18:26:11, token: b'ffffffffffffffffffffffffffffffff' DEBUG:miio.miioprotocol:192.168.1.121:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []} DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 3 DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b'' DEBUG:miio.miioprotocol:Got a response: Container: data = Container: data = b'' (total 0) value = b'' (total 0) offset1 = 32 offset2 = 32 length = 0 header = Container: data = b'!1\x00 \x00\x00\x00\x00\x03\x8c\x8e\x06\xcaH' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('038c8e06')
ts = 2021-03-28 18:26:16
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 038c8e06 with ts: 2021-03-28 18:26:16, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.1.121:54321 >>: {'id': 102, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 2
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x03\x8c\x8e\x06``\xcaM' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('038c8e06')
ts = 2021-03-28 18:26:21
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 038c8e06 with ts: 2021-03-28 18:26:21, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.1.121:54321 >>: {'id': 203, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:192.168.1.121:54321 (ts: 2021-03-28 18:26:21, id: 203) << {'partner_id': '', 'id': 203, 'code': 0, 'message': 'ok', 'result': {'hw_ver': 'Linux', 'fw_ver': '5.5.1.243', 'ap': {'ssid': 'Test12345', 'bssid': 'XX:D7:XX:40:XX:3A'}, 'netif': {'localIp': '192.168.1.121', 'mask': '255.255.255.0', 'gw': '192.168.1.1'}, 'model': 'isa.camera.df3', 'mac': '34:XX:00:XX:FE:XX', 'token': 'xxxxxx4749665859696a30414cxxxxxx', 'life': 120}}
{
"hw_ver": "Linux",
"fw_ver": "5.5.1.243",
"ap": {
"ssid": "Test12345",
"bssid": "XX:D7:XX:40:6C:XX"
},
"netif": {
"localIp": "192.168.1.121",
"mask": "255.255.255.0",
"gw": "192.168.1.1"
},
"model": "isa.camera.df3",
"mac": "34:XX:00:XX:FE:XX",
"token": "xxxxxx4749665859696a30414cxxxxxx",
"life": 120
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions