27#ifndef SRC_SUPLA_CONTROL_BISTABLE_RELAY_H_
28#define SRC_SUPLA_CONTROL_BISTABLE_RELAY_H_
30#include <supla-common/proto.h>
58 bool statusPullUp =
true,
59 bool statusHighIsOn =
true,
61 _supla_int_t functions =
62 (0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER));
79 bool statusPullUp =
true,
80 bool statusHighIsOn =
true,
82 _supla_int_t functions =
83 (0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER));
102 bool statusPullUp =
true,
103 bool statusHighIsOn =
true,
104 bool highIsOn =
true,
105 _supla_int_t functions =
106 (0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER));
111 void turnOn(_supla_int_t duration = 0)
override;
112 void turnOff(_supla_int_t duration = 0)
override;
113 void toggle(_supla_int_t duration = 0)
override;
115 bool isOn()
override;
116 bool isStatusUnknown();
119 void internalToggle();
123 uint32_t disarmTimeMs = 0;
124 uint32_t lastReadTime = 0;
126 int16_t statusPin = -1;
127 bool statusPullUp =
true;
128 bool statusHighIsOn =
true;
130 bool lastCommandTurnOn =
false;
void iterateAlways() override
Method called on each SuplaDevice iteration.
Definition bistable_relay.cpp:112
void onInit() override
Third method called on element in SuplaDevice.begin()
Definition bistable_relay.cpp:85
BistableRelay(int pin, int statusPin=-1, bool statusPullUp=true, bool statusHighIsOn=true, bool highIsOn=true, _supla_int_t functions=(0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER))
BistableRelay constructor which works on ESP's GPIO (with defaul Supla::Io)
Definition bistable_relay.cpp:69
int32_t handleNewValueFromServer(TSD_SuplaChannelNewValue *newValue) override
Handles "new value" request from server.
Definition bistable_relay.cpp:137