homebridge-tuya-web icon indicating copy to clipboard operation
homebridge-tuya-web copied to clipboard

Adding the WiFi Temperature & Humidity Sensor issue

Open bkrisz14 opened this issue 2 years ago • 7 comments

Hello,

I tried to add my WiFi Temperature & Humidity Sensor to this HomeBridge Tuya Web plugin but it says: [17/09/2022, 20:36:51] [TuyaWebPlatform] Tried overwriting device config for: "bf5xxxxxx914622ddczav" which is not a valid device-id or device-name. (not the actual ID)

Any recommendations? Thanks in advance!

bkrisz14 avatar Sep 17 '22 18:09 bkrisz14

Thank you for your great plugin! I have the same problem with @bkrisz14. Are there any solutions?

missflash avatar Sep 18 '22 03:09 missflash

Please post the result of the steps under "How to check whether the api this library uses can control your device".

Please also include your configuration file for this plugin.

Without this it is hard for me to help you with regards to this specific issue.

milo526 avatar Sep 19 '22 19:09 milo526

This was the result of the script:

Getting credentials Got credentials { 'access_token': 'EUheu1663441295198LEMjGz5RAezGsXR', 'expires_in': 864000, 'refresh_token': 'EUheu1663441295198LEMjG4NzkRjcXGm', 'token_type': 'bearer'} Getting devices Got devices { 'header': {'code': 'SUCCESS', 'payloadVersion': 1}, 'payload': {'devices': [], 'scenes': []}} !!! NOW REMOVE THIS FILE, SO YOUR CREDENTIALS (username, password) WON'T LEAK !!!

Since I didn't see my device here I contaced the Tuya support and they said:

Tuya engineer (09-22 09:04:30) we check the logs do not find something wrong /error about it

My config file has the following lines:

    {
        "name": "TuyaWebPlatform",
        "options": {
            "username": "[email protected]",
            "password": "xxx",
            "countryCode": "36",
            "platform": "tuya"
        },
        "defaults": [
            {
                "id": "bf5xxxxxx914622ddczav",
                "device_type": "temperature_sensor",
                "current_temperature_factor": "1"
            }
        ],
        "scenes": false,
        "platform": "TuyaWebPlatform"
    }

bkrisz14 avatar Sep 22 '22 14:09 bkrisz14

This is a very good plugin, but I have exactly the same problem as others here. Please, try to resolve this!

Tupuz avatar Oct 07 '22 11:10 Tupuz

@Tupuz same as stated before, please post your config file and the result of the steps as outlined earlier.

@bkrisz14 you have no devices exposed, sadly your devices do not work with the API that this plugin uses.

milo526 avatar Oct 07 '22 11:10 milo526

I have a WiFi Temperature & Humidity Sensor, which works well in Smart Life app in my iPhone. The configuration in defaults section is: { "id": "bfe48b9905267356f09j0p", "device_type": "temperature_sensor", "current_temperature_factor": "1" }

HOOBS seem to recognize the sensor, log file: "7.10.2022 klo 14.20.28Tuya Web BridgeTuyaWebPlatformExisting Accessory found [Name: LämpöKost KPH] [Tuya ID: bfe48b9905267356f09j0p] [HomeBridge ID: c5fad494-78fe-4d0e-aa3a-35f0443ad041]",

Home-app shows this, but says that accessory is not responding and temperature is -- degrees.

I could not do the script above, I got only errors :-(

Tupuz avatar Oct 07 '22 12:10 Tupuz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 28 '22 23:10 stale[bot]

Hi I have the same issue, can u pls solve this? [TuyaWebPlatform] Tried overwriting device config for: "bfcde0639463526cc4jhaf" which is not a valid device-id or device-name.

zsozsobasa avatar Nov 17 '22 11:11 zsozsobasa

Hi, I have the same issue:

[TuyaWebPlatform] Tried overwriting device config for: "bfffd232f952052e4a90bl" which is not a valid device-id or device-name.

{ "name": "TuyaWebPlatform", "options": { "username": "xxxxxxxxx", "password": "xxxxxxxxx", "countryCode": "420", "platform": "tuya" }, "defaults": [ { "id": "bfffd232f952052e4a90bl", "device_type": "temperature_sensor", "current_temperature_factor": "1" } ], "scenes": false, "platform": "TuyaWebPlatform" }

nacovicko avatar Nov 25 '22 13:11 nacovicko

Closing since this issue cannot be solved without the requested API output.

If somebody is willing to give the API output so I can look into this I will happily do so.

milo526 avatar Nov 25 '22 13:11 milo526

Just commenting on this specific device, the default debug_discovery.py script is setup to point to BIZ_TYPE = "smart_life" however changing to BIZ_TYPE = "tuya" results in the thermostat being displayed:

Got devices
{   'header': {'code': 'SUCCESS', 'payloadVersion': 1},
    'payload': {   'devices': [   {   'data': {   'max_temper': 90,
                                                  'min_temper': 62,
                                                  'online': False,
                                                  'state': 'false',
                                                  'temp_unit': 'FAHRENHEIT',
                                                  'temperature': 62},
                                      'dev_type': 'climate',
                                      'ha_type': 'climate',
                                      'icon': 'https://images.tuyaeu.com/smart/product_icon/kt.png',
                                      'id': '7580xxxxxx409985',
                                      'name': 'Office'}],
                   'scenes': []}}

I setup the device using the Smart Life app so it seems that somewhere in Tuya the device is being registered on the incorrect platform.

I've registered two versions of this plugin with the different platforms and the sensor has appeared

        {
            "platform": "TuyaWebPlatform",
            "options": {
                "username": "xxx",
                "password": "xxx",
                "countryCode": "44",
                "platform": "smart_life",
                "pollingInterval": 2000
            }
        },
        {
            "platform": "TuyaWebPlatform",
            "options": {
                "username": "xxx",
                "password": "xxx",
                "countryCode": "44",
                "platform": "tuya",
                "pollingInterval": 2000
            }
        },

and

[06/12/2022, 14:26:54] [TuyaWebPlatform] Created new Accessory [Name: Office] [Tuya ID: 7580xxxxxx409985] [HomeBridge ID: 1e9539c4-419e-494e-a107-c9297e243a1e]
[06/12/2022, 14:26:54] [TuyaWebPlatform] Enable cloud polling with interval 2000s
[06/12/2022, 14:26:54] [melcloud2] Found device: Office 
[06/12/2022, 14:26:54] Initializing platform accessory 'Office '..

One issue is its detected as offline (I think the sensor sleeps and just reports back at a defined internal, and the plugin detects it as a thermostate. Ill keep playing and update if I solve the issues :)

ninoz avatar Dec 06 '22 14:12 ninoz

Thanks @ninoz, interesting to see that it is linked to the "wrong" platform.

Your device also reports the "state" and "online" properties as false, that is what the plugin is reporting.

milo526 avatar Dec 06 '22 14:12 milo526

I have installed this temp and humidity sensor and have the same issues. Plug in does not see it. I attempted the Python script and see that this device is NOT on the list. I followed the next suggestion and contacted tuya asking them to add this to their homeassistant api and this was their response

2023-07-13 15:40:48 Dear Frank,

Thanks for your response.

If the device supports API calls, it can be self-developed.

You can refer to the following link:

https://support.tuya.com/en/help/_detail/Kamwr24uw2ogu

But whether the device itself supports it is determined by the device manufacturer. You can check whether the selling device supports it. If the device does not support it, you can give your suggestion back to the device seller. If you want to return your device, you can also contact to the seller.

As an IoT platform, Tuya Smart provides a development platform for product manufacturers or developers. However, we do not directly produce products and we cannot modify or maintain the function or firmware of the product. Powered by Tuya (PBT) is a mark of interconnectivity across different brands and categories, which means that this product is developed based on the Tuya Smart IoT platform.

Thank you for your support and understanding.

Anything we can do to make this work?

fratinize avatar Jul 13 '23 09:07 fratinize