logo elektroda
logo elektroda
X
logo elektroda

Configuring Tuya Device with BK7231N CBU and OpenBeken Firmware Issues

ramielsaady 510 3
ADVERTISEMENT
  • #1 21463910
    ramielsaady
    Level 2  
    i have this tuya device with bk7231n CBU
    already flash open beken frimware but ican set pin out and if i set channel from import after reboot i cant control untell set import script again !!
    Close-up of an electrical device with visible components and wires.
    A person holds a green circuit board with mounted electronic components.
    Person holding an OBCH brand electricity meter.
    AI: Can you provide the specific model of your Tuya device?
    CBU BK7231N
    AI: Could you describe the exact steps you took to set the pin outs and channels, including any scripts or settings you used?
    //ClearIO
    StartupCommand


    // Start TuyaMCU driver
    startDriver TuyaMCU

    // Read/Write DPIDs (rw)

    // DP 1 - Switch (On/Off)
    setChannelType 1 Toggle
    linkTuyaMCUOutputToChannel 1 1 1

    // DP 11 - Prepayment Switch (On/Off)
    setChannelType 2 Toggle
    linkTuyaMCUOutputToChannel 11 1 2

    // DP 12 - Clear Energy (On/Off)
    setChannelType 3 Toggle
    linkTuyaMCUOutputToChannel 12 1 3

    // DP 14 - Energy Charge (On/Off)
    setChannelType 4 Toggle
    linkTuyaMCUOutputToChannel 14 1 4

    // DP 54 - Power Limit (On/Off)
    setChannelType 5 Toggle
    linkTuyaMCUOutputToChannel 54 1 5

    // DP 63 - Clear Balance (On/Off)
    setChannelType 6 Toggle
    linkTuyaMCUOutputToChannel 63 1 6

    // DP 101 - Over Voltage (Input - Value)
    setChannelType 7 TextField
    linkTuyaMCUOutputToChannel 101 2 7

    // DP 102 - Low Voltage (Input - Value)
    setChannelType 8 TextField
    linkTuyaMCUOutputToChannel 102 2 8

    // DP 103 - Over Current (Input - Value)
    setChannelType 9 TextField
    linkTuyaMCUOutputToChannel 103 2 9

    // DP 104 - Data Set 1 (Read-Only)
    setChannelType 10 ReadOnly
    linkTuyaMCUOutputToChannel 104 2 10

    // Read-Only DPIDs (ro)

    // DP 13 - Balance Energy
    setChannelType 11 EnergyTotal_kWh_div1000
    linkTuyaMCUOutputToChannel 13 2 11

    // DP 18 - Current Reading (A)
    setChannelType 12 ReadOnly
    linkTuyaMCUOutputToChannel 18 2 12

    // DP 19 - Total Energy Consumed (kWh)
    setChannelType 13 EnergyTotal_kWh_div1000
    linkTuyaMCUOutputToChannel 19 2 13

    // DP 20 - Voltage (V)
    setChannelType 14 Voltage_div10
    linkTuyaMCUOutputToChannel 20 2 14

    // DP 53 - Leakage Current (mA)
    setChannelType 15 ReadOnly
    linkTuyaMCUOutputToChannel 53 2 15

    // DP 87 - Additional Monitor Value
    setChannelType 16 ReadOnly
    linkTuyaMCUOutputToChannel 87 2 16
  • ADVERTISEMENT
  • #2 21464208
    p.kaczmarek2
    Moderator Smart Home
    This script should be created in autoexec.bat so it runs at each startup, not in one-time import script. Follow the LittleFS guide to create autoexec.bat:


    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21465588
    ramielsaady
    Level 2  
    Code: JSON
    Log in, to see the code


    using local toya scan befor flash open beken i have this json not i need to seee realtime currunt and voltaj plzz help me to set correct channel
ADVERTISEMENT