krikk / hiking-dds238-2-wifi-din-rail-energy-meter-flashing-tasmota Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Hi, Do you know if its possible to read the export and frequency values and send via mqtt. I have a DDS238 wifi connected to my grid feed, it shows all power going across the DDS238, however it doesn't indicate what direction, as in negative/reverse energy, but on the LCD display of the DDS238 it does show the reverse energy.
I have read that the registers that hold the export data are 21,22,23,24
In the modbus version of the DDS238 it gets this data out, the tasmota code ( file xnrg_09_dds2382.ino) it has:
Energy.export_active = (float)((buffer[19] << 24) + (buffer[20] << 16) + (buffer[21] << 8) + buffer[22]) / 100.0; // 429496729.0 W
float import_active = (float)((buffer[23] << 24) + (buffer[24] << 16) + (buffer[25] << 8) + buffer[26]) / 100.0; // 429496729.0 W
Is it possible to access these registers on the wifi version ?
I have searched and there seemed to be alot of people interested and looking at it but never found any answers.
In the pic below is what I can graph from the mqtt data. On the LCD it says -23 for reverse/export energy, and I would like to get this into home assistant.
Thanks for any help.
I've been using DDS238-2s with tasmota for several years and the counting data is sent directly to my domoticz (domoticz configuration and Idx10 P1 Smartmeter sensor configuration). Everything works fine under normal circumstances, except when there's a power cut, and as soon as the DDS238-2 reboots, the first data sent to my domoticz is no good at all! Someone else has the same problem (clearly a bug generated by TASMOTA) ?
Hi,
Is it possible that you will sell one flashed device?
My knowledge with soldering are not so fine for this.
Regards
FYI: sold in Germany (Europe?) as Ketotek KTEM06 on amazon
Hi,
I have installed tasmota 11.0.0 on my 3x DDS238, and just from the one I have connected up I am getting mqtt messages continually, so with all 3 connected I am thinking they will block out all other mqtt messages.
Is the a way to suppress the amount of mqtt messages from TuyaReceived ?
I have read the documentation on TuyaMCU here https://tasmota.github.io/docs/TuyaMCU/ but not sure what I am doing and don't want to stuff it up.
What I would like is to get a message at boot and then one every 60 seconds about power usage, and when the device is turned off an on, and the state of the device (on/off) every minute.
At the moment my pi is getting so many mqtt messages from the one DDS238 that I am not get all messages from other sensors,
I have tried with:
Rule1 on System#Boot do RuleTimer1 5 endon on Rules#Timer=1 do backlog TuyaSend8; RuleTimer1 60 endon
and this
Rule1 on System#Boot do RuleTimer1 60 endon on Rules#Timer=1 do backlog TuyaSend8; RuleTimer1 60 endon
Both the above didn't seem to do anything.
Below is a snapshot of what I get in less than 2 seconds.
08:35:01 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:35:08 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA03070008120200040000000029","Cmnd":7,"CmndData":"1202000400000000","DpType2Id18":0,"18":{"DpId":18,"DpIdType":2,"DpIdData":"00000000"}}}
08:35:09 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA0307000813020004000000002A","Cmnd":7,"CmndData":"1302000400000000","DpType2Id19":0,"19":{"DpId":19,"DpIdType":2,"DpIdData":"00000000"}}}
08:35:10 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA0307000814020004000009A5D9","Cmnd":7,"CmndData":"14020004000009A5","DpType2Id20":2469,"20":{"DpId":20,"DpIdType":2,"DpIdData":"000009A5"}}}
08:35:11 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA03070008650200040000000A86","Cmnd":7,"CmndData":"650200040000000A","DpType2Id101":10,"101":{"DpId":101,"DpIdType":2,"DpIdData":"0000000A"}}}
08:35:12 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:35:23 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:35:34 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:35:38 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA03070008120200040000000029","Cmnd":7,"CmndData":"1202000400000000","DpType2Id18":0,"18":{"DpId":18,"DpIdType":2,"DpIdData":"00000000"}}}
08:35:39 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA0307000813020004000000002A","Cmnd":7,"CmndData":"1302000400000000","DpType2Id19":0,"19":{"DpId":19,"DpIdType":2,"DpIdData":"00000000"}}}
08:35:40 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA0307000814020004000009A5D9","Cmnd":7,"CmndData":"14020004000009A5","DpType2Id20":2469,"20":{"DpId":20,"DpIdType":2,"DpIdData":"000009A5"}}}
08:35:41 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA03070008650200040000000A86","Cmnd":7,"CmndData":"650200040000000A","DpType2Id101":10,"101":{"DpId":101,"DpIdType":2,"DpIdData":"0000000A"}}}
08:35:45 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:35:56 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:36:07 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:36:08 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA03070008120200040000000029","Cmnd":7,"CmndData":"1202000400000000","DpType2Id18":0,"18":{"DpId":18,"DpIdType":2,"DpIdData":"00000000"}}}
08:36:09 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA0307000813020004000000002A","Cmnd":7,"CmndData":"1302000400000000","DpType2Id19":0,"19":{"DpId":19,"DpIdType":2,"DpIdData":"00000000"}}}
08:36:10 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA0307000814020004000009A5D9","Cmnd":7,"CmndData":"14020004000009A5","DpType2Id20":2469,"20":{"DpId":20,"DpIdType":2,"DpIdData":"000009A5"}}}
08:36:11 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA03070008650200040000000A86","Cmnd":7,"CmndData":"650200040000000A","DpType2Id101":10,"101":{"DpId":101,"DpIdType":2,"DpIdData":"0000000A"}}}
08:36:18 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:36:29 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:36:38 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA03070008120200040000000029","Cmnd":7,"CmndData":"1202000400000000","DpType2Id18":0,"18":{"DpId":18,"DpIdType":2,"DpIdData":"00000000"}}}
08:36:39 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA0307000813020004000000002A","Cmnd":7,"CmndData":"1302000400000000","DpType2Id19":0,"19":{"DpId":19,"DpIdType":2,"DpIdData":"00000000"}}}
08:36:40 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
08:36:40 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA0307000814020004000009A4D8","Cmnd":7,"CmndData":"14020004000009A4","DpType2Id20":2468,"20":{"DpId":20,"DpIdType":2,"DpIdData":"000009A4"}}}
08:36:41 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA03070008650200040000000A86","Cmnd":7,"CmndData":" 650200040000000A","DpType2Id101":10,"101":{"DpId":101,"DpIdType":2,"DpIdData":"0000000A"}}}
08:36:51 - tele/tasmota_09C676/RESULT {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
Hello,
I have followed the flashing method some time ago and managed to integrate this meter into HA. It works fine except for two issues, one which I noticed just now:
Hiking DDS238-2 WIFI power-meter
Program Version | 12.0.2(tasmota)
2022-06-20T12:41:03
2_7_4_9/2.2.2-dev(38a443e)
8T06:15:32
2391 at 0xF4000
37
Software/System restart
power-meter
wifi network name (64%, -68 dBm) 11n
tasmota-DCACAA-3242
C4:5B:BE:DC:AC:AA
192.168.1.220
192.168.1.249 <-- wrong gateway ip!! it should be 1 not 249!
255.255.255.0
192.168.1.249 <-- here it should be 6 instead of 249
192.168.1.4
Enabled
192.168.1.67
1883
homeassistant
DVES_DCACAA
tasmota_%06X
cmnd/tasmotas/
cmnd/tasmota_DCACAA/
cmnd/DVES_DCACAA_fb/
Disabled
None
14462122 (ESP8266EX)
0x1540C8
2048 KB
1024 KB
619 KB
384 KB
26.0 KB
I am not very familiar with tasmota and I see no obvious way to change the time or modify the gateway ip.
Can anyone help me out with this?
Hello I have just purchased this meter and wanted to flash tasmota to it so I can integrate it into homeassistant. However, whatever I try I cannot get it to flash.
I am using windows 11 and followed all the guides to the letter. But no matter what I do is I get a timeout in the tasmotizer like so:
What is it that I am doing wrong?
I tried to pinout from here: https://user-images.githubusercontent.com/4527135/124747294-b04dd780-df19-11eb-962f-7e01ce873563.png
I have a feeling that there is something missing and I can't figure it out.
Cheers
Good day @krikk,
As a total newb to this world could you please include a high level of what can be achieved by this mod and what you are achieving please?
I pretty excited to see that this readily available device from AliExpress has an open source firmware that allows us to play 8)
I am looking to modify to include data logging to internal memory which can then be downloaded later. Do you know if this is possible with the Tasmota FW?
Sorry if this is the wrong place to ask - only just dipped my toes in 8)
Cheers,
Jasper
Hey, thank you for the guide, it really helped a lot. I was new to flashing the ESP this way, so struggled a bit. I found a youtube video that had a good diagram to use. After getting things wired up like this, I had no issues flashing the device with tasmota.
Reference:
https://www.youtube.com/watch?v=JE3vWB-rhFM
Hello,
I have followed the guide and all was well with the meter so I went ahead and installed it to measure the power for the entire house. Two days after I installed it I lost contact with it (I was monitoring it through homeassistant integration). I still have power in the house but I just cant reconnect it to wifi.
What should I do? I have read that normally you would do the 6 on off cycles and get back to the wifi connection settings or something but this is not possible becuase I would destroy stuff in the house buy doing 6 fast on off cycles.
Is there something I can do to get it back online?
Upon inspection of the network, it appears as one of the clients in the router list but I cannot ping it!
I wonder if the line frequency is available from the TuyaMCU itself.
How about dpId=9, what does it mean?
Thank you for this page. I wasn't able to flash it without desoldering the wifi module but finally everything works.
Does anyone know if i can change the timezone in which the Today kWh consumption resets? In midnight UTC it starts from 0 but im wondering if this is configurable.
Dear all
This is not the first product that i flash with tasmota, but for this one impossible.
I could pair with smartlife without issue, so it means this is not an issue with hardware.
I have soulded connector to RX TX VCC and GPI00, put GPI00 on ground when starting (used tasmotizer) but it not works.
has anyone had the same problem ? or an idea ?
Thanks in advance
I've been programing the modules without disordering.
Just remove from the LCD board from the power module, connect the programing pins, gnd and 3.3V, ensure a good power supply able to supply 200mA or more, and that is enough.
With the lcd module floating on the air the tuya mcu is usually stuck in reset so it does not interfere with the programming.
i dont know if this is a general tasmota or setting thing or simply gets not pushed.
but the device can show the frequency on the display and it would be nice to have it in tasmota, too!
also i see its a 2 way power meter so it would also nice to have to see the forward and reverse power flow. this is very handy eg. when use the meter for a solar planel inverter(s) where the power flows forward in the nighttime and reverse on daytime. or vice versa when used on solar powered battey inverters or on USVs on power outages.
can we get this working?
sash
Thank you very much for this guide!
I've got an issue. On restart, the daily and total energy get very high values from somewhere. I used the Tasmota energyreset to zero them out, but when I restart the device, they get overwritten with ~5000 KWh or so.
The voltage, power and current energy seems about right, it's just on restart that the total energy gets a bad value.
Hi,
In one of the issues it was pointed out that esphome can display reverse energy on the DDS238-2, and that the settings are:
- platform: "tuya"
name: "${friendly_name} kWh +"
sensor_datapoint: 101
unit_of_measurement: "kWh"
accuracy_decimals: 3
icon: "mdi:flash"
filters:
- multiply: 0.01
- platform: "tuya"
name: "${friendly_name} kWh -"
sensor_datapoint: 9
unit_of_measurement: "kWh"
accuracy_decimals: 3
icon: "mdi:flash"
filters:
- multiply: 0.01
sensor_datapoint: 101 is what tasmota and esphome uses for positive energy, and sensor_datapoint: 9 is what esphome uses for reverse energy.
I have been looking at this as I want to monitor the export of solar energy to grid.
I have installed the tuyaMCU helper bookmarklet:
https://github.com/sillyfrog/Tasmota-Tuya-Helper
And it shows datapoint 9, which is used in esphome for reverse energy as shown in below screen shot
The curious thing is that it doesnt show dpID 101. So I am wondering where that came from for the backlog setting TuyaMCU 37,101; ?
Can functionID be used for more than one datapoint, eg TuyaMCU 37,101; TuyaMCU 37,9;
EDIT:
I just checked another DDS-238 that is connected to my hotwater cylinder, and is shows both dpID 101 and 9, they both have tasmota 11 on and have exactly same config.
I have the Zigbee Tuya version instead of WiFi, can I also do the same, change the firmware to the Tasmota?
Thanks.
Connect a buzzer (3V active type) to GPIO15 and GND. Better to use a mosfet (BS170) to ensure the ESP is not overloaded.
Use this template:
{"NAME":"Hiking DDS238-2 WIFI","GPIO":[0,2272,0,2304,0,0,0,0,0,0,320,480,32,0],"FLAG":0,"BASE":54}
Configure the buzzer as needed.
Examples:
Beep when current > 20 A:
Rule3
ON energy#current>20 DO buzzer -1,3,20 ENDON
ON energy#current<20 DO buzzer 3,1,1 ENDON
Beep on wifi connect / disconnect:
Rule 4
ON Wifi#Connected DO backlog buzzer 2,1,1; ENDON
ON Wifi#Disconnected DO backlog buzzer 1,3,1; ENDON
Hey,
is it possible to add the missing read outs for frequency in Hz and reverse kWh?
I have not enough experience with TuyaMCU, but maybe there is a fnId/dpId which deliver these read outs?
The documentation at https://tasmota.github.io/docs/TuyaMCU/#fnid seems to be incomplete (as noted), the fnID 37 is also missing there.
A solution would be nice 🙂
Hi.
I've recently bought the hiking DDS238-2-WIFI.
Straight open it up, trying the flashing without the soldering,
But it didn't succeeded.
I've just realized, my Hiking-DDS238-2 comes with the WR3 Chip instead of the TYWE3S.
https://imgur.com/a/J4shu8A
Is anyone here succeeded flashing that chip?
Hi,
Could you be so kind to publish in github oriinal firmware of TYWE3S from HIKING DDS238-2 WI-FI?
Hello, I just flashed tasmota on my dds238-2.
Everything works well except for an inaccurate count. Indeed, the value of the counter that we receive "TuyaReceived#DpType2Id101" must be multiplied by 10 to obtain a value in Wh.
For the record, a flashing LED = 1 Wh.
The incrementation of the counter received by the variable TuyaReceived#DpType2Id101 is done every 10 Wh ... There would be no other way to get the exact value of the meter at the exact number of Wh??
Besides, I can't understand how tasmota can give us a consumption value of 1 Wh??
If anyone has an idea...
Save bakup of original firmware:
python esptool.py --port COM15 --baud 115200 read_flash 0x00000 0x100000 backup1.img
Restore original firmware:
python esptool.py --port COM15 --baud 234000 write_flash -fm qio -fs 1MB 0x00000 backup1.img
(Adjust the port)
Just to advice that on latest Tasmota dev brach there is native support for DpId=101 data type.
Use this instead:
Backlog TuyaMCU 33,20; TuyaMCU 32,18; TuyaMCU 31,19; TuyaMCU 37,101;
Backlog SetOption72 1; VoltRes 1; WattRes 1;
Also rule 2 is not needed as energy total will be available on ENERGY message.
Additionally see arendst/Tasmota#11837 requesting native support for this DDS238-2 WIFI devices all together.
Hello,
I see that you are using TASMOTA configuration for Tuya connect. Tuya software is written on the ESP module and not in the Power meter IC, into the one you just flashed!
Can you confirm if this setup is working?
... does TASMOTA support direct communication with G80F923?
Hello,
for me the flashing procedure without desoldering did not work.
However, I found a workaround:
https://familie-emmrich.de/Ketotek.jpg
I cut the RX connection on the PCB.
I also used the standard wiring, i.e. dragging GPIO0 to GND.
Don't forget to reconnect RX after flashing.
Enjoy.
I have the firmware flashed with Tasmota 9.2.0. Followed the procedures Hiking DDS238-2 WIFI Module
Tasmota. Seems the relay is not switching.
Hi, @krikk - Thanks for all the info in your guide.
I have flashed 3 DDS238-2 energy meters. For anyone who doesn't have a bench power supply and doesn't want to buy one, but does have access to a 3D printer, this is what I have done/used.
Installed Tasmota 11.0.0
Downloaded tasmota.bin - at top of list of downloads
http://ota.tasmota.com/tasmota/release
Used a bread board power supply for the 3,3V DC power.
https://www.amazon.com.au/Breadboard-Supply-Module-DC7-12V-Arduino/dp/B074H5V51V/ref=sr_1_17?keywords=breadboard+power&qid=1648080742&sr=8-17
Can be had off aliexpress for US$1
Wall plug USB power supply needs to be at least 1A. I used a 3A one.
I had 16mm pogo pins already so printed the below jig for it:
16mm pogp pins jig
https://www.thingiverse.com/thing:4554950
18mm pogo pins jig
https://www.thingiverse.com/thing:4099748
Put pogo pins in each corner of jig as well in RX and IO0 positions so the jig sits on the ESP8266 properly. I used pointed pins as that's what I had, however I think cup end pins would work better.
USB TTL programmer I used is a CP2102, I did try 2 others, that either didn't work or stopped 1/2 way through - lost communication with ESP module, so if you can't get it to flash try a CP2102.
https://www.amazon.com.au/HiLetgo-Cp2102-Module-Serial-Converter/dp/B00LODGRV8/ref=sr_1_11?keywords=cp2102+usb+ttl&linkCode=gs3&linkId=424feaad13a82d1725a0c33de5bd01fe&qid=1648093094&sr=8-11
Again can be had off aliexpress for around US$1
@krikk thanks a lot for this repo, helps a lot.
The new version has the silk screen on top, thought I might share.
The red labels show how to connect the serial flasher.
Hi @krikk
Very nice job, I ordered some to do some testing, I got some ideas to deal with that piece of hardware.
Would you mind (if ou know) tell me on the 6 pins connector from ESP board to main board how are wired the 2 pins in the middle. I think it should be GPIO14 and GPIO16 but I would like to know (I don't have hardware yet) how it's wired.
6 pin connector is as follow (tell me if I'm wrong) :
which of pin 3 and 4 are LED (inverted) or Button ? Is button is active Low or High when idle?
Thank you very much for your help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.