make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.44k stars 559 forks source link

Request support for door sensor MC400D #1666

Closed cyrius62 closed 9 months ago

cyrius62 commented 9 months ago

Log Message

Please paste logs here
Cette erreur provient d'une intégration personnalisée

Logger: custom_components.tuya_local.config_flow
Source: custom_components/tuya_local/config_flow.py:216
Integration: Tuya Local (documentation, issues)
First occurred: 17 février 2024 à 07:38:34 (7 occurrences)
Last logged: 10:53:17

Connection test failed with <class 'Exception'> Unable to find device on network (specify IP address)

Information about DPS mappings


Please paste the output here.
```{
  "result": {
    "model": "{\"modelId\":\"000003eglo\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":1,\"accessMode\":\"ro\",\"code\":\"doorcontact_state\",\"description\":\"\",\"extensions\":{\"attribute\":\"768\"},\"name\":\"门磁状态\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},{\"abilityId\":2,\"accessMode\":\"ro\",\"code\":\"battery_percentage\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"电池电量\",\"typeSpec\":{\"max\":100,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"%\"}}]}]}"
  },
  "success": true,
  "t": 1708249667459,
  "tid": "c5994be1ce4211eea4757ade033758b0"
}

<!--
If you do not have access to iot.tuya.com, please try to identify as
many DPs as possible, by experimenting with your device.  Please also
note any ranges and scale factors for input numbers, and possible
values and their meanings for any input strings (enums).
-->

# Product ID

<!--
If you have access to the IoT portal, please paste just the product_id
line from API Explorer: "Devices Management" / "Query Device Details in Bulk".
You will also find the local_key in here, please take care not to post that
publicly.  If you do, then re-pairing the device with the mobile app will
refresh the local key.

Alternatively, tools that do local discovery, such as tinytuya, may be able
to show the product id without needing access to the developer portal.

Although this information is optional and not required, it will be
used in future to identify matching devices.
-->
{
  "result": [
    {
      "active_time": 1705093178,
      "bind_space_id": "6957558",
      "category": "mcs",
      "create_time": 1705093178,
      "custom_name": "détecteur Bar",
      "icon": "smart/icon/ay1537847617560vAgbw/5526564c1ac295a5a9eeea014fb2d02e.jpg",
      "id": "bfd65e3354a7dc06a62xyp",
      "ip": "77.153.44.5",
      "is_online": true,
      "lat": "50.7500",
      "local_key": "",
      "lon": "1.7300",
      "model": "MC400D",
      "name": "Contacter le capteur",
      "product_id": "5etnzhfidcmm0ang",
      "product_name": "WIFI门磁",
      "sub": false,
      "time_zone": "+01:00",
      "update_time": 1705155936,
      "uuid": "28f4450dc9e97e07"
    }
  ],
  "success": true,
  "t": 1708249840891,
  "tid": "2d0364e2ce4311ee9d7cfe8b4d072f7e"
}

# Information about how the device functions

<!--
If there is a manual or other explanation available online, please
link to it (even if not in English) Otherwise if it is not obvious
what all the functions do, please give a brief description.
-->
Thanks in advance
make-all commented 9 months ago

Is this a battery powered WiFi device? The log message would suggest that thee device itself is not reliably present on WiFi, which would mean it cannot be supported.

cyrius62 commented 9 months ago

Oops sorry, yes, it's a battery powered device ( door sensor). Thanks for your answer