21#define S_LOCK S_ADDITIONAL+1
22#define S_QUIET S_ADDITIONAL+2
23#define S_SWING S_ADDITIONAL+3
78 int Poll(
short cause)
override;
87 int Ctrl(
itemCmd cmd,
char* subItem=NULL,
bool toExecute=
true,
bool authorized =
false)
override;
94 void SendData(
byte req[],
size_t size);
96 #if defined (__SAM3X8E__)
A single LightHub item (virtual channel).
Definition item.h:232
chPersistent * getPersistent()
Definition item.cpp:641
abstractOut()
Definition abstractout.h:22
virtual void link(Item *_item)
Definition abstractout.h:24
Item * item
Item currently linked to this driver.
Definition abstractout.h:55
Persistent per-item state of an AC channel, stored in the config tree.
Definition out_ac.h:35
byte power
Definition out_ac.h:38
byte inCheck
Definition out_ac.h:40
byte mode
Definition out_ac.h:39
byte data[37]
Definition out_ac.h:37
uint32_t timestamp
Definition out_ac.h:41
Placeholder for driver-persistent data attached to an item (I_EXT field).
Definition abstractout.h:8
Command + value container passed between items, drivers and MQTT.
Definition itemCmd.h:306
int Ctrl(itemCmd cmd, char *subItem=NULL, bool toExecute=true, bool authorized=false) override
Applies a control command: /set, /cmd, /fan, /mode, and lock/swing/queit/raw subitems (see class doc)...
Definition out_ac.cpp:497
int Setup() override
Initializes persistent storage and starts the UART at 9600 baud.
Definition out_ac.cpp:325
int Poll(short cause) override
Polls the AC every 5 s, parses the 37-byte status frame and publishes the status topics.
Definition out_ac.cpp:398
uint8_t portNum
Definition out_ac.h:95
int Stop() override
Releases the persistent storage and marks the channel as unknown.
Definition out_ac.cpp:367
void getConfig()
Reads itemArg and selects the UART port (0-3) for the AC line.
Definition out_ac.cpp:48
void SendData(byte req[], size_t size)
Definition out_ac.cpp:284
HardwareSerial * ACSerial
Definition out_ac.h:99
acPersistent * store
Definition out_ac.h:92
int isActive() override
Returns 1 if the AC power bit is set, 0 otherwise.
Definition out_ac.cpp:392
out_AC()
Default constructor; binds nothing until link() is called.
Definition out_ac.h:70
void link(Item *_item)
Links the channel item, attaches persistent storage and reads the config.
Definition out_ac.h:72
void InsertData(byte data[], size_t size)
Definition out_ac.cpp:92
int getChanType() override
Returns CH_THERMO (5).
Definition out_ac.cpp:769
Item (virtual channel) system of LightHub.
void modbusIdle(void)
Idle hook invoked by the Modbus code between serial operations to let the main system breathe.
Definition main.cpp:3008
void SubmitParameters(aJsonObject *callbackObj, const char *name, itemCmd value, bool doMapping)
Definition out_multivent.cpp:420