I need help with Tuya smart circuit breaker flashed with OpenBK. How to MQTT to HomeAssistant consuption,voltage,power and control Toggle function?
here is my autoexec
json:
here is my autoexec
// Start TuyaMCu driver
startDriver TuyaMCU
// set TuyaMCU baud rate
//tuyaMcu_setBaudRate 115200
// set TuyaMCU default wifi state 0x04, which means "paired",
// because some TuyaMCU MCUs will not report all data
// unless they think they are connected to cloud
tuyaMcu_defWiFiState 4
setChannelType 1 EnergyTotal_kWh_div100
setChannelType 2 toggle
// linkTuyaMCUOutputToChannel dpId verType tgChannel
linkTuyaMCUOutputToChannel 16 bool 2
// set voltage, current ,power channel types
setChannelType 3 Voltage_div10
setChannelType 4 Current_div1000
setChannelType 5 Power
// map dpID 6, which is VCP format, to first voltage, then current, then power (3, 4, 5)
linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3
// map dpID 1, which is energy, to channel 1
linkTuyaMCUOutputToChannel 1 val 1
json:
{
"id": 109,
"type": 3,
"data": "AAAA"
},
{
"id": 106,
"type": 3,
"data": "EwAAAAAAAAAAAA=="
},
{
"id": 105,
"type": 2,
"data": 0
},
{
"id": 104,
"type": 1,
"data": 1
},
{
"id": 102,
"type": 2,
"data": 5
},
{
"id": 107,
"type": 2,
"data": 10
},
{
"id": 18,
"type": 0,
"data": "01010276"
},
{
"id": 12,
"type": 1,
"data": 0
},
{
"id": 13,
"type": 2,
"data": 0
},
{
"id": 11,
"type": 1,
"data": 0
},
{
"id": 9,
"type": 5,
"data": "00"
},
{
"id": 111,
"type": 4,
"data": 0
},
{
"id": 1,
"type": 2,
"data": 25
},
{
"id": 6,
"type": 206,
"data": "0931000000000000"
},
{
"id": 16,
"type": 1,
"data": 1
}