mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-12 00:02:53 +00:00
Fixed cloud connection for C3
This commit is contained in:
parent
111807a743
commit
2b5f3f50df
12
lib/SvelteUi/app/dist/index.js
vendored
12
lib/SvelteUi/app/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -688,6 +688,7 @@
|
||||
<strong class="text-sm">{translations.conf?.cloud?.title ?? "Cloud connections"}</strong>
|
||||
<a href="{wiki('Cloud')}" target="_blank" class="float-right">ⓘ</a>
|
||||
<input type="hidden" name="c" value="true"/>
|
||||
{#if sysinfo?.features?.includes('cloud')}
|
||||
<div class="my-1">
|
||||
<label><input type="checkbox" name="ce" value="true" bind:checked={configuration.c.e} class="rounded mb-1"/> {translations.conf?.cloud?.ams ?? "AMS reader cloud"}</label>
|
||||
{#if configuration.c.e}
|
||||
@ -705,7 +706,8 @@
|
||||
<button type="button" on:click={cloudBind} class="text-blue-500 ml-6">Connect device to my cloud account</button>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="my-1">
|
||||
<label><input type="checkbox" class="rounded mb-1" name="ces" value="true" bind:checked={configuration.c.es}/> {translations.conf?.cloud?.es ?? "Energy Speedometer"}</label>
|
||||
{#if configuration?.c?.es}
|
||||
|
||||
@ -35,15 +35,14 @@
|
||||
#include <WebServer.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <ESP32SSDP.h>
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
#warning "Cloud disabled"
|
||||
#else
|
||||
#include "CloudConnector.h"
|
||||
#endif
|
||||
#else
|
||||
#warning "Unsupported board type"
|
||||
#endif
|
||||
|
||||
#if defined(AMS_CLOUD)
|
||||
#include "CloudConnector.h"
|
||||
#endif
|
||||
|
||||
#include "LittleFS.h"
|
||||
|
||||
class AmsWebServer {
|
||||
|
||||
@ -392,6 +392,10 @@ void AmsWebServer::sysinfoJson() {
|
||||
if(!features.isEmpty()) features += ",";
|
||||
features += "\"kmp\"";
|
||||
#endif
|
||||
#if defined(AMS_CLOUD)
|
||||
if(!features.isEmpty()) features += ",";
|
||||
features += "\"cloud\"";
|
||||
#endif
|
||||
|
||||
int size = snprintf_P(buf, BufferSize, SYSINFO_JSON,
|
||||
FirmwareVersion::VersionString,
|
||||
|
||||
@ -16,6 +16,7 @@ build_flags =
|
||||
-D NO_AMS2MQTT_SC_KEY
|
||||
-D NO_ENERGY_SPEEDOMETER_USER
|
||||
-D NO_ENERGY_SPEEDOMETER_PASS
|
||||
-D AMS_CLOUD=1
|
||||
-fexceptions
|
||||
|
||||
[esp32]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user