27#ifndef SRC_SUPLA_CONTROL_BISTABLE_RELAY_H_
28#define SRC_SUPLA_CONTROL_BISTABLE_RELAY_H_
34class BistableRelay :
public Relay {
39 bool statusPullUp =
true,
40 bool statusHighIsOn =
true,
42 _supla_int_t functions =
43 (0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER));
44 BistableRelay(
int pin,
46 bool statusPullUp =
true,
47 bool statusHighIsOn =
true,
49 _supla_int_t functions =
50 (0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER));
54 void turnOn(_supla_int_t duration = 0)
override;
55 void turnOff(_supla_int_t duration = 0)
override;
56 void toggle(_supla_int_t duration = 0)
override;
59 bool isStatusUnknown();
62 void internalToggle();
64 uint32_t disarmTimeMs = 0;
65 uint32_t lastReadTime = 0;
67 int16_t statusPin = -1;
68 bool statusPullUp =
true;
69 bool statusHighIsOn =
true;
void iterateAlways() override
Method called on each SuplaDevice iteration.
Definition bistable_relay.cpp:79
void onInit() override
Third method called on element in SuplaDevice.begin()
Definition bistable_relay.cpp:56
int32_t handleNewValueFromServer(TSD_SuplaChannelNewValue *newValue) override
Handles "new value" request from server.
Definition bistable_relay.cpp:93