Last Updated on : 2024-06-25 03:52:03download
This topic describes the features provided by the Bluetooth Beacon Mesh Lighting Product Development Kit (PHY6252).
Version | Description |
---|---|
0.0.1 (applies to TuyaOS v3.6.4) | Implement the basic features for a lighting product. |
Device pairing and reset.
Lighting scenes.
If the color temperature is 0%, the cool white light should come off. To present the lighting effect, the cool white light is set to its minimum brightness.
If the color temperature is not 0%, when the light acts as a warm to cool white light, the warm white value is calculated and used as the cool white value. The cool white is calculated in the usual way.
If cool white and warm white alternate, the cool white fades out to minimum brightness and then fades into full brightness. If a scene has warm white light only, brightness cannot be adjusted.
Supported LED drivers: PWM, BP5758D, KP18058, and SM2235EGH.
Music sync.
Countdown timer.
Power-on behavior.
Segmented lighting adjustment.
Gamma configuration.
Power scale.
On/off gradient.
Power loss detection.
Local schedule.
Compatible with Bluetooth beacon mesh remote controls.
JSON configuration of no-code solutions.
Product testing with a host.
OTA firmware update.
Open Visual Studio Code.
In Tuya Wind IDE, right-click on your project and choose Config Project. You can modify the following configurations to try the demo. After modification, generate macro definitions in app_config.h
.
#define TEST_DEBUG 0
#define APP_LOG_ENABLE 0
#define APP_JSON_LOG_ENABLE 0
#define APP_LED_REMINDER_LOG_ENABLE 0
#define APP_LED_LOG_ENABLE 0
#define APP_LOCAL_TIMER_LOG_ENABLE 0
#define APP_SCENE_LOG_ENABLE 0
#define APP_SEGMENT_DIMMING_LOG_ENABLE 0
#define APP_LIGHT_POWER_CHECK_LOG_ENABLE 0
#define APP_DRIVER_BP5758_LOG_ENABLE 0
#define APP_DRIVER_KP18058_LOG_ENABLE 0
#define APP_DRIVER_SM2235_LOG_ENABLE 0
#define APP_DRIVER_I2C_LOG_ENABLE 0
#define APP_DRIVER_PWM_LOG_ENABLE 0
beacon_dev_s beacon_dev_data = {
.mac = {0xdc,0x23,0x4f,0x4f,0x82,0xd2},
.authkey = "R1XQxgMID5ujN58m",
.pid = "3jnrwpet",
.version = 0x01,
.flag = 0x00,
.kind = 0x1015,
.state = STATE_NOT_PAIRED
};// If you set `TEST_DEBUG` to 1 and use the public PID (gjhptpwy) to try out the demo, you might fail to control the device because this PID has been occupied by another developer. Therefore, we recommend you use your own PID and AuthKey.
When flashing firmware, if you do not need the file download configuration, you can set JSON_CONFIG_DEFAULT
to 1
in app_json_config.h
and modify DEFAULT_CONFIG
as needed.
#define JSON_CONFIG_DEFAULT 0 ///< default json config
#if JSON_CONFIG_DEFAULT
#define DEFAULT_CONFIG "{rstnum:3,rstcor:c,Jsonver:1.0.0,brightmin:10,r_lv:1,c_lv:1,wfcfg:spcl_auto,colormin:10,pmemory:1,pairt:60,segmentdim:1,ctrl_pin:2,cmod:rgbcw,g_lv:1,acdetect_pin:1,cwtype:0,onofftime:800,rstbr:50,remdmode:0,colormax:100,g_pin:7,w_lv:1,c_pin:3,notdisturb:1,module:phy6252_24pin,b_pin:5,b_lv:1,ctrl_lv:1,colorpfun:1,cwmaxp:100,dmod:0,acdetect_lv:0,colormaxp:100,onoffmode:0,brightmax:100,w_pin:4,pwmhz:1000,r_pin:6,rsttemp:100,category:1015,defcolor:g,defbright:100,crc:101,}"
#endif
You can create a product on the Tuya Developer Platform to check out the details of DPs.
If you have any problems with TuyaOS development, you can post your questions in the Tuya Developer Forum.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback