connected to mqtt server. modified config
This commit is contained in:
parent
c1ec26b9de
commit
f0a15b632d
|
@ -315,6 +315,7 @@ void setup() {
|
|||
mqttClient.onDisconnect(onMqttDisconnect);
|
||||
|
||||
mqttClient.onPublish(onMqttPublish);
|
||||
mqttClient.setServer(mqttHost, mqttPort);
|
||||
|
||||
connectToWifi();
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
//Replace with a human-friendly host name.
|
||||
#define hostname "esp32_room_presence"
|
||||
|
||||
//Replace with your MQTT Broker address; example: #define mqttServer "192.168.0.112"
|
||||
#define mqttServer "$MQTT_BROKER_ADDRESS$"
|
||||
//Replace with your MQTT Broker address; example: #define mqttHost IPAddress(192, 168, 1, 195)
|
||||
#define mqttHost IPAddress(192, 168, 1, 195)
|
||||
|
||||
//Replace with your MQTT Broker port; example: #define mqttPort 1883
|
||||
#define mqttPort $MQTT_PORT$
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define ssid "Travis"
|
||||
#define password "123456789"
|
||||
#define hostname "esp32_room_presence"
|
||||
#define mqttServer "192.168.1.1"
|
||||
#define mqttHost IPAddress(192, 168, 1, 195)
|
||||
#define mqttPort 1883
|
||||
#define mqttUser "homeassistant"
|
||||
#define mqttPassword "123456789"
|
||||
|
|
Loading…
Reference in New Issue