mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Merge branch 'development' into release-7.1
This commit is contained in:
commit
a0fe00dd6f
2
API.md
2
API.md
@ -2,7 +2,7 @@
|
||||
|
||||
# Basic API 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.
|
||||
Tasmota can easily be extended by developers using provided function pointers as callback Ids. This document lists the available callback function Ids. Read [Sensor API](https://tasmota.github.io/docs/#/Sensor-API) for more information.
|
||||
|
||||
Callback availability can be checked by searching for either XdrvCall, XsnsCall, XdspCall, XnrgCall and XlgtCall.
|
||||
|
||||
|
147
BUILDS.md
Normal file
147
BUILDS.md
Normal file
@ -0,0 +1,147 @@
|
||||
## Available Features and Sensors
|
||||
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
|-----------------------|---------|-------|--------|-----|---------|----|---------|--------
|
||||
| MY_LANGUAGE en-GB | x | x | x | x | x | x | x |
|
||||
| USE_ARDUINO_OTA | - | - | - | - | - | - | - |
|
||||
| USE_DOMOTICZ | - | - | x | x | x | x | - |
|
||||
| USE_HOME_ASSISTANT | - | - | x | x | x | x | - |
|
||||
| USE_MQTT_TLS | - | - | - | - | - | - | - |
|
||||
| USE_MQTT_TLS_CA_CERT | - | - | - | - | - | - | - |
|
||||
| USE_MQTT_AWS_IOT | - | - | - | - | - | - | - |
|
||||
| USE_4K_RSA | - | - | - | - | - | - | - |
|
||||
| USE_KNX | - | - | - | x | - | - | - |
|
||||
| USE_WEBSERVER | x | x | x | x | x | x | x |
|
||||
| USE_JAVASCRIPT_ES6 | - | - | - | - | - | - | - |
|
||||
| USE_WEBSEND_RESPONSE | - | - | - | - | - | - | - |
|
||||
| USE_EMULATION_HUE | - | x | x | - | x | - | - |
|
||||
| USE_EMULATION_WEMO | - | x | x | - | x | - | - |
|
||||
| USE_DISCOVERY | - | - | x | x | - | - | x |
|
||||
| WEBSERVER_ADVERTISE | - | - | x | x | - | - | x |
|
||||
| MQTT_HOST_DISCOVERY | - | - | x | x | - | - | x |
|
||||
| USE_TIMERS | - | x | x | x | x | x | x |
|
||||
| USE_TIMERS_WEB | - | x | x | x | x | x | x |
|
||||
| USE_SUNRISE | - | x | x | x | x | x | x |
|
||||
| USE_RULES | - | x | x | x | x | x | x |
|
||||
| USE_SCRIPT | - | - | - | - | - | - | - |
|
||||
| USE_EXPRESSION | - | - | - | - | - | - | - |
|
||||
| SUPPORT_IF_STATEMENT | - | - | - | - | - | - | - |
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| ROTARY_V1 | - | - | - | - | - | - | - |
|
||||
| USE_SONOFF_RF | - | - | x | x | x | - | - |
|
||||
| USE_RF_FLASH | - | - | x | x | x | - | - |
|
||||
| USE_SONOFF_SC | - | - | x | - | x | - | - |
|
||||
| USE_TUYA_MCU | - | x | x | x | x | - | x |
|
||||
| USE_ARMTRONIX_DIMMERS | - | - | x | x | - | - | - |
|
||||
| USE_PS_16_DZ | - | - | x | x | x | - | - |
|
||||
| USE_SONOFF_IFAN | - | - | x | x | x | - | - |
|
||||
| USE_BUZZER | - | - | x | x | x | - | - |
|
||||
| USE_ARILUX_RF | - | - | x | x | x | - | - |
|
||||
| USE_SHUTTER | - | - | - | - | - | - | - |
|
||||
| USE_DEEPSLEEP | - | - | x | - | x | - | - |
|
||||
| USE_EXS_DIMMER | - | - | x | x | - | - | - |
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| USE_LIGHT | - | x | x | x | x | x | x |
|
||||
| USE_WS2812 | - | - | x | x | x | - | x |
|
||||
| USE_WS2812_DMA | - | - | - | - | - | - | - |
|
||||
| USE_MY92X1 | - | - | x | x | x | - | x |
|
||||
| USE_SM16716 | - | - | x | x | x | - | x |
|
||||
| USE_SM2135 | - | - | x | x | x | - | x |
|
||||
| USE_SONOFF_L1 | - | - | x | x | x | - | x |
|
||||
| | | | | | | | |
|
||||
| USE_ENERGY_SENSOR | - | x | x | x | x | - | - |
|
||||
| USE_PZEM004T | - | - | x | x | x | - | - |
|
||||
| USE_PZEM_AC | - | - | x | x | x | - | - |
|
||||
| USE_PZEM_DC | - | - | x | x | x | - | - |
|
||||
| USE_MCP39F501 | - | x | x | x | x | - | - |
|
||||
| USE_SDM120 | - | - | - | - | x | - | - |
|
||||
| USE_SDM630 | - | - | - | - | x | - | - |
|
||||
| USE_DDS2382 | - | - | - | - | x | - | - |
|
||||
| USE_DDSU666 | - | - | - | - | x | - | - |
|
||||
| USE_SOLAX_X1 | - | - | - | - | - | - | - |
|
||||
| | | | | | | | |
|
||||
| USE_ADC_VCC | x | x | - | - | - | - | - |
|
||||
| USE_COUNTER | - | - | x | x | x | x | x |
|
||||
| USE_DS18x20 | - | - | x | x | x | - | x |
|
||||
| USE_DHT | - | - | x | x | x | x | x |
|
||||
| USE_MAX31855 | - | - | - | - | x | - | - |
|
||||
| USE_MAX31865 | - | - | - | - | - | - | - |
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| USE_I2C | - | - | x | x | x | - | x |
|
||||
| USE_SHT | - | - | x | x | x | - | x |
|
||||
| USE_HTU | - | - | x | x | x | - | x |
|
||||
| USE_BMP | - | - | x | x | x | - | x |
|
||||
| USE_BME680 | - | - | - | - | x | - | - |
|
||||
| USE_BH1750 | - | - | x | x | x | - | x |
|
||||
| USE_VEML6070 | - | - | - | - | x | - | - |
|
||||
| USE_ADS1115 | - | - | - | - | x | - | - |
|
||||
| USE_ADS1115_I2CDEV | - | - | - | - | - | - | - |
|
||||
| USE_INA219 | - | - | - | - | x | - | - |
|
||||
| USE_INA226 | - | - | - | - | - | - | - |
|
||||
| USE_SHT3X | - | - | x | x | x | - | x |
|
||||
| USE_TSL2561 | - | - | - | - | x | - | - |
|
||||
| USE_TSL2591 | - | - | - | - | - | - | - |
|
||||
| USE_MGS | - | - | - | - | x | - | - |
|
||||
| USE_SGP30 | - | - | x | x | x | - | x |
|
||||
| USE_SI1145 | - | - | - | - | - | - | - |
|
||||
| USE_LM75AD | - | - | x | x | x | - | x |
|
||||
| USE_APDS9960 | - | - | - | - | - | - | - |
|
||||
| USE_MCP230xx | - | - | - | - | - | - | - |
|
||||
| USE_PCA9685 | - | - | - | - | - | - | - |
|
||||
| USE_MPR121 | - | - | - | - | - | - | - |
|
||||
| USE_CCS811 | - | - | - | - | - | - | - |
|
||||
| USE_MPU6050 | - | - | - | - | - | - | - |
|
||||
| USE_DS3231 | - | - | - | - | - | - | - |
|
||||
| USE_MGC3130 | - | - | - | - | - | - | - |
|
||||
| USE_MAX44009 | - | - | - | - | - | - | - |
|
||||
| USE_SCD30 | - | - | - | - | x | - | - |
|
||||
| USE_SPS30 | - | - | - | - | - | - | - |
|
||||
| USE_ADE7953 | - | - | x | x | x | - | x |
|
||||
| USE_VL53L0X | - | - | - | - | - | - | - |
|
||||
| USE_MLX90614 | - | - | - | - | - | - | - |
|
||||
| USE_CHIRP | - | - | - | - | - | - | - |
|
||||
| USE_PAJ7620 | - | - | - | - | - | - | - |
|
||||
| USE_PCF8574 | - | - | - | - | - | - | - |
|
||||
| USE_HIH6 | - | - | - | - | x | - | - |
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| USE_SPI | - | - | - | - | - | - | x |
|
||||
| USE_MHZ19 | - | - | x | x | x | - | x |
|
||||
| USE_SENSEAIR | - | - | x | x | x | - | x |
|
||||
| USE_PMS5003 | - | - | x | x | x | - | x |
|
||||
| USE_NOVA_SDS | - | - | x | x | x | - | x |
|
||||
| USE_HPMA | - | - | - | - | x | - | - |
|
||||
| USE_SERIAL_BRIDGE | - | - | x | x | x | - | x |
|
||||
| USE_MP3_PLAYER | - | - | - | - | x | - | - |
|
||||
| USE_AZ7798 | - | - | - | - | - | - | - |
|
||||
| USE_PN532_HSU | - | - | - | - | x | - | - |
|
||||
| USE_ZIGBEE | - | - | - | - | - | - | - |
|
||||
| | | | | | | | |
|
||||
| USE_IR_REMOTE | - | - | x | x | x | x | x |
|
||||
| USE_IR_RECEIVE | - | - | x | x | x | x | x |
|
||||
| | | | | | | | |
|
||||
| USE_SR04 | - | - | x | x | x | - | x |
|
||||
| USE_TM1638 | - | - | - | - | x | - | - |
|
||||
| USE_HX711 | - | - | x | x | x | - | x |
|
||||
| USE_TX20_WIND_SENSOR | - | - | - | - | x | - | - |
|
||||
| USE_RC_SWITCH | - | - | - | - | x | - | - |
|
||||
| USE_RF_SENSOR | - | - | - | - | x | - | - | AlectoV2 only
|
||||
| USE_HRE | - | - | - | - | x | - | - |
|
||||
| USE_A4988_STEPPER | - | - | - | - | - | - | - |
|
||||
| USE_TASMOTA_SLAVE | - | - | - | - | - | - | - | Experimental
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| USE_DISPLAY | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_LCD | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_SSD1306 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_MATRIX | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_SH1106 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_ILI9341 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_EPAPER_29 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_EPAPER_42 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_ILI9488 | - | - | - | - | - | - | - |
|
||||
| USE_DISPLAY_SSD1351 | - | - | - | - | - | - | - |
|
||||
| USE_DISPLAY_RA8876 | - | - | - | - | - | - | - |
|
@ -8,7 +8,7 @@ Everybody is welcome and invited to contribute to Tasmota Project by:
|
||||
|
||||
* Testing newly released features and reporting issues.
|
||||
* Providing Pull Requests (Features, Proof of Concepts, Language files or Fixes)
|
||||
* Contributing missing documentation for features and devices on our [Wiki](https://github.com/arendst/Tasmota/wiki/Contributing)
|
||||
* Contributing missing documentation for features and devices in our [documentation](https://tasmota.github.io/docs/#/Contributing)
|
||||
|
||||
This document describes rules that are in effect for this repository, meant for handling issues by contributors in the issue tracker and PRs.
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" alt="Logo" align="right" height="76"/>
|
||||
|
||||
# Tasmota I2C devices
|
||||
# I2C devices
|
||||
|
||||
Tasmota supports several I2C devices but to use them they mostly need to be enabled at compile time to solve possible address conflicts.
|
||||
|
||||
|
59
README.md
59
README.md
@ -24,7 +24,7 @@ In addition to the [release webpage](https://github.com/arendst/Tasmota/releases
|
||||
[](http://thehackbox.org/tasmota/)
|
||||
[](https://travis-ci.org/arendst/Tasmota)
|
||||
|
||||
See [tasmota/_changelog.ino](tasmota/_changelog.ino) for detailed change information.
|
||||
See [tasmota/CHANGELOG.md](tasmota/CHANGELOG.md) for detailed change information.
|
||||
|
||||
Unless your Tasmota powered device exhibits a problem or you need to make use of a feature that is not available in the Tasmota version currently installed on your device, leave your device alone - it works so don't make unnecessary changes! If the release version (i.e., the master branch) exhibits unexpected behaviour for your device and configuration, you should upgrade to the latest development version instead to see if your problem is resolved as some bugs in previous releases or development builds may already have been resolved.
|
||||
|
||||
@ -42,10 +42,10 @@ We don't take any responsibility nor liability for using this software nor for t
|
||||
|
||||
## 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://tasmota.github.io/docs/#/Templates) first. If it is not listed in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates) create your own [Template](https://tasmota.github.io/docs/#/Templates?id=creating-your-template).
|
||||
|
||||
## Quick Install
|
||||
Download one of the released binaries from https://github.com/arendst/Tasmota/releases and flash it to your hardware as [documented in the wiki](https://github.com/arendst/Tasmota/wiki/Flashing).
|
||||
Download one of the released binaries from https://github.com/arendst/Tasmota/releases and flash it to your hardware [using our installation guide](https://tasmota.github.io/docs/#/installation/).
|
||||
|
||||
## Important User Compilation Information
|
||||
If you want to compile Tasmota yourself keep in mind the following:
|
||||
@ -56,11 +56,11 @@ If you want to compile Tasmota yourself keep in mind the following:
|
||||
|
||||
## 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 our [documentation](https://tasmota.github.io/docs).
|
||||
|
||||
## 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://tasmota.github.io/docs/#/Upgrading?id=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**
|
||||
2. Migrate to **Sonoff-Tasmota 4.x**
|
||||
@ -74,8 +74,8 @@ See [wiki migration path](https://github.com/arendst/Tasmota/wiki/Upgrading#migr
|
||||
|
||||
For a database of supported devices see [Tasmota Device Templates Repository](https://blakadder.github.io/templates)
|
||||
|
||||
See [Wiki](https://github.com/arendst/Tasmota/wiki) for use instructions and how-to's.<br />
|
||||
See [Community](https://groups.google.com/d/forum/sonoffusers) for forum.<br />
|
||||
See [Wiki](https://tasmota.github.io/docs) for use instructions and how-to's.
|
||||
See [Community](https://groups.google.com/d/forum/sonoffusers) for forum.
|
||||
Visit [Discord Chat](https://discord.gg/Ks2Kzd4) for discussions and troubleshooting.
|
||||
|
||||
## Contribute
|
||||
@ -84,55 +84,12 @@ You can contribute to Tasmota by
|
||||
- providing Pull Requests (Features, Proof of Concepts, Language files or Fixes)
|
||||
- testing new released features and report issues
|
||||
- donating to acquire hardware for testing and implementing or out of gratitude
|
||||
- contributing missing documentation for features and devices on our [Wiki](https://github.com/arendst/Tasmota/wiki)
|
||||
- contributing missing [documentation](https://tasmota.github.io/docs) for features and devices
|
||||
|
||||
[](https://paypal.me/tasmota)
|
||||
|
||||
## Credits
|
||||
|
||||
### Libraries Used
|
||||
|
||||
Libraries used with Tasmota are:
|
||||
- [ESP8266 core for Arduino](https://github.com/esp8266/Arduino)
|
||||
- [Adafruit CCS811](https://github.com/adafruit/Adafruit_CCS811)
|
||||
- [Adafruit ILI9341](https://github.com/adafruit/Adafruit_ILI9341)
|
||||
- [Adafruit LED Backpack](https://github.com/adafruit/Adafruit-LED-Backpack-Library)
|
||||
- [Adafruit MAX31865](https://github.com/adafruit/Adafruit_MAX31865)
|
||||
- [Adafruit SGP30](https://github.com/adafruit/Adafruit_SGP30)
|
||||
- Adafruit based SH1106
|
||||
- [Adafruit SSD1306](https://github.com/adafruit/Adafruit_SSD1306)
|
||||
- [Adafruit TSL2591](https://github.com/adafruit/Adafruit_TSL2591_Library)
|
||||
- Adafruit based SSD1351
|
||||
- [Adafruit GFX](https://github.com/adafruit/Adafruit-GFX-Library)
|
||||
- [ArduinoJson](https://arduinojson.org/)
|
||||
- AT24C256 I2C eeprom
|
||||
- [Base64](https://github.com/Densaugeo/base64_arduino)
|
||||
- [Bear SSL](https://github.com/earlephilhower/bearssl-esp8266.git)
|
||||
- [Bosch BME680](https://github.com/BoschSensortec/BME680_driver)
|
||||
- [C2 Programmer](http://app.cear.ufpb.br/~lucas.hartmann/tag/efm8bb1/)
|
||||
- [esp-epaper-29-ws-20171230-gemu](https://github.com/gemu2015/Sonoff-Tasmota/tree/displays/lib)
|
||||
- [esp-knx-ip](https://github.com/envy/esp-knx-ip)
|
||||
- FrogmoreScd30
|
||||
- FT6236
|
||||
- [I2Cdevlib](https://github.com/jrowberg/i2cdevlib)
|
||||
- [IRremoteEsp8266](https://github.com/markszabo/IRremoteESP8266)
|
||||
- [JaretBurkett ILI9488](https://github.com/jaretburkett/ILI9488)
|
||||
- [JobaTsl2561](https://github.com/joba-1/Joba_Tsl2561)
|
||||
- [LinkedList](https://github.com/ivanseidel/LinkedList)
|
||||
- [Liquid Cristal](https://github.com/marcoschwartz/LiquidCrystal_I2C)
|
||||
- [MultiChannelGasSensor](http://wiki.seeedstudio.com/Grove-Multichannel_Gas_Sensor/)
|
||||
- [NeoPixelBus](https://github.com/Makuna/NeoPixelBus)
|
||||
- [NewPing](https://bitbucket.org/teckel12/arduino-new-ping/wiki/Home)
|
||||
- [OneWire](https://github.com/PaulStoffregen/OneWire)
|
||||
- [PubSubClient](https://github.com/knolleary/pubsubclient)
|
||||
- [rc-switch](https://github.com/sui77/rc-switch)
|
||||
- TasmotaModbus
|
||||
- TasmotaSerial
|
||||
- [Vl53l0x](https://github.com/pololu/vl53l0x-arduino)
|
||||
- Xlatb Ra8876
|
||||
|
||||
### People inspiring me
|
||||
|
||||
People helping to keep the show on the road:
|
||||
- David Lang providing initial issue resolution and code optimizations
|
||||
- Heiko Krupp for his IRSend, HTU21, SI70xx and Wemo/Hue emulation drivers
|
||||
|
154
RELEASENOTES.md
154
RELEASENOTES.md
@ -6,7 +6,7 @@
|
||||
|
||||
## 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 [migration path](https://tasmota.github.io/docs/#/Upgrading?id=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**
|
||||
2. Migrate to **Sonoff-Tasmota 4.x**
|
||||
@ -22,7 +22,7 @@ Although it might still compile on previous Core versions all support will be re
|
||||
|
||||
## Support of TLS
|
||||
|
||||
To save resources when TLS is enabled mDNS needs to be disabled. In addition to TLS using fingerprints now also user supplied CA certs and AWS IoT is supported. See full documentation on https://github.com/arendst/Tasmota/wiki/AWS-IoT
|
||||
To save resources when TLS is enabled mDNS needs to be disabled. In addition to TLS using fingerprints now also user supplied CA certs and AWS IoT is supported. Read [full documentation](https://tasmota.github.io/docs/#/integrations/AWS-IoT)
|
||||
|
||||
## Initial configuration tools
|
||||
|
||||
@ -122,153 +122,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
|
||||
- **tasmota-display.bin** = The Display version without Energy Monitoring but adds display support.
|
||||
- **tasmota-minimal.bin** = The Minimal version allows intermediate OTA uploads to support larger versions and does NOT change any persistent parameter. This version **should NOT be used for initial installation**.
|
||||
|
||||
## Available Features and Sensors
|
||||
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
|-----------------------|---------|-------|--------|-----|---------|----|---------|--------
|
||||
| MY_LANGUAGE en-GB | x | x | x | x | x | x | x |
|
||||
| USE_ARDUINO_OTA | - | - | - | - | - | - | - |
|
||||
| USE_DOMOTICZ | - | - | x | x | x | x | - |
|
||||
| USE_HOME_ASSISTANT | - | - | x | x | x | x | - |
|
||||
| USE_MQTT_TLS | - | - | - | - | - | - | - |
|
||||
| USE_MQTT_TLS_CA_CERT | - | - | - | - | - | - | - |
|
||||
| USE_MQTT_AWS_IOT | - | - | - | - | - | - | - |
|
||||
| USE_4K_RSA | - | - | - | - | - | - | - |
|
||||
| USE_KNX | - | - | - | x | - | - | - |
|
||||
| USE_WEBSERVER | x | x | x | x | x | x | x |
|
||||
| USE_JAVASCRIPT_ES6 | - | - | - | - | - | - | - |
|
||||
| USE_WEBSEND_RESPONSE | - | - | - | - | - | - | - |
|
||||
| USE_EMULATION_HUE | - | x | x | - | x | - | - |
|
||||
| USE_EMULATION_WEMO | - | x | x | - | x | - | - |
|
||||
| USE_DISCOVERY | - | - | x | x | - | - | x |
|
||||
| WEBSERVER_ADVERTISE | - | - | x | x | - | - | x |
|
||||
| MQTT_HOST_DISCOVERY | - | - | x | x | - | - | x |
|
||||
| USE_TIMERS | - | x | x | x | x | x | x |
|
||||
| USE_TIMERS_WEB | - | x | x | x | x | x | x |
|
||||
| USE_SUNRISE | - | x | x | x | x | x | x |
|
||||
| USE_RULES | - | x | x | x | x | x | x |
|
||||
| USE_SCRIPT | - | - | - | - | - | - | - |
|
||||
| USE_EXPRESSION | - | - | - | - | - | - | - |
|
||||
| SUPPORT_IF_STATEMENT | - | - | - | - | - | - | - |
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| ROTARY_V1 | - | - | - | - | - | - | - |
|
||||
| USE_SONOFF_RF | - | - | x | x | x | - | - |
|
||||
| USE_RF_FLASH | - | - | x | x | x | - | - |
|
||||
| USE_SONOFF_SC | - | - | x | - | x | - | - |
|
||||
| USE_TUYA_MCU | - | x | x | x | x | - | x |
|
||||
| USE_ARMTRONIX_DIMMERS | - | - | x | x | - | - | - |
|
||||
| USE_PS_16_DZ | - | - | x | x | x | - | - |
|
||||
| USE_SONOFF_IFAN | - | - | x | x | x | - | - |
|
||||
| USE_BUZZER | - | - | x | x | x | - | - |
|
||||
| USE_ARILUX_RF | - | - | x | x | x | - | - |
|
||||
| USE_SHUTTER | - | - | - | - | - | - | - |
|
||||
| USE_DEEPSLEEP | - | - | x | - | x | - | - |
|
||||
| USE_EXS_DIMMER | - | - | x | x | - | - | - |
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| USE_LIGHT | - | x | x | x | x | x | x |
|
||||
| USE_WS2812 | - | - | x | x | x | - | x |
|
||||
| USE_WS2812_DMA | - | - | - | - | - | - | - |
|
||||
| USE_MY92X1 | - | - | x | x | x | - | x |
|
||||
| USE_SM16716 | - | - | x | x | x | - | x |
|
||||
| USE_SM2135 | - | - | x | x | x | - | x |
|
||||
| USE_SONOFF_L1 | - | - | x | x | x | - | x |
|
||||
| | | | | | | | |
|
||||
| USE_ENERGY_SENSOR | - | x | x | x | x | - | - |
|
||||
| USE_PZEM004T | - | - | x | x | x | - | - |
|
||||
| USE_PZEM_AC | - | - | x | x | x | - | - |
|
||||
| USE_PZEM_DC | - | - | x | x | x | - | - |
|
||||
| USE_MCP39F501 | - | x | x | x | x | - | - |
|
||||
| USE_SDM120 | - | - | - | - | x | - | - |
|
||||
| USE_SDM630 | - | - | - | - | x | - | - |
|
||||
| USE_DDS2382 | - | - | - | - | x | - | - |
|
||||
| USE_DDSU666 | - | - | - | - | x | - | - |
|
||||
| USE_SOLAX_X1 | - | - | - | - | - | - | - |
|
||||
| | | | | | | | |
|
||||
| USE_ADC_VCC | x | x | - | - | - | - | - |
|
||||
| USE_COUNTER | - | - | x | x | x | x | x |
|
||||
| USE_DS18x20 | - | - | x | x | x | - | x |
|
||||
| USE_DHT | - | - | x | x | x | x | x |
|
||||
| USE_MAX31855 | - | - | - | - | x | - | - |
|
||||
| USE_MAX31865 | - | - | - | - | - | - | - |
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| USE_I2C | - | - | x | x | x | - | x |
|
||||
| USE_SHT | - | - | x | x | x | - | x |
|
||||
| USE_HTU | - | - | x | x | x | - | x |
|
||||
| USE_BMP | - | - | x | x | x | - | x |
|
||||
| USE_BME680 | - | - | - | - | x | - | - |
|
||||
| USE_BH1750 | - | - | x | x | x | - | x |
|
||||
| USE_VEML6070 | - | - | - | - | x | - | - |
|
||||
| USE_ADS1115 | - | - | - | - | x | - | - |
|
||||
| USE_ADS1115_I2CDEV | - | - | - | - | - | - | - |
|
||||
| USE_INA219 | - | - | - | - | x | - | - |
|
||||
| USE_INA226 | - | - | - | - | - | - | - |
|
||||
| USE_SHT3X | - | - | x | x | x | - | x |
|
||||
| USE_TSL2561 | - | - | - | - | x | - | - |
|
||||
| USE_TSL2591 | - | - | - | - | - | - | - |
|
||||
| USE_MGS | - | - | - | - | x | - | - |
|
||||
| USE_SGP30 | - | - | x | x | x | - | x |
|
||||
| USE_SI1145 | - | - | - | - | - | - | - |
|
||||
| USE_LM75AD | - | - | x | x | x | - | x |
|
||||
| USE_APDS9960 | - | - | - | - | - | - | - |
|
||||
| USE_MCP230xx | - | - | - | - | - | - | - |
|
||||
| USE_PCA9685 | - | - | - | - | - | - | - |
|
||||
| USE_MPR121 | - | - | - | - | - | - | - |
|
||||
| USE_CCS811 | - | - | - | - | - | - | - |
|
||||
| USE_MPU6050 | - | - | - | - | - | - | - |
|
||||
| USE_DS3231 | - | - | - | - | - | - | - |
|
||||
| USE_MGC3130 | - | - | - | - | - | - | - |
|
||||
| USE_MAX44009 | - | - | - | - | - | - | - |
|
||||
| USE_SCD30 | - | - | - | - | x | - | - |
|
||||
| USE_SPS30 | - | - | - | - | - | - | - |
|
||||
| USE_ADE7953 | - | - | x | x | x | - | x |
|
||||
| USE_VL53L0X | - | - | - | - | - | - | - |
|
||||
| USE_MLX90614 | - | - | - | - | - | - | - |
|
||||
| USE_CHIRP | - | - | - | - | - | - | - |
|
||||
| USE_PAJ7620 | - | - | - | - | - | - | - |
|
||||
| USE_PCF8574 | - | - | - | - | - | - | - |
|
||||
| USE_HIH6 | - | - | - | - | x | - | - |
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| USE_SPI | - | - | - | - | - | - | x |
|
||||
| USE_MHZ19 | - | - | x | x | x | - | x |
|
||||
| USE_SENSEAIR | - | - | x | x | x | - | x |
|
||||
| USE_PMS5003 | - | - | x | x | x | - | x |
|
||||
| USE_NOVA_SDS | - | - | x | x | x | - | x |
|
||||
| USE_HPMA | - | - | - | - | x | - | - |
|
||||
| USE_SERIAL_BRIDGE | - | - | x | x | x | - | x |
|
||||
| USE_MP3_PLAYER | - | - | - | - | x | - | - |
|
||||
| USE_AZ7798 | - | - | - | - | - | - | - |
|
||||
| USE_PN532_HSU | - | - | - | - | x | - | - |
|
||||
| USE_ZIGBEE | - | - | - | - | - | - | - |
|
||||
| | | | | | | | |
|
||||
| USE_IR_REMOTE | - | - | x | x | x | x | x |
|
||||
| USE_IR_RECEIVE | - | - | x | x | x | x | x |
|
||||
| | | | | | | | |
|
||||
| USE_SR04 | - | - | x | x | x | - | x |
|
||||
| USE_TM1638 | - | - | - | - | x | - | - |
|
||||
| USE_HX711 | - | - | x | x | x | - | x |
|
||||
| USE_TX20_WIND_SENSOR | - | - | - | - | x | - | - |
|
||||
| USE_RC_SWITCH | - | - | - | - | x | - | - |
|
||||
| USE_RF_SENSOR | - | - | - | - | x | - | - | AlectoV2 only
|
||||
| USE_HRE | - | - | - | - | x | - | - |
|
||||
| USE_A4988_STEPPER | - | - | - | - | - | - | - |
|
||||
| USE_TASMOTA_SLAVE | - | - | - | - | - | - | - | Experimental
|
||||
| | | | | | | | |
|
||||
| Feature or Sensor | minimal | basic | tasmota | knx | sensors | ir | display | Remarks
|
||||
| USE_DISPLAY | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_LCD | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_SSD1306 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_MATRIX | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_SH1106 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_ILI9341 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_EPAPER_29 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_EPAPER_42 | - | - | - | - | - | - | x |
|
||||
| USE_DISPLAY_ILI9488 | - | - | - | - | - | - | - |
|
||||
| USE_DISPLAY_SSD1351 | - | - | - | - | - | - | - |
|
||||
| USE_DISPLAY_RA8876 | - | - | - | - | - | - | - |
|
||||
[Complete list](BUILDS.md) of available feature and sensors.
|
||||
|
||||
## Changelog
|
||||
|
||||
@ -287,6 +141,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
|
||||
- Change Reset erase end address from as seen by SDK (getFlashChipSize) to full flash size (getFlashChipRealSize)
|
||||
- Fix better control of RGB/White when ``SetOption37`` >128, added ``Dimmer1`` and ``Dimmer2`` commands (#6714)
|
||||
- Fix random crash caused by UPNP flood
|
||||
- Fix Wifi instability when light is on, due to sleep=0 (#6961, #6608)
|
||||
- Add support for Tuya battery powered devices (#6735)
|
||||
- Add support for Honeywell I2C HIH series Humidity and Temperetaure sensor (#6808)
|
||||
- Add support for Honeywell HPMA115S0 particle concentration sensor by David Hunt (#6843)
|
||||
@ -302,3 +157,4 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
|
||||
- Add frequency to ADE7953 energy monitor as used in Shelly 2.5 by ljakob (#6778)
|
||||
- Add hide Alexa objects with friendlyname starting with '$' (#6722, #6762)
|
||||
- Add Zigbee command support, considered as v1.0 for full Zigbee support
|
||||
- Add colorpicker to WebUI by Christian Staars (#6984)
|
||||
|
@ -1,4 +1,4 @@
|
||||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" alt="Logo" align="right" height="76"/>
|
||||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" style="margin:5px;float:right;width:50"></img>
|
||||
|
||||
# Support
|
||||
|
||||
@ -6,10 +6,9 @@ If you're looking for support on **Tasmota** there are some options available:
|
||||
|
||||
## Documentation:
|
||||
|
||||
* [Wiki Pages](https://github.com/arendst/Tasmota/wiki): For information on how to Flash Tasmota, configure and use it.
|
||||
* [FAQ](https://github.com/arendst/Tasmota/wiki/FAQ): For information on common problems and solutions.
|
||||
* [Troubleshooting Information](https://github.com/arendst/Tasmota/wiki/Troubleshooting): For ways to debug and troubleshoot.
|
||||
* [Commands Information](https://github.com/arendst/Tasmota/wiki/Commands): For information on all the commands supported by Tasmota.
|
||||
* [Documentation Site](https://tasmota.github.io/docs): For information on how to flash Tasmota, configure, use and expand it
|
||||
* [FAQ and Troubleshooting](https://tasmota.github.io/docs/#/help/): For information on common problems and solutions.
|
||||
* [Commands Information](https://tasmota.github.io/docs/#/Commands): For information on all the commands supported by Tasmota.
|
||||
|
||||
## Support's Community:
|
||||
|
||||
|
@ -1,162 +0,0 @@
|
||||
# ESP8266 platform
|
||||
# ------------------------------
|
||||
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
|
||||
|
||||
name=ESP8266 Boards (2.6.0)
|
||||
version=2.6.0
|
||||
|
||||
# These will be removed by the packager script when doing a JSON release
|
||||
|
||||
|
||||
|
||||
|
||||
runtime.tools.signing={runtime.platform.path}/tools/signing.py
|
||||
runtime.tools.elf2bin={runtime.platform.path}/tools/elf2bin.py
|
||||
runtime.tools.sizes={runtime.platform.path}/tools/sizes.py
|
||||
runtime.tools.makecorever={runtime.platform.path}/tools/makecorever.py
|
||||
runtime.tools.eboot={runtime.platform.path}/bootloaders/eboot/eboot.elf
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall
|
||||
compiler.warning_flags.all=-Wall -Wextra
|
||||
|
||||
build.lwip_lib=-llwip_gcc
|
||||
build.lwip_include=lwip/include
|
||||
build.lwip_flags=-DLWIP_OPEN_SRC
|
||||
|
||||
build.vtable_flags=-DVTABLES_IN_FLASH
|
||||
|
||||
build.sslflags=
|
||||
|
||||
build.exception_flags=-fno-exceptions
|
||||
build.stdcpp_lib=-lstdc++
|
||||
build.stdcpp_level=-std=gnu++11
|
||||
|
||||
# build.float=-u _printf_float -u _scanf_float
|
||||
build.float=
|
||||
build.led=
|
||||
|
||||
# default SDK for all boards
|
||||
# (generic board overrides this variable)
|
||||
#build.sdk=NONOSDK22x_190703
|
||||
build.sdk=NONOSDK22x_191024
|
||||
#build.sdk=NONOSDK22x_191105
|
||||
|
||||
compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
|
||||
compiler.sdk.path={runtime.platform.path}/tools/sdk
|
||||
|
||||
compiler.libc.path={runtime.platform.path}/tools/sdk/libc/xtensa-lx106-elf
|
||||
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core"
|
||||
|
||||
compiler.c.cmd=xtensa-lx106-elf-gcc
|
||||
compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags}
|
||||
|
||||
compiler.S.cmd=xtensa-lx106-elf-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls
|
||||
|
||||
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u app_entry {build.float} -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/lib/{build.sdk}" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read
|
||||
|
||||
compiler.c.elf.cmd=xtensa-lx106-elf-gcc
|
||||
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 {build.stdcpp_lib} -lm -lc -lgcc
|
||||
|
||||
compiler.cpp.cmd=xtensa-lx106-elf-g++
|
||||
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 {build.stdcpp_level} -MMD -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags}
|
||||
|
||||
compiler.as.cmd=xtensa-lx106-elf-as
|
||||
|
||||
compiler.ar.cmd=xtensa-lx106-elf-ar
|
||||
compiler.ar.flags=cru
|
||||
|
||||
compiler.elf2hex.cmd=esptool
|
||||
compiler.elf2hex.flags=
|
||||
|
||||
compiler.size.cmd=xtensa-lx106-elf-size
|
||||
|
||||
# This can be overriden in boards.txt
|
||||
build.extra_flags=-DESP8266
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.objcopy.eep.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
## generate file with git version number
|
||||
## needs git
|
||||
recipe.hooks.sketch.prebuild.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.signing}" --mode header --publickey "{build.source.path}/public.key" --out "{build.path}/core/Updater_Signing.h"
|
||||
# This is quite a working hack. This form of prebuild hook, while intuitive, is not explicitly documented.
|
||||
recipe.hooks.prebuild.10.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.makecorever}" --build_path "{build.path}" --platform_path "{runtime.platform.path}" --version "unix-{version}"
|
||||
|
||||
## Build the app.ld linker file
|
||||
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -CC -E -P {build.vtable_flags} "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "{build.path}/local.eagle.app.v6.common.ld"
|
||||
|
||||
## Compile c files
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -D{build.sdk}=1 -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {build.flash_flags} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -D{build.sdk}=1 -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {build.flash_flags} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -D{build.sdk}=1 -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {build.flash_flags} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {build.exception_flags} -Wl,-Map "-Wl,{build.path}/{build.project_name}.map" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}"
|
||||
|
||||
## Create eeprom
|
||||
recipe.objcopy.eep.pattern=
|
||||
|
||||
## Create hex
|
||||
recipe.objcopy.hex.1.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.elf2bin}" --eboot "{runtime.tools.eboot}" --app "{build.path}/{build.project_name}.elf" --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size {build.flash_size} --path "{runtime.tools.xtensa-lx106-elf-gcc.path}/bin" --out "{build.path}/{build.project_name}.bin"
|
||||
recipe.objcopy.hex.2.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.signing}" --mode sign --privatekey "{build.source.path}/private.key" --bin "{build.path}/{build.project_name}.bin" --out "{build.path}/{build.project_name}.bin.signed" --legacy "{build.path}/{build.project_name}.bin.legacy_sig"
|
||||
recipe.objcopy.hex.3.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.sizes}" --elf "{build.path}/{build.project_name}.elf" --path "{runtime.tools.xtensa-lx106-elf-gcc.path}/bin"
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.bin
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.bin
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=^(?:\.irom0\.text|\.text|\.text1|\.data|\.rodata|)\s+([0-9]+).*
|
||||
recipe.size.regex.data=^(?:\.data|\.rodata|\.bss)\s+([0-9]+).*
|
||||
#recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
|
||||
|
||||
# ------------------------------
|
||||
|
||||
tools.esptool.path=
|
||||
# Because the variable expansion doesn't allow one tool to find another, the following lines
|
||||
# will point to "{runtime.platform.path}/tools/python3/python3" in GIT and
|
||||
# "{runtime.tools.python3.path}/python3" for JSON board manager releases.
|
||||
tools.esptool.cmd={runtime.tools.python3.path}/python3
|
||||
tools.esptool.network_cmd={runtime.tools.python3.path}/python3
|
||||
|
||||
|
||||
|
||||
tools.esptool.upload.protocol=esp
|
||||
# esptool.py --trace option is a debug option, not a verbose option
|
||||
tools.esptool.upload.params.verbose=
|
||||
tools.esptool.upload.params.quiet=
|
||||
|
||||
# First, potentially perform an erase or nothing
|
||||
# Next, do the binary upload
|
||||
# Combined in one rule because Arduino doesn't suport upload.1.pattern/upload.3.pattern
|
||||
tools.esptool.upload.pattern="{cmd}" "{runtime.platform.path}/tools/upload.py" --chip esp8266 --port "{serial.port}" --baud "{upload.speed}" "{upload.verbose}" {upload.erase_cmd} --end --chip esp8266 --port "{serial.port}" --baud "{upload.speed}" {upload.resetmethod} "{upload.verbose}" write_flash 0x0 "{build.path}/{build.project_name}.bin" --end
|
||||
|
||||
tools.esptool.upload.network_pattern="{network_cmd}" "{runtime.platform.path}/tools/espota.py" -i "{serial.port}" -p "{network.port}" "--auth={network.password}" -f "{build.path}/{build.project_name}.bin"
|
||||
|
||||
tools.mkspiffs.cmd=mkspiffs
|
||||
tools.mkspiffs.cmd.windows=mkspiffs.exe
|
||||
tools.mkspiffs.path={runtime.tools.mkspiffs.path}
|
||||
|
||||
tools.mklittlefs.cmd=mklittlefs
|
||||
tools.mklittlefs.cmd.windows=mklittlefs.exe
|
||||
tools.mklittlefs.path={runtime.platform.path}/tools/mklittlefs
|
File diff suppressed because it is too large
Load Diff
@ -5,8 +5,8 @@
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
|
||||
|
||||
name=ESP8266 Boards (2.5.2-196-g45d71ae4)
|
||||
version=2.5.2-196-g45d71ae4
|
||||
name=ESP8266 Boards (2.6.1)
|
||||
version=2.6.1
|
||||
|
||||
# These will be removed by the packager script when doing a JSON release
|
||||
|
||||
@ -37,10 +37,15 @@ build.exception_flags=-fno-exceptions
|
||||
build.stdcpp_lib=-lstdc++
|
||||
build.stdcpp_level=-std=gnu++11
|
||||
|
||||
# build.float=-u _printf_float -u _scanf_float
|
||||
#build.float=-u _printf_float -u _scanf_float
|
||||
build.float=
|
||||
build.led=
|
||||
build.sdk=NONOSDK22y
|
||||
|
||||
# default SDK for all boards
|
||||
# (generic board overrides this variable)
|
||||
build.sdk=NONOSDK22x_190703
|
||||
#build.sdk=NONOSDK22x_191024
|
||||
#build.sdk=NONOSDK22x_191105
|
||||
|
||||
compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
|
||||
compiler.sdk.path={runtime.platform.path}/tools/sdk
|
||||
@ -88,7 +93,7 @@ compiler.elf2hex.extra_flags=
|
||||
## needs git
|
||||
recipe.hooks.sketch.prebuild.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.signing}" --mode header --publickey "{build.source.path}/public.key" --out "{build.path}/core/Updater_Signing.h"
|
||||
# This is quite a working hack. This form of prebuild hook, while intuitive, is not explicitly documented.
|
||||
recipe.hooks.prebuild.10.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.makecorever}" --build_path "{build.path}" --platform_path "{runtime.platform.path}" --version "unix-{version}"
|
||||
|
||||
|
||||
## Build the app.ld linker file
|
||||
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -CC -E -P {build.vtable_flags} "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "{build.path}/local.eagle.app.v6.common.ld"
|
||||
@ -145,7 +150,7 @@ tools.esptool.upload.params.quiet=
|
||||
# First, potentially perform an erase or nothing
|
||||
# Next, do the binary upload
|
||||
# Combined in one rule because Arduino doesn't suport upload.1.pattern/upload.3.pattern
|
||||
tools.esptool.upload.pattern="{cmd}" "{runtime.platform.path}/tools/upload.py" --chip esp8266 --port "{serial.port}" --baud "{upload.speed}" "{upload.verbose}" {upload.erase_cmd} --end --chip esp8266 --port "{serial.port}" --baud "{upload.speed}" "{upload.verbose}" write_flash 0x0 "{build.path}/{build.project_name}.bin" --end
|
||||
tools.esptool.upload.pattern="{cmd}" "{runtime.platform.path}/tools/upload.py" --chip esp8266 --port "{serial.port}" --baud "{upload.speed}" "{upload.verbose}" {upload.erase_cmd} {upload.resetmethod} "{build.path}/{build.project_name}.bin"
|
||||
|
||||
tools.esptool.upload.network_pattern="{network_cmd}" "{runtime.platform.path}/tools/espota.py" -i "{serial.port}" -p "{network.port}" "--auth={network.password}" -f "{build.path}/{build.project_name}.bin"
|
||||
|
2194
tasmota/CHANGELOG.md
Normal file
2194
tasmota/CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -714,15 +714,15 @@ bool DecodeCommand(const char* haystack, void (* const MyCommand[])(void))
|
||||
return false;
|
||||
}
|
||||
|
||||
const char kOptions[] PROGMEM = "OFF|" D_OFF "|" D_FALSE "|" D_STOP "|" D_CELSIUS "|" // 0
|
||||
"ON|" D_ON "|" D_TRUE "|" D_START "|" D_FAHRENHEIT "|" D_USER "|" // 1
|
||||
"TOGGLE|" D_TOGGLE "|" D_ADMIN "|" // 2
|
||||
"BLINK|" D_BLINK "|" // 3
|
||||
"BLINKOFF|" D_BLINKOFF "|" // 4
|
||||
"ALL" ; // 255
|
||||
const char kOptions[] PROGMEM = "OFF|" D_OFF "|FALSE|" D_FALSE "|STOP|" D_STOP "|" D_CELSIUS "|" // 0
|
||||
"ON|" D_ON "|TRUE|" D_TRUE "|START|" D_START "|" D_FAHRENHEIT "|" D_USER "|" // 1
|
||||
"TOGGLE|" D_TOGGLE "|" D_ADMIN "|" // 2
|
||||
"BLINK|" D_BLINK "|" // 3
|
||||
"BLINKOFF|" D_BLINKOFF "|" // 4
|
||||
"ALL" ; // 255
|
||||
|
||||
const uint8_t sNumbers[] PROGMEM = { 0,0,0,0,0,
|
||||
1,1,1,1,1,1,
|
||||
const uint8_t sNumbers[] PROGMEM = { 0,0,0,0,0,0,0,
|
||||
1,1,1,1,1,1,1,1,
|
||||
2,2,2,
|
||||
3,3,
|
||||
4,4,
|
||||
|
@ -375,9 +375,10 @@ float sqrt1(const float x)
|
||||
// changeUIntScale
|
||||
// Change a value for range a..b to c..d, using only unsigned int math
|
||||
//
|
||||
// New version, you don't need the "to_min < to_max" precondition anymore
|
||||
//
|
||||
// PRE-CONDITIONS (if not satisfied, you may 'halt and catch fire')
|
||||
// from_min < from_max (not checked)
|
||||
// to_min < to_max (not checked)
|
||||
// from_min <= num <= from-max (chacked)
|
||||
// POST-CONDITIONS
|
||||
// to_min <= result <= to_max
|
||||
@ -385,8 +386,12 @@ float sqrt1(const float x)
|
||||
uint16_t changeUIntScale(uint16_t inum, uint16_t ifrom_min, uint16_t ifrom_max,
|
||||
uint16_t ito_min, uint16_t ito_max) {
|
||||
// guard-rails
|
||||
if ((ito_min >= ito_max) || (ifrom_min >= ifrom_max)) {
|
||||
return ito_min; // invalid input, return arbitrary value
|
||||
if (ifrom_min >= ifrom_max) {
|
||||
if (ito_min > ito_max) {
|
||||
return ito_max;
|
||||
} else {
|
||||
return ito_min; // invalid input, return arbitrary value
|
||||
}
|
||||
}
|
||||
// convert to uint31, it's more verbose but code is more compact
|
||||
uint32_t num = inum;
|
||||
@ -397,6 +402,15 @@ uint16_t changeUIntScale(uint16_t inum, uint16_t ifrom_min, uint16_t ifrom_max,
|
||||
|
||||
// check source range
|
||||
num = (num > from_max ? from_max : (num < from_min ? from_min : num));
|
||||
|
||||
// check to_* order
|
||||
if (to_min > to_max) {
|
||||
// reverse order
|
||||
num = (from_max - num) + from_min;
|
||||
to_min = ito_max;
|
||||
to_max = ito_min;
|
||||
}
|
||||
|
||||
uint32_t numerator = (num - from_min) * (to_max - to_min);
|
||||
uint32_t result;
|
||||
if (numerator >= 0x80000000L) {
|
||||
|
@ -628,8 +628,10 @@ const uint8_t kGpioNiceList[] PROGMEM = {
|
||||
#if defined(USE_I2C) && defined(USE_ADE7953)
|
||||
GPIO_ADE7953_IRQ, // ADE7953 IRQ
|
||||
#endif
|
||||
#ifdef USE_CSE7766
|
||||
GPIO_CSE7766_TX, // CSE7766 Serial interface (S31 and Pow R2)
|
||||
GPIO_CSE7766_RX, // CSE7766 Serial interface (S31 and Pow R2)
|
||||
#endif
|
||||
#ifdef USE_MCP39F501
|
||||
GPIO_MCP39F5_TX, // MCP39F501 Serial interface (Shelly2)
|
||||
GPIO_MCP39F5_RX, // MCP39F501 Serial interface (Shelly2)
|
||||
|
@ -164,7 +164,7 @@ const char HTTP_SCRIPT_ROOT[] PROGMEM =
|
||||
"}"
|
||||
#endif // USE_JAVASCRIPT_ES6
|
||||
"function ld(v,p){"
|
||||
"eb('s').style.backgroundImage='linear-gradient(to right,grey,hsl('+p+',100%%,50%%))';"
|
||||
"eb('s').style.background='linear-gradient(to right,#fff,hsl('+p+',100%%,50%%))';"
|
||||
"la('&'+v+'='+p);"
|
||||
"}"
|
||||
|
||||
@ -345,6 +345,7 @@ const char HTTP_HEAD_STYLE1[] PROGMEM =
|
||||
"p{margin:0.5em 0;}"
|
||||
"input{width:100%%;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;background:#%06x;color:#%06x;}" // COLOR_INPUT, COLOR_INPUT_TEXT
|
||||
"input[type=checkbox],input[type=radio]{width:1em;margin-right:6px;vertical-align:-1px;}"
|
||||
"input[type=range]{width:99%%;}"
|
||||
"select{width:100%%;background:#%06x;color:#%06x;}" // COLOR_INPUT, COLOR_INPUT_TEXT
|
||||
"textarea{resize:none;width:98%%;height:318px;padding:5px;overflow:auto;background:#%06x;color:#%06x;}" // COLOR_CONSOLE, COLOR_CONSOLE_TEXT
|
||||
"body{text-align:center;font-family:verdana,sans-serif;background:#%06x;}" // COLOR_BACKGROUND
|
||||
@ -520,7 +521,6 @@ const char kUploadErrors[] PROGMEM =
|
||||
"|" D_UPLOAD_ERR_10 "|" D_UPLOAD_ERR_11 "|" D_UPLOAD_ERR_12 "|" D_UPLOAD_ERR_13
|
||||
#endif
|
||||
;
|
||||
const char kChannelColors[] PROGMEM = "#f00|#0f0|#00f|#fff|#ff0"; // Red, Green, Blue, ColdWhite, WarmWhite
|
||||
|
||||
const uint16_t DNS_PORT = 53;
|
||||
enum HttpOptions {HTTP_OFF, HTTP_USER, HTTP_ADMIN, HTTP_MANAGER, HTTP_MANAGER_RESET_ONLY};
|
||||
@ -1022,8 +1022,8 @@ void HandleRoot(void)
|
||||
LightGetHSB(&hue, &sat, &bri);
|
||||
WSContentSend_P(HTTP_MSG_SLIDER_HUE, hue); // Hue
|
||||
snprintf_P(stemp, sizeof(stemp), PSTR("#%02X%02X%02X"), Settings.light_color[0], Settings.light_color[1], Settings.light_color[2]);
|
||||
// Saturation "s" related to eb('s').style.backgroundImage='linear-gradient(to right,grey,hsl('+p+',100%%,50%%))';
|
||||
WSContentSend_P(HTTP_MSG_SLIDER_GRADIENT, "s", "grey", stemp, 1, 100, changeUIntScale(sat, 0, 255, 0, 100), 'n');
|
||||
// Saturation "s" related to eb('s').style.background='linear-gradient(to right,#fff,hsl('+p+',100%%,50%%))';
|
||||
WSContentSend_P(HTTP_MSG_SLIDER_GRADIENT, "s", "#fff", stemp, 1, 100, changeUIntScale(sat, 0, 255, 0, 100), 'n');
|
||||
}
|
||||
// Dark - Bright &d related to lb("d", value) and WebGetArg("d", tmp, sizeof(tmp));
|
||||
WSContentSend_P(HTTP_MSG_SLIDER_GRADIENT, "b", "#000", "#fff", 1, 100, Settings.light_dimmer, 'd'); // Black to White
|
||||
@ -1031,8 +1031,7 @@ void HandleRoot(void)
|
||||
uint32_t pwm_channels = light_subtype > LST_MAX ? LST_MAX : light_subtype;
|
||||
for (uint32_t i = 0; i < pwm_channels; i++) {
|
||||
uint8_t index = (pwm_channels < 3) ? i +3 : i;
|
||||
WSContentSend_P(HTTP_MSG_SLIDER_CHANNEL, GetTextIndexed(stemp, sizeof(stemp), index, kChannelColors),
|
||||
changeUIntScale(Settings.light_color[i], 0, 255, 0, 100), i+1); // Dark to Light
|
||||
WSContentSend_P(HTTP_MSG_SLIDER_CHANNEL, "#fff", changeUIntScale(Settings.light_color[i], 0, 255, 0, 100), i+1); // Dark to Light
|
||||
}
|
||||
} // Settings.flag3.pwm_multi_channels
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ const uint8_t _ledTable[] = {
|
||||
//867,879,887,899,907,919,931,939,951,963,971,983,995,1003,1015,1023
|
||||
|
||||
struct LIGHT {
|
||||
unsigned long strip_timer_counter = 0; // Bars and Gradient
|
||||
uint32_t strip_timer_counter = 0; // Bars and Gradient
|
||||
power_t power = 0; // Power<x> for each channel if SetOption68, or boolean if single light
|
||||
|
||||
uint16_t wakeup_counter = 0;
|
||||
@ -253,6 +253,16 @@ struct LIGHT {
|
||||
|
||||
bool update = true;
|
||||
bool pwm_multi_channels = false; // SetOption68, treat each PWM channel as an independant dimmer
|
||||
|
||||
bool fade_running = false;
|
||||
uint8_t fade_start_8[LST_MAX] = {0,0,0,0,0};
|
||||
uint8_t fade_cur_8[LST_MAX];
|
||||
uint8_t fade_end_8[LST_MAX]; // 8 bits resolution target channel values
|
||||
uint16_t fade_start_10[LST_MAX] = {0,0,0,0,0};
|
||||
uint16_t fade_cur_10[LST_MAX];
|
||||
uint16_t fade_end_10[LST_MAX]; // 10 bits resolution target channel values
|
||||
uint16_t fade_counter = 0; // fade timer in ticks (50ms)
|
||||
uint16_t fade_duration = 0; // duration of fade in ticks (50ms)
|
||||
} Light;
|
||||
|
||||
power_t LightPower(void)
|
||||
@ -955,11 +965,13 @@ public:
|
||||
}
|
||||
|
||||
// calculate the levels for each channel
|
||||
void calcLevels() {
|
||||
// if no parameter, results are stored in Light.current_color
|
||||
void calcLevels(uint8_t *current_color = nullptr) {
|
||||
uint8_t r,g,b,c,w,briRGB,briCT;
|
||||
if (current_color == nullptr) { current_color = Light.current_color; }
|
||||
|
||||
if (_pwm_multi_channels) { // if PWM multi channel, no more transformation required
|
||||
_state->getChannelsRaw(Light.current_color);
|
||||
_state->getChannelsRaw(current_color);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -967,32 +979,32 @@ public:
|
||||
briRGB = _state->getBriRGB();
|
||||
briCT = _state->getBriCT();
|
||||
|
||||
Light.current_color[0] = Light.current_color[1] = Light.current_color[2] = 0;
|
||||
Light.current_color[3] = Light.current_color[4] = 0;
|
||||
current_color[0] = current_color[1] = current_color[2] = 0;
|
||||
current_color[3] = current_color[4] = 0;
|
||||
switch (Light.subtype) {
|
||||
case LST_NONE:
|
||||
Light.current_color[0] = 255;
|
||||
current_color[0] = 255;
|
||||
break;
|
||||
case LST_SINGLE:
|
||||
Light.current_color[0] = briRGB;
|
||||
current_color[0] = briRGB;
|
||||
break;
|
||||
case LST_COLDWARM:
|
||||
Light.current_color[0] = c;
|
||||
Light.current_color[1] = w;
|
||||
current_color[0] = c;
|
||||
current_color[1] = w;
|
||||
break;
|
||||
case LST_RGBW:
|
||||
case LST_RGBWC:
|
||||
if (LST_RGBWC == Light.subtype) {
|
||||
Light.current_color[3] = c;
|
||||
Light.current_color[4] = w;
|
||||
current_color[3] = c;
|
||||
current_color[4] = w;
|
||||
} else {
|
||||
Light.current_color[3] = briCT;
|
||||
current_color[3] = briCT;
|
||||
}
|
||||
// continue
|
||||
case LST_RGB:
|
||||
Light.current_color[0] = r;
|
||||
Light.current_color[1] = g;
|
||||
Light.current_color[2] = b;
|
||||
current_color[0] = r;
|
||||
current_color[1] = g;
|
||||
current_color[2] = b;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1482,32 +1494,6 @@ void LightPreparePower(void)
|
||||
LightState(0);
|
||||
}
|
||||
|
||||
void LightFade(void)
|
||||
{
|
||||
if (0 == Settings.light_fade) {
|
||||
for (uint32_t i = 0; i < Light.subtype; i++) {
|
||||
Light.new_color[i] = Light.current_color[i];
|
||||
}
|
||||
} else {
|
||||
uint8_t shift = Settings.light_speed;
|
||||
if (Settings.light_speed > 6) {
|
||||
shift = (Light.strip_timer_counter % (Settings.light_speed -6)) ? 0 : 8;
|
||||
}
|
||||
if (shift) {
|
||||
for (uint32_t i = 0; i < Light.subtype; i++) {
|
||||
if (Light.new_color[i] != Light.current_color[i]) {
|
||||
if (Light.new_color[i] < Light.current_color[i]) {
|
||||
Light.new_color[i] += ((Light.current_color[i] - Light.new_color[i]) >> shift) +1;
|
||||
}
|
||||
if (Light.new_color[i] > Light.current_color[i]) {
|
||||
Light.new_color[i] -= ((Light.new_color[i] - Light.current_color[i]) >> shift) +1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LightWheel(uint8_t wheel_pos)
|
||||
{
|
||||
wheel_pos = 255 - wheel_pos;
|
||||
@ -1558,7 +1544,8 @@ void LightRandomColor(void)
|
||||
LightWheel(Light.wheel);
|
||||
memcpy(Light.current_color, Light.entry_color, sizeof(Light.current_color));
|
||||
}
|
||||
LightFade();
|
||||
|
||||
memcpy(Light.new_color, Light.current_color, sizeof(Light.new_color));
|
||||
}
|
||||
|
||||
void LightSetPower(void)
|
||||
@ -1592,44 +1579,29 @@ void LightSetPower(void)
|
||||
LightAnimate();
|
||||
}
|
||||
|
||||
// On entry Light.new_color[5] contains the color to be displayed
|
||||
// and Light.last_color[5] the color currently displayed
|
||||
// Light.power tells which lights or channels (SetOption68) are on/off
|
||||
void LightAnimate(void)
|
||||
{
|
||||
uint8_t cur_col[LST_MAX];
|
||||
uint16_t light_still_on = 0;
|
||||
|
||||
Light.strip_timer_counter++;
|
||||
if (!Light.power) { // Power Off
|
||||
sleep = Settings.sleep;
|
||||
if (!Light.power) { // All channels powered off
|
||||
Light.strip_timer_counter = 0;
|
||||
for (uint32_t i = 0; i < Light.subtype; i++) {
|
||||
light_still_on += Light.new_color[i];
|
||||
}
|
||||
if (light_still_on && Settings.light_fade && (Settings.light_scheme < LS_MAX)) {
|
||||
uint8_t speed = Settings.light_speed;
|
||||
if (speed > 6) {
|
||||
speed = 6;
|
||||
}
|
||||
for (uint32_t i = 0; i < Light.subtype; i++) {
|
||||
if (Light.new_color[i] > 0) {
|
||||
Light.new_color[i] -= (Light.new_color[i] >> speed) +1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (uint32_t i = 0; i < Light.subtype; i++) {
|
||||
Light.new_color[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (Settings.sleep > 10) {
|
||||
sleep = 10; // set a minimal value of 50 milliseconds to ensure that animations are smooth
|
||||
} else {
|
||||
sleep = Settings.sleep; // or keep the current sleep if it's lower than 50
|
||||
if (!Light.fade_running) {
|
||||
sleep = Settings.sleep;
|
||||
}
|
||||
} else {
|
||||
#ifdef PWM_LIGHTSCHEME0_IGNORE_SLEEP
|
||||
sleep = (LS_POWER == Settings.light_scheme) && (!Light.fade_running) ? Settings.sleep : 0; // If no animation then use sleep as is
|
||||
#else
|
||||
sleep = 0;
|
||||
#endif // PWM_LIGHTSCHEME0_IGNORE_SLEEP
|
||||
switch (Settings.light_scheme) {
|
||||
case LS_POWER:
|
||||
light_controller.calcLevels();
|
||||
LightFade();
|
||||
light_controller.calcLevels(Light.new_color);
|
||||
break;
|
||||
case LS_WAKEUP:
|
||||
if (2 == Light.wakeup_active) {
|
||||
@ -1672,32 +1644,16 @@ void LightAnimate(void)
|
||||
}
|
||||
}
|
||||
|
||||
if ((Settings.light_scheme < LS_MAX) || !Light.power) {
|
||||
if (Settings.light_scheme < LS_MAX) { // exclude WS281X Neopixel
|
||||
|
||||
// If SetOption68, multi_channels
|
||||
if (Light.pwm_multi_channels) {
|
||||
// if multi-channels, specifically apply the Light.power bits
|
||||
for (uint32_t i = 0; i < LST_MAX; i++) {
|
||||
if (0 == bitRead(Light.power,i)) { // if power down bit is zero
|
||||
Light.new_color[i] = 0; // shut down this channel
|
||||
}
|
||||
}
|
||||
// #ifdef DEBUG_LIGHT
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG_MORE, "Animate>> Light.power=%d Light.new_color=[%d,%d,%d,%d,%d]",
|
||||
// Light.power, Light.new_color[0], Light.new_color[1], Light.new_color[2],
|
||||
// Light.new_color[3], Light.new_color[4]);
|
||||
// #endif
|
||||
} else {
|
||||
if (!light_controller.isCTRGBLinked()) {
|
||||
// we have 2 power bits for RGB and White
|
||||
if (0 == (Light.power & 1)) {
|
||||
Light.new_color[0] = Light.new_color[1] = Light.new_color[2] = 0;
|
||||
}
|
||||
if (0 == (Light.power & 2)) {
|
||||
Light.new_color[3] = Light.new_color[4] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Apply power modifiers to Light.new_color
|
||||
LightApplyPower(Light.new_color, Light.power);
|
||||
|
||||
// AddLog_P2(LOG_LEVEL_INFO, PSTR("last_color (%02X%02X%02X%02X%02X) new_color (%02X%02X%02X%02X%02X) power %d"),
|
||||
// Light.last_color[0], Light.last_color[1], Light.last_color[2], Light.last_color[3], Light.last_color[4],
|
||||
// Light.new_color[0], Light.new_color[1], Light.new_color[2], Light.new_color[3], Light.new_color[4],
|
||||
// Light.power
|
||||
// );
|
||||
|
||||
if (memcmp(Light.last_color, Light.new_color, Light.subtype)) {
|
||||
Light.update = true;
|
||||
@ -1728,7 +1684,8 @@ void LightAnimate(void)
|
||||
uint8_t min_rgb = min3(cur_col[0], cur_col[1], cur_col[2]);
|
||||
for (uint32_t i=0; i<3; i++) {
|
||||
// substract white and adjust according to rgbwwTable
|
||||
cur_col_10bits[i] = changeUIntScale(cur_col_10bits[i] - min_rgb_10, 0, 255, 0, Settings.rgbwwTable[i]);
|
||||
uint32_t adjust10 = changeUIntScale(Settings.rgbwwTable[i], 0, 255, 0, 1023);
|
||||
cur_col_10bits[i] = changeUIntScale(cur_col_10bits[i] - min_rgb_10, 0, 1023, 0, adjust10);
|
||||
cur_col[i] = changeUIntScale(cur_col[i] - min_rgb, 0, 255, 0, Settings.rgbwwTable[i]);
|
||||
}
|
||||
// compute the adjusted white levels for 10 and 8 bits
|
||||
@ -1772,41 +1729,151 @@ void LightAnimate(void)
|
||||
cur_col_10bits[i] = orig_col_10bits[Light.color_remap[i]];
|
||||
}
|
||||
|
||||
// now apply the actual PWM values, adjusted and remapped 10-bits range
|
||||
if (light_type < LT_PWM6) { // only for direct PWM lights, not for Tuya, Armtronix...
|
||||
for (uint32_t i = 0; i < (Light.subtype - Light.pwm_offset); i++) {
|
||||
if (pin[GPIO_PWM1 +i] < 99) {
|
||||
//AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_APPLICATION "Cur_Col%d 10 bits %d, Pwm%d %d"), i, cur_col_10bits[i], i+1, cur_col[i]);
|
||||
analogWrite(pin[GPIO_PWM1 +i], bitRead(pwm_inverted, i) ? Settings.pwm_range - cur_col_10bits[(i + Light.pwm_offset)] : cur_col_10bits[(i + Light.pwm_offset)]);
|
||||
}
|
||||
if (!Settings.light_fade) { // no fade
|
||||
// record the current value for a future Fade
|
||||
memcpy(Light.fade_start_8, cur_col, sizeof(Light.fade_start_8));
|
||||
memcpy(Light.fade_start_10, cur_col_10bits, sizeof(Light.fade_start_10));
|
||||
// push the final values at 8 and 10 bits resolution to the PWMs
|
||||
LightSetOutputs(cur_col, cur_col_10bits);
|
||||
} else { // fade on
|
||||
if (Light.fade_running) {
|
||||
// if fade is running, we take the curring value as the start for the next fade
|
||||
memcpy(Light.fade_start_8, Light.fade_cur_8, sizeof(Light.fade_start_8));
|
||||
memcpy(Light.fade_start_10, Light.fade_cur_10, sizeof(Light.fade_start_10));
|
||||
}
|
||||
memcpy(Light.fade_end_8, cur_col, sizeof(Light.fade_start_8));
|
||||
memcpy(Light.fade_end_10, cur_col_10bits, sizeof(Light.fade_start_10));
|
||||
Light.fade_running = true;
|
||||
Light.fade_counter = 0;
|
||||
Light.fade_duration = 0; // set the value to zero to force a recompute
|
||||
// Fade will applied immediately below
|
||||
}
|
||||
}
|
||||
if (Light.fade_running) {
|
||||
LightApplyFade();
|
||||
// AddLog_P2(LOG_LEVEL_INFO, PSTR("LightApplyFade %d %d %d %d %d - %d %d %d %d %d"),
|
||||
// Light.fade_cur_8[0], Light.fade_cur_8[1], Light.fade_cur_8[2], Light.fade_cur_8[3], Light.fade_cur_8[4],
|
||||
// Light.fade_cur_10[0], Light.fade_cur_10[1], Light.fade_cur_10[2], Light.fade_cur_10[3], Light.fade_cur_10[4]);
|
||||
|
||||
// Some devices need scaled RGB like Sonoff L1
|
||||
uint8_t scale_col[3];
|
||||
uint32_t max = (cur_col[0] > cur_col[1] && cur_col[0] > cur_col[2]) ? cur_col[0] : (cur_col[1] > cur_col[2]) ? cur_col[1] : cur_col[2]; // 0..255
|
||||
for (uint32_t i = 0; i < 3; i++) {
|
||||
scale_col[i] = (0 == max) ? 255 : (255 > max) ? changeUIntScale(cur_col[i], 0, max, 0, 255) : cur_col[i];
|
||||
}
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("LGT: R%d(%d) G%d(%d) B%d(%d), C%d W%d, D%d"),
|
||||
// cur_col[0], scale_col[0], cur_col[1], scale_col[1], cur_col[2], scale_col[2], cur_col[3], cur_col[4], light_state.getDimmer());
|
||||
|
||||
char *tmp_data = XdrvMailbox.data;
|
||||
char *tmp_topic = XdrvMailbox.topic;
|
||||
XdrvMailbox.data = (char*)cur_col;
|
||||
XdrvMailbox.topic = (char*)scale_col;
|
||||
if (XlgtCall(FUNC_SET_CHANNELS)) {
|
||||
// Serviced
|
||||
}
|
||||
else if (XdrvCall(FUNC_SET_CHANNELS)) {
|
||||
// Serviced
|
||||
}
|
||||
XdrvMailbox.data = tmp_data;
|
||||
XdrvMailbox.topic = tmp_topic;
|
||||
LightSetOutputs(Light.fade_cur_8, Light.fade_cur_10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LightApplyFade(void) {
|
||||
|
||||
// Check if we need to calculate the duration
|
||||
if (0 == Light.fade_duration) {
|
||||
Light.fade_counter = 0;
|
||||
// compute the distance between start and and color (max of distance for each channel)
|
||||
uint32_t distance = 0;
|
||||
for (uint32_t i = 0; i < Light.subtype; i++) {
|
||||
int32_t channel_distance = Light.fade_end_10[i] - Light.fade_start_10[i];
|
||||
if (channel_distance < 0) { channel_distance = - channel_distance; }
|
||||
if (channel_distance > distance) { distance = channel_distance; }
|
||||
}
|
||||
if (distance > 0) {
|
||||
// compute the duration of the animation
|
||||
// Note: Settings.light_speed is the number of half-seconds for a 100% fade,
|
||||
// i.e. light_speed=1 means 1024 steps in 10 ticks (500ms)
|
||||
Light.fade_duration = (distance * Settings.light_speed * 10) / 1024;
|
||||
} else {
|
||||
// no fade needed, we keep the duration at zero, it will fallback directly to end of fade
|
||||
}
|
||||
}
|
||||
|
||||
Light.fade_counter++;
|
||||
if (Light.fade_counter <= Light.fade_duration) { // fade not finished
|
||||
for (uint32_t i = 0; i < Light.subtype; i++) {
|
||||
Light.fade_cur_8[i] = changeUIntScale(Light.fade_counter,
|
||||
0, Light.fade_duration,
|
||||
Light.fade_start_8[i], Light.fade_end_8[i]);
|
||||
Light.fade_cur_10[i] = changeUIntScale(Light.fade_counter,
|
||||
0, Light.fade_duration,
|
||||
Light.fade_start_10[i], Light.fade_end_10[i]);
|
||||
}
|
||||
} else {
|
||||
// stop fade
|
||||
//AddLop_P2(LOG_LEVEL_DEBUG, PSTR("Stop fade"));
|
||||
Light.fade_running = false;
|
||||
Light.fade_counter = 0;
|
||||
Light.fade_duration = 0;
|
||||
// set light to target value
|
||||
memcpy(Light.fade_cur_8, Light.fade_end_8, sizeof(Light.fade_end_8));
|
||||
memcpy(Light.fade_cur_10, Light.fade_end_10, sizeof(Light.fade_end_10));
|
||||
// record the last value for next start
|
||||
memcpy(Light.fade_start_8, Light.fade_end_8, sizeof(Light.fade_start_8));
|
||||
memcpy(Light.fade_start_10, Light.fade_end_10, sizeof(Light.fade_start_10));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// On entry we take the 5 channels 8 bits entry, and we apply Power modifiers
|
||||
// I.e. shut down channels that are powered down
|
||||
void LightApplyPower(uint8_t new_color[LST_MAX], power_t power) {
|
||||
// If SetOption68, multi_channels
|
||||
if (Light.pwm_multi_channels) {
|
||||
// if multi-channels, specifically apply the Light.power bits
|
||||
for (uint32_t i = 0; i < LST_MAX; i++) {
|
||||
if (0 == bitRead(power,i)) { // if power down bit is zero
|
||||
new_color[i] = 0; // shut down this channel
|
||||
}
|
||||
}
|
||||
// #ifdef DEBUG_LIGHT
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG_MORE, "Animate>> Light.power=%d Light.new_color=[%d,%d,%d,%d,%d]",
|
||||
// Light.power, Light.new_color[0], Light.new_color[1], Light.new_color[2],
|
||||
// Light.new_color[3], Light.new_color[4]);
|
||||
// #endif
|
||||
} else {
|
||||
if (!light_controller.isCTRGBLinked()) {
|
||||
// we have 2 power bits for RGB and White
|
||||
if (0 == (power & 1)) {
|
||||
new_color[0] = new_color[1] = new_color[2] = 0;
|
||||
}
|
||||
if (0 == (power & 2)) {
|
||||
new_color[3] = new_color[4] = 0;
|
||||
}
|
||||
} else if (!power) {
|
||||
for (uint32_t i = 0; i < LST_MAX; i++) {
|
||||
new_color[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LightSetOutputs(const uint8_t *cur_col, const uint16_t *cur_col_10bits) {
|
||||
// now apply the actual PWM values, adjusted and remapped 10-bits range
|
||||
if (light_type < LT_PWM6) { // only for direct PWM lights, not for Tuya, Armtronix...
|
||||
for (uint32_t i = 0; i < (Light.subtype - Light.pwm_offset); i++) {
|
||||
if (pin[GPIO_PWM1 +i] < 99) {
|
||||
//AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_APPLICATION "Cur_Col%d 10 bits %d, Pwm%d %d"), i, cur_col_10bits[i], i+1, cur_col[i]);
|
||||
analogWrite(pin[GPIO_PWM1 +i], bitRead(pwm_inverted, i) ? Settings.pwm_range - cur_col_10bits[(i + Light.pwm_offset)] : cur_col_10bits[(i + Light.pwm_offset)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("LGT: R %02X(%d) G %02X(%d) B %02X(%d), CW %02X(%d) WW %02x(%d), D %d"),
|
||||
// cur_col[0], cur_col_10bits[0], cur_col[1], cur_col_10bits[1], cur_col[2], cur_col_10bits[2], cur_col[3], cur_col_10bits[3], cur_col[4], cur_col_10bits[4], light_state.getDimmer());
|
||||
|
||||
// Some devices need scaled RGB like Sonoff L1
|
||||
// TODO, should be probably moved to the Sonoff L1 support code
|
||||
uint8_t scale_col[3];
|
||||
uint32_t max = (cur_col[0] > cur_col[1] && cur_col[0] > cur_col[2]) ? cur_col[0] : (cur_col[1] > cur_col[2]) ? cur_col[1] : cur_col[2]; // 0..255
|
||||
for (uint32_t i = 0; i < 3; i++) {
|
||||
scale_col[i] = (0 == max) ? 255 : (255 > max) ? changeUIntScale(cur_col[i], 0, max, 0, 255) : cur_col[i];
|
||||
}
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("LGT: R%d(%d) G%d(%d) B%d(%d), C%d(%d) W%d(%d), D%d"),
|
||||
// cur_col[0], scale_col[0], cur_col[1], scale_col[1], cur_col[2], scale_col[2], cur_col[3], scale_col[3], cur_col[4], scale_col[4], light_state.getDimmer());
|
||||
|
||||
char *tmp_data = XdrvMailbox.data;
|
||||
char *tmp_topic = XdrvMailbox.topic;
|
||||
XdrvMailbox.data = (char*)cur_col;
|
||||
XdrvMailbox.topic = (char*)scale_col;
|
||||
if (XlgtCall(FUNC_SET_CHANNELS)) { /* Serviced */ }
|
||||
else if (XdrvCall(FUNC_SET_CHANNELS)) { /* Serviced */ }
|
||||
XdrvMailbox.data = tmp_data;
|
||||
XdrvMailbox.topic = tmp_topic;
|
||||
}
|
||||
|
||||
// Do specific computation is SetOption73 is on, Color Temp is a separate PWM channel
|
||||
void calcGammaCTPwm(uint8_t cur_col[5], uint16_t cur_col_10bits[5]) {
|
||||
// Xiaomi Philips bulbs follow a different scheme:
|
||||
@ -2301,20 +2368,21 @@ void CmndFade(void)
|
||||
Settings.light_fade ^= 1;
|
||||
break;
|
||||
}
|
||||
if (!Settings.light_fade) { Light.fade_running = false; }
|
||||
ResponseCmndStateText(Settings.light_fade);
|
||||
}
|
||||
|
||||
void CmndSpeed(void)
|
||||
{ // 1 - fast, 20 - very slow
|
||||
{ // 1 - fast, 40 - very slow
|
||||
if (1 == XdrvMailbox.data_len) {
|
||||
if (('+' == XdrvMailbox.data[0]) && (Settings.light_speed > 1)) {
|
||||
XdrvMailbox.payload = Settings.light_speed -1;
|
||||
XdrvMailbox.payload = Settings.light_speed - 1;
|
||||
}
|
||||
else if (('-' == XdrvMailbox.data[0]) && (Settings.light_speed < STATES)) {
|
||||
XdrvMailbox.payload = Settings.light_speed +1;
|
||||
else if (('-' == XdrvMailbox.data[0]) && (Settings.light_speed < 40)) {
|
||||
XdrvMailbox.payload = Settings.light_speed + 1;
|
||||
}
|
||||
}
|
||||
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= STATES)) {
|
||||
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= 40)) {
|
||||
Settings.light_speed = XdrvMailbox.payload;
|
||||
}
|
||||
ResponseCmndNumber(Settings.light_speed);
|
||||
|
@ -26,15 +26,16 @@
|
||||
|
||||
#include <IRremoteESP8266.h>
|
||||
|
||||
enum IrErrors { IE_NO_ERROR, IE_INVALID_RAWDATA, IE_INVALID_JSON, IE_SYNTAX_IRSEND, IE_SYNTAX_IRHVAC };
|
||||
enum IrErrors { IE_NO_ERROR, IE_INVALID_RAWDATA, IE_INVALID_JSON, IE_SYNTAX_IRSEND };
|
||||
|
||||
const char kIrRemoteCommands[] PROGMEM = "|" D_CMND_IRSEND ;
|
||||
|
||||
void (* const IrRemoteCommand[])(void) PROGMEM = { &CmndIrSend };
|
||||
// Keep below IrRemoteCommand lines exactly as below as otherwise Arduino IDE prototyping will fail (#6982)
|
||||
void (* const IrRemoteCommand[])(void) PROGMEM = {
|
||||
&CmndIrSend };
|
||||
|
||||
// Based on IRremoteESP8266.h enum decode_type_t
|
||||
static const uint8_t MAX_STANDARD_IR = SHARP; // this is the last code mapped to decode_type_t
|
||||
enum IrVendors { IR_BASE = MAX_STANDARD_IR };
|
||||
static const uint8_t MAX_STANDARD_IR = NEC; // this is the last code mapped to decode_type_t
|
||||
const char kIrRemoteProtocols[] PROGMEM = "UNKNOWN|RC5|RC6|NEC";
|
||||
|
||||
/*********************************************************************************************\
|
||||
@ -86,7 +87,7 @@ void IrReceiveInit(void)
|
||||
|
||||
void IrReceiveCheck(void)
|
||||
{
|
||||
char sirtype[14]; // Max is AIWA_RC_T501
|
||||
char sirtype[8]; // Max is UNKNOWN
|
||||
int8_t iridx = 0;
|
||||
|
||||
decode_results results;
|
||||
@ -95,7 +96,7 @@ void IrReceiveCheck(void)
|
||||
char hvalue[65]; // Max 256 bits
|
||||
|
||||
iridx = results.decode_type;
|
||||
if ((iridx < 0) || (iridx > 14)) { iridx = 0; } // UNKNOWN
|
||||
if ((iridx < 0) || (iridx > MAX_STANDARD_IR)) { iridx = 0; } // UNKNOWN
|
||||
|
||||
if (iridx) {
|
||||
if (results.bits > 64) {
|
||||
|
@ -33,9 +33,11 @@
|
||||
enum IrErrors { IE_RESPONSE_PROVIDED, IE_NO_ERROR, IE_INVALID_RAWDATA, IE_INVALID_JSON, IE_SYNTAX_IRSEND, IE_SYNTAX_IRHVAC,
|
||||
IE_UNSUPPORTED_HVAC, IE_UNSUPPORTED_PROTOCOL };
|
||||
|
||||
const char kIrRemoteCommands[] PROGMEM = "|" D_CMND_IRHVAC "|" D_CMND_IRSEND ; // No prefix
|
||||
const char kIrRemoteCommands[] PROGMEM = "|"
|
||||
D_CMND_IRHVAC "|" D_CMND_IRSEND ; // No prefix
|
||||
|
||||
void (* const IrRemoteCommand[])(void) PROGMEM = { &CmndIrHvac, &CmndIrSend };
|
||||
void (* const IrRemoteCommand[])(void) PROGMEM = {
|
||||
&CmndIrHvac, &CmndIrSend };
|
||||
|
||||
/*********************************************************************************************\
|
||||
* IR Send
|
||||
|
@ -29,8 +29,8 @@ const uint8_t SERIAL_BRIDGE_BUFFER_SIZE = 130;
|
||||
const char kSerialBridgeCommands[] PROGMEM = "|" // No prefix
|
||||
D_CMND_SSERIALSEND "|" D_CMND_SBAUDRATE;
|
||||
|
||||
void (* const SerialBridgeCommand[])(void) PROGMEM =
|
||||
{ &CmndSSerialSend, &CmndSBaudrate };
|
||||
void (* const SerialBridgeCommand[])(void) PROGMEM = {
|
||||
&CmndSSerialSend, &CmndSBaudrate };
|
||||
|
||||
#include <TasmotaSerial.h>
|
||||
|
||||
|
@ -35,8 +35,8 @@
|
||||
const char kRfSendCommands[] PROGMEM = "|" // No prefix
|
||||
D_CMND_RFSEND;
|
||||
|
||||
void (* const RfSendCommand[])(void) PROGMEM =
|
||||
{ &CmndRfSend };
|
||||
void (* const RfSendCommand[])(void) PROGMEM = {
|
||||
&CmndRfSend };
|
||||
|
||||
#include <RCSwitch.h>
|
||||
|
||||
|
@ -33,8 +33,8 @@ const uint8_t kIFan03Sequence[MAX_FAN_SPEED][MAX_FAN_SPEED] = {{0, 2, 2, 2}, {0,
|
||||
const char kSonoffIfanCommands[] PROGMEM = "|" // No prefix
|
||||
D_CMND_FANSPEED;
|
||||
|
||||
void (* const SonoffIfanCommand[])(void) PROGMEM =
|
||||
{ &CmndFanspeed };
|
||||
void (* const SonoffIfanCommand[])(void) PROGMEM = {
|
||||
&CmndFanspeed };
|
||||
|
||||
uint8_t ifan_fanspeed_timer = 0;
|
||||
uint8_t ifan_fanspeed_goal = 0;
|
||||
|
@ -36,13 +36,15 @@ TasmotaSerial *ZigbeeSerial = nullptr;
|
||||
#endif
|
||||
|
||||
|
||||
const char kZigbeeCommands[] PROGMEM = "|" D_CMND_ZIGBEEZNPSEND "|" D_CMND_ZIGBEE_PERMITJOIN
|
||||
"|" D_CMND_ZIGBEE_STATUS "|" D_CMND_ZIGBEE_RESET "|" D_CMND_ZIGBEE_SEND
|
||||
"|" D_CMND_ZIGBEE_PROBE "|" D_CMND_ZIGBEE_READ ;
|
||||
const char kZigbeeCommands[] PROGMEM = "|"
|
||||
D_CMND_ZIGBEEZNPSEND "|" D_CMND_ZIGBEE_PERMITJOIN "|"
|
||||
D_CMND_ZIGBEE_STATUS "|" D_CMND_ZIGBEE_RESET "|" D_CMND_ZIGBEE_SEND "|"
|
||||
D_CMND_ZIGBEE_PROBE "|" D_CMND_ZIGBEE_READ ;
|
||||
|
||||
void (* const ZigbeeCommand[])(void) PROGMEM = { &CmndZigbeeZNPSend, &CmndZigbeePermitJoin,
|
||||
&CmndZigbeeStatus, &CmndZigbeeReset, &CmndZigbeeSend,
|
||||
&CmndZigbeeProbe, &CmndZigbeeRead };
|
||||
void (* const ZigbeeCommand[])(void) PROGMEM = {
|
||||
&CmndZigbeeZNPSend, &CmndZigbeePermitJoin,
|
||||
&CmndZigbeeStatus, &CmndZigbeeReset, &CmndZigbeeSend,
|
||||
&CmndZigbeeProbe, &CmndZigbeeRead };
|
||||
|
||||
int32_t ZigbeeProcessInput(class SBuffer &buf) {
|
||||
if (!zigbee.state_machine) { return -1; } // if state machine is stopped, send 'ignore' message
|
||||
@ -260,7 +262,7 @@ uint32_t strToUInt(const JsonVariant val) {
|
||||
return 0; // couldn't parse anything
|
||||
}
|
||||
|
||||
const unsigned char ZIGBEE_FACTORY_RESET[] PROGMEM =
|
||||
const unsigned char ZIGBEE_FACTORY_RESET[] PROGMEM =
|
||||
{ Z_SREQ | Z_SAPI, SAPI_WRITE_CONFIGURATION, CONF_STARTUP_OPTION, 0x01 /* len */, 0x01 /* STARTOPT_CLEAR_CONFIG */};
|
||||
//"2605030101"; // Z_SREQ | Z_SAPI, SAPI_WRITE_CONFIGURATION, CONF_STARTUP_OPTION, 0x01 len, 0x01 STARTOPT_CLEAR_CONFIG
|
||||
// Do a factory reset of the CC2530
|
||||
|
@ -508,10 +508,10 @@ const char kExsCommands[] PROGMEM = D_PRFX_EXS "|"
|
||||
D_CMND_EXS_DIMMS "|" D_CMND_EXS_CH_LOCK "|"
|
||||
D_CMND_EXS_STATE;
|
||||
|
||||
void (* const ExsCommand[])(void) PROGMEM =
|
||||
{ &CmndExsDimm, &CmndExsDimmTbl, &CmndExsDimmVal,
|
||||
&CmndExsDimms, &CmndExsChLock,
|
||||
&CmndExsState };
|
||||
void (* const ExsCommand[])(void) PROGMEM = {
|
||||
&CmndExsDimm, &CmndExsDimmTbl, &CmndExsDimmVal,
|
||||
&CmndExsDimms, &CmndExsChLock,
|
||||
&CmndExsState };
|
||||
|
||||
void CmndExsDimm(void)
|
||||
{
|
||||
|
@ -31,8 +31,8 @@
|
||||
const char kCounterCommands[] PROGMEM = D_PRFX_COUNTER "|" // Prefix
|
||||
"|" D_CMND_COUNTERTYPE "|" D_CMND_COUNTERDEBOUNCE ;
|
||||
|
||||
void (* const CounterCommand[])(void) PROGMEM =
|
||||
{ &CmndCounter, &CmndCounterType, &CmndCounterDebounce };
|
||||
void (* const CounterCommand[])(void) PROGMEM = {
|
||||
&CmndCounter, &CmndCounterType, &CmndCounterDebounce };
|
||||
|
||||
struct COUNTER {
|
||||
uint32_t timer[MAX_COUNTERS]; // Last counter time in micro seconds
|
||||
|
@ -186,8 +186,8 @@ void AdcShow(bool json)
|
||||
const char kAdcCommands[] PROGMEM = "|" // No prefix
|
||||
D_CMND_ADC "|" D_CMND_ADCS "|" D_CMND_ADCPARAM;
|
||||
|
||||
void (* const AdcCommand[])(void) PROGMEM =
|
||||
{ &CmndAdc, &CmndAdcs, &CmndAdcParam };
|
||||
void (* const AdcCommand[])(void) PROGMEM = {
|
||||
&CmndAdc, &CmndAdcs, &CmndAdcParam };
|
||||
|
||||
void CmndAdc(void)
|
||||
{
|
||||
|
@ -1,375 +0,0 @@
|
||||
<h1 id="decode-config-py">decode-config.py</h1>
|
||||
<p><em>decode-config.py</em> is able to backup and restore Tasmota configuration.</p>
|
||||
<p>In comparison with the Tasmota build-in "Backup/Restore Configuration" function <em>decode-config.py</em></p>
|
||||
<ul>
|
||||
<li>uses human readable and editable <a href="http://www.json.org/">JSON</a>-format for backup/restore,</li>
|
||||
<li>can restore previously backup and changed <a href="http://www.json.org/">JSON</a>-format files,</li>
|
||||
<li>is able to create Tasmota compatible command list with related config parameter</li>
|
||||
</ul>
|
||||
<p>Comparing backup files created by <em>decode-config.py</em> and *.dmp files created by Tasmota "Backup/Restore Configuration":</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th style="text-align:center">decode-config.py<br />*.json file</th>
|
||||
<th style="text-align:center">Tasmota<br />*.dmp file</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Encrypted</td>
|
||||
<td style="text-align:center">No</td>
|
||||
<td style="text-align:center">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Readable</td>
|
||||
<td style="text-align:center">Yes</td>
|
||||
<td style="text-align:center">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Simply editable</td>
|
||||
<td style="text-align:center">Yes</td>
|
||||
<td style="text-align:center">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Simply batch processing</td>
|
||||
<td style="text-align:center">Yes</td>
|
||||
<td style="text-align:center">No</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><em>decode-config.py</em> is compatible with Tasmota version from v5.10.0 up to now.</p>
|
||||
<h1 id="content">Content</h1>
|
||||
<ul>
|
||||
<li><a href="decode-config.md#prerequisite">Prerequisite</a></li>
|
||||
<li><a href="decode-config.md#file-types">File Types</a><ul>
|
||||
<li><a href="decode-config.md#-dmp-format">.dmp File Format</a></li>
|
||||
<li><a href="decode-config.md#-json-format">.json File Format</a></li>
|
||||
<li><a href="decode-config.md#-bin-format">.bin File Format</a><ul>
|
||||
<li><a href="decode-config.md#file-extensions">File extensions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="decode-config.md#usage">Usage</a><ul>
|
||||
<li><a href="decode-config.md#basics">Basics</a></li>
|
||||
<li><a href="decode-config.md#save-backup-file">Save backup file</a></li>
|
||||
<li><a href="decode-config.md#restore-backup-file">Restore backup file</a></li>
|
||||
<li><a href="decode-config.md#output-to-screen">Output to screen</a><ul>
|
||||
<li><a href="decode-config.md#json-output">JSON output</a></li>
|
||||
<li><a href="decode-config.md#tasmota-command-output">Tasmota command output</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="decode-config.md#filter-data">Filter data</a></li>
|
||||
<li><a href="decode-config.md#configuration-file">Configuration file</a></li>
|
||||
<li><a href="decode-config.md#more-program-arguments">More program arguments</a></li>
|
||||
<li><a href="decode-config.md#examples">Examples</a><ul>
|
||||
<li><a href="decode-config.md#config-file">Config file</a></li>
|
||||
<li><a href="decode-config.md#using-tasmota-binary-configuration-files">Using Tasmota binary configuration files</a></li>
|
||||
<li><a href="decode-config.md#use-batch-processing">Use batch processing</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="decode-config.md#notes">Notes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="prerequisite">Prerequisite</h2>
|
||||
<ul>
|
||||
<li>This program is written in <a href="https://en.wikipedia.org/wiki/Python_(programming_language">Python</a>) so you need to install a working python environment for your operating system.</li>
|
||||
</ul>
|
||||
<h3 id="linux">Linux</h3>
|
||||
<pre><code>sudo apt-<span class="hljs-built_in">get</span> install python python-pip libcurl4-openssl-<span class="hljs-built_in">dev</span> libssl-<span class="hljs-built_in">dev</span>
|
||||
</code></pre><pre><code>pip <span class="hljs-keyword">install</span> pycurl configargparse
|
||||
</code></pre><h3 id="windows-10">Windows 10</h3>
|
||||
<p>Install <a href="https://www.python.org/download/releases/2.7/">Python 2.7</a> then install dependencies. For PyCurl you need to <a href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl">download pycurl‑7.43.0.3‑cp27‑cp27m‑win_amd64.whl</a> for Windows 10 64bit.</p>
|
||||
<pre><code>pip install pycurl<span class="hljs-number">-7.43</span><span class="hljs-number">.0</span><span class="hljs-number">.3</span>-cp27-cp27m-win_amd64.whl configargparse
|
||||
<span class="hljs-comment">// run the command from the folder where you downloaded the file</span>
|
||||
|
||||
pip install configargparse
|
||||
</code></pre><ul>
|
||||
<li><a href="https://github.com/arendst/Tasmota">Tasmota</a> <a href="https://github.com/arendst/Tasmota/releases">Firmware</a> with Web-Server enabled:<ul>
|
||||
<li>To backup or restore configurations from or to a Tasmota device you need a firmare with enabled web-server in admin mode (command <a href="https://github.com/arendst/Tasmota/wiki/Commands#wifi">WebServer 2</a>). This is the Tasmota default.</li>
|
||||
<li>If using your own compiled firmware be aware to enable the web-server (<code>#define USE_WEBSERVER</code> and <code>#define WEB_SERVER 2</code>).</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="file-types">File Types</h2>
|
||||
<p><em>decode-config.py</em> can handle the following backup file types:</p>
|
||||
<h3 id="-dmp-format">.dmp Format</h3>
|
||||
<p>Configuration data as used by Tasmota "Backup/Restore Configuration" web interface.
|
||||
This format is binary and encrypted.</p>
|
||||
<h3 id="-json-format">.json Format</h3>
|
||||
<p>Configuration data in <a href="http://www.json.org/">JSON</a>-format.
|
||||
This format is decrypted, human readable and editable and can also be used for the <code>--restore-file</code> parameter.
|
||||
This file will be created by <em>decode-config.py</em> using the <code>--backup-file</code> with <code>--backup-type json</code> parameter, this is the default.</p>
|
||||
<h3 id="-bin-format">.bin Format</h3>
|
||||
<p>Configuration data in binary format.
|
||||
This format is binary decryptet, editable (e.g. using a hex editor) and can also be used for <code>--restore-file</code> command.
|
||||
It will be created by <em>decode-config.py</em> using <code>--backup-file</code> with <code>--backup-type bin</code>.
|
||||
Note:
|
||||
The .bin file contains the same information as the original .dmp file from Tasmota "Backup/Restore Configuration" but it is decrpted and 4 byte longer than an original (it is a prefix header at the beginning). .bin file data starting at address 4 contains the same as the <strong>struct SYSCFG</strong> from Tasmota <a href="https://github.com/arendst/Tasmota/blob/master/tasmota/settings.h">settings.h</a> in decrypted format.</p>
|
||||
<h4 id="file-extensions">File extensions</h4>
|
||||
<p>You don't need to append exensions for your file name as <em>decode-config.py</em> uses auto extension as default. The extension will be choose based on file contents and <code>--backup-type</code> parameter.
|
||||
If you do not want using auto extensions use the <code>--no-extension</code> parameter.</p>
|
||||
<h2 id="usage">Usage</h2>
|
||||
<p>After download don't forget to set the executable flag under linux with <code>chmod +x decode-config.py</code> or call the program using <code>python decode-config.py...</code>.</p>
|
||||
<h3 id="basics">Basics</h3>
|
||||
<p>At least pass a source where you want to read the configuration data from using <code>-f <filename></code> or <code>-d <host></code>:</p>
|
||||
<p>The source can be either</p>
|
||||
<ul>
|
||||
<li>a Tasmota device hostname or IP using the <code>-d <host></code> parameter</li>
|
||||
<li>a Tasmota <code>*.dmp</code> configuration file using <code>-f <filename></code> parameter</li>
|
||||
</ul>
|
||||
<p>Example:</p>
|
||||
<pre><code>decode-config<span class="hljs-selector-class">.py</span> -d tasmota-<span class="hljs-number">4281</span>
|
||||
</code></pre><p>will output a human readable configuration in <a href="http://www.json.org/">JSON</a>-format:</p>
|
||||
<pre><code>{
|
||||
<span class="hljs-string">"altitude"</span>: <span class="hljs-number">112</span>,
|
||||
<span class="hljs-string">"baudrate"</span>: <span class="hljs-number">115200</span>,
|
||||
<span class="hljs-string">"blinkcount"</span>: <span class="hljs-number">10</span>,
|
||||
<span class="hljs-string">"blinktime"</span>: <span class="hljs-number">10</span>,
|
||||
...
|
||||
<span class="hljs-string">"ws_width"</span>: [
|
||||
<span class="hljs-number">1</span>,
|
||||
<span class="hljs-number">3</span>,
|
||||
<span class="hljs-number">5</span>
|
||||
]
|
||||
}
|
||||
</code></pre><h3 id="save-backup-file">Save backup file</h3>
|
||||
<p>To save the output as backup file use <code>--backup-file <filename></code>, you can use placeholder for Version, Friendlyname and Hostname:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">--backup-file</span> <span class="hljs-selector-tag">Config_</span>@<span class="hljs-keyword">f_</span>@<span class="hljs-keyword">v</span>
|
||||
</code></pre><p>If you have setup a WebPassword within Tasmota, use</p>
|
||||
<pre><code>decode-config<span class="hljs-selector-class">.py</span> -d tasmota-<span class="hljs-number">4281</span> -<span class="hljs-selector-tag">p</span> <yourpassword> --backup-file Config_@f_@v
|
||||
</code></pre><p>will create a file like <code>Config_Tasmota_6.4.0.json</code> (the part <code>Tasmota</code> and <code>6.4.0</code> will choosen related to your device configuration). Because the default backup file format is JSON, you can read and change it with any raw text editor.</p>
|
||||
<h3 id="restore-backup-file">Restore backup file</h3>
|
||||
<p>Reading back a saved (and possible changed) backup file use the <code>--restore-file <filename></code> parameter. This will read the (changed) configuration data from this file and send it back to the source device or filename.</p>
|
||||
<p>To restore the previously save backup file <code>Config_Tasmota_6.2.1.json</code> to device <code>tasmota-4281</code> use:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">--restore-file</span> <span class="hljs-selector-tag">Config_Tasmota_6</span><span class="hljs-selector-class">.2</span><span class="hljs-selector-class">.1</span><span class="hljs-selector-class">.json</span>
|
||||
</code></pre><p>with password set by WebPassword:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">-p</span> <<span class="hljs-selector-tag">yourpassword</span>> <span class="hljs-selector-tag">--restore-file</span> <span class="hljs-selector-tag">Config_Tasmota_6</span><span class="hljs-selector-class">.2</span><span class="hljs-selector-class">.1</span><span class="hljs-selector-class">.json</span>
|
||||
</code></pre><h3 id="output-to-screen">Output to screen</h3>
|
||||
<p>To force screen output use the <code>--output</code> parameter.</p>
|
||||
<p>Output to screen is default enabled when calling the program with a source parameter (-f or -d) but without any backup or restore parameter.</p>
|
||||
<h4 id="json-output">JSON output</h4>
|
||||
<p>The default output format is <a href="decode-config.md#-json-format">JSON</a>. You can force JSON output using the <code>--output-format json</code> parameter.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code>decode-config.py -d tasmota<span class="hljs-number">-4281</span> -c my.conf -x <span class="hljs-symbol">Wifi</span> --output-format json
|
||||
|
||||
{
|
||||
...
|
||||
<span class="hljs-string">"hostname"</span>: <span class="hljs-string">"%s-%04d"</span>,
|
||||
<span class="hljs-string">"ip_address"</span>: [
|
||||
<span class="hljs-string">"0.0.0.0"</span>,
|
||||
<span class="hljs-string">"192.168.12.1"</span>,
|
||||
<span class="hljs-string">"255.255.255.0"</span>,
|
||||
<span class="hljs-string">"192.168.12.1"</span>
|
||||
],
|
||||
<span class="hljs-string">"ntp_server"</span>: [
|
||||
<span class="hljs-string">"ntp.localnet.home"</span>,
|
||||
<span class="hljs-string">"ntp2.localnet.home"</span>,
|
||||
<span class="hljs-string">"192.168.12.1"</span>
|
||||
],
|
||||
<span class="hljs-string">"sta_active"</span>: <span class="hljs-number">0</span>,
|
||||
<span class="hljs-string">"sta_config"</span>: <span class="hljs-number">5</span>,
|
||||
<span class="hljs-string">"sta_pwd"</span>: [
|
||||
<span class="hljs-string">"myWlAnPaszxwo!z"</span>,
|
||||
<span class="hljs-string">"myWlAnPaszxwo!z2"</span>
|
||||
],
|
||||
<span class="hljs-string">"sta_ssid"</span>: [
|
||||
<span class="hljs-string">"wlan.1"</span>,
|
||||
<span class="hljs-string">"my-wlan"</span>
|
||||
],
|
||||
<span class="hljs-string">"web_password"</span>: <span class="hljs-string">"myPaszxwo!z"</span>,
|
||||
<span class="hljs-string">"webserver"</span>: <span class="hljs-number">2</span>
|
||||
...
|
||||
}
|
||||
</code></pre><p>Note: JSON output always contains all configuration data like the backup file except you are using <code>--group</code> arg.</p>
|
||||
<h4 id="tasmota-command-output">Tasmota command output</h4>
|
||||
<p><em>decode-config.py</em> is able to translate the configuration data to (most all) Tasmota commands. To output your configuration as Tasmota commands use <code>--output-format cmnd</code> or <code>--output-format command</code>.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">-c</span> <span class="hljs-selector-tag">my</span><span class="hljs-selector-class">.conf</span> <span class="hljs-selector-tag">-g</span> <span class="hljs-selector-tag">Wifi</span> <span class="hljs-selector-tag">--output-format</span> <span class="hljs-selector-tag">cmnd</span>
|
||||
|
||||
# <span class="hljs-selector-tag">Wifi</span>:
|
||||
<span class="hljs-selector-tag">AP</span> 0
|
||||
<span class="hljs-selector-tag">Hostname</span> %<span class="hljs-selector-tag">s-</span>%04<span class="hljs-selector-tag">d</span>
|
||||
<span class="hljs-selector-tag">IPAddress1</span> 0<span class="hljs-selector-class">.0</span><span class="hljs-selector-class">.0</span><span class="hljs-selector-class">.0</span>
|
||||
<span class="hljs-selector-tag">IPAddress2</span> 192<span class="hljs-selector-class">.168</span><span class="hljs-selector-class">.12</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">IPAddress3</span> 255<span class="hljs-selector-class">.255</span><span class="hljs-selector-class">.255</span><span class="hljs-selector-class">.0</span>
|
||||
<span class="hljs-selector-tag">IPAddress4</span> 192<span class="hljs-selector-class">.168</span><span class="hljs-selector-class">.12</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">NtpServer1</span> <span class="hljs-selector-tag">ntp</span><span class="hljs-selector-class">.localnet</span><span class="hljs-selector-class">.home</span>
|
||||
<span class="hljs-selector-tag">NtpServer2</span> <span class="hljs-selector-tag">ntp2</span><span class="hljs-selector-class">.localnet</span><span class="hljs-selector-class">.home</span>
|
||||
<span class="hljs-selector-tag">NtpServer3</span> 192<span class="hljs-selector-class">.168</span><span class="hljs-selector-class">.12</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">Password1</span> <span class="hljs-selector-tag">myWlAnPaszxwo</span>!<span class="hljs-selector-tag">z</span>
|
||||
<span class="hljs-selector-tag">Password2</span> <span class="hljs-selector-tag">myWlAnPaszxwo</span>!<span class="hljs-selector-tag">z2</span>
|
||||
<span class="hljs-selector-tag">SSId1</span> <span class="hljs-selector-tag">wlan</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">SSId2</span> <span class="hljs-selector-tag">wlan</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">WebPassword</span> <span class="hljs-selector-tag">myPaszxwo</span>!<span class="hljs-selector-tag">z</span>
|
||||
<span class="hljs-selector-tag">WebServer</span> 2
|
||||
<span class="hljs-selector-tag">WifiConfig</span> 5
|
||||
</code></pre><p>Note: A few very specific module commands like MPC230xx, KNX and some Display commands are not supported. These are still available by JSON output.</p>
|
||||
<h3 id="filter-data">Filter data</h3>
|
||||
<p>The huge number of Tasmota configuration data can be overstrained and confusing, so the most of the configuration data are grouped into categories.</p>
|
||||
<p>With <em>decode-config.py</em> the following categories are available: <code>Display</code>, <code>Domoticz</code>, <code>Internal</code>, <code>KNX</code>, <code>Led</code>, <code>Logging</code>, <code>MCP230xx</code>, <code>MQTT</code>, <code>Main</code>, <code>Management</code>, <code>Pow</code>, <code>Sensor</code>, <code>Serial</code>, <code>SetOption</code>, <code>RF</code>, <code>System</code>, <code>Timers</code>, <code>Wifi</code></p>
|
||||
<p>These are similary to the categories on <a href="Tasmota Command Wiki">https://github.com/arendst/Tasmota/wiki/Commands</a>.</p>
|
||||
<p>To filter outputs to a subset of groups use the <code>-g</code> or <code>--group</code> arg concatenating the grooup you want, e. g.</p>
|
||||
<pre><code>decode-config<span class="hljs-selector-class">.py</span> -d tasmota-<span class="hljs-number">4281</span> -c my<span class="hljs-selector-class">.conf</span> --output-format cmnd --group Main MQTT Management Wifi
|
||||
</code></pre><h3 id="configuration-file">Configuration file</h3>
|
||||
<p>Each argument that start with <code>--</code> (eg. <code>--file</code>) can also be set in a config file (specified via -c). Config file syntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see syntax at <a href="https://pypi.org/project/ConfigArgParse/">https://pypi.org/project/ConfigArgParse</a>).</p>
|
||||
<p>If an argument is specified in more than one place, then commandline values override config file values which override defaults. This is usefull if you always use the same argument or a basic set of arguments.</p>
|
||||
<p>The http authentication credentials <code>--username</code> and <code>--password</code> is predestinated to store it in a file instead using it on your command line as argument:</p>
|
||||
<p>e.g. my.conf:</p>
|
||||
<pre><code><span class="hljs-section">[source]</span>
|
||||
<span class="hljs-attr">username</span> = admin
|
||||
<span class="hljs-attr">password</span> = myPaszxwo!z
|
||||
</code></pre><p>To make a backup file from example above you can now pass the config file instead using the password on command line:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">-c</span> <span class="hljs-selector-tag">my</span><span class="hljs-selector-class">.conf</span> <span class="hljs-selector-tag">--backup-file</span> <span class="hljs-selector-tag">Config_</span>@<span class="hljs-keyword">f_</span>@<span class="hljs-keyword">v</span>
|
||||
</code></pre><h3 id="more-program-arguments">More program arguments</h3>
|
||||
<p>For better reading each short written arg (minus sign <code>-</code>) has a corresponding long version (two minus signs <code>--</code>), eg. <code>--device</code> for <code>-d</code> or <code>--file</code> for <code>-f</code> (note: not even all <code>--</code> arg has a corresponding <code>-</code> one).</p>
|
||||
<p>A short list of possible program args is displayed using <code>-h</code> or <code>--help</code>.</p>
|
||||
<p>For advanced help use <code>-H</code> or <code>--full-help</code>:</p>
|
||||
<pre><code>usage: <span class="hljs-keyword">decode</span>-config.py [-f <filename>] [-<span class="hljs-keyword">d</span> <host>] [-P <port>]
|
||||
[-<span class="hljs-keyword">u</span> <username>] [-p <password>] [-i <filename>]
|
||||
[-o <filename>] [-t json|bin|dmp] [-<span class="hljs-keyword">E</span>] [-<span class="hljs-keyword">e</span>] [-F]
|
||||
[--json-indent <indent>] [--json-compact]
|
||||
[--json-hide-pw] [--json-show-pw]
|
||||
[--cmnd-indent <indent>] [--cmnd-groups]
|
||||
[--cmnd-nogroups] [--cmnd-<span class="hljs-keyword">sort</span>] [--cmnd-unsort]
|
||||
[-c <filename>] [-S] [-T json|cmnd|command]
|
||||
[-<span class="hljs-keyword">g</span> {Control,Devices,<span class="hljs-keyword">Display</span>,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,<span class="hljs-keyword">Timer</span>,Wifi} [{Control,Devices,<span class="hljs-keyword">Display</span>,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,<span class="hljs-keyword">Timer</span>,Wifi} ...]]
|
||||
[--ignore-warnings] [-<span class="hljs-keyword">h</span>] [-<span class="hljs-keyword">H</span>] [-v] [-V]
|
||||
|
||||
Backup/<span class="hljs-keyword">Restore</span> Tasmota configuration data. <span class="hljs-keyword">Args</span> that start with '--'
|
||||
(eg. -f) can also be <span class="hljs-keyword">set</span> <span class="hljs-keyword">in</span> a config <span class="hljs-keyword">file</span> (specified via -c). Config <span class="hljs-keyword">file</span>
|
||||
<span class="hljs-keyword">syntax</span> allows: key=value, flag=true, stuff=[a,b,c] (<span class="hljs-keyword">for</span> details, see <span class="hljs-keyword">syntax</span> at
|
||||
https:<span class="hljs-comment">//goo.gl/R74nmi). If an arg is specified in more than one place, then</span>
|
||||
commandline values override config <span class="hljs-keyword">file</span> values <span class="hljs-keyword">which</span> override defaults.
|
||||
|
||||
Source:
|
||||
<span class="hljs-keyword">Read</span>/Write Tasmota configuration from/to
|
||||
|
||||
-f, --<span class="hljs-keyword">file</span>, --tasmota-<span class="hljs-keyword">file</span> <filename>
|
||||
<span class="hljs-keyword">file</span> to retrieve/write Tasmota configuration from/to
|
||||
(default: None)'
|
||||
-<span class="hljs-keyword">d</span>, --device, --host <host>
|
||||
hostname or IP address to retrieve/send Tasmota
|
||||
configuration from/to (default: None)
|
||||
-P, --port <port> TCP/IP port number to <span class="hljs-keyword">use</span> <span class="hljs-keyword">for</span> the host connection
|
||||
(default: 80)
|
||||
-<span class="hljs-keyword">u</span>, --username <username>
|
||||
host HTTP access username (default: admin)
|
||||
-p, --password <password>
|
||||
host HTTP access password (default: None)
|
||||
|
||||
Backup/<span class="hljs-keyword">Restore</span>:
|
||||
Backup & <span class="hljs-keyword">restore</span> specification
|
||||
|
||||
-i, --<span class="hljs-keyword">restore</span>-<span class="hljs-keyword">file</span> <filename>
|
||||
<span class="hljs-keyword">file</span> to <span class="hljs-keyword">restore</span> configuration from (default: None).
|
||||
Replacements: @v=firmware <span class="hljs-keyword">version</span> from config,
|
||||
@f=device friendly name from config, @<span class="hljs-keyword">h</span>=device
|
||||
hostname from config, @<span class="hljs-keyword">H</span>=device hostname from device
|
||||
(-<span class="hljs-keyword">d</span> arg only)
|
||||
-o, --backup-<span class="hljs-keyword">file</span> <filename>
|
||||
<span class="hljs-keyword">file</span> to backup configuration to (default: None).
|
||||
Replacements: @v=firmware <span class="hljs-keyword">version</span> from config,
|
||||
@f=device friendly name from config, @<span class="hljs-keyword">h</span>=device
|
||||
hostname from config, @<span class="hljs-keyword">H</span>=device hostname from device
|
||||
(-<span class="hljs-keyword">d</span> arg only)
|
||||
-t, --backup-<span class="hljs-keyword">type</span> json|bin|dmp
|
||||
backup filetype (default: 'json')
|
||||
-<span class="hljs-keyword">E</span>, --extension <span class="hljs-keyword">append</span> filetype extension <span class="hljs-keyword">for</span> -i and -o filename
|
||||
(default)
|
||||
-<span class="hljs-keyword">e</span>, --<span class="hljs-keyword">no</span>-extension <span class="hljs-keyword">do</span> not <span class="hljs-keyword">append</span> filetype extension, <span class="hljs-keyword">use</span> -i and -o
|
||||
filename <span class="hljs-keyword">as</span> passed
|
||||
-F, --force-<span class="hljs-keyword">restore</span> force <span class="hljs-keyword">restore</span> even configuration is identical
|
||||
|
||||
JSON output:
|
||||
JSON <span class="hljs-keyword">format</span> specification
|
||||
|
||||
--json-indent <indent>
|
||||
pretty-printed JSON output using indent level
|
||||
(default: 'None'). -1 disables indent.
|
||||
--json-compact compact JSON output <span class="hljs-keyword">by</span> eliminate whitespace
|
||||
--json-hide-pw hide passwords
|
||||
--json-show-pw, --json-unhide-pw
|
||||
unhide passwords (default)
|
||||
|
||||
Tasmota command output:
|
||||
Tasmota command output <span class="hljs-keyword">format</span> specification
|
||||
|
||||
--cmnd-indent <indent>
|
||||
Tasmota command grouping indent level (default: '2').
|
||||
0 disables indent
|
||||
--cmnd-groups group Tasmota commands (default)
|
||||
--cmnd-nogroups leave Tasmota commands ungrouped
|
||||
--cmnd-<span class="hljs-keyword">sort</span> <span class="hljs-keyword">sort</span> Tasmota commands (default)
|
||||
--cmnd-unsort leave Tasmota commands unsorted
|
||||
|
||||
Common:
|
||||
Optional arguments
|
||||
|
||||
-c, --config <filename>
|
||||
<span class="hljs-keyword">program</span> config <span class="hljs-keyword">file</span> - can be used to <span class="hljs-keyword">set</span> default
|
||||
command <span class="hljs-keyword">args</span> (default: None)
|
||||
-S, --output <span class="hljs-keyword">display</span> output regardsless of backup/<span class="hljs-keyword">restore</span> usage
|
||||
(default <span class="hljs-keyword">do</span> not output <span class="hljs-keyword">on</span> backup or <span class="hljs-keyword">restore</span> usage)
|
||||
-T, --output-<span class="hljs-keyword">format</span> json|cmnd|command
|
||||
<span class="hljs-keyword">display</span> output <span class="hljs-keyword">format</span> (default: 'json')
|
||||
-<span class="hljs-keyword">g</span>, --group {Control,Devices,<span class="hljs-keyword">Display</span>,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,<span class="hljs-keyword">Timer</span>,Wifi}
|
||||
limit data processing to command groups (default <span class="hljs-keyword">no</span>
|
||||
filter)
|
||||
--ignore-warnings <span class="hljs-keyword">do</span> not <span class="hljs-keyword">exit</span> <span class="hljs-keyword">on</span> warnings. Not recommended, used <span class="hljs-keyword">by</span> your
|
||||
own responsibility!
|
||||
|
||||
Info:
|
||||
Extra information
|
||||
|
||||
-<span class="hljs-keyword">h</span>, --<span class="hljs-keyword">help</span> show usage <span class="hljs-keyword">help</span> message and <span class="hljs-keyword">exit</span>
|
||||
-<span class="hljs-keyword">H</span>, --full-<span class="hljs-keyword">help</span> show full <span class="hljs-keyword">help</span> message and <span class="hljs-keyword">exit</span>
|
||||
-v, --verbose produce <span class="hljs-keyword">more</span> output <span class="hljs-keyword">about</span> what the <span class="hljs-keyword">program</span> does
|
||||
-V, --<span class="hljs-keyword">version</span> show <span class="hljs-keyword">program</span>'s <span class="hljs-keyword">version</span> number and <span class="hljs-keyword">exit</span>
|
||||
|
||||
Either argument -<span class="hljs-keyword">d</span> <host> or -f <filename> must be given.
|
||||
</code></pre><h3 id="program-parameter-notes">Program parameter notes</h3>
|
||||
<p><em>decode-config.py</em></p>
|
||||
<h3 id="examples">Examples</h3>
|
||||
<p>The most of the examples are for linux command line. Under Windows call the program using <code>python decode-config.py ...</code>.</p>
|
||||
<h4 id="config-file">Config file</h4>
|
||||
<p>Note: The example contains .ini style sections <code>[...]</code>. Sections are always treated as comment and serves as clarity only.
|
||||
For further details of config file syntax see <a href="https://pypi.org/project/ConfigArgParse/">https://pypi.org/project/ConfigArgParse</a>.</p>
|
||||
<p><em>my.conf</em></p>
|
||||
<pre><code><span class="hljs-string">[Source]</span>
|
||||
username = admin
|
||||
password = myPaszxwo!z
|
||||
|
||||
<span class="hljs-string">[JSON]</span>
|
||||
json-indent <span class="hljs-number">2</span>
|
||||
</code></pre><h4 id="using-tasmota-binary-configuration-files">Using Tasmota binary configuration files</h4>
|
||||
<ol>
|
||||
<li><p>Restore a Tasmota configuration file</p>
|
||||
<p> <code>decode-config.py -c my.conf -d tasmota --restore-file Config_Tasmota_6.2.1.dmp</code></p>
|
||||
</li>
|
||||
<li><p>Backup device using Tasmota configuration compatible format</p>
|
||||
<p>a) use file extension to choice the file format</p>
|
||||
<p> <code>decode-config.py -c my.conf -d tasmota --backup-file Config_@f_@v.dmp</code></p>
|
||||
<p>b) use args to choice the file format</p>
|
||||
<p> <code>decode-config.py -c my.conf -d tasmota --backup-type dmp --backup-file Config_@f_@v</code></p>
|
||||
</li>
|
||||
</ol>
|
||||
<h4 id="use-batch-processing">Use batch processing</h4>
|
||||
<pre><code><span class="hljs-keyword">for</span> device <span class="hljs-keyword">in</span> tasmota1 tasmota2 tasmota3; <span class="hljs-keyword">do</span> ./decode-config.py -c my.conf -d <span class="hljs-variable">$device</span> -o Config<span class="hljs-number">_</span><span class="hljs-variable">@f_</span><span class="hljs-variable">@v</span>
|
||||
</code></pre><p>or under windows</p>
|
||||
<pre><code><span class="hljs-keyword">for</span> device <span class="hljs-keyword">in</span> (tasmota1 tasmota2 tasmota3) <span class="hljs-keyword">do</span> <span class="hljs-keyword">python</span> decode-config.py -c my.conf -d %device -o Config_@f_@v
|
||||
</code></pre><p>will produce JSON configuration files for host tasmota1, tasmota2 and tasmota3 using friendly name and Tasmota firmware version for backup filenames.</p>
|
||||
<h2 id="notes">Notes</h2>
|
||||
<p>Some general notes:</p>
|
||||
<ul>
|
||||
<li>Filename replacement macros <strong>@h</strong> and <strong>@H</strong>:<ul>
|
||||
<li><strong>@h</strong>
|
||||
The <strong>@h</strong> replacement macro uses the hostname configured with the Tasomta Wifi <code>Hostname <host></code> command (defaults to <code>%s-%04d</code>). It will not use the network hostname of your device because this is not available when working with files only (e.g. <code>--file <filename></code> as source).
|
||||
To prevent having a useless % in your filename, <strong>@h</strong> will not replaced by configuration data hostname if this contains '%' characters.</li>
|
||||
<li><strong>@H</strong>
|
||||
If you want to use the network hostname within your filename, use the <strong>@H</strong> replacement macro instead - but be aware this will only replaced if you are using a network device as source (<code>-d</code>, <code>--device</code>, <code>--host</code>); it will not work when using a file as source (<code>-f</code>, <code>--file</code>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
@ -55,14 +55,14 @@ pip install pycurl configargparse
|
||||
|
||||
Install [Python 2.7](https://www.python.org/download/releases/2.7/) then install dependencies. For PyCurl you need to [download pycurl‑7.43.0.3‑cp27‑cp27m‑win_amd64.whl](https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl) for Windows 10 64bit.
|
||||
```
|
||||
pip install pycurl-7.43.0.3-cp27-cp27m-win_amd64.whl configargparse
|
||||
pip install pycurl-7.43.0.3-cp27-cp27m-win_amd64.whl
|
||||
// run the command from the folder where you downloaded the file
|
||||
|
||||
pip install configargparse
|
||||
```
|
||||
|
||||
* [Tasmota](https://github.com/arendst/Tasmota) [Firmware](https://github.com/arendst/Tasmota/releases) with Web-Server enabled:
|
||||
* To backup or restore configurations from or to a Tasmota device you need a firmare with enabled web-server in admin mode (command [WebServer 2](https://github.com/arendst/Tasmota/wiki/Commands#wifi)). This is the Tasmota default.
|
||||
* To backup or restore configurations from or to a Tasmota device you need a firmare with enabled web-server in admin mode (command [WebServer 2](https://tasmota.github.io/docs/#/Commands#wifi)). This is the Tasmota default.
|
||||
* If using your own compiled firmware be aware to enable the web-server (`#define USE_WEBSERVER` and `#define WEB_SERVER 2`).
|
||||
|
||||
## File Types
|
||||
@ -213,7 +213,7 @@ The huge number of Tasmota configuration data can be overstrained and confusing,
|
||||
|
||||
With _decode-config.py_ the following categories are available: `Display`, `Domoticz`, `Internal`, `KNX`, `Led`, `Logging`, `MCP230xx`, `MQTT`, `Main`, `Management`, `Pow`, `Sensor`, `Serial`, `SetOption`, `RF`, `System`, `Timers`, `Wifi`
|
||||
|
||||
These are similary to the categories on [https://github.com/arendst/Tasmota/wiki/Commands](Tasmota Command Wiki).
|
||||
These are similary to the categories on [https://tasmota.github.io/docs/#/Commands](Tasmota Command Wiki).
|
||||
|
||||
To filter outputs to a subset of groups use the `-g` or `--group` arg concatenating the grooup you want, e. g.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user