logo elektroda
logo elektroda
X
logo elektroda

Three-phase smart meter Hiking DTS238-7 TOMZN 60A - interior, communication protocol

p.kaczmarek2 3648 17
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • Three-phase energy meter WIFI with the casing removed, revealing internal electronics. Today we take a look inside a rather expensive product, bought for a whole $160 (that's over £600). This will be a three-phase energy meter that works with the Tuya ecosystem. We will also consider here the possibility of freeing it from the cloud so that it works 100% locally, without the manufacturer's servers.

    The topic shown here was carried out with colleague @DeDaMrAz , he owns the device and from him come the photos.
    Let's start with the purchase. We bought the equipment in China:
    DTS238-7 three-phase energy meter with WiFi Tuya and display.
    There is rather no need for me to explain on foot here what this device does. I will simply quote the description from the seller:
    Photo of the user manual for a three-phase energy meter compatible with Tuya. List of new features for a three-phase energy meter.
    Technical specifications table for a three-phase energy meter.

    HIKING three-phase energy meter with smartphone app
    HIKING three-phase energy meter with smartphone app
    Three-phase WiFi energy meter with visible wiring instructions.
    Three-phase Wi-Fi energy meter Hiking DTS238-7 with visible dimensions.
    HIKING three-phase energy meter with screen and measurements in mm
    A manual is included, which specifies the measurements we can expect:
    Energy meter manual with measurement table
    But we're interested in the inside, so let's remove the case:
    Three-phase energy meter WIFI with the casing removed, revealing internal electronics.

    We found a piece based on the TYWE3S WiFi module, the ESP8266. Tasmota could be uploaded. Admittedly, we were hoping for a version with BK7231 to test OpenBeken a bit, but this is not a problem. You can always replace the WiFi module.
    TYWE3S WiFi module mounted on a PCB inside a three-phase energy meter. Interior of a three-phase energy meter with production date.
    Interior:
    Close-up of the interior of a three-phase energy meter with visible electronic components and colorful wires. Image of the interior of a three-phase energy meter, showing wires connected to terminals. Interior of a three-phase energy meter with electronic components on the board.
    On the other side of the display board you can also see an additional microcontroller, here the SH79F6431P. An 8051 core, this is the one that communicates with the WiFi module via the aforementioned TuyaMCU protocol.
    Close-up of a circuit board with visible microcontrollers.
    RN8302B renergy in turn is responsible for the measurement, the coils of the transformers are connected to it:
    Interior of a three-phase energy meter with open casing
    Figure diagram of the part performing the measurement:
    Circuit diagram of a typical three-phase energy meter. Circuit diagram of the RN8302B three-phase energy meter.
    This small 24C16 bone (U7) in the picture of the board is in turn an EEPROM.
    On the board there is also a chip responsible for RS485 communication, which we haven't tested yet:
    Technical specification of GM3085E
    And I would forget, already after removing the casing - what the display shows:




    We also made a copy of the original batch:
    https://github.com/openshwprojects/FlashDumps...66/TYWE3S_HIKING-3-phase-wifi-smart-meter.bin

    There is still a power supply - inside is a PN8145T based, flyback power supply:
    Excerpt from the documentation of the PN8145T device by Chipown.
    Technical documentation of the PN8145T chip.



    Packet capture
    This device is based on the TuyaMCU, i.e. the WiFi module here only realises the communication with the outside world, and the rest (including the LCD) is handled by an additional microcontroller. There have already been several topics about the TuyaMCU:
    TuyaMCU protocol - communication between microcontroller and WiFi module
    Flashing guide, install and configure TuyaMCU - configure dpID for Home Assistant
    I recommend reading the above topics, otherwise this paragraph will be incomprehensible.
    Well, in accordance with the above topics we prepared to capture TuyaMCU packets. We used the ADUM1201 optoisolation modules for this.
    Here's what it looks like in practice:
    Three-phase energy meter with exposed casing and connected wires.
    Collected data in our analyser, usual work:
    Screenshot of TuyaMCU Explorer/Analyzer application showing packet data in hex formats.
    Test timer (you can see here the dpID of the countdown value and the state of the timer - boolean):
    Screenshot of TuyaMCU Explorer/Analyzer software showing packet data.
    For review:
    https://github.com/openshwprojects/TuyaMCUAnalyzer/tree/main/project/samples
    From more important dpIDs we will discover:
    
    
    //1 => on/off
    //18 => current in mA
    //19 => power in watts/10
    //20 => voltage
    

    In Tasmat this can be mapped according to this documentation:
    https://tasmota.github.io/docs/TuyaMCU-Devices/
    For OBK the guide is here:
    https://www.elektroda.com/rtvforum/topic4038151.html

    Configuring OpenBeken Our piece was using TYWE3S, but a colleague had a couple of CB3S in stock so he replaced the WiFi module so that we could upload OBK . Here is the autoexec.bat file with the configuration of the basic dpIDs for this device:
    
    startDriver TuyaMCU
    tuyaMcu_defWiFiState 4
    
    // may be needed, depends on device
    //tuyaMCU_setBaudRate 9600
    
    // dpID 1 is power toggle ON or OFF
    setChannelType 1 Toggle
    linkTuyaMCUOutputToChannel 1 bool 1
    
    // dpID 18 is amperage in mA
    setChannelLabel 2 Current
    setChannelType 2 Current_div1000
    linkTuyaMCUOutputToChannel 18 val 2
    
    // dpID 19 is power in W
    setChannelLabel 3 Power
    setChannelType 3 Power_div10
    linkTuyaMCUOutputToChannel 19 val 3
    
    // dpID 20 is power in W
    setChannelLabel 4 Voltage
    setChannelType 4 Voltage_div10
    linkTuyaMCUOutputToChannel 20 val 4
    
    test:
    tuyaMcu_sendQueryState
    delay_s 1
    goto test
    

    An additional loop at the end of the configuration calls for a data refresh from TuyaMCU every second.
    The whole thing works correctly and also allows automatic pairing with Home Assistant via HASS Discovery:




    . Summary As expected -. the whole thing is based on TuyaMCU. With a bit of cleverness and willingness, it is possible to make this product cloud-free, both with Tasmota and with OpenBeken. We specifically still got the versions with TYWE3S (ESP8266) after purchase, but there have also been some recent products from the same series (TOMZ/Hiking) based on CB3S (BK7231N) on our forum. As I have shown, this is not a problem, at the moment all versions of these products known to me are "flashable" without any problem. In summary, if you want a solution that works without the cloud, 100% locally, then you can buy and convert, I will help you if necessary.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 11884 posts with rating 9961, helped 569 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21100360
    youzeq
    Level 14  
    If it measured in both directions at this price it would be like half free. It could then be used for an open autoconsumption control system (e.g. DHW heating) from photovoltaics.
  • #3 21100675
    bubu1769
    Level 42  
    I have recently bought a smaller version of such a meter and it supposedly states that it has the possibility of bidirectional power measurement,
    EARU Electric three-phase energy meter with bi-directional measurement feature.

    In the application itself there is also an indicator of the power given off to the grid, but in my case, due to the lack of photovoltaics, it is not used.
    Screenshot of an energy meter app showing energy consumption and other parameters.

    It is a pity that there is not, or at least I do not see such a possibility, to switch off a single phase.
    Sometimes such a possibility would be useful.
  • #5 21100822
    divadiow
    Level 34  
    p.kaczmarek2 wrote:
    bought for a whole $160 (that's over £600)


    USD?
  • ADVERTISEMENT
  • #6 21100834
    p.kaczmarek2
    Moderator Smart Home
    divadiow wrote:
    p.kaczmarek2 wrote:
    bought for a whole $160 (that's over £600)

    USD?

    Sorry, translation error occured, somehow our machine learning translation system changed "zl" (polish zloty) to £...
    Comparison of currency translation error from $ to £.
    Still, it was some time ago, so the pricing on the offer may have changed. It's also important to note that we've got the more expensive, RS485 + WiFi version.

    paoliniluis wrote:
    whoa! you bought the same device I posted in https://www.elektroda.com/rtvforum/topic4052585.html!!! did you hit the same issue? my error, seems like you got the one based on ESP8266, so sad

    We wanted to get BK7231 one but somehow they indeed sent us ESP-based one. We may still play a bit more with it, check for more dpIDs, etc, but we didn't encounter any issues so far...
    Helpful post? Buy me a coffee.
  • #7 21101026
    Michalwarpas
    Level 8  
    How many amps per phase do you think it is capable of taking? I've dealt with a few sub meters that were capable of 20A or even more. These onro and similar. The problem is winter and a 15kw radiator fed three phase. It just melts away inside.
  • ADVERTISEMENT
  • #8 21101042
    bubu1769
    Level 42  
    When choosing, I took into account the "quality" of this meter.
    At my place there is still combustion heating, so as such there is not a large consumption, since the gas cooker is used instead of induction, peak consumption is a maximum of 16A per phase.
    When I get my thermal imaging camera back, I have to see how the switchboard "shines" under a higher load.
  • #9 21103664
    vincenzoernst1
    Level 6  
    Michalwarpas wrote:
    How many amps per phase do you think it is capable of taking? I've dealt with a few sub meters that were capable of 20A or even more. These onro and similar. The problem is winter and a 15kw radiator fed three phase. It just melts away inside.


    i have one of these flashed and configured to tasmota (and for sale if someone is interested.). this units are rated 60(80) amps.
  • #10 21103675
    p.kaczmarek2
    Moderator Smart Home
    @vincenzoernst1 can you share your Tasmota config, some screenshots from the main panel, and some usage experience?
    Helpful post? Buy me a coffee.
  • #11 21105251
    jarux
    Level 12  
    @p.kaczmarek2 a minor error crept in in the first post. Under the description "RN8302B renergy in turn is responsible for measurement, the coils of the transformers are connected to it: " you have given a picture of the contactor, not the current transformer.

    Btw. I doubt that this contactor will take more than a couple of times on the cage to disconnect a circuit at full load.
  • #12 21130048
    paoliniluis
    Level 4  
    >>21100834

    Hey, what do you think if I mail my device to your place? therefore you can see what's going on with it and also complete this post. You don't need to return it and I'll cover the shipping costs (but import taxes). Let me know what you think
  • #13 21130203
    p.kaczmarek2
    Moderator Smart Home
    @paoliniluis do you have a factory backup of your device? Full 2MB flash? We could try that, but first we should check if there are any import taxes in this case. The item should be marked as gift and declared a low value so they don't tax me like 20$ or more.
    Helpful post? Buy me a coffee.
  • #14 21130605
    paoliniluis
    Level 4  
    >>21130203

    Unfortunately I don't have the factory firmware :(. About sending the breaker, anything you say.
  • ADVERTISEMENT
  • #15 21134938
    vincenzoernst1
    Level 6  
    >>21100675

    @bubu1769


    i have also this unit here and try to get it running with openbeken. not much success so far.
  • #16 21134943
    p.kaczmarek2
    Moderator Smart Home
    Ok I can still try to give it a go, let me know if you want to ship it.
    Helpful post? Buy me a coffee.
  • #17 21139847
    paoliniluis
    Level 4  
    Ok I found why you got a different version: you got the one that says TY on the front, which is https://www.aliexpress.com/item/4000925379665.html
    The Tuya version is the one that says IVAP: https://www.aliexpress.com/item/1005004987892397.html

    Added after 1 [minutes]:

    >>21134943

    I just saw this message, if the message was for me, then let's do it. You can contact me via direct message so we can set up a secure comm channel?
  • #18 21140160
    p.kaczmarek2
    Moderator Smart Home
    Sure, let's chat on Private Message, and we can try to organize the shipment.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the Hiking DTS238-7 TOMZN three-phase smart meter, which operates within the Tuya ecosystem. Users share experiences regarding its capabilities, including bidirectional power measurement and local operation without reliance on cloud services. The device, purchased for approximately $160, is noted for its 60A rating and potential applications in energy management systems, particularly for photovoltaic setups. Some users express concerns about the device's build quality and compatibility with various configurations, including Tasmota and OpenBeken firmware. There are also discussions about the specific model variations and their respective features.
Summary generated by the language model.
ADVERTISEMENT