mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Release v1.5.2
* Additional filters for invalid frames * Added tilt calibration for integrated tilt blinds
This commit is contained in:
parent
e8296d3782
commit
156bdee0a5
6 changed files with 11 additions and 6 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef configsettings_h
|
#ifndef configsettings_h
|
||||||
#define configsettings_h
|
#define configsettings_h
|
||||||
|
|
||||||
#define FW_VERSION "v1.5.2beta"
|
#define FW_VERSION "v1.5.2"
|
||||||
enum DeviceStatus {
|
enum DeviceStatus {
|
||||||
DS_OK = 0,
|
DS_OK = 0,
|
||||||
DS_ERROR = 1,
|
DS_ERROR = 1,
|
||||||
|
|
|
||||||
6
MQTT.cpp
6
MQTT.cpp
|
|
@ -100,6 +100,7 @@ bool MQTTClass::connect() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(settings.MQTT.enabled) {
|
if(settings.MQTT.enabled) {
|
||||||
|
if(this->lastConnect + 10000 > millis()) return false;
|
||||||
uint64_t mac = ESP.getEfuseMac();
|
uint64_t mac = ESP.getEfuseMac();
|
||||||
snprintf(this->clientId, sizeof(this->clientId), "client-%08lx%08lx", (uint32_t)((mac >> 32) & 0xFFFFFFFF), (uint32_t)(mac & 0xFFFFFFFF));
|
snprintf(this->clientId, sizeof(this->clientId), "client-%08lx%08lx", (uint32_t)((mac >> 32) & 0xFFFFFFFF), (uint32_t)(mac & 0xFFFFFFFF));
|
||||||
if(strlen(settings.MQTT.protocol) > 0 && strlen(settings.MQTT.hostname) > 0) {
|
if(strlen(settings.MQTT.protocol) > 0 && strlen(settings.MQTT.hostname) > 0) {
|
||||||
|
|
@ -112,11 +113,14 @@ bool MQTTClass::connect() {
|
||||||
this->subscribe("shades/+/direction/set");
|
this->subscribe("shades/+/direction/set");
|
||||||
this->subscribe("shades/+/mypos/set");
|
this->subscribe("shades/+/mypos/set");
|
||||||
mqttClient.setCallback(MQTTClass::receive);
|
mqttClient.setCallback(MQTTClass::receive);
|
||||||
|
this->lastConnect = millis();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Serial.print("MQTT Connection failed for ");
|
Serial.print("MQTT Connection failed for: ");
|
||||||
Serial.println(mqttClient.state());
|
Serial.println(mqttClient.state());
|
||||||
|
this->lastConnect = millis();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
1
MQTT.h
1
MQTT.h
|
|
@ -5,6 +5,7 @@
|
||||||
#include <ArduinoJson.h>
|
#include <ArduinoJson.h>
|
||||||
class MQTTClass {
|
class MQTTClass {
|
||||||
public:
|
public:
|
||||||
|
uint64_t lastConnect = 0;
|
||||||
char clientId[32] = {'\0'};
|
char clientId[32] = {'\0'};
|
||||||
bool begin();
|
bool begin();
|
||||||
bool loop();
|
bool loop();
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -3,10 +3,10 @@
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="main.css?v=1.5.2b" type="text/css" />
|
<link rel="stylesheet" href="main.css?v=1.5.2" type="text/css" />
|
||||||
<link rel="stylesheet" href="icons.css?v=1.5.2b" type="text/css" />
|
<link rel="stylesheet" href="icons.css?v=1.5.2" type="text/css" />
|
||||||
<link rel="icon" type="image/png" href="favicon.png" />
|
<link rel="icon" type="image/png" href="favicon.png" />
|
||||||
<script type="text/javascript" src="index.js?v=1.5.2b"></script>
|
<script type="text/javascript" src="index.js?v=1.5.2"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="divContainer" class="container" style="user-select:none;position:relative;border-radius:27px;">
|
<div id="divContainer" class="container" style="user-select:none;position:relative;border-radius:27px;">
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,7 @@ async function reopenSocket() {
|
||||||
await initSockets();
|
await initSockets();
|
||||||
}
|
}
|
||||||
class General {
|
class General {
|
||||||
appVersion = 'v1.5.2beta';
|
appVersion = 'v1.5.2';
|
||||||
reloadApp = false;
|
reloadApp = false;
|
||||||
async init() {
|
async init() {
|
||||||
this.setAppVersion();
|
this.setAppVersion();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue