mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Add RTV protocol support for 433.92 RTS frames. #77
Begin adding v2.0 for motor groups.
This commit is contained in:
parent
e54621f171
commit
b279efdb1f
5 changed files with 101 additions and 2 deletions
17
Somfy.h
17
Somfy.h
|
|
@ -2,7 +2,9 @@
|
|||
#define SOMFY_H
|
||||
|
||||
#define SOMFY_MAX_SHADES 32
|
||||
#define SOMFY_MAX_GROUPS 16
|
||||
#define SOMFY_MAX_LINKED_REMOTES 7
|
||||
#define SOMFY_MAX_GROUPED_SHADES 32
|
||||
|
||||
#define SECS_TO_MILLIS(x) ((x) * 1000)
|
||||
#define MINS_TO_MILLIS(x) SECS_TO_MILLIS((x) * 60)
|
||||
|
|
@ -21,7 +23,8 @@ struct appver_t {
|
|||
};
|
||||
enum class radio_proto : byte {
|
||||
RTS = 0x00,
|
||||
RTW = 0x01
|
||||
RTW = 0x01,
|
||||
RTV = 0x02
|
||||
};
|
||||
enum class somfy_commands : byte {
|
||||
Unknown0 = 0x0,
|
||||
|
|
@ -260,7 +263,17 @@ class SomfyShade : public SomfyRemote {
|
|||
void clear();
|
||||
int8_t transformPosition(float fpos);
|
||||
};
|
||||
|
||||
class SomfyGroup : public SomfyRemote {
|
||||
protected:
|
||||
uint8_t groupId = 255;
|
||||
public:
|
||||
char name[21] = "";
|
||||
uint8_t linkedShades[SOMFY_MAX_GROUPED_SHADES];
|
||||
void setGroupId(uint8_t id) { groupId = id; }
|
||||
uint8_t getGroupId() { return groupId; }
|
||||
bool fromJSON(JsonObject &obj);
|
||||
bool toJSON(JsonObject &obj);
|
||||
};
|
||||
struct transceiver_config_t {
|
||||
bool printBuffer = false;
|
||||
bool enabled = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue