Browse Source

Small fixes, mostly comments and debug

fastled
Xose Pérez 8 years ago
parent
commit
e4ea3b0f66
6 changed files with 7 additions and 4 deletions
  1. +1
    -1
      code/espurna/config/general.h
  2. +1
    -0
      code/espurna/espurna.ino
  3. +2
    -1
      code/espurna/mqtt.ino
  4. +1
    -0
      code/espurna/pow.ino
  5. +1
    -1
      code/gulpfile.js
  6. +1
    -1
      code/html/index.html

+ 1
- 1
code/espurna/config/general.h View File

@ -105,7 +105,7 @@
#define NTP_UPDATE_INTERVAL 1800
// -----------------------------------------------------------------------------
// FAUXO
// FAUXMO
// -----------------------------------------------------------------------------
// This setting defines whether Alexa support should be built into the firmware


+ 1
- 0
code/espurna/espurna.ino View File

@ -1,6 +1,7 @@
/*
ESPurna
Copyright (C) 2016-2017 by Xose Pérez <xose dot perez at gmail dot com>
This program is free software: you can redistribute it and/or modify


+ 2
- 1
code/espurna/mqtt.ino View File

@ -42,7 +42,7 @@ unsigned int mqttTopicRootLength() {
void mqttSendRaw(const char * topic, const char * message) {
if (mqtt.connected()) {
DEBUG_MSG("[MQTT] Sending %s %s\n", topic, message);
DEBUG_MSG("[MQTT] Sending %s => %s\n", topic, message);
mqtt.publish(topic, MQTT_QOS, MQTT_RETAIN, message);
}
}
@ -141,6 +141,7 @@ void mqttConnect() {
DEBUG_MSG("[MQTT] Connecting to broker at %s", host);
mqtt.setServer(host, port);
mqtt.setKeepAlive(MQTT_KEEPALIVE).setCleanSession(false);
mqtt.setWill(MQTT_HEARTBEAT_TOPIC, MQTT_QOS, MQTT_RETAIN, "0");
if ((strlen(user) > 0) && (strlen(pass) > 0)) {
DEBUG_MSG(" as user '%s'.", user);
mqtt.setCredentials(user, pass);


+ 1
- 0
code/espurna/pow.ino View File

@ -191,6 +191,7 @@ void powLoop() {
apparent = current * voltage;
reactive = (apparent > power) ? sqrt(apparent * apparent - power * power) : 0;
factor = (apparent > 0) ? 100 * power / apparent : 100;
if (factor > 100) factor = 100;
mqttSend(getSetting("powPowerTopic", POW_POWER_TOPIC).c_str(), String(power).c_str());
mqttSend(getSetting("powCurrentTopic", POW_CURRENT_TOPIC).c_str(), String(current).c_str());


+ 1
- 1
code/gulpfile.js View File

@ -2,7 +2,7 @@
ESP8266 file system builder
Copyright (C) 2016 by Xose PĆ©rez <xose dot perez at gmail dot com>
Copyright (C) 2016 by Xose Pérez <xose dot perez at gmail dot com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by


+ 1
- 1
code/html/index.html View File

@ -222,7 +222,7 @@
</div>
<div class="pure-g module module-fauxmo">
<div class="pure-u-1 pure-u-sm-1-4"><label for="fauxmoEnabled">Enable WeMo emulation</label></div>
<div class="pure-u-1 pure-u-sm-1-4"><label for="fauxmoEnabled">Alexa integration</label></div>
<div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="fauxmoEnabled" /></div>
</div>


Loading…
Cancel
Save