8 #include "../Wiring/WiringFrameworkDependencies.h" 9 #include "../Wiring/WHashMap.h" 10 #include "../Wiring/WVector.h" 11 #include "../Wiring/WString.h" 12 #include "IPAddress.h" 15 #ifndef SERVICES_YEELIGHTBULB_H_ 16 #define SERVICES_YEELIGHTBULB_H_ 18 enum YeelightBulbState
43 void setState(
bool isOn);
52 void setBrightness(
int percent);
53 void setRGB(byte r, byte g, byte b);
54 void setHSV(
int hue,
int sat);
58 bool onResponse(
TcpClient& client,
char *data,
int size);
59 void parsePower(
const String& resp);
63 uint16_t port = 55443;
68 YeelightBulbState state = eYBS_Unknown;
void sendCommand(String method, Vector< String > params)
Send any command to the lamp.
Definition: TcpClient.h:35
Yeelight wifi bulb controller class.
Definition: YeelightBulb.h:27
void updateState()
Start async reading of current lamp state.
bool connect()
Can be skipped. This method will be called automatically from any action method below.
YeelightBulbState currentState()
Get current lamp state (should be called only after updateState)
Definition: YeelightBulb.h:50
Definition: IPAddress.h:30