Browse Source

Update fauxmoESP library

fastled
Xose Pérez 7 years ago
parent
commit
c2bcd86260
2 changed files with 9 additions and 2 deletions
  1. +8
    -1
      code/espurna/alexa.ino
  2. +1
    -1
      code/platformio.ini

+ 8
- 1
code/espurna/alexa.ino View File

@ -30,6 +30,7 @@ void alexaSetup() {
moveSetting("fauxmoEnabled", "alexaEnabled");
alexaConfigure();
unsigned int relays = relayCount();
String hostname = getSetting("hostname");
if (relays == 1) {
@ -39,11 +40,17 @@ void alexaSetup() {
alexa.addDevice((hostname + "_" + i).c_str());
}
}
alexa.onMessage([relays](unsigned char device_id, const char * name, bool state) {
alexa.onSetState([relays](unsigned char device_id, const char * name, bool state) {
_alexa_change = true;
_alexa_device_id = device_id;
_alexa_state = state;
});
alexa.onGetState([relays](unsigned char device_id, const char * name) {
return relayStatus(device_id);
});
}
void alexaLoop() {


+ 1
- 1
code/platformio.ini View File

@ -27,7 +27,7 @@ lib_deps =
EspSoftwareSerial
https://bitbucket.org/xoseperez/justwifi.git#1.1.4
https://bitbucket.org/xoseperez/hlw8012.git#1.1.0
https://bitbucket.org/xoseperez/fauxmoesp.git#2.2.1
https://bitbucket.org/xoseperez/fauxmoesp.git#2.3.0
https://bitbucket.org/xoseperez/nofuss.git#0.2.5
https://bitbucket.org/xoseperez/emonliteesp.git#0.2.0
https://bitbucket.org/xoseperez/debounceevent.git#2.0.1


Loading…
Cancel
Save