rytilahti / python-miio

Python library & console tool for controlling Xiaomi smart appliances
https://python-miio.readthedocs.io
GNU General Public License v3.0
3.8k stars 565 forks source link

Mijia Graphene Baseboard Heater 2 #1836

Open yroz opened 1 year ago

yroz commented 1 year ago

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

If your device is rather new, it is likely supported already by the genericmiot integration. This is currently available only on the git version (until version 0.6.0 is released), so please give it a try before opening a new issue.

Device information:

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

Additional context If you know already about potential commands or any other useful information to add support for the device, please add that information here.

spec: https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:heater:0000A01A:xiaomi-ma7:1

{
  "type": "urn:miot-spec-v2:device:heater:0000A01A:xiaomi-ma7:1",
  "description": "Heater",
  "services": [
    {
      "iid": 1,
      "type": "urn:miot-spec-v2:service:device-information:00007801:xiaomi-ma7:1",
      "description": "Device Information",
      "properties": [
        {
          "iid": 1,
          "type": "urn:miot-spec-v2:property:manufacturer:00000001:xiaomi-ma7:1",
          "description": "Device Manufacturer",
          "format": "string",
          "access": [
            "read"
          ]
        },
        {
          "iid": 2,
          "type": "urn:miot-spec-v2:property:model:00000002:xiaomi-ma7:1",
          "description": "Device Model",
          "format": "string",
          "access": [
            "read"
          ]
        },
        {
          "iid": 3,
          "type": "urn:miot-spec-v2:property:serial-number:00000003:xiaomi-ma7:1",
          "description": "Device ID",
          "format": "string",
          "access": [
            "read"
          ]
        },
        {
          "iid": 4,
          "type": "urn:miot-spec-v2:property:firmware-revision:00000005:xiaomi-ma7:1",
          "description": "Current Firmware Version",
          "format": "string",
          "access": [
            "read"
          ]
        },
        {
          "iid": 5,
          "type": "urn:miot-spec-v2:property:serial-no:000000FF:xiaomi-ma7:1",
          "description": "Serial Number",
          "format": "string",
          "access": [
            "read",
            "notify"
          ]
        }
      ]
    },
    {
      "iid": 2,
      "type": "urn:miot-spec-v2:service:heater:0000782E:xiaomi-ma7:1",
      "description": "Heater",
      "properties": [
        {
          "iid": 1,
          "type": "urn:miot-spec-v2:property:on:00000006:xiaomi-ma7:1",
          "description": "Switch Status",
          "format": "bool",
          "access": [
            "read",
            "write",
            "notify"
          ]
        },
        {
          "iid": 2,
          "type": "urn:miot-spec-v2:property:fault:00000009:xiaomi-ma7:1",
          "description": "Device Fault",
          "format": "uint8",
          "access": [
            "read",
            "notify"
          ],
          "value-list": [
            {
              "value": 0,
              "description": "No Faults"
            },
            {
              "value": 1,
              "description": "NTC-err"
            }
          ],
          "gatt-access": []
        },
        {
          "iid": 3,
          "type": "urn:miot-spec-v2:property:status:00000007:xiaomi-ma7:1",
          "description": "Status",
          "format": "uint8",
          "access": [
            "read",
            "notify"
          ],
          "value-list": [
            {
              "value": 1,
              "description": "Idle"
            },
            {
              "value": 2,
              "description": "Busy"
            }
          ]
        },
        {
          "iid": 5,
          "type": "urn:miot-spec-v2:property:target-temperature:00000021:xiaomi-ma7:1",
          "description": "Target Temperature",
          "format": "uint8",
          "access": [
            "read",
            "write",
            "notify"
          ],
          "unit": "celsius",
          "value-range": [
            16,
            28,
            1
          ],
          "gatt-access": []
        },
        {
          "iid": 6,
          "type": "urn:miot-spec-v2:property:heat-level:00000047:xiaomi-ma7:1",
          "description": "Heat Level",
          "format": "uint8",
          "access": [
            "read",
            "write",
            "notify"
          ],
          "value-list": [
            {
              "value": 0,
              "description": "Normal"
            },
            {
              "value": 1,
              "description": "Low"
            },
            {
              "value": 2,
              "description": "High"
            }
          ],
          "gatt-access": []
        }
      ],
      "actions": [
        {
          "iid": 1,
          "type": "urn:miot-spec-v2:action:toggle:00002811:xiaomi-ma7:1",
          "description": "Toggle",
          "in": [],
          "out": []
        }
      ]
    },
    {
      "iid": 4,
      "type": "urn:miot-spec-v2:service:environment:0000780A:xiaomi-ma7:1",
      "description": "Environment",
      "properties": [
        {
          "iid": 7,
          "type": "urn:miot-spec-v2:property:temperature:00000020:xiaomi-ma7:1",
          "description": "Temperature",
          "format": "float",
          "access": [
            "read",
            "notify"
          ],
          "unit": "celsius",
          "value-range": [
            -30,
            100,
            0.1
          ],
          "gatt-access": []
        }
      ]
    },
    {
      "iid": 5,
      "type": "urn:miot-spec-v2:service:physical-controls-locked:00007807:xiaomi-ma7:1",
      "description": "Physical Control Locked",
      "properties": [
        {
          "iid": 1,
          "type": "urn:miot-spec-v2:property:physical-controls-locked:0000001D:xiaomi-ma7:1",
          "description": "Physical Control Locked",
          "format": "bool",
          "access": [
            "read",
            "write",
            "notify"
          ]
        }
      ]
    },
    {
      "iid": 6,
      "type": "urn:miot-spec-v2:service:alarm:00007804:xiaomi-ma7:1",
      "description": "Alarm",
      "properties": [
        {
          "iid": 1,
          "type": "urn:miot-spec-v2:property:alarm:00000012:xiaomi-ma7:1",
          "description": "Alarm",
          "format": "bool",
          "access": [
            "read",
            "write",
            "notify"
          ]
        }
      ]
    },
    {
      "iid": 9,
      "type": "urn:miot-spec-v2:service:delay:000078BB:xiaomi-ma7:1",
      "description": "Delay",
      "properties": [
        {
          "iid": 1,
          "type": "urn:miot-spec-v2:property:delay:0000014F:xiaomi-ma7:1",
          "description": "Delay",
          "format": "bool",
          "access": [
            "read",
            "write",
            "notify"
          ]
        },
        {
          "iid": 2,
          "type": "urn:miot-spec-v2:property:delay-time:00000150:xiaomi-ma7:1",
          "description": "Delay Time",
          "format": "uint8",
          "access": [
            "read",
            "write",
            "notify"
          ],
          "unit": "hours",
          "value-range": [
            1,
            12,
            1
          ],
          "gatt-access": []
        },
        {
          "iid": 3,
          "type": "urn:miot-spec-v2:property:delay-remain-time:00000151:xiaomi-ma7:1",
          "description": "Delay Remain Time",
          "format": "uint8",
          "access": [
            "read",
            "notify"
          ],
          "unit": "hours",
          "value-range": [
            0,
            12,
            1
          ],
          "gatt-access": []
        }
      ]
    },
    {
      "iid": 10,
      "type": "urn:miot-spec-v2:service:screen:00007806:xiaomi-ma7:1",
      "description": "Screen",
      "properties": [
        {
          "iid": 1,
          "type": "urn:miot-spec-v2:property:on:00000006:xiaomi-ma7:1",
          "description": "Switch Status",
          "format": "bool",
          "access": [
            "read",
            "write",
            "notify"
          ],
          "gatt-access": []
        }
      ]
    },
    {
      "iid": 7,
      "type": "urn:xiaomi-spec:service:crontab:00007801:xiaomi-ma7:1",
      "description": "crontab",
      "properties": [
        {
          "iid": 1,
          "type": "urn:xiaomi-spec:property:expression:00000001:xiaomi-ma7:1",
          "description": "",
          "format": "string",
          "access": [
            "read",
            "notify",
            "write"
          ]
        },
        {
          "iid": 2,
          "type": "urn:xiaomi-spec:property:cron-log:00000002:xiaomi-ma7:1",
          "description": "",
          "format": "string",
          "access": [
            "read",
            "notify"
          ]
        }
      ],
      "events": [
        {
          "iid": 1,
          "type": "urn:xiaomi-spec:event:cron-excuted:00005001:xiaomi-ma7:1",
          "description": "cron-excuted",
          "arguments": [
            2
          ]
        }
      ]
    },
    {
      "iid": 8,
      "type": "urn:xiaomi-spec:service:private:00007802:xiaomi-ma7:1",
      "description": "private",
      "properties": [
        {
          "iid": 1,
          "type": "urn:xiaomi-spec:property:dev-use-time:00000001:xiaomi-ma7:1",
          "description": "",
          "format": "uint32",
          "access": [
            "notify",
            "read"
          ],
          "unit": "seconds",
          "value-range": [
            0,
            4294967295,
            1
          ]
        }
      ],
      "events": [
        {
          "iid": 1,
          "type": "urn:xiaomi-spec:event:childlock-trigger:00005001:xiaomi-ma7:1",
          "description": "childlock-trigger",
          "arguments": []
        }
      ]
    }
  ]
}
rytilahti commented 1 year ago

You can use the genericmiot integration (see miiocli genericmiot --help), it should support this (like all other miot-spec devices) just fine.