Tuya switches with energy monitoring support

TUYA blocking convert

my node red setup for Tuya Power Monitoring

Note: Set:True injection is just to turn plug on and MSG.payload is for debugged , used in HA config (see below)

note: Node Red the node-red-contrib-tuya-smart node …
refer https://flows.nodered.org/node/node-red-contrib-tuya-smart

node details , note poll interval

MQTT Setup within Node Red

image

HA Sensor setup

HA Results

note: I have moved ALL my automation over to Node Red , pushing the data back to HA is fro presentation purposes only

LeeB

4 Likes

@leeb98 , hi , how do I find the device id , device key for the tuya smart node in nodered? thx

@tvha I used converting them to use Tasmota
it will display the ID
i only listed the devices and got the ID , i did not do the conversion

1 Like

@BradAU any update on getting them working after flashing - accurate power monitoring, etc.

Just found this in another thread. Have ordered a 4 pack of the power monitoring plugs, will report back once set up and configured.

4 pack received today of the Kogan Energy Meter plugs, and can confirm they can easily be flashed with Tuya-convert.

I have only flashed 1 so far for testing, I updated the firmware to the latest available from here after using Tuya-Convert and then went into the console and used these 2 backlog commands to set all of my settings. You can adjust the names and MQTT server and other settings to suit yourself.

Backlog MqttHost YOUR_MQTT_HOST_IP; MqttUser YOUR_MQTT_USERNAME; MqttPassword YOUR_MQTT_PASSWORD; Hostname kogan_1; MqttClient kogan_1; Topic kogan_1; FriendlyName1 kogan_1; Timezone 10; SetOption0 1; TelePeriod 30; PowerRetain 1;

and then after it reboots,

Backlog Module 18 Generic; GPIO0 17 Button1; GPIO4 133 HLW8012 CF; GPIO5 132 HLWBL CF1; GPIO12 131 HLWBL SELi; GPIO13 56 LED1i; GPIO14 21 Relay1;

The second command sets all the GPIO and power reporting easily without needing to select from the list.

Working very well so far. Haven’t done a power calibration yet, however, seems to be reporting accurately with a 40w fan showing 40w-41w.

Nice, I bought a 2 pack last month but haven’t opened them yet. Planning to flash ESPhome to them

@sparkydave Any particular reason for ESP Home over Tasmota? I’ve not used ESP Home, so not sure of the benefits.

Native API rather than MQTT which is apparently slightly faster, and also therefore doesn’t require a broker (I disabled my MQTT broker when I migrated all my devices to the ESPhome API). I have used it on a number of devices now and it’s been awesome. It’s also very easy to incorporate device run automations which can then operate without needing HA, either for simple local control or to make it sort of failsafe in the event that HA (or wifi) is unavailable.

For a device such as a smart plug there probably isn’t much in it regarding benefits etc, however given that I use it for more complicated things such as my retic controller, its great. It supports many auxiliary devices such as displays, I2C boards etc.

Cool, good to know. I might have to give it a spin sometime.

On another note, I did notice the voltage reporting of the plug was sitting about 280v, without testing and calibrating, I just sent the console command VoltageSet 240 to sort it for the moment.

Also, flashed the other 3 of the 4 pack, all worked the same as the first with Tuya-Convert. Super happy to essentially have replacements for my WeMo insights plugs for $20 each that run MQTT.

Works perfect!! Thanks man…

Hey, great stuff, have it working with my system. Is it possible to take this a step further to record the data so you can look back on a monthly, or bi-monthly basis??

Just a thought

Regards

@ Bananaskin im using a docker image of Influxbd and grafana , to present this type of information.

Look like energy report is fully support by TUYA api. anyone can merge into home assistant switch.

https://github.com/codetheweb/tuyapi/issues/121

2 Likes

Has anyone tried it?

Wish to buy some tuya based plugs but only if the power reading is well calibrated, is updated fast , and easily integrated with HASS

I got about 10 of those tuya with power monitoring, different brand have different chipset. All of them converted to tasmota and self calibration is REQUIRED but not hard. Power change is update almost immediate via tasmota MQTT.
However, this feature request is to enable tuya power monitoring data to be accesible by home assistant not via tasmota.

I heard that now tuya-convert does not work anymore, did you flash them using the 4 pins?

Can anyone recommend EU power plugs that are easy to open/close (unscrew it without breaking the enlosure) in order to flash it with the 4 pins?

My goal is in order of preference

  1. find tuya-convert(ible) EU plugs
  2. find EU plugs easily flashable with Tasmota/ESPhome
  3. find EU plugs and use the tuya component but only when is possible fast and fast updated power monitoring

So far all 4 brand if have still flashable via tuya convert. Their are version 1.0.0 firmware.
Most brand does not update their firmware to block it. The company may not even exist anymore.

I am using all UK plug so i dont have recomendation for you

This page probably give you some flashable device but do check the tuya convert issue page before buying.