fix
This commit is contained in:
parent
6a00edce30
commit
69cf8231a1
|
@ -327,10 +327,6 @@ void RATGDOComponent::sendCurrentCounter() {
|
|||
ESP_LOGD(TAG, "Current counter %d", rollingCodeCounter);
|
||||
}
|
||||
|
||||
/********************************** MANAGE HARDWARE BUTTON
|
||||
* *****************************************/
|
||||
void RATGDOComponent::manageHardwareButton() {}
|
||||
|
||||
/************************* DOOR COMMUNICATION *************************/
|
||||
/*
|
||||
* Transmit a message to the door opener over uart1
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
* GNU GENERAL PUBLIC LICENSE
|
||||
************************************/
|
||||
|
||||
#ifndef _RATGDO_H
|
||||
#define _RATGDO_H
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "SoftwareSerial.h"
|
||||
#include "rolling_code.h"
|
||||
|
@ -40,29 +40,15 @@ namespace ratgdo {
|
|||
|
||||
SoftwareSerial swSerial;
|
||||
|
||||
/********************************** BOOTSTRAP MANAGER
|
||||
* *****************************************/
|
||||
BootstrapManager bootstrapManager;
|
||||
|
||||
/********************************** MQTT TOPICS
|
||||
* *****************************************/
|
||||
String doorCommandTopic = ""; // will be mqttTopicPrefix/deviceName/command
|
||||
String setCounterTopic =
|
||||
""; // will be mqttTopicPrefix/deviceName/set_code_counter
|
||||
|
||||
String doorCommand = ""; // will be [open|close|light]
|
||||
String overallStatusTopic =
|
||||
""; // legacy from 1.0. Will be mqttTopicPrefix/deviceName/status
|
||||
String availabilityStatusTopic = ""; // online|offline
|
||||
String obstructionStatusTopic = ""; // obstructed|clear
|
||||
String doorStatusTopic =
|
||||
""; // open|opening|closing|closed|reed_open|reed_closed
|
||||
String rollingCodeTopic =
|
||||
""; // broadcast the current rolling code count for debugging purposes
|
||||
class RATGDOComponent; // this component
|
||||
|
||||
class RATGDOComponent : public Component {
|
||||
public:
|
||||
void setup() override;
|
||||
void loop() override;
|
||||
/********************************** GLOBAL VARS
|
||||
* *****************************************/
|
||||
bool setupComplete = false;
|
||||
unsigned int rollingCodeCounter;
|
||||
byte rollingCode[CODE_LENGTH];
|
||||
String doorState =
|
||||
|
@ -126,6 +112,7 @@ byte DOOR_CODE[] = {0x55, 0x01, 0x00, 0x94, 0x3f, 0xef, 0xbc, 0xfb, 0x7f, 0xbe,
|
|||
byte LIGHT_CODE[] = {0x55, 0x01, 0x00, 0x94, 0x3f, 0xef, 0xbc, 0xfb, 0x7f, 0xbe,
|
||||
0xff, 0xa6, 0x1a, 0x4d, 0xa6, 0xda, 0x8d, 0x76, 0xb1};
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} // RATGDOComponent
|
||||
|
||||
} // namespace ratgdo
|
||||
} // namespace esphome
|
Loading…
Reference in New Issue