1 parent
566a43f2e8
commit
c68714a434
3 files changed
+7
-7
No files matched your search
+2
-2
@@ -628,7 +628,7 @@ void storeValue(long MQTTvalue){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int getMin(){
|
int getMin(){
|
||||||
int minimum = ReceivedSignal[0][1];
|
unsigned int minimum = ReceivedSignal[0][1];
|
||||||
int minindex=0;
|
int minindex=0;
|
||||||
for (int i = 0; i < array_size; i++)
|
for (int i = 0; i < array_size; i++)
|
||||||
{
|
{
|
||||||
@@ -640,7 +640,7 @@ int getMin(){
|
|||||||
return minindex;
|
return minindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isAduplicate(long value){
|
boolean isAduplicate(unsigned long value){
|
||||||
trc(F("isAduplicate"));
|
trc(F("isAduplicate"));
|
||||||
// check if the value has been already sent during the last time_avoid_duplicate
|
// check if the value has been already sent during the last time_avoid_duplicate
|
||||||
for (int i = 0; i < array_size;i++){
|
for (int i = 0; i < array_size;i++){
|
||||||
|
|||||||
+4
-4
@@ -34,8 +34,10 @@
|
|||||||
/*-------------DEFINE YOUR NETWORK PARAMETERS BELOW----------------*/
|
/*-------------DEFINE YOUR NETWORK PARAMETERS BELOW----------------*/
|
||||||
//MQTT Parameters definition
|
//MQTT Parameters definition
|
||||||
//#define mqtt_server_name "www.mqtt_broker.com" // instead of defining the server by its IP you can define it by its name, uncomment this line and set the correct MQTT server host name
|
//#define mqtt_server_name "www.mqtt_broker.com" // instead of defining the server by its IP you can define it by its name, uncomment this line and set the correct MQTT server host name
|
||||||
#define mqtt_user "your_username" // not compulsory only if your broker needs authentication
|
char mqtt_user[20] = "your_username"; // not compulsory only if your broker needs authentication
|
||||||
#define mqtt_pass "your_password" // not compulsory only if your broker needs authentication
|
char mqtt_pass[20] = "your_password"; // not compulsory only if your broker needs authentication
|
||||||
|
char mqtt_server[40] = "192.168.1.17";
|
||||||
|
char mqtt_port[6] = "1883";
|
||||||
#define Gateway_Name "OpenMQTTGateway"
|
#define Gateway_Name "OpenMQTTGateway"
|
||||||
#define WifiManager_password "your_password"
|
#define WifiManager_password "your_password"
|
||||||
#define version_Topic "home/" Gateway_Name "/version"
|
#define version_Topic "home/" Gateway_Name "/version"
|
||||||
@@ -45,8 +47,6 @@
|
|||||||
#define will_Message "Offline"
|
#define will_Message "Offline"
|
||||||
#define Gateway_AnnouncementMsg "Online"
|
#define Gateway_AnnouncementMsg "Online"
|
||||||
//#define MDNS_SD //comment if you don't want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work
|
//#define MDNS_SD //comment if you don't want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work
|
||||||
char mqtt_server[40] = "192.168.1.17";
|
|
||||||
char mqtt_port[6] = "1883";
|
|
||||||
|
|
||||||
//set minimu quality of signal so it ignores AP's under that quality
|
//set minimu quality of signal so it ignores AP's under that quality
|
||||||
#define MinimumWifiSignalQuality 8
|
#define MinimumWifiSignalQuality 8
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ unsigned char _uartpos = 0;
|
|||||||
|
|
||||||
void setupSRFB(){
|
void setupSRFB(){
|
||||||
trc(F("ZgatewaySRFB setup done "));
|
trc(F("ZgatewaySRFB setup done "));
|
||||||
trc("Serial Baud" + SERIAL_BAUD);
|
trc("Serial Baud" + String(SERIAL_BAUD));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MQTTtoSRFB(char * topicOri, char * datacallback) {
|
void MQTTtoSRFB(char * topicOri, char * datacallback) {
|
||||||
|
|||||||
Reference in new issue
Block a user