差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
developmentboard:esphome_smart_light_bulb [2024/11/30 02:02] – admin | developmentboard:esphome_smart_light_bulb [2024/12/18 14:41] (当前版本) – admin | ||
---|---|---|---|
行 1: | 行 1: | ||
ESPHome Smart Light Bulb | ESPHome Smart Light Bulb | ||
- | Yaml File: | + | Introduction – Detected by Home Assistant |
- | Yaml File: | + | – Controlled by MQTT, Web UI, HTTP, etc |
+ | |||
+ | – Using times, scripts, rules | ||
+ | |||
+ | – Open source | ||
+ | |||
+ | – Use ESP8285-2M as MCU | ||
+ | |||
+ | Specification – RGB+C+W, 9W | ||
+ | |||
+ | – 850LM | ||
+ | |||
+ | – AC: | ||
+ | |||
+ | – 2700-6500K | ||
+ | |||
+ | – E26/E27 | ||
+ | |||
+ | – 60 x 60 x 125 mm | ||
+ | |||
+ | – 40000 hours | ||
+ | |||
+ | **GPIOs** | ||
+ | |||
+ | GPIO4 – PWM1 – Cool WhiteGPIO5 – PWM4 – Blue ColorGPIO12 – PWM2 – Red Color GPIO13 – PWM5 – Warm WhiteGPIO14 – PWM3 – Green Color | ||
+ | |||
+ | **Yaml File:** | ||
substitutions: | substitutions: | ||
行 75: | 行 101: | ||
static int flag = 0; | static int flag = 0; | ||
- | static ESPPreferenceObject pref = global_preferences->make_preference(23332500UL, | + | static ESPPreferenceObject pref = global_preferences→make_preference(23332500UL, |
- | if((flag == 1) && (network:: | + | if((flag == 1) && (network:: |
{ | { | ||
行 99: | 行 125: | ||
pref.save(& | pref.save(& | ||
- | global_preferences->sync(); | + | global_preferences→sync(); |
if(val >= 3){ | if(val >= 3){ | ||
- | my_global_mode->value() = false; | + | my_global_mode→value() = false; |
} | } | ||
行 117: | 行 143: | ||
pref.save(& | pref.save(& | ||
- | global_preferences->sync(); | + | global_preferences→sync(); |
} | } | ||
行 123: | 行 149: | ||
} | } | ||
- | if(!my_global_mode->value()){ | + | if(!my_global_mode→value()){ |
if(cnt == 1){ | if(cnt == 1){ | ||
行 131: | 行 157: | ||
char b[] = " | char b[] = " | ||
- | wifi_wificomponent->clear_sta(); | + | wifi_wificomponent→clear_sta(); |
- | wifi_wificomponent->save_wifi_sta(a, | + | wifi_wificomponent→save_wifi_sta(a, |
wifi:: | wifi:: | ||
- | wifi_wificomponent->set_ap(wifi_wifiap); | + | wifi_wificomponent→set_ap(wifi_wifiap); |
- | wifi_wificomponent->set_ap_timeout(5000); | + | wifi_wificomponent→set_ap_timeout(5000); |
flag = 1; | flag = 1; | ||
- | rgbww_rgbwwlightoutput->set_color_interlock(false); | + | rgbww_rgbwwlightoutput→set_color_interlock(false); |
} | } | ||
行 205: | 行 231: | ||
{ | { | ||
- | my_global_mode->value() = true; | + | my_global_mode→value() = true; |
} | } | ||
行 304: | 行 330: | ||
disabled_by_default: | disabled_by_default: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||