Prep for release 7.1

This commit is contained in:
Theo Arends 2019-11-13 11:15:24 +01:00
parent 20c2f4238c
commit 0777438d83
2 changed files with 80 additions and 58 deletions

126
API.md
View File

@ -4,73 +4,85 @@
Tasmota can easily be extended by developers using provided function pointers as callback Ids. This document lists the available callback function Ids. See the wiki (https://github.com/arendst/Tasmota/wiki/Sensor-API) for more information. Tasmota can easily be extended by developers using provided function pointers as callback Ids. This document lists the available callback function Ids. See the wiki (https://github.com/arendst/Tasmota/wiki/Sensor-API) for more information.
Callback availability can be checked by searching for either XdrvCall, XsnsCall, XdspCall and XnrgCall. Callback availability can be checked by searching for either XdrvCall, XsnsCall, XdspCall, XnrgCall and XlgtCall.
## Driver, Sensor and Energy Callback Ids ## Driver, Sensor and Energy Callback Ids
The following table lists Callback Ids and their availability for a Driver, Sensor or Energy service. The following table lists Callback Ids and their availability for a Driver, Sensor or Energy service.
Callback Id | Bool | Version | xdrv | xsns | xnrg | Description Callback Id | Bool | xdrv | xsns | xnrg | xlgt | Description
----------------------------|------|----------|------|------|------|---------------------------------- ----------------------------|------|------|------|------|------|----------------------------------
FUNC_SETTINGS_OVERRIDE | | 6.2.1.19 | x | | | Override start-up settings FUNC_SETTINGS_OVERRIDE | | x | | | | Override start-up settings
FUNC_MODULE_INIT | x | 6.2.1.17 | x | | | Init module specific parameters FUNC_PIN_STATE | x | 1 | 2 | | | At GPIO configuration
FUNC_PRE_INIT | | | x | | x | Once GPIO have been established FUNC_MODULE_INIT | x | 1 | | | 2 | Init module specific parameters
FUNC_INIT | | | x | x | x | At end of initialisation FUNC_PRE_INIT | | 1 | | 2 | | Once GPIO have been established
FUNC_LOOP | | | x | | | In main loop FUNC_INIT | | 1 | 3 | 2 | | At end of initialisation
FUNC_EVERY_50_MSECOND | | | x | x | | FUNC_LOOP | | 1 | 2 | | | In main loop
FUNC_EVERY_100_MSECOND | | | x | x | | FUNC_EVERY_50_MSECOND | | 1 | 2 | | |
FUNC_EVERY_200_MSECOND | | | | x | x | FUNC_EVERY_100_MSECOND | | 1 | 2 | | |
FUNC_EVERY_250_MSECOND | | | x | | | FUNC_EVERY_200_MSECOND | | | | x | |
FUNC_EVERY_SECOND | | | x | x | x | FUNC_EVERY_250_MSECOND | | 1 | 3 | 2 | |
FUNC_PREP_BEFORE_TELEPERIOD | | | | x | | Deprecated. Use a FUNC_EVERY_ FUNC_EVERY_SECOND | | 1 | 2 | | |
FUNC_JSON_APPEND | | | | x | | Extend teleperiod JSON text FUNC_SAVE_AT_MIDNIGHT | | | x | | | At midnight
FUNC_WEB_APPEND | | | | x | | Extend webgui ajax info FUNC_SAVE_BEFORE_RESTART | | 2 | 1 | | | Just before a planned restart
FUNC_SAVE_BEFORE_RESTART | | | | x | | Just before a planned restart FUNC_AFTER_TELEPERIOD | | x | | | | At end of teleperiod
FUNC_COMMAND | x | | x | x | | When a command is not recognized FUNC_JSON_APPEND | | 2 | 1 | 3 | | Extend teleperiod JSON text
FUNC_COMMAND_DRIVER | x | 6.4.1.21 | x | | | When command Driver\<id\> is executed FUNC_WEB_SENSOR | | 2 | 1 | 3 | | Add sensor data to web GUI
FUNC_COMMAND_SENSOR | x | 6.4.1.21 | | x | | When command Sensor\<id\> is executed FUNC_COMMAND | x | 1 | 2 | 3 | 4 | When a command is not recognized
FUNC_MQTT_SUBSCRIBE | | 5.12.0k | x | | | At end of MQTT subscriptions FUNC_COMMAND_DRIVER | x | x | | | | When command Driver\<id\> is executed
FUNC_MQTT_INIT | | 5.12.0k | x | | | Once at end of MQTT connection FUNC_COMMAND_SENSOR | x | | x | | | When command Sensor\<id\> is executed
FUNC_MQTT_DATA | x | 5.12.0k | x | | | Before decoding command FUNC_MQTT_SUBSCRIBE | | x | | | | At end of MQTT subscriptions
FUNC_SET_POWER | | | x | | | Before setting relays FUNC_MQTT_INIT | | x | | | | Once at end of MQTT connection
FUNC_SET_DEVICE_POWER | x | 6.2.1.18 | x | | | Set relay FUNC_MQTT_DATA | x | x | | | | Before decoding command
FUNC_SHOW_SENSOR | | | x | | | When FUNC_JSON_APPEND completes FUNC_SET_POWER | | x | | | | Before setting relays
FUNC_RULES_PROCESS | x | 6.0.0 | x | | | Process specific rule FUNC_SET_DEVICE_POWER | x | x | | | | Set relay
FUNC_SERIAL | x | | x | | x | Process serial data FUNC_SHOW_SENSOR | | x | | | | When FUNC_JSON_APPEND completes
FUNC_FREE_MEM | | | x | | | Show free memory for debugging FUNC_ANY_KEY | | x | | | |
FUNC_BUTTON_PRESSED | x | 6.2.1.18 | x | | | When a button is pressed FUNC_ENERGY_EVERY_SECOND | | | | x | |
FUNC_WEB_ADD_BUTTON | | 6.2.1.14 | x | x | | Add a Configuration Button to GUI FUNC_ENERGY_RESET | | | | x | |
FUNC_WEB_ADD_MAIN_BUTTON | | 6.2.1.14 | x | x | | Add a main button to GUI FUNC_RULES_PROCESS | x | x | | | | Process specific rule
FUNC_WEB_ADD_HANDLER | | 6.2.1.14 | x | x | | Add a webserver handler FUNC_SERIAL | x | 1 | | 2 | 3 | Process serial data
FUNC_FREE_MEM | | x | | | | Show free memory for debugging
FUNC_BUTTON_PRESSED | x | x | | | | When a button is pressed
FUNC_WEB_ADD_BUTTON | | 1 | 2 | | | Add a Configuration Button to GUI
FUNC_WEB_ADD_MAIN_BUTTON | | 1 | 2 | | | Add a main button to GUI
FUNC_WEB_ADD_HANDLER | | 1 | 2 | | | Add a webserver handler
FUNC_SET_CHANNELS | | 2 | | | 1 |
FUNC_SET_SCHEME | | | | | x |
The numbers represent the sequence of execution
## Display Call back Ids ## Display Call back Ids
The following table lists all Callback Ids for a Display service. The following table lists all Callback Ids for a Display service.
Callback Id | Bool | Version | Description Callback Id | Bool | Description
------------------------------|------|----------|--------------------- ------------------------------|------|---------------------
FUNC_DISPLAY_INIT_DRIVER | | 6.1.1.7 | FUNC_DISPLAY_INIT_DRIVER | |
FUNC_DISPLAY_INIT | | 6.1.1.7 | FUNC_DISPLAY_INIT | |
FUNC_DISPLAY_EVERY_50_MSECOND | | 6.1.1.7 | FUNC_DISPLAY_EVERY_50_MSECOND | |
FUNC_DISPLAY_EVERY_SECOND | | 6.1.1.7 | FUNC_DISPLAY_EVERY_SECOND | |
FUNC_DISPLAY_MODEL | x | 6.1.1.7 | FUNC_DISPLAY_MODEL | x |
FUNC_DISPLAY_MODE | | 6.1.1.7 | FUNC_DISPLAY_MODE | |
FUNC_DISPLAY_POWER | | 6.1.1.7 | FUNC_DISPLAY_POWER | |
FUNC_DISPLAY_CLEAR | | 6.1.1.7 | FUNC_DISPLAY_CLEAR | |
FUNC_DISPLAY_DRAW_FRAME | | 6.1.1.7 | FUNC_DISPLAY_DRAW_FRAME | |
FUNC_DISPLAY_DRAW_HLINE | | 6.1.1.7 | FUNC_DISPLAY_DRAW_HLINE | |
FUNC_DISPLAY_DRAW_VLINE | | 6.1.1.7 | FUNC_DISPLAY_DRAW_VLINE | |
FUNC_DISPLAY_DRAW_LINE | | 6.1.1.7 | FUNC_DISPLAY_DRAW_LINE | |
FUNC_DISPLAY_DRAW_CIRCLE | | 6.1.1.7 | FUNC_DISPLAY_DRAW_CIRCLE | |
FUNC_DISPLAY_FILL_CIRCLE | | 6.1.1.7 | FUNC_DISPLAY_FILL_CIRCLE | |
FUNC_DISPLAY_DRAW_RECTANGLE | | 6.1.1.7 | FUNC_DISPLAY_DRAW_RECTANGLE | |
FUNC_DISPLAY_FILL_RECTANGLE | | 6.1.1.7 | FUNC_DISPLAY_FILL_RECTANGLE | |
FUNC_DISPLAY_TEXT_SIZE | | 6.1.1.7 | FUNC_DISPLAY_TEXT_SIZE | |
FUNC_DISPLAY_FONT_SIZE | | 6.1.1.7 | FUNC_DISPLAY_FONT_SIZE | |
FUNC_DISPLAY_ROTATION | | 6.1.1.7 | FUNC_DISPLAY_ROTATION | |
FUNC_DISPLAY_DRAW_STRING | | 6.1.1.7 | FUNC_DISPLAY_DRAW_STRING | |
FUNC_DISPLAY_ONOFF | | 6.1.1.7 | FUNC_DISPLAY_ONOFF | |
## Init sequence ## Init sequence
The following list contains the callback init sequence
The following list shows a typical callback init sequence
CFG: Loaded from flash at FB, Count 1581 CFG: Loaded from flash at FB, Count 1581
xdrv - FUNC_SETTINGS_OVERRIDE xdrv - FUNC_SETTINGS_OVERRIDE

View File

@ -1,6 +1,6 @@
![Tasmota logo](/tools/logo/TASMOTA_FullLogo_Vector.svg) ![Tasmota logo](/tools/logo/TASMOTA_FullLogo_Vector.svg)
Alternative firmware for [ESP8266](https://en.wikipedia.org/wiki/ESP8266) based devices with **easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX**. Alternative firmware for [ESP8266](https://en.wikipedia.org/wiki/ESP8266) based devices with **easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX**.
_Written for Arduino IDE and PlatformIO._ _Written for Arduino IDE and PlatformIO._
[![GitHub version](https://img.shields.io/github/release/arendst/Tasmota.svg)](https://github.com/arendst/Tasmota/releases/latest) [![GitHub version](https://img.shields.io/github/release/arendst/Tasmota.svg)](https://github.com/arendst/Tasmota/releases/latest)
@ -19,6 +19,7 @@ See [RELEASENOTES.md](https://github.com/arendst/Tasmota/blob/development/RELEAS
In addition to the [release webpage](https://github.com/arendst/Tasmota/releases/latest) the binaries can also be downloaded from http://thehackbox.org/tasmota/release/ In addition to the [release webpage](https://github.com/arendst/Tasmota/releases/latest) the binaries can also be downloaded from http://thehackbox.org/tasmota/release/
## Development ## Development
[![Dev Version](https://img.shields.io/badge/development%20version-v7.0.0.x-blue.svg)](https://github.com/arendst/Tasmota) [![Dev Version](https://img.shields.io/badge/development%20version-v7.0.0.x-blue.svg)](https://github.com/arendst/Tasmota)
[![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://thehackbox.org/tasmota/) [![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://thehackbox.org/tasmota/)
[![Build Status](https://img.shields.io/travis/arendst/Tasmota.svg)](https://travis-ci.org/arendst/Tasmota) [![Build Status](https://img.shields.io/travis/arendst/Tasmota.svg)](https://travis-ci.org/arendst/Tasmota)
@ -32,6 +33,7 @@ The Tasmota development codebase is checked every 1-2 hours for changes. If new
Note that there is a chance, as with any upgrade, that the device may not function as expected. You must always account for the possibility that you may need to flash the device via the serial programming interface if the OTA upgrade fails. Even with the master release, you should always attempt to test the device or a similar prototype before upgrading a device which is in production or is hard to reach. And, as always, make a backup of the device configuration before beginning any firmware update. Note that there is a chance, as with any upgrade, that the device may not function as expected. You must always account for the possibility that you may need to flash the device via the serial programming interface if the OTA upgrade fails. Even with the master release, you should always attempt to test the device or a similar prototype before upgrading a device which is in production or is hard to reach. And, as always, make a backup of the device configuration before beginning any firmware update.
## Disclaimer ## Disclaimer
:warning: **DANGER OF ELECTROCUTION** :warning: :warning: **DANGER OF ELECTROCUTION** :warning:
If your device connects to mains electricity (AC power) there is danger of electrocution if not installed properly. If you don't know how to install it, please call an electrician (***Beware:*** certain countries prohibit installation without a licensed electrician present). Remember: _**SAFETY FIRST**_. It is not worth the risk to yourself, your family and your home if you don't know exactly what you are doing. Never tinker or try to flash a device using the serial programming interface while it is connected to MAINS ELECTRICITY (AC power). If your device connects to mains electricity (AC power) there is danger of electrocution if not installed properly. If you don't know how to install it, please call an electrician (***Beware:*** certain countries prohibit installation without a licensed electrician present). Remember: _**SAFETY FIRST**_. It is not worth the risk to yourself, your family and your home if you don't know exactly what you are doing. Never tinker or try to flash a device using the serial programming interface while it is connected to MAINS ELECTRICITY (AC power).
@ -39,6 +41,7 @@ If your device connects to mains electricity (AC power) there is danger of elect
We don't take any responsibility nor liability for using this software nor for the installation or any tips, advice, videos, etc. given by any member of this site or any related site. We don't take any responsibility nor liability for using this software nor for the installation or any tips, advice, videos, etc. given by any member of this site or any related site.
## Note ## Note
Please do not ask to add new devices unless it requires additional code for new features. If the device is not listed as a module, try using [Templates](https://github.com/arendst/Tasmota/wiki/Templates) first. If it is not listed in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates) create your own [Template](https://github.com/arendst/Tasmota/wiki/Templates#creating-your-template-). Please do not ask to add new devices unless it requires additional code for new features. If the device is not listed as a module, try using [Templates](https://github.com/arendst/Tasmota/wiki/Templates) first. If it is not listed in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates) create your own [Template](https://github.com/arendst/Tasmota/wiki/Templates#creating-your-template-).
## Quick Install ## Quick Install
@ -52,9 +55,11 @@ If you want to compile Tasmota yourself keep in mind the following:
- To make compile time changes to Tasmota use the `user_config_override.h` file. It assures keeping your custom settings when you download and compile a new version. You have to make a copy from the provided `user_config_override_sample.h` file and add your setting overrides. To enable the override you have to set a compile define as documented in the `user_config_override_sample.h` file. - To make compile time changes to Tasmota use the `user_config_override.h` file. It assures keeping your custom settings when you download and compile a new version. You have to make a copy from the provided `user_config_override_sample.h` file and add your setting overrides. To enable the override you have to set a compile define as documented in the `user_config_override_sample.h` file.
## Configuration Information ## Configuration Information
Please refer to the installation and configuration articles in the [wiki](https://github.com/arendst/Tasmota/wiki). Please refer to the installation and configuration articles in the [wiki](https://github.com/arendst/Tasmota/wiki).
## Migration Information ## Migration Information
See [wiki migration path](https://github.com/arendst/Tasmota/wiki/Upgrading#migration-path) for instructions how to migrate to a major version. Pay attention to the following version breaks due to dynamic settings updates: See [wiki migration path](https://github.com/arendst/Tasmota/wiki/Upgrading#migration-path) for instructions how to migrate to a major version. Pay attention to the following version breaks due to dynamic settings updates:
1. Migrate to **Sonoff-Tasmota 3.9.x** 1. Migrate to **Sonoff-Tasmota 3.9.x**
@ -64,6 +69,7 @@ See [wiki migration path](https://github.com/arendst/Tasmota/wiki/Upgrading#migr
5. Migrate to **Tasmota 7.x** 5. Migrate to **Tasmota 7.x**
## Support Information ## Support Information
<img src="https://user-images.githubusercontent.com/5904370/68332933-e6e5a600-00d7-11ea-885d-50395f7239a1.png" width=150 align="right" /> <img src="https://user-images.githubusercontent.com/5904370/68332933-e6e5a600-00d7-11ea-885d-50395f7239a1.png" width=150 align="right" />
For a database of supported devices see [Tasmota Device Templates Repository](https://blakadder.github.io/templates) For a database of supported devices see [Tasmota Device Templates Repository](https://blakadder.github.io/templates)
@ -73,6 +79,7 @@ See [Community](https://groups.google.com/d/forum/sonoffusers) for forum.<br />
Visit [Discord Chat](https://discord.gg/Ks2Kzd4) for discussions and troubleshooting. Visit [Discord Chat](https://discord.gg/Ks2Kzd4) for discussions and troubleshooting.
## Contribute ## Contribute
You can contribute to Tasmota by You can contribute to Tasmota by
- providing Pull Requests (Features, Proof of Concepts, Language files or Fixes) - providing Pull Requests (Features, Proof of Concepts, Language files or Fixes)
- testing new released features and report issues - testing new released features and report issues
@ -84,6 +91,7 @@ You can contribute to Tasmota by
## Credits ## Credits
### Libraries Used ### Libraries Used
Libraries used with Tasmota are: Libraries used with Tasmota are:
- [ESP8266 core for Arduino](https://github.com/esp8266/Arduino) - [ESP8266 core for Arduino](https://github.com/esp8266/Arduino)
- [Adafruit CCS811](https://github.com/adafruit/Adafruit_CCS811) - [Adafruit CCS811](https://github.com/adafruit/Adafruit_CCS811)
@ -93,6 +101,7 @@ Libraries used with Tasmota are:
- [Adafruit SGP30](https://github.com/adafruit/Adafruit_SGP30) - [Adafruit SGP30](https://github.com/adafruit/Adafruit_SGP30)
- Adafruit based SH1106 - Adafruit based SH1106
- [Adafruit SSD1306](https://github.com/adafruit/Adafruit_SSD1306) - [Adafruit SSD1306](https://github.com/adafruit/Adafruit_SSD1306)
- [Adafruit TSL2591](https://github.com/adafruit/Adafruit_TSL2591_Library)
- Adafruit based SSD1351 - Adafruit based SSD1351
- [Adafruit GFX](https://github.com/adafruit/Adafruit-GFX-Library) - [Adafruit GFX](https://github.com/adafruit/Adafruit-GFX-Library)
- [ArduinoJson](https://arduinojson.org/) - [ArduinoJson](https://arduinojson.org/)
@ -123,6 +132,7 @@ Libraries used with Tasmota are:
- Xlatb Ra8876 - Xlatb Ra8876
### People inspiring me ### People inspiring me
People helping to keep the show on the road: People helping to keep the show on the road:
- David Lang providing initial issue resolution and code optimizations - David Lang providing initial issue resolution and code optimizations
- Heiko Krupp for his IRSend, HTU21, SI70xx and Wemo/Hue emulation drivers - Heiko Krupp for his IRSend, HTU21, SI70xx and Wemo/Hue emulation drivers