【已解决】EFR32MG21A020平台的TuyaOS 3.6.1版本zigbee子设备的场景开关demo SDK
目前场景开关demo是一路普通开关+一路场景开关,我在demo上多加了两路,变成了一路普通开关+三路场景开关,请问如何变成两路开关+两路场景
简单、多彩、自由讨论
https://tuyaos.com/
目前场景开关demo是一路普通开关+一路场景开关,我在demo上多加了两路,变成了一路普通开关+三路场景开关,请问如何变成两路开关+两路场景
请问是zigbee设备吗?是用哪个sdk开发的呢?
是zigbee设备,TuyaOS 3.6.1版本的场景开关demo
1.请在 tuya iot平台创建 2+2场景复合开关,并将修改程序中的pid为创建的pid, https://iot.tuya.com/
这个场景开关_带继电器版只有蓝牙mesh的,没有zigbee的
我觉得可能会不会是代码的问题呀
下面这张图是我创建的场景开关dp点
#define DEVICE_MAX_CHANNELS 4 //Maximum number of supported channels
#define CHANNEL_NUMS 4 //The current number of channels, the maximum cannot exceed DEVICE_MAX_CHANNELS
#define CHANNEL0_MODE_FLASH_ID 0
#define CHANNEL1_MODE_FLASH_ID 1
#define CHANNEL2_MODE_FLASH_ID 2
#define CHANNEL3_MODE_FLASH_ID 3
#define CHANNEL0_SG_FLASH_ID 4
#define CHANNEL1_SG_FLASH_ID 5
#define CHANNEL2_SG_FLASH_ID 6
#define CHANNEL3_SG_FLASH_ID 7
#define STARTUP0_ONOFF_FLASH_ID 8
#define STARTUP1_ONOFF_FLASH_ID 9
#define STARTUP2_ONOFF_FLASH_ID 10
#define STARTUP3_ONOFF_FLASH_ID 11
//When the channel is a scene switch, the status of the channel indicator 0:off; 1:on
#define SCENE_CHANNEL_LED_STATUS LED_ST_OFF
//The user needs to define what function each channel is. 0: Support scene and switch functions, which can be switched through the panel; 1: Only support scene switch;
#if defined DEV_CHANNEL_MODE_ENABLE
#define CHANNED_MODE_CFG { \
0, \
0, \
1, \
1, \
}
#define CHANNEL_MODE_FLASH_ID { \
CHANNEL0_MODE_FLASH_ID, \
CHANNEL1_MODE_FLASH_ID, \
CHANNEL2_MODE_FLASH_ID, \
CHANNEL3_MODE_FLASH_ID, \
}
#define CHANNEL_SG_FLASH_ID { \
CHANNEL0_SG_FLASH_ID, \
CHANNEL1_SG_FLASH_ID, \
CHANNEL2_SG_FLASH_ID, \
CHANNEL3_SG_FLASH_ID, \
}
#endif
#ifdef SUB_RELAY_UNIT_ENABLE
#define STARTUP_ONOFF_FLASH_ID { \
STARTUP0_ONOFF_FLASH_ID, \
STARTUP1_ONOFF_FLASH_ID, \
STARTUP2_ONOFF_FLASH_ID, \
STARTUP3_ONOFF_FLASH_ID, \
}
#endif
iot后台创建四路场景开关即可
客户后续另开贴已解决:链接 viewtopic.php?t=471
总结:
1.DP17需要较高网关版本支持,无线小网关请升级至1.3.2以上。
2.后续各位开发者提问题时请带上子设备虚拟id,方便我们进行确认。
3.虚拟id可以通过点击子设备界面右上角编辑按键进入,通过设备信息栏点击查看。