-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.h
More file actions
70 lines (52 loc) · 2.3 KB
/
config.example.h
File metadata and controls
70 lines (52 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
Copyright 2025 Timandes White
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include <Arduino.h>
const char *WIFI_SSID = "";
const char *WIFI_PASSWD = "";
const char *MQTT_HOST = "192.168.1.2";
const uint16_t MQTT_PAYLOAD_BUF_SIZE = 512;
// 命令订阅
const char *MQTT_COMMAND_TOPIC = "hello/esp8266/command";
// 状态发布
uint32_t TOPIC_STATUS_PUBLISH_INTERVAL_IN_MILLIS = 10000;
const char *MQTT_STATUS_TOPIC = "hello/esp8266/status";
const uint8_t CLOSE_STATE = LOW;
const uint8_t INITIAL_STATE = CLOSE_STATE;
const uint8_t ON_BOARD_LED_NORMAL_STATE = LOW;
const uint8_t OUTPUT_PIN = 0;
#define COMPUTER_ON_ENABLED
const unsigned long COMPUTER_ON_INTERVAL = 200;
//#define HOME_ASSISTANT_MQTT_DISCOVER_ENABLED
const char *HOME_ASSISTANT_TOPIC_PREFIX = "homeassistant";
const char *HOME_ASSISTANT_OBJECT_ID = "esp8266";
const char *HOME_ASSISTANT_NAME = "ESP8266";
uint32_t HOME_ASSISTANT_TOPIC_PUBLISH_INTERVAL_IN_MILLIS = 10000;
const char *HOME_ASSISTANT_DEVICE_IDENTIFIER = "hello";
const char *HOME_ASSISTANT_DEVICE_NAME = "Hello";
//#define PWM_ENABLED
const char * PWM_MQTT_COMMAND_TOPIC = "hello/pwm/cmd";
uint32_t PWM_TOPIC_STATUS_PUBLISH_INTERVAL_IN_MILLIS = 10000;
const char * PWM_MQTT_STATUS_TOPIC = "hello/pwm/status";
const uint8_t PWM_OUTPUT_PIN = 3;
const char * PWM_HOME_ASSISTANT_OBJECT_ID = "pwm";
const char * PWM_HOME_ASSISTANT_NAME = "pwm";
//#define TACHO_ENABLED
const uint8_t TACHO_INPUT_PIN = 0; // D0引脚用于TACHO输入
uint32_t TACHO_TOPIC_STATUS_PUBLISH_INTERVAL_IN_MILLIS = 10000;
const char* TACHO_MQTT_COMMAND_TOPIC = "hello/tacho/cmd"; // 没有用处
const char * TACHO_MQTT_STATUS_TOPIC = "hello/tacho/status";
const char * TACHO_HOME_ASSISTANT_OBJECT_ID = "tacho";
const char * TACHO_HOME_ASSISTANT_NAME = "tacho";
#endif