Tuya issues

Hi all,
I bought an outdoor wifi plug to measure the energy production of my solar panels. Unfortunately, the only thing I could find was this tuya based plug. I added it to HA using the standard Tuya integration which works fine. However, it only updates the power values if I have the Smart Life app open on my phone. I’ve read multiple times in the forum that this is a common issue and people advised to use localtuya instead. I tried that, set up the iot cloud dev account, got the keys, etc. However, when I try to add my plug, it is not auto-discovered.

If I try to manually configure it, how would I know the protocol version to be used? I could find no clue on that.

Another issue: I not only want to measure the current power, but also the energy produced. For that, I added the Xtend Tuya integration. This worked out of the box, but as with the original Tuya, only updates when the phone app is open.

To summarize, these are my questions:

  • Is it somehow possible to update the Tuya values in HA without opening the phone app?
  • If not, is localtuya the way to go?
  • How to find out the protocol version to add a device in localtuya?
  • Can localtuya show energy values like Xtend Tuya?

Thanks in advance!

Quick update. I now use a fork of the localtuya integration. This one has a protocol “auto” version and it works fine for my plug. It detected version 3.4, so probably it would also work with the “original” localtuya, I guess.

The plug also has an entity Electricity but that’s not really useful as it always showed 0.1 kWh in my case. So, additionally to the localtuya, I’m using the Xtend Tuya to get the energy consumption values (or in my case energy generation) from the cloud. This works well. With the localtuya integration, Xtend Tuya does also update its values regularly.

So, problem solved I guess. Probably not the most elegant solution to use two different custom integrations to read out a single plug, but works for me.