Update display.ino

Nextion baudrate en portsettings SoftwareSerial terug gezet want die waren al aangepast voor de ESP32 !!
En MQTT server IP adres is aangepast
This commit is contained in:
Frank 2022-03-06 11:43:29 +01:00
parent bdcf70d1bf
commit 14ecb076bd

View File

@ -1,21 +1,35 @@
/*
Display Domoticz
//#define DEBUG 1 //Uit quoten om debug messages te krijgen
Device : LOLIN (WEMOS) D1 mini (clone)
#include <WiFi.h>
Nextion display is connected to D5 en D6
in NexHardware.cpp moet de volgende regels staan :
//#include <ESP8266WiFi.h>
#include "SoftwareSerial.h" //FvEs deze uit als ESP32 gebruikt wordt
//Wemos
SoftwareSerial nexSerial(D5, D6); // RX, TX
*/
#define DEBUG 1 //Uit quoten om debug messages te krijgen
//#include <WiFi.h>
#include <ESP8266WiFi.h>
//#include <ESP8266HTTPClient.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>
#include <Nextion.h>
//SoftwareSerial HMISerial(D5,D6);
#include <X10ir.h>
//#define BUZZER_PIN D5
//#define BUZZER_PIN D7
#define BUZZER_PIN 5
#define BUZZER_PIN D7
//#define BUZZER_PIN 5
// X10 Infrared Receiver Library
@ -29,11 +43,13 @@ X10ir x10ir = X10ir(
infraredEvent // Event triggered when IR message is received . //In example zonder * !!!!
);
//WIFI config
const char* ssid = "FrankHilde";
const char* password = "HildeFrank";
const char* mqtt_server = "192.168.2.200";
const char* mqtt_user = "mqtt-display";
const char* mqtt_pwd = "@MQTT4Display";
//MQTT config
const char* mqtt_server = "192.168.2.153";
const char* mqtt_user = "domoticz";
const char* mqtt_pwd = "MQTT&Domoticz";
WiFiClient espClient;
PubSubClient client(espClient);
@ -201,7 +217,7 @@ void reconnect() {
//if (client.connect(clientId.c_str())) {
//changed mqtt authentication
if (client.connect(clientId.c_str(),mqtt_user,mqtt__pwd)) {
if (client.connect(clientId.c_str(),mqtt_user,mqtt_pwd)) {
#ifdef DEBUG
Serial.println("connected");
#endif