mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Add ESP and connection information to discovery #211
This commit is contained in:
parent
51e3e4b15a
commit
4272d2245e
8 changed files with 13 additions and 7 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef configsettings_h
|
#ifndef configsettings_h
|
||||||
#define configsettings_h
|
#define configsettings_h
|
||||||
|
|
||||||
#define FW_VERSION "v2.2.4"
|
#define FW_VERSION "v2.3.0"
|
||||||
enum DeviceStatus {
|
enum DeviceStatus {
|
||||||
DS_OK = 0,
|
DS_OK = 0,
|
||||||
DS_ERROR = 1,
|
DS_ERROR = 1,
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
6
Web.cpp
6
Web.cpp
|
|
@ -11,6 +11,7 @@
|
||||||
#include "Somfy.h"
|
#include "Somfy.h"
|
||||||
#include "MQTT.h"
|
#include "MQTT.h"
|
||||||
#include "GitOTA.h"
|
#include "GitOTA.h"
|
||||||
|
#include "Network.h"
|
||||||
|
|
||||||
extern ConfigSettings settings;
|
extern ConfigSettings settings;
|
||||||
extern SSDPClass SSDP;
|
extern SSDPClass SSDP;
|
||||||
|
|
@ -19,6 +20,7 @@ extern SomfyShadeController somfy;
|
||||||
extern Web webServer;
|
extern Web webServer;
|
||||||
extern MQTTClass mqtt;
|
extern MQTTClass mqtt;
|
||||||
extern GitUpdater git;
|
extern GitUpdater git;
|
||||||
|
extern Network net;
|
||||||
|
|
||||||
#define WEB_MAX_RESPONSE 16384
|
#define WEB_MAX_RESPONSE 16384
|
||||||
static char g_content[WEB_MAX_RESPONSE];
|
static char g_content[WEB_MAX_RESPONSE];
|
||||||
|
|
@ -697,6 +699,10 @@ void Web::handleDiscovery(WebServer &server) {
|
||||||
obj["hostname"] = settings.hostname;
|
obj["hostname"] = settings.hostname;
|
||||||
obj["authType"] = static_cast<uint8_t>(settings.Security.type);
|
obj["authType"] = static_cast<uint8_t>(settings.Security.type);
|
||||||
obj["permissions"] = settings.Security.permissions;
|
obj["permissions"] = settings.Security.permissions;
|
||||||
|
obj["chipModel"] = settings.chipModel;
|
||||||
|
if(net.connType == conn_types::ethernet) obj["connType"] = "Ethernet";
|
||||||
|
else if(net.connType == conn_types::wifi) obj["connType"] = "Wifi";
|
||||||
|
else obj["connType"] = "Unknown";
|
||||||
JsonArray arrShades = obj.createNestedArray("shades");
|
JsonArray arrShades = obj.createNestedArray("shades");
|
||||||
somfy.toJSONShades(arrShades);
|
somfy.toJSONShades(arrShades);
|
||||||
JsonArray arrGroups = obj.createNestedArray("groups");
|
JsonArray arrGroups = obj.createNestedArray("groups");
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
2.2.4
|
2.3.0
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
<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=2.2.4" type="text/css" />
|
<link rel="stylesheet" href="main.css?v=2.3.0" type="text/css" />
|
||||||
<link rel="stylesheet" href="widgets.css?v=2.2.4" type="text/css" />
|
<link rel="stylesheet" href="widgets.css?v=2.3.0" type="text/css" />
|
||||||
<link rel="stylesheet" href="icons.css?v=2.2.4" type="text/css" />
|
<link rel="stylesheet" href="icons.css?v=2.3.0" 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=2.2.4"></script>
|
<script type="text/javascript" src="index.js?v=2.3.0"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="divContainer" class="container main" data-auth="false">
|
<div id="divContainer" class="container main" data-auth="false">
|
||||||
|
|
|
||||||
|
|
@ -1255,7 +1255,7 @@ var security = new Security();
|
||||||
|
|
||||||
class General {
|
class General {
|
||||||
initialized = false;
|
initialized = false;
|
||||||
appVersion = 'v2.2.4';
|
appVersion = 'v2.3.0';
|
||||||
reloadApp = false;
|
reloadApp = false;
|
||||||
init() {
|
init() {
|
||||||
if (this.initialized) return;
|
if (this.initialized) return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue