Add SHELLY PLUS 1 board with support of relay, switch, BT gateway (#1349)
So that you know, the overtemperature protection is not implemented in the firmware.
This commit is contained in:
1 parent
8a767cf4b8
commit
31ffdf1e2b
9 files changed
+65
-19
No files matched your search
@@ -103,13 +103,16 @@ void MQTTtoONOFF(char* topicOri, char* datacallback) {
|
||||
}
|
||||
# endif
|
||||
|
||||
void ActuatorButtonTrigger() {
|
||||
uint8_t level = !digitalRead(ACTUATOR_ONOFF_GPIO);
|
||||
char* level_string = "ON";
|
||||
if (level != ACTUATOR_ON) {
|
||||
level_string = "OFF";
|
||||
void ActuatorManualTrigger(uint8_t level) {
|
||||
# ifdef ACTUATOR_BUTTON_TRIGGER_LEVEL
|
||||
if (level == ACTUATOR_BUTTON_TRIGGER_LEVEL) {
|
||||
// Change level value to the opposite of the current level
|
||||
level = !digitalRead(ACTUATOR_ONOFF_GPIO);
|
||||
}
|
||||
Log.trace(F("Actuator triggered %s by button" CR), level_string);
|
||||
# else
|
||||
level = !digitalRead(ACTUATOR_ONOFF_GPIO);
|
||||
# endif
|
||||
Log.trace(F("Actuator triggered %d" CR), level);
|
||||
digitalWrite(ACTUATOR_ONOFF_GPIO, level);
|
||||
// Send the state of the switch to the broker so as to update the status
|
||||
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
|
||||
|
||||
Reference in new issue
Block a user