mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-04-03 13:23:44 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
889b9153fa | ||
|
|
7b52efd332 | ||
|
|
c936f605d6 | ||
|
|
9d0ceb9ca8 | ||
|
|
b33273e3cc | ||
|
|
ab016fff93 | ||
|
|
a215aa7766 |
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@@ -19,6 +19,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_REF: ${{ github.ref }}
|
GITHUB_REF: ${{ github.ref }}
|
||||||
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:11})
|
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:11})
|
||||||
|
run: echo ::set-env name=GITHUB_TAG::$(echo ${GITHUB_REF##*/})
|
||||||
- name: Cache Python dependencies
|
- name: Cache Python dependencies
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
@@ -52,7 +53,7 @@ jobs:
|
|||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
- name: Upload hw1esp12e binary to release
|
- name: Upload hw1esp12e binary to release
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -61,7 +62,7 @@ jobs:
|
|||||||
asset_name: ams2mqtt-hw1esp12e-${{ steps.release_tag.outputs.tag }}.bin
|
asset_name: ams2mqtt-hw1esp12e-${{ steps.release_tag.outputs.tag }}.bin
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload esp12e binary to release
|
- name: Upload esp12e binary to release
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -70,7 +71,7 @@ jobs:
|
|||||||
asset_name: ams2mqtt-esp12e-${{ steps.release_tag.outputs.tag }}.bin
|
asset_name: ams2mqtt-esp12e-${{ steps.release_tag.outputs.tag }}.bin
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload d1mini binary to release
|
- name: Upload d1mini binary to release
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -79,7 +80,7 @@ jobs:
|
|||||||
asset_name: ams2mqtt-d1mini-${{ steps.release_tag.outputs.tag }}.bin
|
asset_name: ams2mqtt-d1mini-${{ steps.release_tag.outputs.tag }}.bin
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload esp32 binary to release
|
- name: Upload esp32 binary to release
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -88,7 +89,7 @@ jobs:
|
|||||||
asset_name: ams2mqtt-esp32-${{ steps.release_tag.outputs.tag }}.bin
|
asset_name: ams2mqtt-esp32-${{ steps.release_tag.outputs.tag }}.bin
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload lolind32 binary to release
|
- name: Upload lolind32 binary to release
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -97,7 +98,7 @@ jobs:
|
|||||||
asset_name: ams2mqtt-lolind32-${{ steps.release_tag.outputs.tag }}.bin
|
asset_name: ams2mqtt-lolind32-${{ steps.release_tag.outputs.tag }}.bin
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload featheresp32 binary to release
|
- name: Upload featheresp32 binary to release
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
FILENAME_VERSION_H = 'src/version.h'
|
FILENAME_VERSION_H = 'src/version.h'
|
||||||
version = os.environ.get('GITHUB_REF')
|
version = os.environ.get('GITHUB_TAG')
|
||||||
if version == None:
|
if version == None:
|
||||||
version = "SNAPSHOT"
|
version = "SNAPSHOT"
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "AmsToMqttBridge.h"
|
#include "AmsToMqttBridge.h"
|
||||||
|
#define ARDUINOJSON_POSITIVE_EXPONENTIATION_THRESHOLD 1e9
|
||||||
#include <ArduinoJson.h>
|
#include <ArduinoJson.h>
|
||||||
#include <MQTT.h>
|
#include <MQTT.h>
|
||||||
#include <DNSServer.h>
|
#include <DNSServer.h>
|
||||||
@@ -45,7 +46,7 @@ AmsConfiguration config;
|
|||||||
AmsWebServer ws;
|
AmsWebServer ws;
|
||||||
|
|
||||||
WiFiClient *client;
|
WiFiClient *client;
|
||||||
MQTTClient mqtt(384);
|
MQTTClient mqtt(512);
|
||||||
|
|
||||||
Stream* debugger = NULL;
|
Stream* debugger = NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -463,8 +463,6 @@ void AmsWebServer::handleSave() {
|
|||||||
config->setMqttSubscribeTopic(server.arg("mqttSubscribeTopic"));
|
config->setMqttSubscribeTopic(server.arg("mqttSubscribeTopic"));
|
||||||
config->setMqttUser(server.arg("mqttUser"));
|
config->setMqttUser(server.arg("mqttUser"));
|
||||||
config->setMqttPassword(server.arg("mqttPassword"));
|
config->setMqttPassword(server.arg("mqttPassword"));
|
||||||
config->setAuthUser(server.arg("authUser"));
|
|
||||||
config->setAuthPassword(server.arg("authPassword"));
|
|
||||||
} else {
|
} else {
|
||||||
config->clearMqtt();
|
config->clearMqtt();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user