Tuya LOCAL with energy monitoring and without tuya-convert

All my switches i made/added “separate” sensors for in Local_Tuya, by “Running” ADD again(and unchecked the small box) “forgot the name in there” … so for each switch i have 3 sensor for mA,W,V, so the switch it self i can exclude from History/Recorder

ok, 1 switch, 3 sensors… I only have 1 switch and one sensor as only interested in consumption.
I never tried running ADD again…will try on my dev-env later this week, interesting finding

And how do you add the W value in the energy dashboard? I was not able to do this without creating the ‘integration’ sensor.

Thank you boheme, I’ll try it.

Yes, only way to get current_consumption into Energy,… i have considered skipping mA, as it’s really not relevant, But V is currently essential to me, as i have an “old” buggy Power installation :frowning: , want to have an “overview” so i can see where the V variate a-lot ( goes from 217 to 239 ) from time to time, Grid-company obviously say that’s my problem :slight_smile:

Thanks…I too have ‘some’ variance but 229<>235…which is fine… A value of 239 would be an issue for one of my appliances (an old one)

1 Like

I’ve got my devices (curtain motors) working well in LocalTuya. I’m now keen to sever the link to the cloud and test it is purely a local link. But I have not the slighest idea of how to proceed. Does anyone know of a guide I could follow?

1 Like

pull the network-plug from your internet router, HA should continue to work locally (for these things)…it does do that for Zigbee… I would like to know what you found afterwards :slight_smile:

Well…I found that it doesn’t work if I block the IP address of the motor from internet access. So clearly Tuya devices may need some sort of “heartbeat” signal? Or I could spoof the request to the Tuya server but that is well beyond my router configuration skills.

For me not unexpected…, Tuya local uses a local-key which is actually generated by the IoTproject and is not tied to the object…i.e. it changes if you re-add the object in your projects.
So my guess is the same as yours… it is not ‘local’ …the benefit vs. the normal integration is the ‘push’ vs. ‘pull’ (see description on locatuya). I have just asked that owner to expand a bit on that in its documentation

Hi everyone

I’m trying to configure this switch (HOCH disyuntor inteligente con WIFI, Interruptor inalámbrico automático con Control remoto, para fábrica, Tuya|Fusibles de interruptor de circuito| - AliExpress), but when I access the DPS, only letters like “AAAAAAAAAAAA” come out
Does anyone know what I’m doing wrong?

and in which number comes out only “0” comes out

it is supposed to have 3 voltages, 3 currents, 3 consumptions since it is three-phase

but I can’t get anything out of it and I’ve been investigating for 3 or 4 days (having read the 700 posts)

Thank you very much in advance

Captura de pantalla 2022-05-10 203906

Are all the data (consumption, voltage, temperature…etc…) sent through DPS? or is there another way to fetch the data?

I would like to ask for help. I installed Localtuya from Hacs. It recognizes one of the shutters, it works beautifully and perfectly. There is no way I can install the other so that the controls appear. SmartLife works nicely, but the buttons are missing here as in the previous picture of Makis.
This error message is in the log. What can be done, I see there was such a problem. The other (kitchen) shutters work just fine, just the way they should. Please help, I’ll have a coffee :slight_smile:

This is a just a on/off switch nothing else.

Any suggestions on how to configure the Gosund SP211 socket to monitor consumption?

I’ve tried every which way to configure this with the Local Tuya front end, but it only allows to choose values 0, 1, 4, 5, 6. 18, 19 and 20 are not options. Has anyone else experienced this? And since I’m using the Local Tuya front end, I can’t even FIND where the configuration is to manually edit this. Any help there would be cool, too.

Hi All

I’m trying to configure my fiber driver to use the localtuya instead of cloud.
Some stuff I can figure out, but for the rest I’m sort of lost :smiley:

The configs looks like this
billede
So I guess 1 is on/off, 2 is color mode, but what about the rest?

Of course, through tuya cloud, it works fine.
It has a ‘true’ white, and then color mode.

This is from the App:

I’ve been digging through here to get my Tuya plugs (this one) to send energy usage to HA. I’m using localtuya, and from what I understand now, the plug doesn’t give the energy reading, I’d need to create that with a formula (using Integration)?

If I look through my DPs I think:
1= on/off
18 = current
20 = voltage
19 = power (not sure about this one)

So what’s my next step? Do I create a sensor for each, or for one? Do I need a second integration like “Integration” to make this work? Thanks for any tips.

There are plenty of posts where people donot seem to get the values so here is my setup on a gosund plug

  1. the localtuya, selecting 1/18/… ALIKE above gives me this
  2. from that I extract the consumption

    and then the integration sensor on the 2nd one
#Gosund 1
  - platform: template
    sensors:
      gosund_1_consumption:
        friendly_name: "GosundPlug1 current consumption"
        unit_of_measurement: 'W'
        device_class: power
        value_template: "{{ states.switch.gosundplug1.attributes.current_consumption }}"
  - platform: integration
    source: sensor.gosund_1_consumption
    name: gosund_plug_1
    method: left
    round: 2
    unit_prefix: k
1 Like

Thanks for the explanation. Small additions…

What’s the difference between current and current consumption?
And how do you extract the consumption from the switch?

So far I am doing everything via the UI, but I don’t recognise the screenshots, where in HA is that?

Thanks again!

current is in Ampere, consumption in W
Screenshots made in Development tools > States