Tuya switches with energy monitoring support

thus using a direct integration rather than the tuya cloud poll…

I’m also interested in this - I have a bunch of tuya enabled wifi light switches. But Ive not seen anyone else say they have flashed/tested them for tasmota. Making me exceptionally nervous - everything works right now, just lots of

Updating tuya switch took longer than the scheduled update interval 0:00:30

warnings

There is a guy who has done a few videos on flashing the smart plugs with ESPHome to expose all the information

I plan to try it soon

Nice find! That should work with the Kogan plugs that @leeb98 was referring to I would imagine. I might be tempted to buy some myself.

His ESPhome code for it is here.

I’ve got some of the Kogan plugs that @leeb98 referred to and have flashed them with both Tasmota 6.4.1 using tuya-convert and espHome using the config in the video from Intermittent Technology.
While both flashed with no issues, I haven’t been able to get either one working properly as yet.
The espHome config is closest so far with the relay and LED working, and energy monitoring displaying values albeit incorrect so far.
The LED in the Kogan plugs is a single green as opposed to the red & blue in the video, but easily controlled using the red LED GPIO.
Still no luck getting the onboard button working and need to look at energy setup and calibration, will update further when I get these things sorted.

1 Like

interesting. ive used tuya-convert in the past with Tasmota with no issues but i seem to have bricked my first Kogan plug (turns on but the led just blinks). Going to try and reflash the backup once i get a tri-wing screw driver. The brilliant plugs from bunnings work a treat but power monitoring would be great.

1 Like

I bought some of these a few months back and ended up returning them. The power updates sometimes took up to 30 minutes to show up, and that didnt work for my use case… Has your experience been any better?

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