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 !!
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
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 !!



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