logo elektroda
logo elektroda
X
logo elektroda

EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU

xury 10734 74
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • Helpful post
    #31 20629705
    xglooom
    Level 8  
    Hi, recently bought this type of energy meter, and try to setup.
    My autoexec now:
    startDriver TuyaMCU
    startDriver NTP
    ntp_timeZoneOfs +06:00
    
    setChannelType 1 toggle
    setChannelLabel 1 "Output"
    
    setChannelType 2 Voltage_div10
    setChannelLabel 2 "Voltage"
    
    setChannelType 3 Power
    setChannelLabel 3 "Power"
    
    setChannelType 4 Current_div1000
    setChannelLabel 4 "Current"
    
    setChannelType 5 EnergyTotal_kWh_div100
    setChannelLabel 5 "Energy"
    
    setChannelType 6 Current_div1000
    setChannelLabel 6 "Leakage current"
    
    setChannelType 7 Temperature
    
    setChannelType 10 TextField
    setChannelLabel 10 "Restart time"
    setChannelType 11 TextField
    setChannelLabel 11 "Restart tries"
    
    linkTuyaMCUOutputToChannel 16 bool 1
    linkTuyaMCUOutputToChannel 1 val 5
    linkTuyaMCUOutputToChannel 6 RAW_TAC2121C_VCP
    linkTuyaMCUOutputToChannel 15 val 6
    linkTuyaMCUOutputToChannel 103 val 7
    linkTuyaMCUOutputToChannel 107 val 10
    linkTuyaMCUOutputToChannel 102 val 11
    


    After adding it to home assistant I can't obtain the energy total values. Looking into the code I found these energy channels would be configured only if BL0937 BL0942 or CSE7766 driver is active. But in my case this data comes from tuyaMCU. So I come up with this solution https://github.com/iglooom/OpenBK7231T_App/commit/811bfaf412cb81793b4445cbd4f4f71e8e9c4e4c but not sure, is it good way, or I should configure it somehow on stock firmware.

    PS: Also for this such case with two "current" channels I managed to alter some functions as well https://github.com/openshwprojects/OpenBK7231T_App/pull/863
  • ADVERTISEMENT
  • #32 20629740
    p.kaczmarek2
    Moderator Smart Home

    Both changes seem okay, please open pull requests and let me know when they are ready so I can merge them.

    I must admit it is really unfortunate that I had to use this "set channel by type" approach but at the time of TuyaMCU implementation I was not aware of the fact that some few meters are using a "raw" compound packets with a single dpID carrying multiple data points, like that voltage/current/power packet.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #33 20629784
    xglooom
    Level 8  
    PR 863 is ready to merge.

    But for "ENERGY_SENSOR" I'm not sure. Can my changes break someone's config with EnergyTotal_kWh_div100 and a real sensor like CSE7766?
  • #34 20629797
    p.kaczmarek2
    Moderator Smart Home

    Currently BL0942, BL0937 and CSE (and similar power metering chips) are not using custom channel types at all. They are hardcoded to both UI and HASS discovery so everything is automatic. Users don't have to set up channel types for them. For instance, for BL0942, all you need to do is "startDriver BL0942" in short startup command.

    Channel types are only for more advanced devices like TuyaMCU.

    So, with the state of things now, if someone is using EnergyTotal_kWh_div100, then you can be sure that they're using TuyaMCU as well.
    Helpful post? Buy me a coffee.
  • #35 20630070
    xglooom
    Level 8  

    @p.kaczmarek2 Honestly I don't know what's better, I'm a newbie in HA system, so it is up to you :)
    IMHO the ability to use multiple same channels is good for future-proofing, so setting only the first channel by type I think makes sense anyway.

    I've created a PR https://github.com/openshwprojects/OpenBK7231T_App/pull/864 for EnergyTotal_kWh
  • #36 20630133
    p.kaczmarek2
    Moderator Smart Home

    xglooom wrote:

    IMHO ability to use multiple same channels is good for future-proofing, so setting only the first channel by type I think makes sense anyway.

    The thing is that channel type Current is published via HASS discovery to Home Assistant as just a current, so even if you use it for leakage, Home Assistant Discovery will not work right.
    This is why I think the correct solution is to create channel type LeakageCurrent_div100 or anything.

    xglooom wrote:

    Perfect! Merged into main tree, thanks.
    EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #38 20630769
    p.kaczmarek2
    Moderator Smart Home
    Approved, but can you explain the logic behind this?
    Helpful post? Buy me a coffee.
  • #39 20630786
    xglooom
    Level 8  

    This channel reports an absolute number of kWh from the first power-up, not an instant or day value. So it should be 'total_increasing', as I wrote in the first PR, but didn't notice a couple of lines below this value set to 'measurement'.

    If I leave this channel as 'measurement', then HA Energy dashboard doesn't work and warns "The following entities have state class ‘measurement’ but ‘last_reset’ is missing".
  • #40 20646866
    Zogdan
    Level 9  
    Just for sharing my experience with the EARU EAMPDW-TY-63

    Flashing was easy with the BK7231 GUI Flash Tool 1.1.1 ( https://github.com/openshwprojects/BK7231GUIFlashTool/releases/tag/v1.1.1 ) , UART is nicely exposed via regular pins. Needed to short CEN to ground to get it going, and change baudrate to 115200.
    EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU


    As expected, no valuable info could be extracted from the backup firmware:
    Code: JSON
    Log in, to see the code



    Looking at the existing teardowns, https://github.com/vedga/eampdw-ty-63/tree/main/doc
    there is a difference in the board.

    This is board_v02 2023/02/21

    Running openbkn 1.17.175 with the suggested autoexec in this thread did the following :
    - toggle works
    - connecting anything to the output would show a very high leak current (25 ++ mA), and multiple times tripped the leak protection
    - voltage is ok, but no power measurement
    - log Warn:EnergyMeter:Consumed 256 unwanted non-header byte in BL0942 buffer

    Here are some images.
    EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU
  • #41 20646950
    p.kaczmarek2
    Moderator Smart Home

    Hello, how did you manage to get BL0942 warning? I assume that your device is TuyaMCU, so BL0942 driver should not be running.

    Is your device using BL0942 directly (without TuyaMCU), or is the BL0942 started by mistake?

    Do you see the reception of TuyaMCU packets in the Web App Log?
    Helpful post? Buy me a coffee.
  • #42 20647003
    Zogdan
    Level 9  

    True, it was still set in the Startup command after selecting the default EARU power meter from the device list (as a starting point).

    Cleared that so now only tuyamc and ntp are running.

    The error disappeared, but the leak current is really high. I will flash the original firmware back and see if that still happens, it might be a defect.
  • #43 20647032
    p.kaczmarek2
    Moderator Smart Home

    Ah, I see. The template had a copy-paste leftover. I apologize, it must have slipped through the review. I have removed that line from the template for now.

    You can try with the original firmware. Or maybe Tuya changed the precision and now we need to divide by the next power of 10?
    Helpful post? Buy me a coffee.
  • #44 20647046
    Zogdan
    Level 9  

    I'm not sure how the leak current protection works exactly, it is independent of OpenBKN because the display flashes red, and switches off for 30 seconds, all managed by the V9801S.

    The V9801S SoC (see http://www.jiangsuwanwu.com/index/product?id=316) is actually a very complete power meter solution.
    Datasheet: https://datasheetspdf.com/pdf-file/941764/VangoTechnologies/V9801/1.

    To be followed up...
  • #45 20647222
    p.kaczmarek2
    Moderator Smart Home

    So you have leakage current displayed on LCD? And the value is high on LCD?

    If so, it's not OBK fault, as the LCD connects directly to MCU, no WiFi module is involved.
    Helpful post? Buy me a coffee.
  • #46 20647226
    Zogdan
    Level 9  
    The original firmware shows the same behavior tripping immediately leak protection, so it is not openBKN related.

    Good enough that you can switch it off by going into setup mode (long press set, it should flash the digits) and going from 30mA->0mA = OFF

    So far Voltage and Power reading are ok, but current reading is not, nor total energy.


    Switch (channel 1: toggle)
    Voltage 240.30V (ch 2: voltage div 10)
    Power 7W (ch 3 :power )

    I set all other channels to READONLY to read the raw values, but all are zero.

    TuyaMCU log :

    
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 73 00 00 00 00 00 07 A6 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 73 00 00 00 00 00 07 A6 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 74 00 00 00 00 00 07 A7 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 74 00 00 00 00 00 07 A7 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 74 00 00 00 00 00 07 A7 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 74 00 00 00 00 00 07 A7 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 74 00 00 00 00 00 07 A7 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 72 00 00 00 00 00 07 A5 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 73 00 00 00 00 00 07 A6 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 72 00 00 00 00 00 07 A5 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 73 00 00 00 00 00 07 A6 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 73 00 00 00 00 00 07 A6 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 73 00 00 00 00 00 07 A6 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6F 00 00 00 00 00 07 A2 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 74 00 00 00 00 00 07 A7 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 74 00 00 00 00 00 07 A7 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 73 00 00 00 00 00 07 A6 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 74 00 00 00 00 00 07 A7 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6F 00 00 00 00 00 07 A2 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6F 00 00 00 00 00 07 A2 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6C 00 00 00 00 00 07 9F 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6D 00 00 00 00 00 07 A0 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6D 00 00 00 00 00 07 A0 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6D 00 00 00 00 00 07 A0 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6D 00 00 00 00 00 07 A0 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6C 00 00 00 00 00 07 9F 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6C 00 00 00 00 00 07 9F 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6F 00 00 00 00 00 07 A2 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6F 00 00 00 00 00 07 A2 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 70 00 00 00 00 00 07 A3 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6D 00 00 00 00 00 07 A0 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6F 00 00 00 00 00 07 A2 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6F 00 00 00 00 00 07 A2 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 70 00 00 00 00 00 07 A3 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6E 00 00 00 00 00 07 A1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 6F 00 00 00 00 00 07 A2 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 19 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 0-DP_TYPE_RAW and 8 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 15, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 0C 06 00 00 08 09 70 00 00 00 00 00 07 A3 
    
    [/code]
  • #47 20647429
    p.kaczmarek2
    Moderator Smart Home
    What is your current autoexec?

    Maybe TuyaMCU sends some more data when paired. Ensure your MQTT is on or spoof it with:
    
    tuyaMcu_defWiFiState 4
    
    Helpful post? Buy me a coffee.
  • #48 20647750
    Zogdan
    Level 9  

    Ok, MQTT is set and issued.
    tuyaMcu_defWiFiState 4

    Now, the current also shows correctly. Interesting!

    I'll proceed with TuyaMCUAnalyzer on a non-openBKN version to see if I can get the settings for min/max voltage, maxCurrent, startuptimerSeconds, and leak current setting.

    
    startDriver TuyaMCU
    startDriver NTP
    setChannelType 1 toggle
    linkTuyaMCUOutputToChannel 16 1 1
    setChannelType 2 Voltage_div10
    setChannelType 3 Power
    setChannelType 4 Current_div1000
    setChannelType 5 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 1 0 5
    linkTuyaMCUOutputToChannel 6 RAW_TAC2121C_VCP

  • #49 20647891
    p.kaczmarek2
    Moderator Smart Home

    I wonder why Tuya chose to skip reporting this particular value when the device is not connected to the cloud. Still, it's good to hear it's working now.

    Maybe we should always use the 0x04 Wi-Fi state as default. Currently, 0x04 is reported only when both Wi-Fi and MQTT are connected, unless you override it with the command I mentioned in my previous post.
    Helpful post? Buy me a coffee.
  • #50 20650550
    xury
    Automation specialist
    I already wrote about it at the very beginning.
  • ADVERTISEMENT
  • #51 20652463
    p.kaczmarek2
    Moderator Smart Home
    @xury, could you put the full checked configuration in the first post? This will make it easier for people from abroad to read.
    Helpful post? Buy me a coffee.
  • #52 20690572
    Zogdan
    Level 9  
    Just a small warning on quality:

    I bought a few more of these devices, and they all have the same problem with measuring leak current.

    The RCD function (Residual Current Device) of the EAMPDW-TY63 is unusable and you should not rely on that as a protection device, since it consistently reads too high values, tripping the set protection. If readings are so much all over the place you might wonder if it is reading anything useful, so I just switch it off...

    For completeness or those searching : the printed sticker says EARU EAMPDW-TY-63
  • #53 20700382
    Zogdan
    Level 9  

    >>20650550
    Just flashed another one, but I am still not able to get EnergyTotal from it, can anyone post a working definition?

    current:
    
    startDriver TuyaMCU
    startDriver NTP
    setChannelType 1 toggle
    linkTuyaMCUOutputToChannel 16 1 1
    setChannelType 2 Voltage_div10
    setChannelType 3 Power
    setChannelType 4 Current_div1000
    setChannelType 5 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 1 0 5
    linkTuyaMCUOutputToChannel 6 RAW_TAC2121C_VCP

  • #54 20700488
    p.kaczmarek2
    Moderator Smart Home
    Are you sure that dpID 1 is EnergyTotal? You are also missing:
    
    tuyaMcu_defWiFiState 4
    

    so maybe not all data is transferred?

    See commands docs:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Helpful post? Buy me a coffee.
  • #55 20864333
    mistikdonbass
    Level 4  

    Hello! I decided to flash a similar device too.
    I've almost figured out the configuration, but there are a couple of questions.:
    1. How to reset Energy Total?
    2. getchanneltype 7 Temperature - shows it is unclear what, then 50 °C, then 1 °C, and now 0 °C. Does it even have to work?
    3. This is my configuration, can you check it? Maybe something is missing or superfluous?
    startDriver TuyaMCU
    startDriver NTP
    ntp_timeZoneOfs +03:00
    tuyaMcu_defWiFiState 4
    setChannelType 1 toggle
    setChannelLabel 1 "Output"
    setChannelType 2 Voltage_div10
    setChannelLabel 2 "Voltage"
    setChannelType 3 Power
    setChannelLabel 3 "Power"
    setChannelType 4 Current_div1000
    setChannelLabel 4 "Current"
    setChannelType 5 EnergyTotal_kWh_div100
    setChannelLabel 5 "Energy"
    setChannelType 7 Temperature
    setChannelType 10 TextField
    setChannelLabel 10 "Set MaxVoltage"
    setChannelType 11 TextField
    setChannelLabel 11 "Set MinVoltage"
    setChannelType 12 TextField
    setChannelLabel 12 "Set Current"
    setChannelType 13 TextField
    setChannelLabel 13 "Set leakage"
    // link id 16 to channel 1
    linkTuyaMCUOutputToChannel 16 bool 1
    // link id 1 to channel 5
    linkTuyaMCUOutputToChannel 1 val 5
    // TAC2121C VoltageCurrentPower Packet
    // This will automatically set voltage, power and current
    linkTuyaMCUOutputToChannel 6 RAW_TAC2121C_VCP
    linkTuyaMCUOutputToChannel 12 bool 6
    linkTuyaMCUOutputToChannel 11 bool 7
    linkTuyaMCUOutputToChannel 105 bool 8
    linkTuyaMCUOutputToChannel 106 bool 9
    linkTuyaMCUOutputToChannel 101 2 10
    linkTuyaMCUOutputToChannel 102 2 11
    linkTuyaMCUOutputToChannel 103 2 12
    linkTuyaMCUOutputToChannel 104 2 13
    linkTuyaMCUOutputToChannel 19 3 14


    These lines are incomprehensible to me, can you tell me about them?
    // link id 1 to channel 5
    linkTuyaMCUOutputToChannel 1 val 5
    // TAC2121C VoltageCurrentPower Packet
    // This will automatically set voltage, power and current
    linkTuyaMCUOutputToChannel 6 RAW_TAC2121C_VCP
    linkTuyaMCUOutputToChannel 12 bool 6
    linkTuyaMCUOutputToChannel 11 bool 7
    linkTuyaMCUOutputToChannel 105 bool 8
    linkTuyaMCUOutputToChannel 106 bool 9
    linkTuyaMCUOutputToChannel 101 2 10
    linkTuyaMCUOutputToChannel 102 2 11
    linkTuyaMCUOutputToChannel 103 2 12
    linkTuyaMCUOutputToChannel 104 2 13
    linkTuyaMCUOutputToChannel 19 3 14

  • #56 20864346
    p.kaczmarek2
    Moderator Smart Home
    Hello, which dpID is energy total? That one?
    
    setChannelType 5 EnergyTotal_kWh_div100
    setChannelLabel 5 "Energy"
    
    // link id 1 to channel 5
    linkTuyaMCUOutputToChannel 1 val 5
    


    If I understand correctly, energyTotal is send by TuyaMCU, so we need to know how original Tuya firmware was resetting it...

    Maybe it's possible to just send a new value for that?
    Try to use tuyaMcu_sendState to send 0 to the following dpID:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Helpful post? Buy me a coffee.
  • #57 20864948
    mistikdonbass
    Level 4  

    Now I'm completely confused.
    From the beginning, I deleted the line to check how it would work without it:

    // link id 1 to channel 5
    linkTuyaMCUOutputToChannel 1 val 5


    The total energy count does not work.

    Then I added it and deleted the following:

    setChannelType 5 EnergyTotal_kWh_div100


    Counting still doesn't work.

    Then I added both lines to the code, the counting doesn't work.

    It is possible that there is something left in the memory, I do not know how to reset it.
  • #58 20864949
    p.kaczmarek2
    Moderator Smart Home
    The channel types (setChannelType) are stored in memory. You can use "Go To Web App" to see their list on the right.

    Futhermore, you need a device restart in order for counter to work.

    The setChannelType just sets channel type for display and HA discovery, the second line links the channel with TuyaMCU dpID
    Helpful post? Buy me a coffee.
  • #59 20972823
    njhuiz
    Level 5  

    It seems that I've got a newer version of this device. The board with the display has the same date, but maybe the firmware of the V9801S is different. The second line of the sticker says 2155 instead of 0234 in the post above. The device always displays a leaking current of 2mA, so it could be working. I'll order a 22k high voltage resistor to test if it actually measures leakage.

    The IDs over 100 do not work for me. What I found (using tuyaMcu_sendQueryState) is

    ID 18. RAW (55 AA 03 07 00 18 12 00 00 14) with data:

    01 01 00 10
    03 01 01 0E
    04 01 00 AA
    08 00 00 1E
    09 01 00 00

    where bytes 3,4 is the 16 bit value for max Amps, bytes 7,8 are max Voltage and 11,12 min Voltage. I do not have an idea, what the rest of the bytes mean.
    It seems that the raw block is organized in blocks of 4 bytes. The first byte is sort of a channel number, the second byte can be zero or one and the following two bytes are a 16 bit value.
    The max Voltage for example can be set to 256 with

    tuyaMcu_sendState 18 0 03 01 01 00

    Byte two defines, if the condition triggers the relay. A 0 there will only cause the backlight to blink red, if the set condition is violated.

    Likewise ID 17 has 4 raw bytes
    04 01 00 64
    which corresponds the maximal leak current.

    ID 11 is an unknown bool.
    ID 13 is 0 value, which I could not change with send_state.

    IDs 1,6,15,16 are like described above.

    Is there a way to map these raw values?
  • #60 20972962
    p.kaczmarek2
    Moderator Smart Home
    I think that we have worked on similiar problem in this thread:
    [BK7231N ] Teardown and flashing of Tomzn TOMPD-63 WIFI (not to be confounded with TOMPD-63LW)
    @Angel0fDeath proposed an extra HTTP/CSS page in LittleFS to get extended gui for a device.

    Alternatively you can just enable publishing of dpID and receive it in HA and process it there. Here is how you can order OBK to just publish raw hex for given dpID over MQTT:
    
    linkTuyaMCUOutputToChannel 6 MQTT
    
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the EAMPDW-TY63 device, focusing on the implementation of alternative firmware, OpenBeken, to access measurement data via TuyaMCU. Users share experiences with flashing the device, configuring it to read voltage, current, and power data, and troubleshooting issues related to data accuracy and communication. Key points include the need for specific commands to enable data reporting, the importance of MQTT configuration, and the challenges faced with leakage current measurements. The conversation also touches on the device's firmware capabilities, including the mapping of dpIDs to channels for effective data retrieval and control.
Summary generated by the language model.
ADVERTISEMENT