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
46 void setState(
bool isOn);
55 void setBrightness(
int percent);
56 void setRGB(byte r, byte g, byte b);
57 void setHSV(
int hue,
int sat);
61 bool onResponse(
TcpClient& client,
char *data,
int size);
62 void parsePower(
const String& resp);
66 uint16_t port = 55443;
71 YeelightBulbState state = eYBS_Unknown;
void sendCommand(String method, Vector< String > params)
Send any command to the lamp.
The string class.
Definition: WString.h:104
Definition: TcpClient.h:40
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:53
Definition: IPAddress.h:37