Tuya - WifiDualMeter Issue (missing entities)

I’m using Home Assistant with Tuya Cloud integration.
I’ve got some smart sockets/switches on it.
Previous devices work fine, I could see and control from HomeAssistant the same parameters as from SmartLife App.
I’ve added “Wifi Dual Meter”. From SmartLife App and Tuya IoT cloud site I could see all entities.
But HomeAssistant pulls only one (“Total Energy”).
I could see on Tuya IoT site logs all entities, but on HomeAssistant logs there are 3 entities and on dashboard could be added only one.
May be I missed something or I could add some of them manual?
Attaching part of HomeAssistant Tuya debug log and screenshot from Tuya IoT site.
Thanks for assistance

 "data": {
    "endpoint": "https://openapi.tuyaeu.com",
    "auth_type": 0,
    "country_code": "",
    "app_type": "smartlife",
    "mqtt_connected": true,
    "disabled_by": null,
    "disabled_polling": false,
    "devices": [
      {
        "name": "WIFI Dual Meter",
        "model": "PJ1103A",
        "category": "zndb",
        "product_id": "_________",
        "product_name": "WIFI Dual Meter",
        "online": true,
        "sub": false,
        "time_zone": "+03:00",
        "active_time": "2023-08-22T17:43:05+00:00",
        "create_time": "2023-08-22T17:43:05+00:00",
        "update_time": "2023-08-24T05:45:33+00:00",
        "function": {
          "forward_energy_total": {
            "type": "Integer",
            "value": {
              "unit": "KWH",
              "min": 0,
              "max": 99999999,
              "scale": 2,
              "step": 1
            }
          },
          "reverse_energy_total": {
            "type": "Integer",
            "value": {
              "unit": "KWH",
              "min": 0,
              "max": 99999999,
              "scale": 2,
              "step": 1
            }
          }
        },
        "status_range": {
          "forward_energy_total": {
            "type": "Integer",
            "value": {
              "unit": "KWH",
              "min": 0,
              "max": 99999999,
              "scale": 2,
              "step": 1
            }
          },
          "reverse_energy_total": {
            "type": "Integer",
            "value": {
              "unit": "KWH",
              "min": 0,
              "max": 99999999,
              "scale": 2,
              "step": 1
            }
          },
          "total_power": {
            "type": "Integer",
            "value": {
              "unit": "W",
              "min": -99999999,
              "max": 99999999,
              "scale": 1,
              "step": 1
            }
          }
        },
        "status": {
          "forward_energy_total": 8615,
          "reverse_energy_total": 58,
          "total_power": 7794
        },
        "home_assistant": {
          "name": "WIFI Dual Meter",
          "name_by_user": null,
          "disabled": false,
          "disabled_by": null,
          "entities": [
            {
              "disabled": false,
              "disabled_by": null,
              "entity_category": null,
              "device_class": null,
              "original_device_class": "energy",
              "icon": null,
              "original_icon": null,
              "unit_of_measurement": "kWh",
              "state": {
                "entity_id": "sensor.wifi_dual_meter_total_energy",
                "state": "86.15",
                "attributes": {
                  "state_class": "total_increasing",
                  "unit_of_measurement": "kWh",
                  "device_class": "energy",
                  "friendly_name": "WIFI Dual Meter Total energy"
                },
                "last_changed": "2023-08-24T06:58:08.519310+00:00",
                "last_updated": "2023-08-24T06:58:08.519310+00:00"
              }
            }
          ]
        }
      },

3 Likes

Update. Screenshot from Tuya integration HA

1 Like

I would also appreciate any help with this - have tried adding in localTuya using dp_ids from tuya cloud but only get a value of -1

Exactly the same issue on my side. In Tuya Smart Life app all data is being shown, but in Home Assistant my WIFI Dual Meter device only show total energy, exactly as in the screenshots being shared. I can help with logs if needed.
Thanks in advance!

I’m also having this issue. edit I thought i figured something out, but actually didn’t. With tuya integration, i only get total energy. With localtuya i get power consumption, but still trying to figure out scaling factor.

I´ve found this article, but did not test yet:

It is supposed to get this information with this integration:

  • Current (mA)
  • Energy (kWh)
  • Power (w)
  • Voltage (V)
1 Like

Did anyone find the solution for that?
I am dealing with the same…
Tuya integration gives part of available in IoT platform entities, while Tuya local gives less and other than Tuya.
None of integrations gives all available at IoT platform.
How to manually tune and force adding missing entities?

1 Like

Same issue, only one entity, here anyone made any progress on this issue?

1 Like

You can use GitHub - make-all/tuya-local: Local support for Tuya devices in Home Assistant integration. have support for this meter

Same Issue for me… I tried a lot of things without success :frowning:

Same here :cry:

I am able to communicate with the device locally (WAN blocked) but it seems the localtuya integration doesn’t know which device value maps to what sensor. I could try to figure this out, but wondering if anyone has the breakdown of what is ID is?

I dont use local tuya, as now you can use the qr code to easily get your sensors into HA, i refer the simplicity of the standard tuya or smarthome integrations. I would love for this power value to make it into those integrations so I can finally use this thing.

I also bought the two channel one in the hope they could just get the power value from each, hence monitor two things. The basic app for tuya and smarthome however just report one taking away from the other - so not ideal. Once HA can see the power reported from each of these clam sensors, then this will do me fine.

Yes, today I reverse enginered the ID’s and was able to get it working. If there is still some interest from people I can post some more info in the coming days. For me it is now 2am and just got it working so I have to go to bed.



4 Likes

Mine pretty much stright forward (PJ-1130). But I have one entity that is supposed to be Consumption kWh. Which I can’t get it to show correctly.

i have the same issue with 4 wifidualmeter tuya (only one entity) total energy
Can you explane me how you solve please?

I have the same problem
did you solve?

This is what I did :

  1. Add the LocalTuya integration via HACS to your Home assistant:
    GitHub - rospogrigio/localtuya: local handling for Tuya devices
  2. When correctly setup the ip of the Wifi Dual Meter will be detected when you add a new device.
  3. Then it will go through all the DPID’s it finds on the device but it does not know which is what so then you can lookup the numbers in the list I provided that describes all the parameters. I named them in the same way the are also called in the Tuya app. Scaling factors can be derived from the app. 0.01 scaling factor is for example if the value in the app has 2 digits after the . (dot)
    Also “device classes” used are:
    “energy” for everything in “KWH”,
    “power” for everything in “W”, ’
    “power factor” for the power factors,
    “frequency” for everything in Hz,
    “voltage” for everything in “V”
    “current” for everything in “mA” with a scaling factor of 0.001 because HA uses A and not mA.
  4. The calibration values I setup to be numbers with a minimal value of 800, maximum of 1200 and default value of 1000 (Tuya values in app are from 0,8 to 1,2 with default value of 1)
    “Adjust reporting rate” is a value betwee 3 an 60 with a default value of 10.

It is quite some manual labour but it can be done. I’m not aware of any “export” I could make of the device from LocalTuya that you guys could import as kind of a template. That would be much easier.

3 Likes

Thank you for your guide: useful and precious!

I have just one question about the wifi dual meter parameters:
what’s 110 (“Power Factor A”) and 121 (“Power Factor B”) ?

When a electrical load is not pure resistive but is capacitive or inductive (like motors) you not only have “real power” but also “apparant power”. The factor between real and apparant power is the power factor:

1 Like