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
|
||||
#define configsettings_h
|
||||
|
||||
#define FW_VERSION "v2.2.4"
|
||||
#define FW_VERSION "v2.3.0"
|
||||
enum DeviceStatus {
|
||||
DS_OK = 0,
|
||||
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 "MQTT.h"
|
||||
#include "GitOTA.h"
|
||||
#include "Network.h"
|
||||
|
||||
extern ConfigSettings settings;
|
||||
extern SSDPClass SSDP;
|
||||
|
|
@ -19,6 +20,7 @@ extern SomfyShadeController somfy;
|
|||
extern Web webServer;
|
||||
extern MQTTClass mqtt;
|
||||
extern GitUpdater git;
|
||||
extern Network net;
|
||||
|
||||
#define WEB_MAX_RESPONSE 16384
|
||||
static char g_content[WEB_MAX_RESPONSE];
|
||||
|
|
@ -697,6 +699,10 @@ void Web::handleDiscovery(WebServer &server) {
|
|||
obj["hostname"] = settings.hostname;
|
||||
obj["authType"] = static_cast<uint8_t>(settings.Security.type);
|
||||
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");
|
||||
somfy.toJSONShades(arrShades);
|
||||
JsonArray arrGroups = obj.createNestedArray("groups");
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.2.4
|
||||
2.3.0
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="main.css?v=2.2.4" type="text/css" />
|
||||
<link rel="stylesheet" href="widgets.css?v=2.2.4" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.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.3.0" 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" />
|
||||
<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>
|
||||
<body>
|
||||
<div id="divContainer" class="container main" data-auth="false">
|
||||
|
|
|
|||
|
|
@ -1255,7 +1255,7 @@ var security = new Security();
|
|||
|
||||
class General {
|
||||
initialized = false;
|
||||
appVersion = 'v2.2.4';
|
||||
appVersion = 'v2.3.0';
|
||||
reloadApp = false;
|
||||
init() {
|
||||
if (this.initialized) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue