rebtor / nl.rebtor.tuya

TuyAPI implementation for homey
MIT License
7 stars 8 forks source link

Smart life "belife" smartplug not working #23

Open ricardovanlaarhoven opened 3 years ago

ricardovanlaarhoven commented 3 years ago

Perhaps my plug is not supported but i'm not sure. image it says it's temporary unavailable with a dutch error:

Apparaat Onbeschikbaar Dit apparaat is tijdelijk onbereikbaar.

via https://openapi.tuyaeu.com/v1.0/devices?device_ids=.... i'm getting this reponse, is that what your app expects as wel?

        "product_id": "jdk24sq7i07oofqo",
        "product_name": "EU02-JX 公版",
        "status": [
          {
            "code": "switch_1",
            "value": true
          },
          {
            "code": "countdown_1",
            "value": 0
          },
          {
            "code": "add_ele",
            "value": 27
          },
          {
            "code": "cur_current",
            "value": 293
          },
          {
            "code": "cur_power",
            "value": 506
          },
          {
            "code": "cur_voltage",
            "value": 2324
          }
        ],
ricardovanlaarhoven commented 2 years ago
"{\"dps\":{\"18\":95,\"19\":25},\"t\":1637409487}\n NEW DATA ATRIBUTE: {\"dps\":{\"18\":75,\"19\":26},\"t\":1637409491}\n NEW DATA ATRIBUTE: {\"dps\":{\"18\":74,\"19\":38},\"t\":1637409493}\n NEW DATA ATRIBUTE: {\"dps\":{\"18\":76,\"19\":32},\"t\":1637409495}\n NEW DATA ATRIBUTE: {\"dps\":{\"18\":75,\"19\":25},\"t\":1637409497}\n NEW DATA ATRIBUTE: {\"dps\":{\"18\":74,\"19\":29},\"t\":1637409499}\n NEW DATA ATRIBUTE: {\"dps\":{\"18\":76,\"19\":33},\"t\":1637409503}\n NEW DATA ATRIBUTE: {\"dps\":{\"19\":29},\"t\":1637409505}"

It’s weird when i look in the code i don’t see whats different then to other plugs. 18 19 and 20 are used for the power consumption just like neo and the others. but it says it’s unavailable

9 = always 0 ? even if turned of… 18 = current in mA 19 = Power (/10) 20 = voltage (/10

rebtor commented 1 year ago

Fixed