mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-22 15:28:46 +00:00
Some changes before public testing
This commit is contained in:
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -109,3 +109,21 @@ jobs:
|
||||
asset_path: .pio/build/featheresp32/firmware.bin
|
||||
asset_name: ams2mqtt-featheresp32-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload azdevkit4 binary to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: .pio/build/az-delivery-devkit-v4/firmware.bin
|
||||
asset_name: ams2mqtt-azdevkit4-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload doitdevkit1 binary to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: .pio/build/esp32doit-devkit-v1/firmware.bin
|
||||
asset_name: ams2mqtt-doitdevkit1-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -346,7 +346,9 @@ void loop() {
|
||||
MDNS.addService("http", "tcp", 80);
|
||||
}
|
||||
}
|
||||
#if defined ESP8266
|
||||
MDNS.update();
|
||||
#endif
|
||||
|
||||
if(now > 10000 && now - lastErrorBlink > 3000) {
|
||||
errorBlink();
|
||||
@@ -545,7 +547,7 @@ void readHanPort() {
|
||||
if(strlen(config.getMqttHost()) > 0 && strlen(config.getMqttPublishTopic()) > 0) {
|
||||
if(config.getMqttPayloadFormat() == 0) {
|
||||
StaticJsonDocument<512> json;
|
||||
hanToJson(json, data, hw, temperature);
|
||||
hanToJson(json, data, hw, temperature, config.getMqttClientId());
|
||||
if (Debug.isActive(RemoteDebug::INFO)) {
|
||||
debugI("Sending data to MQTT");
|
||||
if (Debug.isActive(RemoteDebug::DEBUG)) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "HanToJson.h"
|
||||
|
||||
void hanToJson(JsonDocument& json, AmsData& data, HwTools& hw, double temperature) {
|
||||
void hanToJson(JsonDocument& json, AmsData& data, HwTools& hw, double temperature, String name) {
|
||||
json["id"] = WiFi.macAddress();
|
||||
json["name"] = name;
|
||||
json["up"] = millis();
|
||||
json["t"] = data.getPackageTimestamp();
|
||||
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
#include "AmsData.h"
|
||||
#include "HwTools.h"
|
||||
|
||||
void hanToJson(JsonDocument& json, AmsData& data, HwTools& hw, double temperature);
|
||||
void hanToJson(JsonDocument& json, AmsData& data, HwTools& hw, double temperature, String name);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -594,7 +594,7 @@ void AmsWebServer::handleSetup() {
|
||||
config->setTempSensorPin(14);
|
||||
config->setVccMultiplier(1.1);
|
||||
break;
|
||||
case 199: // ESP8266
|
||||
case 100: // ESP8266
|
||||
config->setHanPin(3);
|
||||
config->setLedPin(2);
|
||||
config->setLedInverted(true);
|
||||
@@ -619,7 +619,7 @@ void AmsWebServer::handleSetup() {
|
||||
config->setLedPin(2);
|
||||
config->setLedInverted(false);
|
||||
break;
|
||||
case 299: // ESP32
|
||||
case 200: // ESP32
|
||||
config->setHanPin(16);
|
||||
config->setApPin(0);
|
||||
config->setLedPin(2);
|
||||
|
||||
Reference in New Issue
Block a user