Skip to content

Commit a95ccdc

Browse files
authored
added somfy repeat option (1technophile#957)
update somfy dependency to fix bug with multiple somfy remotes
1 parent ff7ef4f commit a95ccdc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

docs/use/actuators.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ The json message must contain two properties:
102102
* remote: the index of the remote which is used to send the command (index start at zero)
103103
* command: the command which should be send with the remote as string, see [table of command names](https://github.com/Legion2/Somfy_Remote_Lib#available-commands).
104104

105+
Optionally it can contain the following property:
106+
* repeat: the number how often the command is repeated, default 4. Should be used to simulate long button presses, by increasing the repeat number, e.g. 20.
107+
105108
::: tip
106109
The middle button on physical Somfy RTS Remote controls is called "My".
107110
:::

main/ZactuatorSomfy.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ void MQTTtoSomfy(char* topicOri, JsonObject& jsonData) {
6767
const String commandData = jsonData["command"];
6868
const Command command = getSomfyCommand(commandData);
6969

70+
const int repeat = jsonData["repeat"] | 4;
71+
7072
EEPROMRollingCodeStorage rollingCodeStorage(EEPROM_ADDRESS_START + remoteIndex * 2);
7173
SomfyRemote somfyRemote(RF_EMITTER_GPIO, somfyRemotes[remoteIndex], &rollingCodeStorage);
72-
somfyRemote.sendCommand(command);
74+
somfyRemote.sendCommand(command, repeat);
7375
# ifdef ZradioCC1101
7476
ELECHOUSE_cc1101.SetRx(receiveMhz); // set Receive on
7577
# endif

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ m5stack = M5Stack@0.3.1
119119
smartrc-cc1101-driver-lib = SmartRC-CC1101-Driver-Lib@2.5.5
120120
stl = https://github.com/mike-matera/ArduinoSTL.git#7411816
121121
shtc3 = https://github.com/sparkfun/SparkFun_SHTC3_Arduino_Library
122-
somfy_remote=Somfy_Remote_Lib@0.2.0
122+
somfy_remote=Somfy_Remote_Lib@0.3.0
123123
rtl_433_ESP = https://github.com/NorthernMan54/rtl_433_ESP#38ee89a
124124
emodbus = miq19/eModbus@1.0.0
125125
gfSunInverter = https://github.com/BlackSmith/GFSunInverter.git#v1.0.1

0 commit comments

Comments
 (0)