Skip to content

Add support for Mi Smart Standing Fan 1C (dmaker.fan.p8) #882

@ehn

Description

@ehn

Before submitting a new request, use the search to see if there is an existing issue for the device.

Device information:

Use miiocli device --ip <ip address> --token <token>.

  • Model: dmaker.fan.p8
  • Hardware version: esp8266
  • Firmware version: 2.0.8 (out of the box), 2.1.3 (after upgrade)

Additional context
Works as an miot-enabled device (see #627). For example:

% miiocli fanmiot --ip <ip address> --token <token> off
Powering off
[{'did': 'power', 'siid': 2, 'piid': 1, 'code': 0}]
% miiocli fanmiot --ip <ip address> --token <token> on
Powering on
[{'did': 'power', 'siid': 2, 'piid': 1, 'code': 0}]
% miiocli fanmiot --ip <ip address> --token <token> status
Power: off
Operation mode: OperationMode.Normal
Speed: 0
Oscillate: None
Angle: None
LED: 0
Buzzer: None
Child lock: False
Power-off time: None

However, the Speed field of the status output seems to be the minutes remaining until powering off when set.

The API documentation, if you can call it that, looks similar but not identical to that of dmaker.fan.p9 and dmaker.fan.p10:

{
    "type": "urn:miot-spec-v2:device:fan:0000A005:dmaker-p8:1",
    "description": "Fan",
    "services": [
        {
            "iid": 1,
            "type": "urn:miot-spec-v2:service:device-information:00007801:dmaker-p8:1",
            "description": "Device Information",
            "properties": [
                {
                    "iid": 1,
                    "type": "urn:miot-spec-v2:property:manufacturer:00000001:dmaker-p8:1",
                    "description": "Device Manufacturer",
                    "format": "string",
                    "access": [
                        "read"
                    ]
                },
                {
                    "iid": 2,
                    "type": "urn:miot-spec-v2:property:model:00000002:dmaker-p8:1",
                    "description": "Device Model",
                    "format": "string",
                    "access": [
                        "read"
                    ]
                },
                {
                    "iid": 3,
                    "type": "urn:miot-spec-v2:property:serial-number:00000003:dmaker-p8:1",
                    "description": "Device Serial Number",
                    "format": "string",
                    "access": [
                        "read"
                    ]
                },
                {
                    "iid": 4,
                    "type": "urn:miot-spec-v2:property:firmware-revision:00000005:dmaker-p8:1",
                    "description": "Current Firmware Version",
                    "format": "string",
                    "access": [
                        "read"
                    ]
                }
            ]
        },
        {
            "iid": 2,
            "type": "urn:miot-spec-v2:service:fan:00007808:dmaker-p8:1",
            "description": "Fan",
            "properties": [
                {
                    "iid": 1,
                    "type": "urn:miot-spec-v2:property:on:00000006:dmaker-p8:1",
                    "description": "Switch Status",
                    "format": "bool",
                    "access": [
                        "read",
                        "write",
                        "notify"
                    ]
                },
                {
                    "iid": 2,
                    "type": "urn:miot-spec-v2:property:fan-level:00000016:dmaker-p8:1",
                    "description": "Fan Level",
                    "format": "uint8",
                    "access": [
                        "read",
                        "write",
                        "notify"
                    ],
                    "unit": "none",
                    "value-list": [
                        {
                            "value": 1,
                            "description": "Level1"
                        },
                        {
                            "value": 2,
                            "description": "Level2"
                        },
                        {
                            "value": 3,
                            "description": "Level3"
                        }
                    ]
                },
                {
                    "iid": 3,
                    "type": "urn:miot-spec-v2:property:horizontal-swing:00000017:dmaker-p8:1",
                    "description": "Horizontal Swing",
                    "format": "bool",
                    "access": [
                        "read",
                        "write",
                        "notify"
                    ]
                },
                {
                    "iid": 7,
                    "type": "urn:miot-spec-v2:property:mode:00000008:dmaker-p8:1",
                    "description": "Mode",
                    "format": "uint8",
                    "access": [
                        "read",
                        "write",
                        "notify"
                    ],
                    "unit": "none",
                    "value-list": [
                        {
                            "value": 0,
                            "description": "Straight Wind"
                        },
                        {
                            "value": 1,
                            "description": "Sleep"
                        }
                    ]
                },
                {
                    "iid": 10,
                    "type": "urn:miot-spec-v2:property:off-delay-time:00000054:dmaker-p8:1",
                    "description": "Power Off Delay Time",
                    "format": "uint16",
                    "access": [
                        "read",
                        "write",
                        "notify"
                    ],
                    "unit": "minutes",
                    "value-range": [
                        0,
                        480,
                        1
                    ]
                },
                {
                    "iid": 11,
                    "type": "urn:miot-spec-v2:property:alarm:00000012:dmaker-p8:1",
                    "description": "Alarm",
                    "format": "bool",
                    "access": [
                        "read",
                        "write",
                        "notify"
                    ],
                    "unit": "none"
                },
                {
                    "iid": 12,
                    "type": "urn:miot-spec-v2:property:brightness:0000000D:dmaker-p8:1",
                    "description": "Brightness",
                    "format": "bool",
                    "access": [
                        "read",
                        "write",
                        "notify"
                    ],
                    "unit": "none"
                }
            ],
            "actions": [
                {
                    "iid": 1,
                    "type": "urn:miot-spec-v2:action:toggle:00002811:dmaker-p8:1",
                    "description": "Toggle",
                    "in": [],
                    "out": []
                }
            ]
        },
        {
            "iid": 3,
            "type": "urn:miot-spec-v2:service:physical-controls-locked:00007807:dmaker-p8:1",
            "description": "Physical Control Locked",
            "properties": [
                {
                    "iid": 1,
                    "type": "urn:miot-spec-v2:property:physical-controls-locked:0000001D:dmaker-p8:1",
                    "description": "Physical Control Locked",
                    "format": "bool",
                    "access": [
                        "read",
                        "write",
                        "notify"
                    ]
                }
            ]
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions