Bulb Example
The Bulb Example in the HomeDing library is made especially for WiFi bulbs with the ESP8266 processor inside. These devices only have a small amount of Flash Memory available (1 MByte) for program and web UI storage.
Because the flash memory is very limited on these devices the minimal sketch only contains Elements that are used within bulbs. e.g. no sensors and provide the base functionality combined with a set of elements that can be used in the configuration of the device.
See introduction to Minimal Examples.
Included Elements
The elements that are included in this example sketch are those that support bulbs and other light devices like NEOpixel based strip controllers.
- device Element – for device level configurations.
- ota Element – for OTA update support
- ntptime Element – for self-hosted time based on/off automation
- time Element - time based events
- state Element – to save the state of the last settings
- scene Element – support multiples scene specific settings
- switch Element – interactive switch on/off
- value Element – support of simple values like brightness
- color Element – support of color values
- light Element – driving RGB LEDs using PWM
- my9291 Element – driving RGB LEDs using the my9291 driver chip.
- neo Element – driving RGB LED stripes based on neopixel driver chip.
You can control what elements are included in the firmware file by enabling or disabling the #define statements for registering the elements in the sketch file.
If you like to know what element are available in a device just ask for the URL http://<devicename>/$elements