Skip to content

Commit

Permalink
v5.12.0i - Add Timers webpage
Browse files Browse the repository at this point in the history
5.12.0i
 * Add commands Timer 0 to clear timer and Timer 1..16 to copy
timer
 * Add optional Timer configuration webpage to be enabled in
user_config.h with define USE_TIMERS_WEB
 * Change webpage parameter
communication
  • Loading branch information
arendst committed Mar 28, 2018
1 parent d564615 commit c4b3d42
Show file tree
Hide file tree
Showing 19 changed files with 383 additions and 80 deletions.
3 changes: 3 additions & 0 deletions sonoff/_releasenotes.ino
@@ -1,5 +1,8 @@
/* 5.12.0i
* Add 16 timers using commands Timer and Timers (#1091)
* Add commands Timer 0 to clear timer and Timer 1..16 to copy timer
* Add optional Timer configuration webpage to be enabled in user_config.h with define USE_TIMERS_WEB

This comment has been minimized.

Copy link
@gorgiea

gorgiea Apr 5, 2018

Could you add a way to enable timers through web console? It would make it easier for Sonoffs that I've already flashed...Also is there someway to add a Sunset/Sunrise timer?

* Change webpage parameter communication
*
* 5.12.0h
* Add optional Arduino OTA support to be enabled in user_config.h (#1998)
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/cs-CZ.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Aktualizace stopek"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energie Dnes"
#define D_ENERGY_YESTERDAY "Energie Včera"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/de-DE.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energie heute"
#define D_ENERGY_YESTERDAY "Energie gestern"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/en-GB.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energy Today"
#define D_ENERGY_YESTERDAY "Energy Yesterday"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/es-AR.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "Calidad del Aire"
#define D_DOMOTICZ_UPDATE_TIMER "Intervalo de refresco"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energía Hoy"
#define D_ENERGY_YESTERDAY "Energía Ayer"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/fr-FR.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xsns_03_energy.ino
#define D_ENERGY_TODAY "Energie aujourd'hui"
#define D_ENERGY_YESTERDAY "Energie hier"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/hu-HU.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "Légminőség"
#define D_DOMOTICZ_UPDATE_TIMER "Update időzítő"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Mai Energia"
#define D_ENERGY_YESTERDAY "Tegnapi Energia"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/it-IT.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Intervallo di aggiornamento"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energia Oggi"
#define D_ENERGY_YESTERDAY "Energia Ieri"
Expand Down
12 changes: 11 additions & 1 deletion sonoff/language/nl-NL.h
Expand Up @@ -110,7 +110,7 @@
#define D_OFF "Uit"
#define D_OFFLINE "Offline"
#define D_OK "Ok"
#define D_ON "Ann"
#define D_ON "Aan"
#define D_ONLINE "Online"
#define D_PASSWORD "Wachtwoord"
#define D_PORT "Poort"
Expand Down Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Bijwerk timer"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configureer Tijdschakelaar"
#define D_TIMER_PARAMETERS "Tijdschakelaar parameters"
#define D_TIMER_ARM "Actief"
#define D_TIMER_TIME "Tijd"
#define D_TIMER_DAYS "Dagen"
#define D_TIMER_REPEAT "Herhaal"
#define D_TIMER_DEVICE "Uitgang"
#define D_TIMER_POWER "Actie"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Verbruik vandaag"
#define D_ENERGY_YESTERDAY "Verbruik gisteren"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/pl-PL.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Zaktualizuj czasomierz"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energia Dzisiaj"
#define D_ENERGY_YESTERDAY "Energia Wczoraj"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/pt-PT.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "Qualidade do Ar"
#define D_DOMOTICZ_UPDATE_TIMER "Tempo de atualização"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Consumo energético de hoje"
#define D_ENERGY_YESTERDAY "Consumo energético de ontem"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/ru-RU.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Энергия Сегодня"
#define D_ENERGY_YESTERDAY "Энергия Вчера"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/zh-CN.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "空气质量"
#define D_DOMOTICZ_UPDATE_TIMER "更新计时器"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "今日用电量"
#define D_ENERGY_YESTERDAY "昨日用电量"
Expand Down
10 changes: 10 additions & 0 deletions sonoff/language/zh-TW.h
Expand Up @@ -358,6 +358,16 @@
#define D_DOMOTICZ_AIRQUALITY "空氣品質"
#define D_DOMOTICZ_UPDATE_TIMER "更新計時器"

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Configure Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "Time"
#define D_TIMER_DAYS "Days"
#define D_TIMER_REPEAT "Repeat"
#define D_TIMER_DEVICE "Device"
#define D_TIMER_POWER "Power"

// xdrv_03_energy.ino
#define D_ENERGY_TODAY "今日用電量"
#define D_ENERGY_YESTERDAY "昨日用電量"
Expand Down
4 changes: 2 additions & 2 deletions sonoff/settings.h
Expand Up @@ -93,10 +93,10 @@ typedef union {
uint32_t data;
struct {
uint32_t time : 11; // bits 0 - 10 = minutes in a day
uint32_t mday : 5; // bits 11 - 15 = optional day in a month
uint32_t mday : 5; // bits 11 - 15 = 32 days in a month
uint32_t days : 7; // bits 16 - 22 = week day mask
uint32_t device : 4; // bits 23 - 26 = 16 devices
uint32_t power : 2; // bits 27 - 28 = 4 power states - Off, On, Toggle
uint32_t power : 2; // bits 27 - 28 = 4 power states - Off, On, Toggle, Blink
uint32_t repeat : 1; // bit 29
uint32_t arm : 1; // bit 30
uint32_t spare : 1; // bit 31
Expand Down
1 change: 1 addition & 0 deletions sonoff/user_config.h
Expand Up @@ -163,6 +163,7 @@
#define NTP_SERVER3 "0.nl.pool.ntp.org" // [NtpServer3] Select third NTP server by name or IP address (93.94.224.67)

#define USE_TIMERS // Add support for up to 16 timers (+2k2 code)
#define USE_TIMERS_WEB // Add timer webpage support (+4k5 code)

// -- Time - Start Daylight Saving Time and timezone offset from UTC in minutes
#define TIME_DST North, Last, Sun, Mar, 2, +120 // Northern Hemisphere, Last sunday in march at 02:00 +120 minutes
Expand Down

3 comments on commit c4b3d42

@emontnemery
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and d895341 breaks OTA for 1MB devices.
Any plan to disable for default build or make something else default off?

@arendst
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few items here.

1- as the development branche I have to test for correct functionality before releasing as master.
2- every new esp/arduino library release takes away code space while introducing features I do not (plan) to use. This makes deciding what disable impossible.
3- as documented in the wiki - what's new magicOta solves ota file size problems

So I'm afraid you will have to live with it. If travis is still using 2.3.0 as default I might be able to sqeeze the next release in one ota. If not then you'll have to use the two step approach.

@emontnemery
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arendst Sure I can live with it, I was just curious about the plans. I'll look into OtaMagic.

Please sign in to comment.