logo elektroda
logo elektroda
X
logo elektroda

OpenBeken Support for Tuya 3 Phase Powermeter (ZGMISMART-SPM02)?

vincenzoernst1 3873 45
ADVERTISEMENT
  • #31 21102692
    p.kaczmarek2
    Moderator Smart Home
    can you enable verbose logging and give log again? Somehow channel value is lost?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 21102888
    vincenzoernst1
    Level 9  

    found it in the logs! my fault. typo. sorry!

    next step is to put it to real 3 phase mains. will report back.
  • ADVERTISEMENT
  • #33 21102900
    p.kaczmarek2
    Moderator Smart Home
    What kind of typo was that? Can you show your current autoexec.bat for clarity?
    Helpful post? Buy me a coffee.
  • #34 21102909
    vincenzoernst1
    Level 9  

    I ALWAYS update the config in the opening post!

    I swapped dplds L2 voltage was...err..... 105 ......must happen when I cleared config, cause it worked before
  • ADVERTISEMENT
  • #35 21274110
    vincenzoernst1
    Level 9  
    @p.kaczmarek2

    im missing the openbeken  build in HA info. it shows "unkown", also the IP doesnt show up in HA. since the info is in mqtt there might be a glitch in the posted topic?

    Diagnostic screen showing Build as unknown in the application.

    Added after 58 [minutes]:

    >>21095146

    @divadiow

    im trying to get the rest of the dpid working. now im searching for reasonable channel types for:

    "DPID 6,7,8: "phase", raw,
    9: "code": "fault", "type": "bitmap",
    "DPID 17,18,19": { "code": "alarm_set_1", "type": "raw",

    any suggestions on what channels to use?

    "DPID 2": { "code": "cur_neutral", "type": "value", this is not reasonablecause this unit has a neutral but its ONLY for self powering the unit. there you only can measure the units power consumption. this is not very usefull.

    16 is "switch" but how?! this is physically simply not possible by design?!?!



    maybe like so?

    //phase_a
    setChannelLabel 14 "L1"
    setChannelType 14 OpenClosed_Inv
    linkTuyaMCUOutputToChannel 6 raw 14
    
    // breaker_id
    setChannelLabel 17 " breaker_id"
    setChannelType 17 ReadOnly
    linkTuyaMCUOutputToChannel 19 string 17
    
    // fault
    setChannelLabel 18 "device fault"
    setChannelType 18 ReadOnly
    linkTuyaMCUOutputToChannel 9 bitmap 18
    


    breaker id shows 0. also its shown as: "Channel breaker_id". channel is not a nice wording here.
    for "OpenClosed_Inv" setChannelLabel 14 "L1" is NOT working. it shows "CLOSED (ch14)". Why?
  • #36 21274799
    p.kaczmarek2
    Moderator Smart Home
    Does executing publishAll fix the missing information in MQTT HA (with a delay)?
    Helpful post? Buy me a coffee.
  • #37 21275240
    vincenzoernst1
    Level 9  
    @p.kaczmarek2

    with publishAll build is shown correctly. 👍 is this a bug or does it intended behave this way?
    Diagnostic interface displaying software version, signal strength, temperature, and uptime.


    IP doesnt show up though. so the link ("Besuchen" / "visit" in the english version, i guess) to the OB gui does link to the wrong IP:

    Screenshot of a user interface displaying device and sensor information.
  • #38 21275585
    p.kaczmarek2
    Moderator Smart Home
    I was almost sure that "publishAll" does the same what is done if you enable "broadcast self state on MQTT connect", so it's most likely a bug, but it's very strange... I will need to triple-check it.
    Helpful post? Buy me a coffee.
  • #39 21275591
    vincenzoernst1
    Level 9  
    can i help to check?
  • #40 21792941
    Egzi
    Level 14  
    I have bought this module lately. Product description says Yagusmart, but on the package it says Zemismart SPM02-D2TW.
    The dpIDs are totally different. Why is that?

    My current autoexec.bat:
    startDriver TuyaMCU
    startDriver httpButtons
    
    // emulate being connected to cloud
    tuyaMCU_defWiFiState 4
    
    setChannelLabel 1 "Energy Forward Total"
    setChannelType 1 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 1 val 1
    
    setChannelLabel 2 "Energy Reverse Total"
    setChannelType 2 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 23 val 2
    
    setChannelLabel 3 "Frequency"
    setChannelType 3 Frequency_div100
    linkTuyaMCUOutputToChannel 32 val 3
    
    setChannelLabel 4 "Current Unbalance"
    setChannelType 4 ReadOnly_div100
    linkTuyaMCUOutputToChannel 130 val 4
    
    setChannelLabel 5 "Power Total"
    setChannelType 5 Power
    linkTuyaMCUOutputToChannel 29 val 5
    
    setChannelLabel 6 "Power Factor"
    setChannelType 6 PowerFactor_div100
    linkTuyaMCUOutputToChannel 50 val 6
    
    setChannelLabel 7 "L1 Voltage"
    setChannelType 7 Voltage_div10
    linkTuyaMCUOutputToChannel 103 val 7
    
    setChannelLabel 8 "L2 Voltage"
    setChannelType 8 Voltage_div10
    linkTuyaMCUOutputToChannel 112 val 8
    
    setChannelLabel 9 "L3 Voltage"
    setChannelType 9 Voltage_div10
    linkTuyaMCUOutputToChannel 121 val 9
    
    setChannelLabel 10 "L1 Current"
    setChannelType 10 Current_div1000
    linkTuyaMCUOutputToChannel 104 val 10
    
    setChannelLabel 11 "L2 Current"
    setChannelType 11 Current_div1000
    linkTuyaMCUOutputToChannel 113 val 11
    
    setChannelLabel 12 "L3 Current"
    setChannelType 12 Current_div1000
    linkTuyaMCUOutputToChannel 122 val 12
    
    setChannelLabel 13 "L1 Power"
    setChannelType 13 Power
    linkTuyaMCUOutputToChannel 105 val 13
    
    setChannelLabel 14 "L2 Power"
    setChannelType 14 Power
    linkTuyaMCUOutputToChannel 114 val 14
    
    setChannelLabel 15 "L3 Power"
    setChannelType 15 Power
    linkTuyaMCUOutputToChannel 123 val 15
    
    setChannelLabel 16 "L1 Power Factor"
    setChannelType 16 PowerFactor_div100
    linkTuyaMCUOutputToChannel 108 val 16
    
    setChannelLabel 17 "L2 Power Factor"
    setChannelType 17 PowerFactor_div100
    linkTuyaMCUOutputToChannel 117 val 17
    
    setChannelLabel 18 "L3 Power Factor"
    setChannelType 18 PowerFactor_div100
    linkTuyaMCUOutputToChannel 126 val 18
    
    setChannelLabel 19 "L1 Energy Forward Total"
    setChannelType 19 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 109 val 19
    
    setChannelLabel 20 "L2 Energy Forward Total"
    setChannelType 20 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 118 val 20
    
    setChannelLabel 21 "L3 Energy Forward Total"
    setChannelType 21 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 127 val 21
    
    setChannelLabel 22 "L1 Energy Reverse Total"
    setChannelType 22 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 110 val 22
    
    setChannelLabel 23 "L2 Energy Reverse Total"
    setChannelType 23 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 119 val 23
    
    setChannelLabel 24 "L3 Energy Reverse Total"
    setChannelType 24 EnergyTotal_kWh_div100
    linkTuyaMCUOutputToChannel 128 val 24
    
    setChannelLabel 25 "Data Report Duration"
    setChannelType 25 TextField
    linkTuyaMCUOutputToChannel 102 val 25
    
    setChannelLabel 26 "Device Locating"
    setChannelType 26 Toggle
    linkTuyaMCUOutputToChannel 101 val 26
    
    setButtonEnabled 1 1
    setButtonLabel 1 "Query State"
    setButtonCommand 1 tuyaMcu_sendQueryState 
    
    setButtonEnabled 2 1
    setButtonLabel 2 "Refresh"
    setButtonCommand 2 "tuyaMcu_sendState 35 enum 0"
    
    setButtonEnabled 3 1
    setButtonLabel 3 "Clear Counters"
    setButtonCommand 3 "tuyaMcu_sendState 12 bool 1"


    There are also some other dpIDs, is there any way to brake down raw or bitmap values into separate channels? Is there a way to display a string dpID?
    6: [0-raw] 0x090A000000000000
    7: [0-raw] 0x090A000000000000
    8: [0-raw] 0x090A000000000000
    9:[5-bitmap] (1000-phaseloss) (0100-overcurrent)
    17: [0-raw]  Raw V=0x7000019 (high power alarm, 0x70uvvvv - u=0 for disabled u=1 for enabled, vvvv-2bytes power value 1-65535kW)
    18: [0-raw] Raw V=01 01 00 3F 02 00 00 0F 03 01 00 FD 04 00 00 B4 05 00 00 00 07 00 00 00
       alarms: 6 values of format - 1-byte setting id, 1-byte enabled=0x01/disabled=0x00, 2-bytes parameter value
          id 01 - overcurrent (1-65535A)
          id 02 - unbalanced load (1-100%)
          id 03 - overvoltage (1-65535V)
          id 04 - undervoltage (1-65535V)
          id 05 - phase loss (no parameter)
          id 07 - negative active power (no parameter)
       
    19: [3-str] "vow25010001" - device id
  • ADVERTISEMENT
  • #41 21793000
    vincenzoernst1
    Level 9  
    have u made a backup from the orig firmware? if yes, can u post it here?
  • #43 21818139
    vincenzoernst1
    Level 9  
    @divadiow

    would you mind extracting the dpids from the new revision above? thx!
  • #44 21818190
    divadiow
    Level 37  
    Sure. I can't until Sunday evening, tomorrow, however.
  • #45 21818393
    vincenzoernst1
    Level 9  
    >>21818190

    no hurrry ;-)
  • Helpful post
    #46 21819489
    divadiow
    Level 37  
    Code: JSON
    Log in, to see the code


    you might have a TuyaMCU update too

    Firmware update screen showing version V1.1.12 found and Auto Upgrade toggle off

Topic summary

The discussion revolves around the compatibility of OpenBeken firmware with the Tuya 3 Phase Powermeter model ZGMISMART-SPM02. The user seeks to determine if OpenBeken can effectively handle and display metrics for three-phase power, voltage, current (both forward and reverse), and frequency, given that Tasmota does not support this functionality. Participants in the forum provide insights on flashing the device with OpenBeken, configuring the TuyaMCU interface, and creating custom HTML panels. They discuss the mapping of data points (dpIDs) for voltage and current readings, troubleshooting issues with displaying all three voltages, and scripting capabilities for data processing. The conversation also touches on the need for proper channel types and the potential for custom scripting to enhance functionality.
Summary generated by the language model.
ADVERTISEMENT