14#ifndef SRC_SUPLA_CONTROL_BISTABLE_RELAY_H_
15#define SRC_SUPLA_CONTROL_BISTABLE_RELAY_H_
17#include <supla-common/proto.h>
47 bool statusPullUp =
true,
48 bool statusHighIsOn =
true,
50 _supla_int_t functions =
51 (0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER));
55 _supla_int_t functions =
56 (0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER));
73 bool statusPullUp =
true,
74 bool statusHighIsOn =
true,
76 _supla_int_t functions =
77 (0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER));
96 bool statusPullUp =
true,
97 bool statusHighIsOn =
true,
99 _supla_int_t functions =
100 (0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER));
105 void turnOn(_supla_int_t duration = 0)
override;
106 void turnOff(_supla_int_t duration = 0)
override;
107 void toggle(_supla_int_t duration = 0)
override;
109 bool isOn()
override;
110 bool isStatusUnknown();
113 void internalToggle();
115 uint32_t disarmTimeMs = 0;
116 uint32_t lastReadTime = 0;
120 bool lastCommandTurnOn =
false;
Definition bistable_relay.h:29
void iterateAlways() override
Method called on each SuplaDevice iteration.
Definition bistable_relay.cpp:119
void onInit() override
Third method called on element in SuplaDevice.begin()
Definition bistable_relay.cpp:99
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:144