From db8400635ed56ef06aacf40e9f6087d90dfbcfc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Wed, 2 May 2018 10:04:20 +0200 Subject: [PATCH] Version 1.12.6 --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ README.md | 8 +++++--- code/espurna/config/arduino.h | 1 + code/espurna/config/hardware.h | 4 ++-- code/espurna/config/version.h | 2 +- code/espurna/ir.ino | 19 +++++++++++-------- code/espurna/migrate.ino | 12 ++++++++++++ 7 files changed, 61 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 922422de..6177350c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,35 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.12.6] 2018-05-02 +### Fixed +- Check NTP_SUPPORT for sensors (thanks to @mcspr) +- Fix AM2302 sensor +- Fix hostname truncated to 20 chars when advertised to DHCP ([#774](https://github.com/xoseperez/espurna/issues/774)) +- Decouple Serial object from Terminal, Debug modules ([#787](https://github.com/xoseperez/espurna/issues/787)) +- Fix Arilux LC-01 definitions ([#797](https://github.com/xoseperez/espurna/issues/797)) +- Do not uppercase hostname in web interface ([#799](https://github.com/xoseperez/espurna/issues/799)) +- Ensure scheduler has access to all channels independently of the color mode ([#807](https://github.com/xoseperez/espurna/issues/807)) + +### Added +- Support for IteadStudio Sonoff S31 ([#497](https://github.com/xoseperez/espurna/issues/497)) +- Option to ignore daylight saving in scheduler ([#783](https://github.com/xoseperez/espurna/issues/783)) +- Report last energy reset datetime in web interface ([#784](https://github.com/xoseperez/espurna/issues/784)) +- Added captive portal in AP mode +- Support for IR toggle mode (thanks to @darshkpatel) +- Support for IteadStudio Sonoff POW R2 (thanks to @ColinShorts) +- Support for Luani HVIO (thanks to @wildwiz) +- Support for Zhilde ZLD-EU55-W power strip (thanks to @wildwiz) +- Support for RFB_DIRECT Sonoff Bridge EFM8BB1 bypass hack (thanks to @wildwiz) +- Support for SenseAir S8 CO2 sensor (thanks to @Yonsm) +- Support for PMS5003T/ST sensors (thanks to @Yonsm) + +### Changed +- Updated JustWifi Library +- Some cleanup in the web interface +- Refactored configuration files (thanks to @lobradov, @mcspr) +- Changes pre-commit hook (thanks to @mcspr) + ## [1.12.5] 2018-04-08 ### Fixed - Fixed expected power calibration ([#676](https://github.com/xoseperez/espurna/issues/676)) diff --git a/README.md b/README.md index 926b3872..d903ab2e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ESPurna ("spark" in Catalan) is a custom firmware for ESP8285/ESP8266 based smart switches, lights and sensors. It uses the Arduino Core for ESP8266 framework and a number of 3rd party libraries. -[![version](https://img.shields.io/badge/version-1.12.6a-brightgreen.svg)](CHANGELOG.md) +[![version](https://img.shields.io/badge/version-1.12.6-brightgreen.svg)](CHANGELOG.md) [![branch](https://img.shields.io/badge/branch-dev-orange.svg)](https://github.org/xoseperez/espurna/tree/dev/) [![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=dev)](https://travis-ci.org/xoseperez/espurna) [![codacy](https://img.shields.io/codacy/grade/c9496e25cf07434cba786b462cb15f49/dev.svg)](https://www.codacy.com/app/xoseperez/espurna/dashboard) @@ -63,6 +63,7 @@ It uses the Arduino Core for ESP8266 framework and a number of 3rd party librari * Multiple virtual switches (tested with up to 16) * MQTT-to-RF two-way bridge (no need to learn codes) * Support for [https://github.com/Portisch/RF-Bridge-EFM8BB1](https://github.com/Portisch/RF-Bridge-EFM8BB1) custom firmware + * Support for [direct control of the encoder/decoder bypassing the EFM8BB1](https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack) * Support for [different **sensors**](Sensors) * Environment * **DHT11 / DHT22 / DHT21 / AM2301 / Itead's SI7021** @@ -72,7 +73,8 @@ It uses the Arduino Core for ESP8266 framework and a number of 3rd party librari * **AM2320** temperature and humidity sensor over I2C * **Dallas OneWire sensors** like the DS18B20 * **MHZ19** CO2 sensor - * **PMSX003** dust sensor + * **SenseAir S8** CO2 sensor + * **PMSX003/PMS5003T/ST** dust sensors * **BH1750** luminosity sensor * **GUVAS12SD** UV sensor * Power monitoring @@ -243,7 +245,7 @@ Here is the list of supported hardware. For more information please refer to the |**Generic DHT11 v1.0**|**Generic DS18B20 v1.0**|| **Other supported boards:** -*TODO* +IteadStudio Sonoff S31, IteadStudio Sonoff POW R2, Zhilde ZLD-EU55-W, Luani HVIO ## License diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 2e4a9e6b..a6bbdbc5 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -79,6 +79,7 @@ //#define GENERIC_ESP01S_DS18B20_V10 //#define HELTEC_TOUCHRELAY //#define ZHILDE_EU44_W +//#define LUANI_HVIO //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index cf28148b..487f2729 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -400,9 +400,9 @@ // CSE7766 #ifndef CSE7766_SUPPORT - #define CSE7766_SUPPORT 1 + #define CSE7766_SUPPORT 1 #endif - #define CSE7766_PIN 1 + #define CSE7766_PIN 1 #elif defined(ITEAD_SONOFF_DUAL) diff --git a/code/espurna/config/version.h b/code/espurna/config/version.h index f818fe3c..c6c250c1 100644 --- a/code/espurna/config/version.h +++ b/code/espurna/config/version.h @@ -1,5 +1,5 @@ #define APP_NAME "ESPURNA" -#define APP_VERSION "1.12.6a" +#define APP_VERSION "1.12.6" #define APP_REVISION "" #define APP_AUTHOR "xose.perez@gmail.com" #define APP_WEBSITE "http://tinkerman.cat" diff --git a/code/espurna/ir.ino b/code/espurna/ir.ino index 5a197417..7dd0a34c 100644 --- a/code/espurna/ir.ino +++ b/code/espurna/ir.ino @@ -14,7 +14,8 @@ Copyright (C) 2017-2018 by François Déchery IRrecv * _ir_recv; decode_results _ir_results; -unsigned long _ir_last = millis(); +unsigned long _ir_last_toggle = 0; + // ----------------------------------------------------------------------------- // PRIVATE // ----------------------------------------------------------------------------- @@ -42,15 +43,17 @@ void _irProcessCode(unsigned long code) { if (button_mode == IR_BUTTON_MODE_STATE) { relayStatus(0, button_value); } + if (button_mode == IR_BUTTON_MODE_TOGGLE) { - if (millis() - _ir_last > 250){ - relayToggle(button_value); - _ir_last = millis(); - } - else{ - DEBUG_MSG_P(PSTR("[IR] Ignoring repeated code\n")); - } + + if (millis() - _ir_last_toggle > 250){ + relayToggle(button_value); + _ir_last_toggle = millis(); + } else { + DEBUG_MSG_P(PSTR("[IR] Ignoring repeated code\n")); + } } + #if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE if (button_mode == IR_BUTTON_MODE_BRIGHTER) { diff --git a/code/espurna/migrate.ino b/code/espurna/migrate.ino index 04190b79..fb986e86 100644 --- a/code/espurna/migrate.ino +++ b/code/espurna/migrate.ino @@ -918,6 +918,18 @@ void migrate() { setSetting("cf1GPIO", 13); setSetting("cfGPIO", 14); + #elif defined(LUANI_HVIO) + + setSetting("board", 72); + setSetting("ledGPIO", 0, 15); + setSetting("ledLogic", 0, 0); + setSetting("btnGPIO", 0, 12); + setSetting("btnRelay", 0, 0); + setSetting("relayGPIO", 0, 4); + setSetting("relayType", 0, RELAY_TYPE_NORMAL); + setSetting("relayGPIO", 1, 5); + setSetting("relayType", 1, RELAY_TYPE_NORMAL); + #else // Allow users to define new settings without migration config