LightHub 4.6.0
Open-source smart home controller firmware
Loading...
Searching...
No Matches
itemCmd.cpp File Reference
#include <Arduino.h>
#include "itemCmd.h"
#include "main.h"
#include "Streaming.h"
#include "item.h"
#include "bright.h"
#include <utility/stringbuffer.h>
#include <Adafruit_NeoPixel.h>

Functions

int txt2cmd (char *payload)
int type2num (char *payload)
int replaceCmdToInt (aJsonObject *verb)
int replaceTypeToInt (aJsonObject *verb)

Function Documentation

◆ replaceCmdToInt()

int replaceCmdToInt ( aJsonObject * verb)

◆ replaceTypeToInt()

int replaceTypeToInt ( aJsonObject * verb)
Returns
the channel type code (CH_*) for a config "type" verb (string or int).

◆ txt2cmd()

int txt2cmd ( char * payload)

Translate a text payload to a command code.

Parameters
payload- text command word ("ON", "HALT", ...), number or color
Returns
CMD_* code; CMD_VOID for plain numbers, CMD_UNKNOWN if unrecognized

◆ type2num()

int type2num ( char * payload)