Merge branch 'development' of https://github.com/arendst/Sonoff-Tasmota into development

This commit is contained in:
localhost61 2019-03-19 19:32:38 +01:00
commit 08fd8d5442
52 changed files with 535 additions and 555 deletions

View File

@ -18,7 +18,7 @@ See [RELEASENOTES.md](https://github.com/arendst/Sonoff-Tasmota/blob/development
In addition to the [release webpage](https://github.com/arendst/Sonoff-Tasmota/releases/latest) the binaries can also be OTA downloaded from http://thehackbox.org/tasmota/release/
### Development
[![Dev Version](https://img.shields.io/badge/development%20version-6.4.1.x-blue.svg)](https://github.com/arendst/Sonoff-Tasmota)
[![Dev Version](https://img.shields.io/badge/development%20version-6.5.0.x-blue.svg)](https://github.com/arendst/Sonoff-Tasmota)
[![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://thehackbox.org/tasmota/)
[![Build Status](https://img.shields.io/travis/arendst/Sonoff-Tasmota.svg)](https://travis-ci.org/arendst/Sonoff-Tasmota)
@ -133,9 +133,11 @@ Libraries used with Sonoff-Tasmota are:
- [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
- [I2Cdevlib](https://github.com/jrowberg/i2cdevlib)
- [IRremoteEsp8266](https://github.com/markszabo/IRremoteESP8266)
- [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)

View File

@ -7,16 +7,14 @@ See [wiki migration path](https://github.com/arendst/Sonoff-Tasmota/wiki/Upgrade
4. Migrate to **Sonoff-Tasmota 6.x**
## Release notes
### Core version 2.3.0 vs 2.4.2
This release is based on ESP8266/Arduino library core 2.3.0 (again) as some people encountered wifi related issues on core 2.4.2. For others core 2.4.2 is working just fine. Both version are available from http://thehackbox.org/tasmota/release/
### Change in default initial configuration tool
Firmware binary **sonoff-classic.bin** supports **WifiManager, Wps and SmartConfig** for initial configuration. The default tool is **Wps**.
To save memory space all other binaries support **WifiManager only**.
See _changelog.ino how to enable them again.
- Define WIFI_CONFIG_TOOL now contains the default behaviour once a SSID has been configured.
- If no SSID is configured making a wifi connection impossible the new define WIFI_CONFIG_NO_SSID will be used.
- While define WIFI_CONFIG_NO_SSID is set to WIFI_WPSCONFIG in my_user_config.h the compiler will check for define USE_WPS and if not enabled WIFI_CONFIG_NO_SSID will default to WIFI_MANAGER using the webserver. If define USE_WEBSERVER is also not enabled WIFI_CONFIG_NO_SSID will default to WIFI_SMARTCONFIG. If define USE_SMARTCONFIG is also not enabled WIFI_CONFIG_NO_SSID will default to a new option WIFI_SERIAL allowing to enter wifi parameters to serial which is always possible.
## Supported Modules
The following hardware modules are supported.
@ -82,180 +80,203 @@ Module | Description
58 PS-16-DZ | PS-16-DZ Wifi dimmer for Incandescent Lights and Led
59 Teckin US | Teckin US and ZooZee SA102 Wifi Smart Switch with Energy Monitoring
60 Manzoku strip | Manzoku Wifi Smart Power Strip with four Relays
61 OBI Socket 2 | OBI 2 Wifi Smart Socket
62 YTF IR Bridge | YTF Infra Red Wifi Bridge
63 Digoo DG-SP202 | Digoo DG-SP202 Dual Wifi Smart Switch with Energy Monitoring
64 KA10 | Smanergy KA10 Wifi Smart Wall Switch with Energy Monitoring
65 Luminea ZX2820 | Luminea ZX2820 Wifi Smart Switch with Energy Monitoring
66 Mi Desk Lamp | Mi Desk Lamp with rotary switch and Wifi
67 SP10 | Tuya SP10 Wifi Smart Switch with Energy Monitoring
68 WAGA CHCZ02MB | WAGA life CHCZ02MB Wifi Smart Switch with Energy Monitoring
69 SYF05 | Sunyesmart SYF05 RGBWW Wifi Led Bulb
## Provided Binary Downloads
The following binary downloads have been compiled with ESP8266/Arduino library core version **2.4.2** patched with the Alexa fix.
The following binary downloads have been compiled with ESP8266/Arduino library core version **2.3.0**.
- **sonoff-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**.
- **sonoff-classic.bin** = The Classic version allows **initial installation** using either WifiManager, Wps or SmartConfig.
- **sonoff.bin** = The Sonoff version without Wps and SmartConfig configuration but adds more sensors.
- **sonoff.bin** = The Sonoff version without Wps and SmartConfig configuration but adds more sensors. **RECOMMENDED RELEASE BINARY**
- **sonoff-basic.bin** = The Basic version without Wps and SmartConfig configuration and most sensors.
- **sonoff-classic.bin** = The Classic version allows initial installation using either WifiManager, Wps or SmartConfig.
- **sonoff-BG.bin** to **sonoff-TW.bin** = The Sonoff version without Wps and SmartConfig configuration in different languages.
- **sonoff-sensors.bin** = The Sensors version without Wps and SmartConfig configuration but adds even more useful sensors.
- **sonoff-display.bin** = The Display version without Wps and SmartConfig configuration but adds display support.
- **sonoff-knx.bin** = The Knx version without Wps and SmartConfig configuration and some other features but adds KNX support.
- **sonoff-sensors.bin** = The Sensors version without Wps and SmartConfig configuration but adds even more useful sensors.
- **sonoff-display.bin** = The Display version without Wps and SmartConfig configuration and Energy Monitoring but adds display support.
- **sonoff-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**.
Core version **2.4.2** binaries can be found at http://thehackbox.org/tasmota/release/020402/
### Available Features and Sensors
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | Remarks
|--------------------------------|---------|-------|---------|--------|------|---------|--------
| ESP/Arduino lib v2.3.0 | 346k | 429k | 482k | 504k | 522k | 535k |
| ESP/Arduino lib v2.4.2 | 366k | 446k | 496k | 522k | 538k | 551k | No wifi sleep
| | | | | | | |
| MY_LANGUAGE en-GB | x | x | x | x | x | x |
| MQTT_LIBRARY_TYPE PUBSUBCLIENT | x | x | x | x | x | x |
| USE_WPS | - | - | x | - | - | - | WPS
| USE_SMARTCONFIG | - | - | x | - | - | - | SmartConfig
| USE_ARDUINO_OTA | - | - | - | - | - | - |
| USE_DOMOTICZ | - | - | x | x | x | x |
| USE_HOME_ASSISTANT | - | - | - | x | x | x |
| USE_MQTT_TLS | - | - | - | - | - | - |
| USE_KNX | - | - | - | - | x | - |
| USE_WEBSERVER | x | x | x | x | x | x | WifiManager
| USE_EMULATION | - | x | x | x | - | x |
| USE_DISCOVERY | - | - | x | x | x | x |
| WEBSERVER_ADVERTISE | - | - | x | x | x | x |
| MQTT_HOST_DISCOVERY | - | - | x | x | x | x |
| USE_TIMERS | - | x | - | x | x | x |
| USE_TIMERS_WEB | - | x | - | x | x | x |
| USE_SUNRISE | - | x | - | x | x | x |
| USE_RULES | - | x | - | x | x | x |
| | | | | | |
| USE_ADC_VCC | x | x | x | x | x | - |
| USE_DS18B20 | - | - | - | - | - | - | Single sensor
| USE_DS18x20 | - | - | x | x | x | x | Multiple sensors
| USE_DS18x20_LEGACY | - | - | - | - | - | - | Multiple sensors
| | | | | | | |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors |
| USE_I2C | - | - | - | x | x | x |
| USE_SHT | - | - | - | x | x | x |
| USE_HTU | - | - | - | x | x | x |
| USE_BMP | - | - | - | x | x | x |
| USE_BME680 | - | - | - | - | - | x |
| USE_BH1750 | - | - | - | x | x | x |
| USE_VEML6070 | - | - | - | - | - | x |
| USE_ADS1115 | - | - | - | - | - | x |
| USE_ADS1115_I2CDEV | - | - | - | - | - | - |
| USE_INA219 | - | - | - | - | - | x |
| USE_SHT3X | - | - | - | x | x | x |
| USE_TSL2561 | - | - | - | - | - | x |
| USE_MGS | - | - | - | - | - | x |
| USE_SGP30 | - | - | - | x | x | x |
| USE_SI1145 | - | - | - | - | - | x |
| USE_LM75AD | - | - | - | x | x | x |
| USE_APDS9960 | - | - | - | - | - | - |
| USE_MCP230xx | - | - | - | - | - | - |
| USE_PCA9685 | - | - | - | - | - | - |
| USE_MPR121 | - | - | - | - | - | - |
| USE_CCS811 | - | - | - | - | - | - |
| USE_MPU6050 | - | - | - | - | - | - |
| USE_DS3231 | - | - | - | - | - | - |
| USE_MGC3130 | - | - | - | - | - | - |
| | | | | | | |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors |
| USE_SPI | - | - | - | - | - | - |
| USE_MHZ19 | - | - | - | x | x | x |
| USE_SENSEAIR | - | - | - | x | x | x |
| USE_PMS5003 | - | - | - | x | x | x |
| USE_NOVA_SDS | - | - | - | 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_SERIAL_BRIDGE | - | - | - | x | x | x |
| USE_SDM120 | - | - | - | - | - | x |
| USE_SDM630 | - | - | - | - | - | x |
| USE_MP3_PLAYER | - | - | - | - | - | x |
| USE_TUYA_DIMMER | - | x | - | x | x | x |
| USE_ARMTRONIX_DIMMERS | - | x | - | x | x | x |
| USE_PS_16_DZ | - | x | - | x | x | x |
| USE_AZ7798 | - | - | - | - | - | - |
| USE_IR_REMOTE | - | - | - | x | x | x |
| USE_IR_HVAC | - | - | - | - | - | x |
| USE_IR_RECEIVE | - | - | - | x | x | x |
| USE_WS2812 | - | - | x | x | x | x |
| USE_WS2812_DMA | - | - | - | - | - | - |
| USE_ARILUX_RF | - | - | - | x | x | x |
| USE_SR04 | - | - | - | x | x | x |
| USE_TM1638 | - | - | - | - | - | x |
| USE_HX711 | - | - | - | x | x | x |
| USE_RF_FLASH | - | - | - | x | x | x |
| USE_TX20_WIND_SENSOR | - | - | - | x | x | x |
| USE_RC_SWITCH | - | - | - | x | x | x |
| USE_RF_SENSOR | - | - | - | - | - | x | AlectoV2 only
| USE_DISPLAY | - | - | - | - | - | - |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | display | Remarks
|-----------------------|---------|-------|---------|--------|------|---------|---------|--------
| MY_LANGUAGE en-GB | x | x | x | x | x | x | x |
| USE_WPS | - | - | x | - | - | - | - | WPS
| USE_SMARTCONFIG | - | - | x | - | - | - | - | SmartConfig
| USE_ARDUINO_OTA | - | - | - | - | - | - | - |
| USE_DOMOTICZ | - | - | x | x | x | x | - |
| USE_HOME_ASSISTANT | - | - | - | x | x | x | - |
| USE_MQTT_TLS | - | - | - | - | - | - | - |
| USE_KNX | - | - | - | - | x | - | - |
| USE_WEBSERVER | x | x | x | x | x | x | x | WifiManager
| USE_EMULATION | - | x | x | x | - | x | - |
| USE_DISCOVERY | - | - | x | x | x | x | x |
| WEBSERVER_ADVERTISE | - | - | x | x | x | x | x |
| MQTT_HOST_DISCOVERY | - | - | x | x | x | x | x |
| USE_TIMERS | - | x | - | x | x | x | x |
| USE_TIMERS_WEB | - | x | - | x | x | x | x |
| USE_SUNRISE | - | x | - | x | x | x | x |
| USE_RULES | - | x | - | x | x | x | x |
| USE_EXPRESSION | - | - | - | - | - | - | - |
| | | | | | | | |
| USE_ADC_VCC | x | x | x | x | x | - | x |
| USE_DS18B20 | - | - | - | - | - | - | - | Single sensor
| USE_DS18x20 | - | - | x | x | x | x | x | Multiple sensors
| USE_DS18x20_LEGACY | - | - | - | - | - | - | - | Multiple sensors
| | | | | | | | |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | 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_SHT3X | - | - | - | x | x | x | x |
| USE_TSL2561 | - | - | - | - | - | x | - |
| 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 | - |
| | | | | | | | |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | 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_ENERGY_SENSOR | - | x | 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_SERIAL_BRIDGE | - | - | - | x | x | x | x |
| USE_SDM120 | - | - | - | - | - | x | - |
| USE_SDM630 | - | - | - | - | - | x | - |
| USE_MP3_PLAYER | - | - | - | - | - | x | - |
| USE_TUYA_DIMMER | - | x | - | x | x | x | x |
| USE_ARMTRONIX_DIMMERS | - | x | - | x | x | x | x |
| USE_PS_16_DZ | - | x | - | x | x | x | x |
| USE_AZ7798 | - | - | - | - | - | - | - |
| USE_PN532_HSU | - | - | - | - | - | x | - |
| USE_IR_REMOTE | - | - | - | x | x | x | x |
| USE_IR_HVAC | - | - | - | - | - | x | - |
| USE_IR_RECEIVE | - | - | - | x | x | x | x |
| USE_WS2812 | - | - | x | x | x | x | x |
| USE_WS2812_DMA | - | - | - | - | - | - | - |
| USE_ARILUX_RF | - | - | - | x | x | x | - |
| USE_SR04 | - | - | - | x | x | x | x |
| USE_TM1638 | - | - | - | - | - | x | - |
| USE_HX711 | - | - | - | x | x | x | x |
| USE_RF_FLASH | - | - | - | x | x | x | - |
| USE_TX20_WIND_SENSOR | - | - | - | x | x | x | x |
| USE_RC_SWITCH | - | - | - | x | x | x | x |
| USE_RF_SENSOR | - | - | - | - | - | x | - | AlectoV2 only
| USE_SM16716 | - | x | x | x | x | x | x |
| USE_DISPLAY | - | - | - | - | - | - | x |
| USE_DISPLAY_LCD | - | - | - | - | - | - | x |
| USE_DISPLAY_SSD1306 | - | - | - | - | - | - | x |
| USE_DISPLAY_MATRIX | - | - | - | - | - | - | x |
| USE_DISPLAY_ILI9341 | - | - | - | - | - | - | x |
| USE_DISPLAY_EPAPER_29 | - | - | - | - | - | - | x | Disabled for core 2.3.0
## Changelog
Version 6.4.1 20181225
* Change RAM usage BMP/BME I2C sensors
* Change FallbackTopic from cmnd/\<mqttclient\>/ to cmnd/\<mqttclient\>_fb/ to discriminate from Topic (#1528)
* Change FallbackTopic detection (#4706)
* Change Hass discovery to short MQTT messages as used by Hass 0.81 and up (#4711)
* Change MQTT GUI password handling (#4723)
* Fix possible dtostrf buffer overflows by increasing buffers
* Fix wifi strongest signal detection (#4704)
* Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (#3159, #4712)
* Add Slovak language file (#4663)
* Add support for AZ-Instrument 7798 CO2 meter/datalogger (#4672)
* Add define WIFI_SOFT_AP_CHANNEL in my_user_config.h to set Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI (#4673)
* Add define USE_MQTT_TLS_CA_CERT for checking MQTT TLS against root ca using Let's Encrypt cert from sonoff_letsencrypt.h - not supported with core 2.3.0 (#4703)
Version 6.4.0 20181217
* Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40%.
In case of web page errors clear your browser cache or do Page Reload (F5 or Ctrl+R)
* Change enforcing flashmode dout but it is still mandatory
* Change bootcount update (being first) flash write to 10 seconds after restart
* Change display and epaper drivers
* Change command WebSend Host header field from IP address to hostname (#4331)
* Change log buffer size from 512 to 520 to accommodate http sensor data (#4354)
* Change default WIFI_CONFIG_TOOL from WIFI_WAIT to WIFI_RETRY in my_user_config.h (#4400)
* Change webgui refresh time delay for Save Settings and local OTA Upload (#4423)
* Change SR-04 driver to use NewPing library (#4488)
* Change MCP230xx driver to support interrupt retention over teleperiod (#4547)
* Change support for MPU6050 using DMP (#4581)
* Fix unintended function overload of WifiState
* Fix wifi connection errors using wifi disconnect and ESP.reset instead of ESP.restart
* Fix Sonoff Pow R2 and Sonoff S31 Serial interface hang caused by Sonoff Basic R2 driver delay implementation (and possibly core bug)
* Fix MQTT connection error after restart
* Fix wifi re-scan connection baseline
* Fix possible strncat buffer overflows
* Fix intermittent Pzem sensor energy overflow calculation error
* Fix shelly2 ghost switching caused by lack of pull-up inputs (#4255)
* Fix hardware serial pin configuration. To keep using hardware serial swap current Rx/Tx pin configuration only (#4280)
* Fix MqttRetry values above 255 seconds (#4424)
* Fix WifiManager functionality on initial installation (#4433)
* Fix ArduinoOTA for Core 2.5.0 (#4620)
* Add minutes to commands Timezone to allow all possible world timezones
* Add more strict checks for GPIO selections
* Add code image and optional commit number to version
* Add dynamic delay to main loop providing time for wifi background tasks
* Add additional start-up delay during initial wifi connection
* Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver
* Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 weather stations using 868MHz RF sensor receiver
* Add user definition of defines WIFI_RSSI_THRESHOLD (default 10) and WIFI_RESCAN_MINUTES (default 44)
* Add command SetOption58 0/1 to enable IR raw data info in JSON message (#2116)
* Add command IRSend \<frequency\>|0,\<rawdata1\>,\<rawdata2\>,.. to allow raw data transmission (#2116)
* Add command SetOption56 0/1 to enable wifi network scan and select highest RSSI (#3173)
* Add command SetOption57 0/1 to enable wifi network re-scan every 44 minutes with a rssi threshold of 10 to select highest RSSI (#3173)
* Add support for SDM220 (#3610)
* Add default sleep 1 to sonoff-basic to lower energy consumption (#4217)
* Add wifi status to Tuya (#4221)
* Add delays to reduce CPU usage at boot time (#4233)
* Add command SetOption24 0/1 to select pressure unit as hPa or mmHg (#4241)
* Add optional hardware serial when GPIO13(Rx) and GPIO15(Tx) are selected removing hardware serial from GPIO01(Tx) and GPIO03(Rx) (#4288)
* Add support for Gosund SP1 v2.3 Power Socket with Energy Monitoring (#4297)
* Add support for Armtronix dimmers. See wiki for info (#4321)
* Add to command WebSend option to send a direct path when command starts with a slash (#4329)
* Add support for LG HVac and IrRemote (#4377)
* Add initial support for Hass sensor discovery (#4380)
* Add support for Fujitsu HVac and IrRemote (#4387)
* Add support for I2C MGC3130 Electric Field Effect sensor by Christian Baars (#3774, #4404)
* Add command CalcRes to set number of decimals (0 - 7) used in commands ADD, SUB, MULT and SCALE (#4420)
* Add CPU average load to state message (#4431)
* Add command SetOption59 0/1 to change state topic from tele/STATE to stat/RESULT (#4450)
* Add support for SM Smart Wifi Dimmer PS-16-DZ (#4465)
* Add support for Teckin US Power Socket with Energy Monitoring (#4481)
* Add command SetOption60 0/1 to select dynamic sleep (0) or sleep (1) (#4497)
* Add support for iFan02 Fanspeed in Domoticz using a selector (#4517)
* Add support for GPIO02 for newer Sonoff Basic (#4518)
* Add Announce Switches to MQTT Discovery (#4531)
* Add support for Manzoku Power Strip (#4590)
Version 6.5.0 20190319
* Remove commands SetOption14 and SetOption63 as it has been superseded by command Interlock
* Remove command SetOption35 0-255 for mDNS start-up delay (#4793)
* Remove support for MQTT_LIBRARY_TYPE, MQTT_ARDUINOMQTT and MQTT_TASMOTAMQTT (#5474)
* Change webserver content handling from single String to small Chunks increasing RAM
* Change code use of boolean to bool and byte to uint8_t
* Change code uint8_t flags to bool flags
* Change sonoff_template.h layout regarding optional module flags like ADC0
* Change sonoff_template.h module lay-out by removing non-configurable GPIOs
* Change button driver making it modular
* Change switch driver making it modular and introduce input filter (#4665, #4724)
* Change switch input detection by optimizing switch debounce (#4724)
* Change web authentication (#4865)
* Change image name BE_MINIMAL to FIRMWARE_MINIMAL and USE_xyz to FIRMWARE_xyz (#5106)
* Change GUI weblog from XML to plain text solving possible empty screens (#5154)
* Fix most compiler warnings
* Fix Display exception 28 when JSON value is NULL received
* Fix epaper driver (#4785)
* Fix HAss Sensor Discovery Software Watchdog restart (#4831, #4988)
* Fix allowable MAX_RULE_VARS to 16 (#4933)
* Fix mDNS addService (#4938, #4951)
* Fix HAss discovery of MHZ19(B) sensors (#4992)
* Fix some exceptions and watchdogs due to lack of stack space (#5215)
* Fix GUI wifi password acception starting with asteriks (*) (#5231, #5242)
* Fix command WebSend intermittent results (#5273, #5304)
* Fix additional characters in fallbacktopic, hostname and mqttclient on core 2.5.0 (#5359, #5417)
* Fix Energy TotalStartTime when commands EnergyReset0 and/or EnergyReset3 used (#5373)
* Fix DS18S20 temperature calculation (#5375)
* Fix float calculations in range from 0 to -1 (#5386)
* Fix exception on GUI Configure Logging and Configure Other (#5424)
* Add commands PowerCal, VoltageCal and CurrentCal for HLW8012, HJL01 and BL0937 based energy sensors
* Add command SerialDelimiter 128 to filter reception of only characters between ASCII 32 and 127 (#5131)
* Add command SSerialSend5 \<hexdata\> to SerialBridge
* Add command Interlock 0 / 1 / 1,2 3,4 .. to control interlock ON/OFF and add up to 8 relays in 1 to 4 interlock groups (#4910, #5014)
* Add command Template 255 to copy module configuration over to current active template and store as user template named Merged (#5371)
* Add command WifiConfig 7 to allow reset of device in AP mode without admin password (#5297)
* Add command SetOption36 to control boot loop default restoration (#4645, #5063)
* Add command SetOption37 for RGBCW color mapping (#5326)
* Add command SetOption55 0/1 and define MDNS_ENABLE to disable/enable mDNS (#4793, #4923)
* Add command SetOption62 0/1 to disable retain on Button or Switch hold messages (#5299)
* Add support for Smanergy KA10 Smart Wall Socket with Energy monitoring
* Add support for commands in sensor drivers
* Add support for MAX31855 K-Type thermocouple sensor using softSPI (#4764)
* Add support for Near Field Communication (NFC) controller PN532 using Serial (#4791, #5162)
* Add support for OBI Power Socket 2 (#4829)
* Add support for YTF IR Bridge (#4855)
* Add support for Mi LED Desk Lamp with rotary switch (#4887)
* Add support for Digoo DG-SP202 Smart Socket with Energy monitoring (#4891)
* Add support for MAX44009 Ambient Light sensor (#4907)
* Add support for inverted buttons and inverted buttons without pullup (#4914)
* Add support for Luminea ZX2820 Smart Socket with Energy monitoring (#4921)
* Add support for multiple ADS1115 I2C devices (#5083)
* Add support for online template change using command Template or GUI Configure Other (#5177)
* Add support for Korean language translations (#5344)
* Add support for sensor SCD30 (#5434)
* Add parameter CFG_HOLDER to status 1 message (#5206)
* Add SetOption32 until SetOption49 diagnostic information to Status 3 report as replacement for second property value in SetOption property name
* Add Resolution property to Status 3 report providing previous SetOption second value property
* Add property MqttCount to status 6 message representing number of Mqtt re-connections
* Add property LinkCount to state and status 11 message representing number of Wifi Link re-connections
* Add property Downtime to state and status 11 message representing the duration of wifi connection loss
* Add variable %timestamp% to rules (#4749)
* Add rule support for "==", "!=" ">=" and "<=" (#5122)
* Add rule expression enabled by define USE_EXPRESSION in my_user_config.h (#5210)
* Add Power status functionality to LED2 when configured leaving LED1 for Link status indication
* Add user configuration of HLW8012 and HJL-01/BL0937 Energy Monitoring as used in Sonoff Pow and many Tuya based devices
* Add user configuration of MCP39F501 Energy Monitoring as used in Shelly2
* Add online template configuration using both commands and Configure Template menu option in GUI
* Add (S)SerialSend3 escape sequence \x to allow hexadecimal byte value (#3560, #4947)
* Add define DS18B20_INTERNAL_PULLUP to select internal input pullup when only one DS18B20 sensor is connected eliminating external resistor (#4738)
* Add button control when no relay configured (#4682)
* Add startup delay of 4 seconds to button control (#4829)
* Add core version conditional compile options to provided PWM files (#4917)
* Add resiliency to saved Settings (#5065)
* Add MHZ19 Temperature as Domoticz Temperature selection (#5128)
* Add HAss status sensor (#5139)
* Add status message to former declined group commands (#5145)
* Add 0x to IRRemote (SetOption29) and RCSwitch (SetOption28) received hexadecimal data (#5431)

View File

@ -1,141 +1,84 @@
/* 6.4.2.22 20190315
/* 6.5.0.1 20190319
* Change Web GUI sensor data collection
*
* 6.5.0 20190319
* Remove commands SetOption14 and SetOption63 as it has been superseded by command Interlock
* Remove command SetOption35 0-255 for mDNS start-up delay (#4793)
* Remove support for MQTT_LIBRARY_TYPE, MQTT_ARDUINOMQTT and MQTT_TASMOTAMQTT (#5474)
*
* 6.4.1.21 20190309
* Fix exception on GUI Configure Logging and Configure Other (#5424)
* Add support for sensor SCD30 (#5434)
* Add support for commands in sensor drivers
* Add 0x to IRRemote (SetOption29) and RCSwitch (SetOption28) received hexadecimal data (#5431)
* Add button control when no relay configured (#4682)
*
* 6.4.1.20 20190304
* Changed webserver content handling from single String to small Chunks increasing RAM
* Changed logging message handling
* Change webserver content handling from single String to small Chunks increasing RAM
* Change code use of boolean to bool and byte to uint8_t
* Change code uint8_t flags to bool flags
* Change sonoff_template.h layout regarding optional module flags like ADC0
* Change sonoff_template.h module lay-out by removing non-configurable GPIOs
* Change button driver making it modular
* Change switch driver making it modular and introduce input filter (#4665, #4724)
* Change switch input detection by optimizing switch debounce (#4724)
* Change web authentication (#4865)
* Change image name BE_MINIMAL to FIRMWARE_MINIMAL and USE_xyz to FIRMWARE_xyz (#5106)
* Change GUI weblog from XML to plain text solving possible empty screens (#5154)
* Fix most compiler warnings
* Fix Display exception 28 when JSON value is NULL received
* Fix epaper driver (#4785)
* Fix HAss Sensor Discovery Software Watchdog restart (#4831, #4988)
* Fix allowable MAX_RULE_VARS to 16 (#4933)
* Fix mDNS addService (#4938, #4951)
* Fix HAss discovery of MHZ19(B) sensors (#4992)
* Fix some exceptions and watchdogs due to lack of stack space (#5215)
* Fix GUI wifi password acception starting with asteriks (*) (#5231, #5242)
* Fix command WebSend intermittent results (#5273, #5304)
* Fix additional characters in fallbacktopic, hostname and mqttclient on core 2.5.0 (#5359, #5417)
* Add command Template 255 to copy module configuration over to current active template and store as user template named Merged (#5371)
*
* 6.4.1.19 20190222
* Add command SetOption37 for RGBCW color mapping (#5326)
* Add Korean language translations (#5344)
* Fix Energy TotalStartTime when commands EnergyReset0 and/or EnergyReset3 used (#5373)
* Fix DS18S20 temperature calculation (#5375)
* Fix float calculations in range from 0 to -1 (#5386)
*
* 6.4.1.18 20190221
* Fix some exceptions and watchdogs due to lack of stack space - part 1 (#5215)
* Fix some exceptions and watchdogs due to lack of stack space - part 2
* Add command SetOption62 0/1 to disable retain on Button or Swith hold messages (#5299)
* Add option WifiConfig 7 to allow reset of device in AP mode without admin password (#5297)
* Fix command WebSend when using a port number as regression from 6.4.1.17 (#5304)
*
* 6.4.1.17 20190214
* Change template update by removing possibility to add user module config keeping template as defined (#5222)
* Fix regression from 6.4.1.16 where GPIO9 and GPIO10 connected devices did not work (#5197)
* Fix GUI wifi password acception starting with asteriks (*) (#5231, #5242)
* Add rule expression enabled by define USE_EXPRESSION in my_user_config.h (#5210)
* Add Configure Template menu option to GUI (#5222)
* Remove command SetOption62 as it's functionality is replaced by user changing the device template (#5255)
* Add property LinkCount to state and status 11 message representing number of Wifi Link re-connections
* Add property MqttCount to status 6 message representing number of Mqtt re-connections
* Add property Downtime to state and status 11 message representing the duration of wifi connection loss
* Fix command WebSend intermittent results (#5273)
*
* 6.4.1.16 20190211
* Initial support for online template change using command Template or GUI Configure Other (#5177)
* Add parameter CFG_HOLDER to status 1 message (#5206)
* Update GUI
*
* 6.4.1.15 20190208
* Change image name BE_MINIMAL to FIRMWARE_MINIMAL (#5106)
* Change image names USE_xyz to FIRMWARE_xyz (#5106)
* Fix exception on GUI Configure Logging and Configure Other (#5424)
* Add commands PowerCal, VoltageCal and CurrentCal for HLW8012, HJL01 and BL0937 based energy sensors
* Add command SerialDelimiter 128 to filter reception of only characters between ASCII 32 and 127 (#5131)
* Add status message to former declined group commands (#5145)
*
* 6.4.1.14 20190203
* Add SetOption32 until SetOption49 diagnostic information to Status 3 report as replacement for second property value in SetOption property name
* Add Resolution property to Status 3 report providing previous SetOption second value property
* Fix IR local echo
* Add user configuration of HLW8012 and HJL-01/BL0937 Energy Monitoring as used in Sonoff S31, Pow Ra and many Tuya based devices
* Add user configuration of MCP39F501 Energy Monitoring as used in Shelly2
* Add support for multiple ADS1115 I2C devices (#5083)
* Add rule support for "==", "!=" ">=" and "<=" (#5122)
* Add Hass status sensor (#5139)
* Change GUI weblog solving possible empty screens (#5154)
* Change PN532 support from I2C to Serial for more stability (#5162)
* Add MHZ19 Temperature as Domoticz Temperature selection (#5128)
*
* 6.4.1.13 20190130
* Add command SSerialSend5 \<hexdata\> to SerialBridge
* Add command Interlock 0 / 1 / 1,2 3,4 .. to control interlock ON/OFF and add up to 8 relays in 1 to 4 interlock groups (#4910, #5014)
* Add command Template 255 to copy module configuration over to current active template and store as user template named Merged (#5371)
* Add command WifiConfig 7 to allow reset of device in AP mode without admin password (#5297)
* Add command SetOption36 to control boot loop default restoration (#4645, #5063)
* Add resiliency to saved Settings (#5065)
*
* 6.4.1.12 20190128
* Change code use of boolean to bool and byte to uint8_t
* Change code uint8_t flags to bool flags
*
* 6.4.1.11 20190124
* Remove command SetOption14 as it has been superseded by command Interlock
* Remove command SetOption63 as it has been superseded by command Interlock
* Add command Interlock 0 / 1 / 1,2 3,4 .. to control interlock ON/OFF and add up to 8 relays in 1 to 4 interlock groups (#5014)
* Add core version conditional compile options to provided PWM files (#4917)
* Add support for inverted buttons and inverted buttons without pullup (#4914)
*
* 6.4.1.10 20190121
* Fix Hass discovery of MHZ19(B) sensors (#4992)
* Fix Hass Software Watchdog exception during discovery (#4988)
* Add support for MAX44009 Ambient Light sensor (#4907)
*
* 6.4.1.9 20190115
* Add support for Mi LED Desk Lamp with rotary switch (#4887)
* Fix mDNS addService (#4938, #4951)
* Fix allowable MAX_RULE_VARS to 16 (#4933)
* Add (S)SerialSend3 escape sequence \x to allow hexadecimal byte value (#3560, #4947)
* Add SerialBridge command SSerialSend5 <hexdata>
*
* 6.4.1.8 20190107
* Change sonoff_template.h layout regarding optional module flags like ADC0
* Add command SetOption62 1 to force no Button/Switch pullup on dedicated modules. Currently only supported on Shelly2 (#4841)
* Fix Display exception 28 when JSON value is NULL received
* Fix Home Assistant Sensor Discovery Software Watchdog restart (#4831)
* Add command SetOption37 for RGBCW color mapping (#5326)
* Add command SetOption55 0/1 and define MDNS_ENABLE to disable/enable mDNS (#4793, #4923)
* Add command SetOption62 0/1 to disable retain on Button or Switch hold messages (#5299)
* Add support for Smanergy KA10 Smart Wall Socket with Energy monitoring
* Add support for commands in sensor drivers
* Add support for MAX31855 K-Type thermocouple sensor using softSPI (#4764)
* Add support for Near Field Communication (NFC) controller PN532 using Serial (#4791, #5162)
* Add support for OBI Power Socket 2 (#4829)
* Add support for YTF IR Bridge (#4855)
* Change web authentication (#4865)
* Add support for Mi LED Desk Lamp with rotary switch (#4887)
* Add support for Digoo DG-SP202 Smart Socket with Energy monitoring (#4891)
* Add support for Smanergy KA10 Smart Wall Socket with Energy monitoring
* Add support for MAX44009 Ambient Light sensor (#4907)
* Add support for inverted buttons and inverted buttons without pullup (#4914)
* Add support for Luminea ZX2820 Smart Socket with Energy monitoring (#4921)
* Add define MDNS_ENABLE to control initial mDNS state (#4923)
* Add split interlock part 1 (#4910)
*
* 6.4.1.7 20190106
* Fix HLW8012, HJL01 and BL0937 based energy sensors low Power (below 10W) measurement regression from 6.4.1.6
* Add Power status functionality to LED2 when configured leaving LED1 for Link status indication
* Add no pull-up control to Shelly 2 module (default is pull-up, change GPIO2 to Switch3n for no pull-up) (#4841)
* Add 4 seconds startup delay to button control (#4829)
* Change button driver making it modular
*
* 6.4.1.6 20190105
* Add commands PowerCal, VoltageCal and CurrentCal for HLW8012, HJL01 and BL0937 based energy sensors
*
* 6.4.1.5 20190103
* Remove command SetOption35 0-255 for mDNS start-up delay (#4793)
* Add command SetOption55 0/1 to disable/enable mDNS (#4793)
*
* 6.4.1.4 20190101
* Update Copyright (C) 2019
* Fix epaper driver (#4785)
* Add support for Near Field Communication (NFC) controller PN532 using I2C (#4791)
*
* 6.4.1.3 20181229
* Change sonoff_template.h module lay-out by removing non-configurable GPIOs
* Add support for MAX31855 K-Type thermocouple sensor using softSPI (#4764)
*
* 6.4.1.2 20181228
* Change switch driver making it modular and introduce input filter (#4665, #4724)
* Add define DS18B20_INTERNAL_PULLUP to select internal input pullup when only one DS18B20 sensor is connected eliminating external resistor (#4738)
* Add support for multiple ADS1115 I2C devices (#5083)
* Add support for online template change using command Template or GUI Configure Other (#5177)
* Add support for Korean language translations (#5344)
* Add support for sensor SCD30 (#5434)
* Add parameter CFG_HOLDER to status 1 message (#5206)
* Add SetOption32 until SetOption49 diagnostic information to Status 3 report as replacement for second property value in SetOption property name
* Add Resolution property to Status 3 report providing previous SetOption second value property
* Add property MqttCount to status 6 message representing number of Mqtt re-connections
* Add property LinkCount to state and status 11 message representing number of Wifi Link re-connections
* Add property Downtime to state and status 11 message representing the duration of wifi connection loss
* Add variable %timestamp% to rules (#4749)
*
* 6.4.1.1 20181224
* Fix most compiler warnings
* Change switch input detection by optimizing switch debounce (#4724)
* Add rule support for "==", "!=" ">=" and "<=" (#5122)
* Add rule expression enabled by define USE_EXPRESSION in my_user_config.h (#5210)
* Add Power status functionality to LED2 when configured leaving LED1 for Link status indication
* Add user configuration of HLW8012 and HJL-01/BL0937 Energy Monitoring as used in Sonoff Pow and many Tuya based devices
* Add user configuration of MCP39F501 Energy Monitoring as used in Shelly2
* Add online template configuration using both commands and Configure Template menu option in GUI
* Add (S)SerialSend3 escape sequence \x to allow hexadecimal byte value (#3560, #4947)
* Add define DS18B20_INTERNAL_PULLUP to select internal input pullup when only one DS18B20 sensor is connected eliminating external resistor (#4738)
* Add button control when no relay configured (#4682)
* Add startup delay of 4 seconds to button control (#4829)
* Add core version conditional compile options to provided PWM files (#4917)
* Add resiliency to saved Settings (#5065)
* Add MHZ19 Temperature as Domoticz Temperature selection (#5128)
* Add HAss status sensor (#5139)
* Add status message to former declined group commands (#5145)
* Add 0x to IRRemote (SetOption29) and RCSwitch (SetOption28) received hexadecimal data (#5431)
*
* 6.4.1 20181224
* Change RAM usage BMP/BME I2C sensors

View File

@ -561,19 +561,19 @@ const char kOptionBlinkOff[] PROGMEM = "BLINKOFF|" D_BLINKOFF ;
// xdrv_02_webserver.ino
#ifdef USE_WEBSERVER
const char HTTP_SNS_TEMP[] PROGMEM = "%s{s}%s " D_TEMPERATURE "{m}%s&deg;%c{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_HUM[] PROGMEM = "%s{s}%s " D_HUMIDITY "{m}%s%%{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_PRESSURE[] PROGMEM = "%s{s}%s " D_PRESSURE "{m}%s %s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_SEAPRESSURE[] PROGMEM = "%s{s}%s " D_PRESSUREATSEALEVEL "{m}%s %s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_ANALOG[] PROGMEM = "%s{s}%s " D_ANALOG_INPUT "%d{m}%d{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_ILLUMINANCE[] PROGMEM = "%s{s}%s " D_ILLUMINANCE "{m}%d " D_UNIT_LUX "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_TEMP[] PROGMEM = "{s}%s " D_TEMPERATURE "{m}%s&deg;%c{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_HUM[] PROGMEM = "{s}%s " D_HUMIDITY "{m}%s%%{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_PRESSURE[] PROGMEM = "{s}%s " D_PRESSURE "{m}%s %s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_SEAPRESSURE[] PROGMEM = "{s}%s " D_PRESSUREATSEALEVEL "{m}%s %s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_ANALOG[] PROGMEM = "{s}%s " D_ANALOG_INPUT "%d{m}%d{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_ILLUMINANCE[] PROGMEM = "{s}%s " D_ILLUMINANCE "{m}%d " D_UNIT_LUX "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#if defined(USE_MHZ19) || defined(USE_SENSEAIR) || defined(USE_AZ7798) || defined(USE_SCD30)
const char HTTP_SNS_CO2[] PROGMEM = "%s{s}%s " D_CO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_CO2[] PROGMEM = "{s}%s " D_CO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#endif // USE_MHZ19
#if defined(USE_SCD30)
const char HTTP_SNS_CO2EAVG[] PROGMEM = "%s{s}%s " D_ECO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_CO2EAVG[] PROGMEM = "{s}%s " D_ECO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#endif // USE_SCD30
const char S_MAIN_MENU[] PROGMEM = D_MAIN_MENU;

View File

@ -54,7 +54,7 @@
#define D_ADMIN "מנהל"
#define D_AIR_QUALITY "איכות אוויר"
#define D_AP "AP" // Access Point
#define D_AS "as"
#define D_AS ""
#define D_AUTO "אוטומטי"
#define D_BLINK "מהבהב"
#define D_BLINKOFF "כיבוי היבהוב"
@ -62,11 +62,11 @@
#define D_BRIGHTLIGHT "בהירות"
#define D_BSSID "BSSId"
#define D_BUTTON "לחצן"
#define D_BY "ע" // Written by me
#define D_BY "על ידי" // Written by me
#define D_BYTES "בייט"
#define D_CELSIUS "צלזיוס"
#define D_CHANNEL "ערוץ"
#define D_CO2 "Carbon dioxide"
#define D_CO2 "פחמן דו חמצני"
#define D_CODE "קוד" // Button code
#define D_COLDLIGHT "אור קר"
#define D_COMMAND "פקודה"
@ -112,7 +112,7 @@
#define D_LWT "LWT"
#define D_MODULE "מודול"
#define D_MQTT "MQTT"
#define D_MULTI_PRESS "multi-press"
#define D_MULTI_PRESS "לחיצה מרובה"
#define D_NOISE "רעש"
#define D_NONE "כלום"
#define D_OFF "כבוי"
@ -132,7 +132,7 @@
#define D_PROGRAM_FLASH_SIZE "גודל תוכנית פלאש"
#define D_PROGRAM_SIZE "גודל תוכנית"
#define D_PROJECT "פרויקט"
#define D_RAIN "Rain"
#define D_RAIN "גשם"
#define D_RECEIVED "התקבל"
#define D_RESTART "איתחול"
#define D_RESTARTING "הפעלה מחדש"
@ -203,14 +203,14 @@
#define D_IN_MODE "במצב"
#define D_CONNECT_FAILED_NO_IP_ADDRESS "IP החיבור נכשל מכיוון שלא התקבלה כתובת"
#define D_CONNECT_FAILED_AP_NOT_REACHED "זמין AP החיבור נכשל כיוון שאין"
#define D_CONNECT_FAILED_WRONG_PASSWORD "Connect failed with AP incorrect password"
#define D_CONNECT_FAILED_AP_TIMEOUT "Connect failed with AP timeout"
#define D_ATTEMPTING_CONNECTION "Attempting connection..."
#define D_CHECKING_CONNECTION "Checking connection..."
#define D_QUERY_DONE "Query done. MQTT services found"
#define D_MQTT_SERVICE_FOUND "MQTT service found on"
#define D_FOUND_AT "found at"
#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host not found"
#define D_CONNECT_FAILED_WRONG_PASSWORD "סיסמא שגויה , AP חיבור נכשל ל"
#define D_CONNECT_FAILED_AP_TIMEOUT "פג זמן המתנה , AP חיבור נכשל ל"
#define D_ATTEMPTING_CONNECTION "...מנסה להתחבר"
#define D_CHECKING_CONNECTION "...בודק חיבור"
#define D_QUERY_DONE "MQTT השאילתה נעשתה. נמצאו שירותי"
#define D_MQTT_SERVICE_FOUND "MQTT נמצאו שירותי"
#define D_FOUND_AT "נמצא ב"
#define D_SYSLOG_HOST_NOT_FOUND "לא נמצא Syslog מארח"
// settings.ino
#define D_SAVED_TO_FLASH_AT "נשמר לפלאש ב"
@ -219,7 +219,7 @@
#define D_ERASED_SECTOR "סקטור מחוק"
// xdrv_02_webserver.ino
#define D_NOSCRIPT "JavaScript - כדי להשתמש ב קושחה אסמוטה אנא הפעל"
#define D_NOSCRIPT "JavaScript - כדי להשתמש בקושחת אסמוטה אנא הפעל"
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "קושחה מינימלית - בבקשה אנא שדרג"
#define D_WEBSERVER_ACTIVE_ON "שרת ווב פעיל"
#define D_WITH_IP_ADDRESS "IP עם כתובת"
@ -230,7 +230,7 @@
#define D_WIFIMANAGER_SET_ACCESSPOINT "Wifimanager set AccessPoint"
#define D_TRYING_TO_CONNECT "מנסה לחבר את ההתקן לרשת"
#define D_RESTART_IN "הפעלה מחדש תןך"
#define D_RESTART_IN "הפעלה מחדש תוך"
#define D_SECONDS "שניות"
#define D_DEVICE_WILL_RESTART "ההתקן יופעל מחדש בעוד מס' שניות"
#define D_BUTTON_TOGGLE "מצב"
@ -286,12 +286,12 @@
#define D_MORE_DEBUG "מיפוי נוסף"
#define D_SYSLOG_HOST "Syslog מארח"
#define D_SYSLOG_PORT "Syslog פורט"
#define D_TELEMETRY_PERIOD "Telemetry period"
#define D_TELEMETRY_PERIOD "זמן שידור"
#define D_OTHER_PARAMETERS "פרמטרים שונים"
#define D_TEMPLATE "Template"
#define D_ACTIVATE "Activate"
#define D_WEB_ADMIN_PASSWORD "סיסמת מנהל - אתר"
#define D_TEMPLATE "תבנית"
#define D_ACTIVATE "הפעל"
#define D_WEB_ADMIN_PASSWORD "סיסמת מנהל"
#define D_MQTT_ENABLE "MQTT אפשר"
#define D_FRIENDLY_NAME "שם ידידותי"
#define D_BELKIN_WEMO "Belkin WeMo"
@ -374,38 +374,38 @@
#define D_WEMO_BASIC_EVENT "WeMo basic event"
#define D_WEMO_EVENT_SERVICE "WeMo event service"
#define D_WEMO_META_SERVICE "WeMo meta service"
#define D_WEMO_SETUP "WeMo setup"
#define D_RESPONSE_SENT "Response sent"
#define D_WEMO_SETUP "WeMo הגדרת"
#define D_RESPONSE_SENT "תגובה נשלחה"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Hue setup"
#define D_HUE_BRIDGE_SETUP "Hue הגדרת"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API not implemented"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST args"
#define D_3_RESPONSE_PACKETS_SENT "3 response packets sent"
// xdrv_07_domoticz.ino
#define D_DOMOTICZ_PARAMETERS "Domoticz parameters"
#define D_DOMOTICZ_PARAMETERS "Domoticz פרמטרי"
#define D_DOMOTICZ_IDX "Idx"
#define D_DOMOTICZ_KEY_IDX "Key idx"
#define D_DOMOTICZ_SWITCH_IDX "Switch idx"
#define D_DOMOTICZ_SENSOR_IDX "Sensor idx"
#define D_DOMOTICZ_TEMP "Temp"
#define D_DOMOTICZ_TEMP_HUM "Temp,Hum"
#define D_DOMOTICZ_TEMP_HUM_BARO "Temp,Hum,Baro"
#define D_DOMOTICZ_POWER_ENERGY "Power,Energy"
#define D_DOMOTICZ_ILLUMINANCE "Illuminance"
#define D_DOMOTICZ_TEMP "טמפרטורה"
#define D_DOMOTICZ_TEMP_HUM "טמפרטורה,לחות"
#define D_DOMOTICZ_TEMP_HUM_BARO "טמפרטורה,לחות,ברומטר"
#define D_DOMOTICZ_POWER_ENERGY "הספק,צריכה"
#define D_DOMOTICZ_ILLUMINANCE "עוצמת אור"
#define D_DOMOTICZ_COUNT "Count/PM1"
#define D_DOMOTICZ_VOLTAGE "Voltage/PM2.5"
#define D_DOMOTICZ_CURRENT "Current/PM10"
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"
#define D_DOMOTICZ_AIRQUALITY "איכות אוויר"
#define D_DOMOTICZ_UPDATE_TIMER "עדכן טיימר"
// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "הגדרות תזמון"
#define D_TIMER_PARAMETERS "פרמטרים עבור תזמון"
#define D_TIMER_ENABLE "אפשר תזמון"
#define D_TIMER_ARM "חמש"
#define D_TIMER_ARM "טען"
#define D_TIMER_TIME "זמן"
#define D_TIMER_DAYS "ימים"
#define D_TIMER_REPEAT "חזרות"
@ -413,25 +413,25 @@
#define D_TIMER_ACTION "פעולה"
// xdrv_10_knx.ino
#define D_CONFIGURE_KNX "Configure KNX"
#define D_KNX_PARAMETERS "KNX Parameters"
#define D_KNX_GENERAL_CONFIG "General"
#define D_KNX_PHYSICAL_ADDRESS "Physical Address"
#define D_CONFIGURE_KNX "KNX הגדר"
#define D_KNX_PARAMETERS "KNX פרמטרי"
#define D_KNX_GENERAL_CONFIG "כללי"
#define D_KNX_PHYSICAL_ADDRESS "כתובת פיזית"
#define D_KNX_PHYSICAL_ADDRESS_NOTE "( Must be unique on the KNX network )"
#define D_KNX_ENABLE "Enable KNX"
#define D_KNX_GROUP_ADDRESS_TO_WRITE "Data to Send to Group Addresses"
#define D_ADD "Add"
#define D_DELETE "Delete"
#define D_REPLY "Reply"
#define D_KNX_GROUP_ADDRESS_TO_READ "Group Addresses to Receive Data from"
#define D_KNX_ENABLE "KNX אפשר"
#define D_KNX_GROUP_ADDRESS_TO_WRITE "נתונים לשליחה אל כתובות קבוצתיות"
#define D_ADD "הוסף"
#define D_DELETE "מחק"
#define D_REPLY "השב"
#define D_KNX_GROUP_ADDRESS_TO_READ "כתובות קבוצתיות לקבלת נתונים מ"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Received from"
#define D_KNX_COMMAND_WRITE "Write"
#define D_KNX_COMMAND_READ "Read"
#define D_KNX_COMMAND_OTHER "Other"
#define D_SENT_TO "sent to"
#define D_RECEIVED_FROM "התקבל מאת"
#define D_KNX_COMMAND_WRITE "כתיבה"
#define D_KNX_COMMAND_READ "קריאה"
#define D_KNX_COMMAND_OTHER "אחר"
#define D_SENT_TO "נשלח ל"
#define D_KNX_WARNING "The group address ( 0 / 0 / 0 ) is reserved and can not be used."
#define D_KNX_ENHANCEMENT "Communication Enhancement"
#define D_KNX_ENHANCEMENT "שיפור התקשורת"
#define D_KNX_TX_SLOT "KNX TX"
#define D_KNX_RX_SLOT "KNX RX"
@ -459,7 +459,7 @@
// xsns_18_pms5003.ino
#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter
#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter
#define D_PARTICALS_BEYOND "Particals"
#define D_PARTICALS_BEYOND "חלקיקים"
// xsns_32_mpu6050.ino
#define D_AX_AXIS "Accel. X-Axis"
@ -483,10 +483,10 @@
#define D_CALIBRATION "כיול"
//xsns_35_tx20.ino
#define D_TX20_WIND_DIRECTION "Wind Direction"
#define D_TX20_WIND_SPEED "Wind Speed"
#define D_TX20_WIND_SPEED_AVG "Wind Speed Avg"
#define D_TX20_WIND_SPEED_MAX "Wind Speed Max"
#define D_TX20_WIND_DIRECTION "כיוון הרוח"
#define D_TX20_WIND_SPEED "מהירות הרוח"
#define D_TX20_WIND_SPEED_AVG "מהירות הרוח ממוצעת"
#define D_TX20_WIND_SPEED_MAX "מהירות הרוח מקסימלית"
#define D_TX20_NORTH "N"
#define D_TX20_EAST "E"
#define D_TX20_SOUTH "S"

View File

@ -252,7 +252,7 @@ enum LightSchemes {LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_MA
enum XsnsFunctions {FUNC_SETTINGS_OVERRIDE, FUNC_MODULE_INIT, FUNC_PRE_INIT, FUNC_INIT,
FUNC_LOOP, FUNC_EVERY_50_MSECOND, FUNC_EVERY_100_MSECOND, FUNC_EVERY_200_MSECOND, FUNC_EVERY_250_MSECOND, FUNC_EVERY_SECOND,
FUNC_PREP_BEFORE_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_APPEND, FUNC_SAVE_BEFORE_RESTART, FUNC_COMMAND, FUNC_COMMAND_SENSOR, FUNC_COMMAND_DRIVER,
FUNC_PREP_BEFORE_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_SENSOR, FUNC_SAVE_BEFORE_RESTART, FUNC_COMMAND, FUNC_COMMAND_SENSOR, FUNC_COMMAND_DRIVER,
FUNC_MQTT_SUBSCRIBE, FUNC_MQTT_INIT, FUNC_MQTT_DATA,
FUNC_SET_POWER, FUNC_SET_DEVICE_POWER, FUNC_SHOW_SENSOR,
FUNC_RULES_PROCESS, FUNC_SERIAL, FUNC_FREE_MEM, FUNC_BUTTON_PRESSED,

View File

@ -245,7 +245,9 @@ void KNX_CB_Action(message_t const &msg, void *arg);
#define USE_SPI // Hardware SPI using GPIO12(MISO), GPIO13(MOSI) and GPIO14(CLK) in addition to two user selectable GPIOs(CS and DC)
#define USE_DISPLAY_ILI9341 // [DisplayModel 4] Enable ILI9341 Tft 480x320 display (+19k code)
#ifndef ARDUINO_ESP8266_RELEASE_2_3_0 // There is not enough spare RAM with core 2.3.0 to support the following
#define USE_DISPLAY_EPAPER_29 // [DisplayModel 5] Enable e-paper 2.9 inch display (+19k code)
#endif
#undef USE_ARILUX_RF // Remove support for Arilux RF remote controller (-0k8 code, 252 iram (non 2.3.0))
#undef USE_RF_FLASH // Remove support for flashing the EFM8BB1 chip on the Sonoff RF Bridge. C2CK must be connected to GPIO4, C2D to GPIO5 on the PCB (-3k code)

View File

@ -20,7 +20,7 @@
#ifndef _SONOFF_VERSION_H_
#define _SONOFF_VERSION_H_
#define VERSION 0x06040116
#define VERSION 0x06050001
#define D_PROGRAMNAME "Sonoff-Tasmota"
#define D_AUTHOR "Theo Arends"

View File

@ -376,7 +376,6 @@ const char HTTP_COUNTER[] PROGMEM =
"<br/><div id='t' name='t' style='text-align:center;'></div>";
const char HTTP_END[] PROGMEM =
"<br/>"
"<div style='text-align:right;font-size:11px;'><hr/><a href='" D_WEBLINK "' target='_blank' style='color:#aaa;'>" D_PROGRAMNAME " %s " D_BY " " D_AUTHOR "</a></div>"
"</div>"
"</body>"
@ -629,13 +628,9 @@ void WSContentFlush()
}
}
void WSContentSend_P(const char* formatP, ...) // Content send snprintf_P char data
void _WSContentSendBuffer(void)
{
// This uses char strings. Be aware of sending %% if % is needed
va_list arg;
va_start(arg, formatP);
int len = vsnprintf_P(mqtt_data, sizeof(mqtt_data), formatP, arg);
va_end(arg);
int len = strlen(mqtt_data);
if (0 == len) { // No content
return;
@ -656,6 +651,36 @@ void WSContentSend_P(const char* formatP, ...) // Content send snprintf_P ch
}
}
void WSContentSend_P(const char* formatP, ...) // Content send snprintf_P char data
{
// This uses char strings. Be aware of sending %% if % is needed
va_list arg;
va_start(arg, formatP);
vsnprintf_P(mqtt_data, sizeof(mqtt_data), formatP, arg);
va_end(arg);
_WSContentSendBuffer();
}
void WSContentSend_PD(const char* formatP, ...) // Content send snprintf_P char data checked for decimal separator
{
// This uses char strings. Be aware of sending %% if % is needed
va_list arg;
va_start(arg, formatP);
int len = vsnprintf_P(mqtt_data, sizeof(mqtt_data), formatP, arg);
va_end(arg);
if (D_DECIMAL_SEPARATOR[0] != '.') {
for (int i = 0; i < len; i++) {
if ('.' == mqtt_data[i]) {
mqtt_data[i] = D_DECIMAL_SEPARATOR[0];
}
}
}
_WSContentSendBuffer();
}
void WSContentStart_P(const char* title, bool auth)
{
if (auth && (Settings.web_password[0] != 0) && !WebServer->authenticate(WEB_USERNAME, Settings.web_password)) {
@ -940,20 +965,11 @@ bool HandleRootStatusRefresh(void)
ExecuteWebCommand(svalue, SRC_WEBGUI);
}
mqtt_data[0] = '\0';
XsnsCall(FUNC_WEB_APPEND);
if (D_DECIMAL_SEPARATOR[0] != '.') {
for (uint16_t i = 0; i < strlen(mqtt_data); i++) {
if ('.' == mqtt_data[i]) {
mqtt_data[i] = D_DECIMAL_SEPARATOR[0];
}
}
}
char stemp[strlen(mqtt_data) +1];
memcpy(stemp, mqtt_data, sizeof(stemp));
WSContentBegin(200, CT_HTML);
WSContentSend_P(PSTR("{t}%s</table>"), stemp);
WSContentSend_P(PSTR("{t}"));
XsnsCall(FUNC_WEB_SENSOR);
WSContentSend_P(PSTR("</table>"));
if (devices_present) {
WSContentSend_P(PSTR("{t}<tr>"));
uint8_t fsize = (devices_present < 5) ? 70 - (devices_present * 8) : 32;

View File

@ -548,20 +548,20 @@ void EnergySnsInit(void)
}
#ifdef USE_WEBSERVER
const char HTTP_ENERGY_SNS1[] PROGMEM = "%s"
const char HTTP_ENERGY_SNS1[] PROGMEM =
"{s}" D_VOLTAGE "{m}%s " D_UNIT_VOLT "{e}"
"{s}" D_CURRENT "{m}%s " D_UNIT_AMPERE "{e}"
"{s}" D_POWERUSAGE "{m}%s " D_UNIT_WATT "{e}";
const char HTTP_ENERGY_SNS2[] PROGMEM = "%s"
const char HTTP_ENERGY_SNS2[] PROGMEM =
"{s}" D_POWERUSAGE_APPARENT "{m}%s " D_UNIT_VA "{e}"
"{s}" D_POWERUSAGE_REACTIVE "{m}%s " D_UNIT_VAR "{e}"
"{s}" D_POWER_FACTOR "{m}%s{e}";
const char HTTP_ENERGY_SNS3[] PROGMEM = "%s"
const char HTTP_ENERGY_SNS3[] PROGMEM =
"{s}" D_FREQUENCY "{m}%s " D_UNIT_HERTZ "{e}";
const char HTTP_ENERGY_SNS4[] PROGMEM = "%s"
const char HTTP_ENERGY_SNS4[] PROGMEM =
"{s}" D_ENERGY_TODAY "{m}%s " D_UNIT_KILOWATTHOUR "{e}"
"{s}" D_ENERGY_YESTERDAY "{m}%s " D_UNIT_KILOWATTHOUR "{e}"
"{s}" D_ENERGY_TOTAL "{m}%s " D_UNIT_KILOWATTHOUR "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
@ -666,12 +666,12 @@ void EnergyShow(bool json)
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_ENERGY_SNS1, mqtt_data, voltage_chr, current_chr, active_power_chr);
WSContentSend_PD(HTTP_ENERGY_SNS1, voltage_chr, current_chr, active_power_chr);
if (!energy_type_dc) {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_ENERGY_SNS2, mqtt_data, apparent_power_chr, reactive_power_chr, power_factor_chr);
if (!isnan(energy_frequency)) { snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_ENERGY_SNS3, mqtt_data, frequency_chr); }
WSContentSend_PD(HTTP_ENERGY_SNS2, apparent_power_chr, reactive_power_chr, power_factor_chr);
if (!isnan(energy_frequency)) { WSContentSend_PD(HTTP_ENERGY_SNS3, frequency_chr); }
}
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_ENERGY_SNS4, mqtt_data, energy_daily_chr, energy_yesterday_chr, energy_total_chr);
WSContentSend_PD(HTTP_ENERGY_SNS4, energy_daily_chr, energy_yesterday_chr, energy_total_chr);
#endif // USE_WEBSERVER
}
}
@ -722,7 +722,7 @@ bool Xsns03(uint8_t function)
EnergyShow(true);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
EnergyShow(false);
break;
#endif // USE_WEBSERVER

View File

@ -86,7 +86,7 @@ void CounterInit(void)
#ifdef USE_WEBSERVER
const char HTTP_SNS_COUNTER[] PROGMEM =
"%s{s}" D_COUNTER "%d{m}%s%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}" D_COUNTER "%d{m}%s%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#endif // USE_WEBSERVER
void CounterShow(bool json)
@ -121,7 +121,7 @@ void CounterShow(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_COUNTER, mqtt_data, i +1, counter, (bitRead(Settings.pulse_counter_type, i)) ? " " D_UNIT_SECOND : "");
WSContentSend_PD(HTTP_SNS_COUNTER, i +1, counter, (bitRead(Settings.pulse_counter_type, i)) ? " " D_UNIT_SECOND : "");
#endif // USE_WEBSERVER
}
}
@ -152,7 +152,7 @@ bool Xsns01(uint8_t function)
CounterShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
CounterShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -58,7 +58,7 @@ void AdcShow(bool json)
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"ANALOG\":{\"A0\":%d}"), mqtt_data, analog);
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ANALOG, mqtt_data, "", 0, analog);
WSContentSend_PD(HTTP_SNS_ANALOG, "", 0, analog);
#endif // USE_WEBSERVER
}
}
@ -82,7 +82,7 @@ bool Xsns02(uint8_t function)
AdcShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
AdcShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -105,7 +105,7 @@ void SonoffScSerialInput(char *rcvstat)
#ifdef USE_WEBSERVER
const char HTTP_SNS_SCPLUS[] PROGMEM =
"%s{s}" D_LIGHT "{m}%d%%{e}{s}" D_NOISE "{m}%d%%{e}{s}" D_AIR_QUALITY "{m}%d%%{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}" D_LIGHT "{m}%d%%{e}{s}" D_NOISE "{m}%d%%{e}{s}" D_AIR_QUALITY "{m}%d%%{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#endif // USE_WEBSERVER
void SonoffScShow(bool json)
@ -140,9 +140,9 @@ void SonoffScShow(bool json)
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, "", temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, "", humidity);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_SCPLUS, mqtt_data, sc_value[2], sc_value[3], sc_value[4]);
WSContentSend_PD(HTTP_SNS_TEMP, "", temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, "", humidity);
WSContentSend_PD(HTTP_SNS_SCPLUS, sc_value[2], sc_value[3], sc_value[4]);
#endif // USE_WEBSERVER
}
}
@ -165,7 +165,7 @@ bool Xsns04(uint8_t function)
SonoffScShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
SonoffScShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -218,7 +218,7 @@ void Ds18b20Show(bool json)
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, ds18b20_types, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_TEMP, ds18b20_types, temperature, TempUnit());
#endif // USE_WEBSERVER
}
}
@ -241,7 +241,7 @@ bool Xsns05(uint8_t function)
Ds18b20Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Ds18b20Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -452,7 +452,7 @@ void Ds18x20Show(bool json)
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, ds18x20_types, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_TEMP, ds18x20_types, temperature, TempUnit());
#endif // USE_WEBSERVER
}
}
@ -479,7 +479,7 @@ bool Xsns05(uint8_t function)
Ds18x20Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Ds18x20Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -198,7 +198,7 @@ void Ds18x20Show(bool json)
#ifdef USE_WEBSERVER
} else {
snprintf_P(stemp, sizeof(stemp), PSTR("%s-%d"), ds18x20_types, i +1);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, stemp, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_TEMP, stemp, temperature, TempUnit());
#endif // USE_WEBSERVER
}
}
@ -233,7 +233,7 @@ bool Xsns05(uint8_t function)
Ds18x20Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Ds18x20Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -227,8 +227,8 @@ void DhtShow(bool json)
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, Dht[i].stype, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, Dht[i].stype, humidity);
WSContentSend_PD(HTTP_SNS_TEMP, Dht[i].stype, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, Dht[i].stype, humidity);
#endif // USE_WEBSERVER
}
}
@ -254,7 +254,7 @@ bool Xsns06(uint8_t function)
DhtShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
DhtShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -208,8 +208,8 @@ void ShtShow(bool json)
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, sht_types, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, sht_types, humidity);
WSContentSend_PD(HTTP_SNS_TEMP, sht_types, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, sht_types, humidity);
#endif // USE_WEBSERVER
}
}
@ -236,7 +236,7 @@ bool Xsns07(uint8_t function)
ShtShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
ShtShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -268,8 +268,8 @@ void HtuShow(bool json)
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, htu_types, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, htu_types, humidity);
WSContentSend_PD(HTTP_SNS_TEMP, htu_types, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, htu_types, humidity);
#endif // USE_WEBSERVER
}
}
@ -295,7 +295,7 @@ bool Xsns08(uint8_t function)
HtuShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
HtuShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -597,19 +597,20 @@ void BmpShow(bool json)
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, name, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_TEMP, name, temperature, TempUnit());
if (bmp_sensors[bmp_idx].bmp_model >= 2) {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, name, humidity);
WSContentSend_PD(HTTP_SNS_HUM, name, humidity);
}
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_PRESSURE, mqtt_data, name, pressure, PressureUnit().c_str());
WSContentSend_PD(HTTP_SNS_PRESSURE, name, pressure, PressureUnit().c_str());
if (Settings.altitude != 0) {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_SEAPRESSURE, mqtt_data, name, sea_pressure, PressureUnit().c_str());
WSContentSend_PD(HTTP_SNS_SEAPRESSURE, name, sea_pressure, PressureUnit().c_str());
}
#ifdef USE_BME680
if (bmp_sensors[bmp_idx].bmp_model >= 3) {
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s{s}%s " D_GAS "{m}%s " D_UNIT_KILOOHM "{e}"), mqtt_data, name, gas_resistance);
WSContentSend_PD(PSTR("{s}%s " D_GAS "{m}%s " D_UNIT_KILOOHM "{e}"), name, gas_resistance);
}
#endif // USE_BME680
#endif // USE_WEBSERVER
}
}
@ -636,7 +637,7 @@ bool Xsns09(uint8_t function)
BmpShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
BmpShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -100,7 +100,7 @@ void Bh1750Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ILLUMINANCE, mqtt_data, bh1750_types, bh1750_illuminance);
WSContentSend_PD(HTTP_SNS_ILLUMINANCE, bh1750_types, bh1750_illuminance);
#endif // USE_WEBSERVER
}
}
@ -126,7 +126,7 @@ bool Xsns10(uint8_t function)
Bh1750Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Bh1750Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -256,11 +256,11 @@ double Veml6070UvPower(double uvrisk)
#ifdef USE_WEBSERVER
// {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#ifdef USE_VEML6070_SHOW_RAW
const char HTTP_SNS_UV_LEVEL[] PROGMEM = "%s{s}VEML6070 " D_UV_LEVEL "{m}%s " D_UNIT_INCREMENTS "{e}";
const char HTTP_SNS_UV_LEVEL[] PROGMEM = "{s}VEML6070 " D_UV_LEVEL "{m}%s " D_UNIT_INCREMENTS "{e}";
#endif // USE_VEML6070_SHOW_RAW
// different uv index level texts
const char HTTP_SNS_UV_INDEX[] PROGMEM = "%s{s}VEML6070 " D_UV_INDEX " {m}%s %s{e}";
const char HTTP_SNS_UV_POWER[] PROGMEM = "%s{s}VEML6070 " D_UV_POWER "{m}%s " D_UNIT_WATT_METER_QUADRAT "{e}";
const char HTTP_SNS_UV_INDEX[] PROGMEM = "{s}VEML6070 " D_UV_INDEX "{m}%s %s{e}";
const char HTTP_SNS_UV_POWER[] PROGMEM = "{s}VEML6070 " D_UV_POWER "{m}%s " D_UNIT_WATT_METER_QUADRAT "{e}";
#endif // USE_WEBSERVER
/********************************************************************************************/
@ -289,10 +289,10 @@ void Veml6070Show(bool json)
#ifdef USE_WEBSERVER
} else {
#ifdef USE_VEML6070_SHOW_RAW
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_UV_LEVEL, mqtt_data, str_uvlevel);
WSContentSend_PD(HTTP_SNS_UV_LEVEL, str_uvlevel);
#endif // USE_VEML6070_SHOW_RAW
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_UV_INDEX, mqtt_data, str_uvrisk, str_uvrisk_text);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_UV_POWER, mqtt_data, str_uvpower);
WSContentSend_PD(HTTP_SNS_UV_INDEX, str_uvrisk, str_uvrisk_text);
WSContentSend_PD(HTTP_SNS_UV_POWER, str_uvpower);
#endif // USE_WEBSERVER
}
}
@ -319,7 +319,7 @@ bool Xsns11(uint8_t function)
Veml6070Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Veml6070Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -203,7 +203,7 @@ void Ads1115toString(uint8_t address)
snprintf_P(label, sizeof(label), "ADS1115(%02x)", address);
for (uint8_t i = 0; i < 4; i++) {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ANALOG, mqtt_data, label, i, ads1115_values[i]);
WSContentSend_PD(HTTP_SNS_ANALOG, label, i, ads1115_values[i]);
}
}
@ -255,7 +255,7 @@ bool Xsns12(uint8_t function)
Ads1115Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Ads1115Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -115,7 +115,7 @@ void Ads1115Show(bool json)
strlcpy(stemp, ",", sizeof(stemp));
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ANALOG, mqtt_data, "ADS1115", i, adc_value);
WSContentSend_PD(HTTP_SNS_ANALOG, "ADS1115", i, adc_value);
#endif // USE_WEBSERVER
}
}
@ -144,7 +144,7 @@ bool Xsns12(uint8_t function)
Ads1115Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Ads1115Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -222,7 +222,7 @@ void Ina219EverySecond(void)
}
#ifdef USE_WEBSERVER
const char HTTP_SNS_INA219_DATA[] PROGMEM = "%s"
const char HTTP_SNS_INA219_DATA[] PROGMEM =
"{s}INA219 " D_VOLTAGE "{m}%s " D_UNIT_VOLT "{e}"
"{s}INA219 " D_CURRENT "{m}%s " D_UNIT_AMPERE "{e}"
"{s}INA219 " D_POWERUSAGE "{m}%s " D_UNIT_WATT "{e}";
@ -250,7 +250,7 @@ void Ina219Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_INA219_DATA, mqtt_data, voltage, current, power);
WSContentSend_PD(HTTP_SNS_INA219_DATA, voltage, current, power);
#endif // USE_WEBSERVER
}
}
@ -281,7 +281,7 @@ bool Xsns13(uint8_t function)
Ina219Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Ina219Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -126,8 +126,8 @@ void Sht3xShow(bool json)
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, types, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, types, humidity);
WSContentSend_PD(HTTP_SNS_TEMP, types, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, types, humidity);
#endif // USE_WEBSERVER
}
}
@ -152,7 +152,7 @@ bool Xsns14(uint8_t function)
Sht3xShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Sht3xShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -351,8 +351,8 @@ void MhzShow(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_CO2, mqtt_data, types, mhz_last_ppm);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, types, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_CO2, types, mhz_last_ppm);
WSContentSend_PD(HTTP_SNS_TEMP, types, temperature, TempUnit());
#endif // USE_WEBSERVER
}
}
@ -382,7 +382,7 @@ bool Xsns15(uint8_t function)
MhzShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
MhzShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -95,7 +95,7 @@ void Tsl2561EverySecond(void)
#ifdef USE_WEBSERVER
const char HTTP_SNS_TSL2561[] PROGMEM =
"%s{s}TSL2561 " D_ILLUMINANCE "{m}%u.%03u " D_UNIT_LUX "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}TSL2561 " D_ILLUMINANCE "{m}%u.%03u " D_UNIT_LUX "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#endif // USE_WEBSERVER
void Tsl2561Show(bool json)
@ -109,7 +109,7 @@ void Tsl2561Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TSL2561, mqtt_data, tsl2561_milliLux / 1000, tsl2561_milliLux % 1000);
WSContentSend_PD(HTTP_SNS_TSL2561, tsl2561_milliLux / 1000, tsl2561_milliLux % 1000);
#endif // USE_WEBSERVER
}
}
@ -135,7 +135,7 @@ bool Xsns16(uint8_t function)
Tsl2561Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Tsl2561Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -159,10 +159,10 @@ void SenseairShow(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_CO2, mqtt_data, senseair_types, senseair_co2);
WSContentSend_PD(HTTP_SNS_CO2, senseair_types, senseair_co2);
if (senseair_type != 2) {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, senseair_types, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, senseair_types, humidity);
WSContentSend_PD(HTTP_SNS_TEMP, senseair_types, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, senseair_types, humidity);
}
#endif // USE_WEBSERVER
}
@ -188,7 +188,7 @@ bool Xsns17(uint8_t function)
SenseairShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
SenseairShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -113,7 +113,7 @@ void PmsInit(void)
}
#ifdef USE_WEBSERVER
const char HTTP_PMS5003_SNS[] PROGMEM = "%s"
const char HTTP_PMS5003_SNS[] PROGMEM =
// "{s}PMS5003 " D_STANDARD_CONCENTRATION " 1 " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
// "{s}PMS5003 " D_STANDARD_CONCENTRATION " 2.5 " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
// "{s}PMS5003 " D_STANDARD_CONCENTRATION " 10 " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
@ -145,7 +145,7 @@ void PmsShow(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_PMS5003_SNS, mqtt_data,
WSContentSend_PD(HTTP_PMS5003_SNS,
// pms_data.pm10_standard, pms_data.pm25_standard, pms_data.pm100_standard,
pms_data.pm10_env, pms_data.pm25_env, pms_data.pm100_env,
pms_data.particles_03um, pms_data.particles_05um, pms_data.particles_10um, pms_data.particles_25um, pms_data.particles_50um, pms_data.particles_100um);
@ -174,7 +174,7 @@ bool Xsns18(uint8_t function)
PmsShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
PmsShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -57,7 +57,7 @@ char* measure_gas(int gas_type, char* buffer)
}
#ifdef USE_WEBSERVER
const char HTTP_MGS_GAS[] PROGMEM = "%s{s}MGS %s{m}%s " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_MGS_GAS[] PROGMEM = "{s}MGS %s{m}%s " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#endif // USE_WEBSERVER
void MGSShow(bool json)
@ -74,14 +74,14 @@ void MGSShow(bool json)
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"C2H5OH\":%s}"), mqtt_data, measure_gas(C2H5OH, buffer));
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_MGS_GAS, mqtt_data, "NH3", measure_gas(NH3, buffer));
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_MGS_GAS, mqtt_data, "CO", measure_gas(CO, buffer));
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_MGS_GAS, mqtt_data, "NO2", measure_gas(NO2, buffer));
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_MGS_GAS, mqtt_data, "C3H8", measure_gas(C3H8, buffer));
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_MGS_GAS, mqtt_data, "C4H10", measure_gas(C4H10, buffer));
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_MGS_GAS, mqtt_data, "CH4", measure_gas(GAS_CH4, buffer));
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_MGS_GAS, mqtt_data, "H2", measure_gas(H2, buffer));
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_MGS_GAS, mqtt_data, "C2H5OH", measure_gas(C2H5OH, buffer));
WSContentSend_PD(HTTP_MGS_GAS, "NH3", measure_gas(NH3, buffer));
WSContentSend_PD(HTTP_MGS_GAS, "CO", measure_gas(CO, buffer));
WSContentSend_PD(HTTP_MGS_GAS, "NO2", measure_gas(NO2, buffer));
WSContentSend_PD(HTTP_MGS_GAS, "C3H8", measure_gas(C3H8, buffer));
WSContentSend_PD(HTTP_MGS_GAS, "C4H10", measure_gas(C4H10, buffer));
WSContentSend_PD(HTTP_MGS_GAS, "CH4", measure_gas(GAS_CH4, buffer));
WSContentSend_PD(HTTP_MGS_GAS, "H2", measure_gas(H2, buffer));
WSContentSend_PD(HTTP_MGS_GAS, "C2H5OH", measure_gas(C2H5OH, buffer));
#endif // USE_WEBSERVER
}
}
@ -107,7 +107,7 @@ bool Xsns19(uint8_t function)
if (detected) MGSShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
if (detected) MGSShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -180,7 +180,7 @@ void NovaSdsInit(void)
}
#ifdef USE_WEBSERVER
const char HTTP_SDS0X1_SNS[] PROGMEM = "%s"
const char HTTP_SDS0X1_SNS[] PROGMEM =
"{s}SDS0X1 " D_ENVIRONMENTAL_CONCENTRATION " 2.5 " D_UNIT_MICROMETER "{m}%s " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
"{s}SDS0X1 " D_ENVIRONMENTAL_CONCENTRATION " 10 " D_UNIT_MICROMETER "{m}%s " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#endif // USE_WEBSERVER
@ -204,7 +204,7 @@ void NovaSdsShow(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SDS0X1_SNS, mqtt_data, pm2_5, pm10);
WSContentSend_PD(HTTP_SDS0X1_SNS, pm2_5, pm10);
#endif // USE_WEBSERVER
}
}
@ -230,7 +230,7 @@ bool Xsns20(uint8_t function)
NovaSdsShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
NovaSdsShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -63,7 +63,7 @@ void Sgp30Update(void) // Perform every second to ensure proper operation of th
}
}
const char HTTP_SNS_SGP30[] PROGMEM = "%s"
const char HTTP_SNS_SGP30[] PROGMEM =
"{s}SGP30 " D_ECO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}SGP30 " D_TVOC "{m}%d " D_UNIT_PARTS_PER_BILLION "{e}";
@ -77,7 +77,7 @@ void Sgp30Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_SGP30, mqtt_data, sgp.eCO2, sgp.TVOC);
WSContentSend_PD(HTTP_SNS_SGP30, sgp.eCO2, sgp.TVOC);
#endif
}
}
@ -100,7 +100,7 @@ bool Xsns21(uint8_t function)
Sgp30Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Sgp30Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -45,7 +45,7 @@ void Sr04Init(void)
#ifdef USE_WEBSERVER
const char HTTP_SNS_DISTANCE[] PROGMEM =
"%s{s}SR04 " D_DISTANCE "{m}%s" D_UNIT_CENTIMETER "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}SR04 " D_DISTANCE "{m}%s" D_UNIT_CENTIMETER "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#endif // USE_WEBSERVER
void Sr04Show(bool json)
@ -65,7 +65,7 @@ void Sr04Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_DISTANCE, mqtt_data, distance_chr);
WSContentSend_PD(HTTP_SNS_DISTANCE, distance_chr);
#endif // USE_WEBSERVER
}
}
@ -88,7 +88,7 @@ bool Xsns22(uint8_t function)
Sr04Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Sr04Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -260,7 +260,7 @@ void SDM120Init(void)
}
#ifdef USE_WEBSERVER
const char HTTP_SNS_SDM120_DATA[] PROGMEM = "%s"
const char HTTP_SNS_SDM120_DATA[] PROGMEM =
"{s}SDM120 " D_VOLTAGE "{m}%s " D_UNIT_VOLT "{e}"
"{s}SDM120 " D_CURRENT "{m}%s " D_UNIT_AMPERE "{e}"
"{s}SDM120 " D_POWERUSAGE_ACTIVE "{m}%s " D_UNIT_WATT "{e}"
@ -330,9 +330,9 @@ void SDM120Show(bool json)
#ifdef USE_WEBSERVER
} else {
#ifdef USE_SDM220
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_SDM120_DATA, mqtt_data, voltage, current, active_power, apparent_power, reactive_power, power_factor, frequency, energy_total, phase_angle,import_active,export_active,import_reactive,export_reactive,total_reactive);
WSContentSend_PD(HTTP_SNS_SDM120_DATA, voltage, current, active_power, apparent_power, reactive_power, power_factor, frequency, energy_total, phase_angle,import_active,export_active,import_reactive,export_reactive,total_reactive);
#else
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_SDM120_DATA, mqtt_data, voltage, current, active_power, apparent_power, reactive_power, power_factor, frequency, energy_total);
WSContentSend_PD(HTTP_SNS_SDM120_DATA, voltage, current, active_power, apparent_power, reactive_power, power_factor, frequency, energy_total);
#endif // USE_SDM220
#endif // USE_WEBSERVER
}
@ -358,7 +358,7 @@ bool Xsns23(uint8_t function)
SDM120Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
SDM120Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -316,7 +316,7 @@ void Si1145Update(void)
}
#ifdef USE_WEBSERVER
const char HTTP_SNS_SI1145[] PROGMEM = "%s"
const char HTTP_SNS_SI1145[] PROGMEM =
"{s}SI1145 " D_ILLUMINANCE "{m}%d " D_UNIT_LUX "{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}SI1145 " D_INFRARED "{m}%d " D_UNIT_LUX "{e}"
"{s}SI1145 " D_UV_INDEX "{m}%d.%d{e}";
@ -336,7 +336,7 @@ void Si1145Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_SI1145, mqtt_data, visible, infrared, uvindex /100, uvindex %100);
WSContentSend_PD(HTTP_SNS_SI1145, visible, infrared, uvindex /100, uvindex %100);
#endif
}
} else {
@ -361,7 +361,7 @@ bool Xsns24(uint8_t function)
Si1145Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Si1145Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -257,7 +257,7 @@ void SDM630Init(void)
}
#ifdef USE_WEBSERVER
const char HTTP_SNS_SDM630_DATA[] PROGMEM = "%s"
const char HTTP_SNS_SDM630_DATA[] PROGMEM =
"{s}SDM630 " D_VOLTAGE "{m}%s/%s/%s " D_UNIT_VOLT "{e}"
"{s}SDM630 " D_CURRENT "{m}%s/%s/%s " D_UNIT_AMPERE "{e}"
"{s}SDM630 " D_POWERUSAGE_ACTIVE "{m}%s/%s/%s " D_UNIT_WATT "{e}"
@ -312,7 +312,7 @@ void SDM630Show(bool json)
current_l1, current_l2, current_l3);
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_SDM630_DATA, mqtt_data,
WSContentSend_PD(HTTP_SNS_SDM630_DATA,
voltage_l1, voltage_l2, voltage_l3, current_l1, current_l2, current_l3,
active_power_l1, active_power_l2, active_power_l3,
reactive_power_l1, reactive_power_l2, reactive_power_l3,
@ -341,7 +341,7 @@ bool Xsns25(uint8_t function)
SDM630Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
SDM630Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -91,7 +91,7 @@ void LM75ADShow(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, "LM75AD", temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_TEMP, "LM75AD", temperature, TempUnit());
#endif // USE_WEBSERVER
}
}
@ -114,7 +114,7 @@ bool Xsns26(uint8_t function)
LM75ADShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
LM75ADShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -77,7 +77,7 @@ volatile uint8_t recovery_loop_counter = 0; //count number of stateloops to swi
bool APDS9960_overload = false;
#ifdef USE_WEBSERVER
const char HTTP_APDS_9960_SNS[] PROGMEM = "%s"
const char HTTP_APDS_9960_SNS[] PROGMEM =
"{s}" "Red" "{m}%s{e}"
"{s}" "Green" "{m}%s{e}"
"{s}" "Blue" "{m}%s{e}"
@ -1963,7 +1963,7 @@ void APDS9960_show(bool json)
mqtt_data, APDS9960stype, red_chr, green_chr, blue_chr, ambient_chr, cct_chr, prox_chr);
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_APDS_9960_SNS, mqtt_data, red_chr, green_chr, blue_chr, ambient_chr, cct_chr, prox_chr );
WSContentSend_PD(HTTP_APDS_9960_SNS, red_chr, green_chr, blue_chr, ambient_chr, cct_chr, prox_chr );
#endif // USE_WEBSERVER
}
}
@ -2055,7 +2055,7 @@ bool Xsns27(uint8_t function)
APDS9960_show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
APDS9960_show(0);
break;
#endif // USE_WEBSERVER

View File

@ -215,7 +215,7 @@ bool Xsns28(uint8_t function)
TmShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
TmShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -694,7 +694,7 @@ bool MCP230xx_Command(void) {
#ifdef USE_MCP230xx_DISPLAYOUTPUT
const char HTTP_SNS_MCP230xx_OUTPUT[] PROGMEM = "%s{s}MCP230XX D%d{m}%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_MCP230xx_OUTPUT[] PROGMEM = "{s}MCP230XX D%d{m}%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
void MCP230xx_UpdateWebData(void) {
uint8_t gpio1 = MCP230xx_readGPIO(0);
@ -707,7 +707,7 @@ void MCP230xx_UpdateWebData(void) {
if (Settings.mcp230xx_config[pin].pinmode >= 5) {
char stt[7];
sprintf(stt,ConvertNumTxt((gpio>>pin)&1,Settings.mcp230xx_config[pin].pinmode));
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_MCP230xx_OUTPUT, mqtt_data, pin, stt);
WSContentSend_PD(HTTP_SNS_MCP230xx_OUTPUT, pin, stt);
}
}
}
@ -822,7 +822,7 @@ bool Xsns29(uint8_t function)
#ifdef USE_WEBSERVER
#ifdef USE_MCP230xx_OUTPUT
#ifdef USE_MCP230xx_DISPLAYOUTPUT
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
MCP230xx_UpdateWebData();
break;
#endif // USE_MCP230xx_DISPLAYOUTPUT

View File

@ -356,8 +356,8 @@ void Mpr121Show(struct mpr121 *pS, uint8_t function)
}
// Add buttons to web string
#ifdef USE_WEBSERVER
if (FUNC_WEB_APPEND == function) {
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s{s}MPR121%c Button%d{m}%d{e}"), mqtt_data, pS->id[i], j, BITC(i, j));
if (FUNC_WEB_SENSOR == function) {
WSContentSend_PD(PSTR("{s}MPR121%c Button%d{m}%d{e}"), pS->id[i], j, BITC(i, j));
}
#endif // USE_WEBSERVER
@ -389,7 +389,7 @@ void Mpr121Show(struct mpr121 *pS, uint8_t function)
* FUNC_INIT to initialize a driver,
* FUNC_EVERY_50_MSECOND for near real-time operation,
* FUNC_JSON_APPEND for telemetry data and
* FUNC_WEB_APPEND for displaying data in the Tasmota web-interface
* FUNC_WEB_SENSOR for displaying data in the Tasmota web-interface
*
* @param byte function Tasmota function ID.
* @return bool ???
@ -426,8 +426,8 @@ bool Xsns30(uint8_t function)
#ifdef USE_WEBSERVER
// Show sensor data on main web page
case FUNC_WEB_APPEND:
Mpr121Show(&mpr121, FUNC_WEB_APPEND);
case FUNC_WEB_SENSOR:
Mpr121Show(&mpr121, FUNC_WEB_SENSOR);
break;
#endif // USE_WEBSERVER
}

View File

@ -77,7 +77,7 @@ void CCS811Update(void) // Perform every n second
}
}
const char HTTP_SNS_CCS811[] PROGMEM = "%s"
const char HTTP_SNS_CCS811[] PROGMEM =
"{s}CCS811 " D_ECO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}CCS811 " D_TVOC "{m}%d " D_UNIT_PARTS_PER_BILLION "{e}";
@ -91,7 +91,7 @@ void CCS811Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_CCS811, mqtt_data, eCO2, TVOC);
WSContentSend_PD(HTTP_SNS_CCS811, eCO2, TVOC);
#endif
}
}
@ -114,7 +114,7 @@ bool Xsns31(uint8_t function)
CCS811Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
CCS811Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -155,12 +155,13 @@ void MPU_6050Detect(void)
}
#ifdef USE_WEBSERVER
const char HTTP_SNS_AX_AXIS[] PROGMEM = "%s{s}%s " D_AX_AXIS "{m}%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_AY_AXIS[] PROGMEM = "%s{s}%s " D_AY_AXIS "{m}%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_AZ_AXIS[] PROGMEM = "%s{s}%s " D_AZ_AXIS "{m}%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_GX_AXIS[] PROGMEM = "%s{s}%s " D_GX_AXIS "{m}%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_GY_AXIS[] PROGMEM = "%s{s}%s " D_GY_AXIS "{m}%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_GZ_AXIS[] PROGMEM = "%s{s}%s " D_GZ_AXIS "{m}%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_AXIS[] PROGMEM =
"{s}" D_SENSOR_MPU6050 " " D_AX_AXIS "{m}%s{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}" D_SENSOR_MPU6050 " " D_AY_AXIS "{m}%s{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}" D_SENSOR_MPU6050 " " D_AZ_AXIS "{m}%s{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}" D_SENSOR_MPU6050 " " D_GX_AXIS "{m}%s{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}" D_SENSOR_MPU6050 " " D_GY_AXIS "{m}%s{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
"{s}" D_SENSOR_MPU6050 " " D_GZ_AXIS "{m}%s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
#endif // USE_WEBSERVER
#define D_JSON_AXIS_AX "AccelXAxis"
@ -211,13 +212,8 @@ void MPU_6050Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, D_SENSOR_MPU6050, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_AX_AXIS, mqtt_data, D_SENSOR_MPU6050, axis_ax);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_AY_AXIS, mqtt_data, D_SENSOR_MPU6050, axis_ay);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_AZ_AXIS, mqtt_data, D_SENSOR_MPU6050, axis_az);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_GX_AXIS, mqtt_data, D_SENSOR_MPU6050, axis_gx);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_GY_AXIS, mqtt_data, D_SENSOR_MPU6050, axis_gy);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_GZ_AXIS, mqtt_data, D_SENSOR_MPU6050, axis_gz);
WSContentSend_PD(HTTP_SNS_TEMP, D_SENSOR_MPU6050, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_AXIS, axis_ax, axis_ay, axis_az, axis_gx, axis_gy, axis_gz);
#endif // USE_WEBSERVER
}
}
@ -245,7 +241,7 @@ bool Xsns32(uint8_t function)
MPU_6050Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
MPU_6050Show(0);
MPU_6050PerformReading();
break;

View File

@ -321,11 +321,11 @@ void HxEvery100mSecond(void)
}
#ifdef USE_WEBSERVER
const char HTTP_HX711_WEIGHT[] PROGMEM = "%s"
const char HTTP_HX711_WEIGHT[] PROGMEM =
"{s}HX711 " D_WEIGHT "{m}%s " D_UNIT_KILOGRAM "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_HX711_COUNT[] PROGMEM = "%s"
const char HTTP_HX711_COUNT[] PROGMEM =
"{s}HX711 " D_COUNT "{m}%d{e}";
const char HTTP_HX711_CAL[] PROGMEM = "%s"
const char HTTP_HX711_CAL[] PROGMEM =
"{s}HX711 %s{m}{e}";
#endif // USE_WEBSERVER
@ -351,13 +351,13 @@ void HxShow(bool json)
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"HX711\":{\"" D_JSON_WEIGHT "\":%s%s}"), mqtt_data, weight_chr, scount);
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_HX711_WEIGHT, mqtt_data, weight_chr);
WSContentSend_PD(HTTP_HX711_WEIGHT, weight_chr);
if (count > 1) {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_HX711_COUNT, mqtt_data, count);
WSContentSend_PD(HTTP_HX711_COUNT, count);
}
if (hx_calibrate_step) {
char cal_text[30];
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_HX711_CAL, mqtt_data, GetTextIndexed(cal_text, sizeof(cal_text), hx_calibrate_msg, kHxCalibrationStates));
WSContentSend_PD(HTTP_HX711_CAL, GetTextIndexed(cal_text, sizeof(cal_text), hx_calibrate_msg, kHxCalibrationStates));
}
#endif // USE_WEBSERVER
}
@ -374,7 +374,7 @@ void HxShow(bool json)
const char S_CONFIGURE_HX711[] PROGMEM = D_CONFIGURE_HX711;
const char HTTP_BTN_MENU_MAIN_HX711[] PROGMEM =
"<br/><form action='" WEB_HANDLE_HX711 "' method='get'><button name='reset'>" D_RESET_HX711 "</button></form>";
"<p><form action='" WEB_HANDLE_HX711 "' method='get'><button name='reset'>" D_RESET_HX711 "</button></form></p>";
const char HTTP_BTN_MENU_HX711[] PROGMEM =
"<p><form action='" WEB_HANDLE_HX711 "' method='get'><button>" D_CONFIGURE_HX711 "</button></form></p>";
@ -485,7 +485,7 @@ bool Xsns34(uint8_t function)
HxShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
HxShow(0);
break;
#ifdef USE_HX711_GUI

View File

@ -39,7 +39,7 @@ extern "C" {
#ifdef USE_WEBSERVER
const char HTTP_SNS_TX20[] PROGMEM = "%s"
const char HTTP_SNS_TX20[] PROGMEM =
"{s}TX20 " D_TX20_WIND_SPEED "{m}%s " D_UNIT_KILOMETER_PER_HOUR "{e}"
"{s}TX20 " D_TX20_WIND_SPEED_AVG "{m}%s " D_UNIT_KILOMETER_PER_HOUR "{e}"
"{s}TX20 " D_TX20_WIND_SPEED_MAX "{m}%s " D_UNIT_KILOMETER_PER_HOUR "{e}"
@ -186,7 +186,7 @@ void Tx20Show(bool json)
mqtt_data, wind_speed_string, wind_speed_avg_string, wind_speed_max_string, wind_direction_string);
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TX20, mqtt_data, wind_speed_string, wind_speed_avg_string, wind_speed_max_string, wind_direction_string);
WSContentSend_PD(HTTP_SNS_TX20, wind_speed_string, wind_speed_avg_string, wind_speed_max_string, wind_direction_string);
#endif // USE_WEBSERVER
}
}
@ -211,7 +211,7 @@ bool Xsns35(uint8_t function)
Tx20Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Tx20Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -67,7 +67,7 @@ char MGC3130stype[8];
#ifdef USE_WEBSERVER
const char HTTP_MGC_3130_SNS[] PROGMEM = "%s"
const char HTTP_MGC_3130_SNS[] PROGMEM =
"{s}" "%s" "{m}%s{e}"
"{s}" "HwRev" "{m}%u.%u{e}"
"{s}" "loaderVer" "{m}%u.%u{e}"
@ -555,7 +555,7 @@ void MGC3130_show(bool json)
}
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_MGC_3130_SNS, mqtt_data, MGC3130stype, status_chr, hwRev[0], hwRev[1], loaderVersion[0], loaderVersion[1], loaderPlatform );
WSContentSend_PD(HTTP_MGC_3130_SNS, MGC3130stype, status_chr, hwRev[0], hwRev[1], loaderVersion[0], loaderVersion[1], loaderPlatform );
#endif // USE_WEBSERVER
}
}
@ -622,7 +622,7 @@ bool Xsns36(uint8_t function)
MGC3130_show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
MGC3130_show(0);
break;
#endif // USE_WEBSERVER

View File

@ -287,8 +287,8 @@ void RfSnsTheoV2Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, sensor, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ILLUMINANCE, mqtt_data, sensor, rfsns_theo_v2_t1[i].lux);
WSContentSend_PD(HTTP_SNS_TEMP, sensor, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_ILLUMINANCE, sensor, rfsns_theo_v2_t1[i].lux);
#endif // USE_WEBSERVER
}
}
@ -331,8 +331,8 @@ void RfSnsTheoV2Show(bool json)
}
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, sensor, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, sensor, humidity);
WSContentSend_PD(HTTP_SNS_TEMP, sensor, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, sensor, humidity);
#endif // USE_WEBSERVER
}
}
@ -539,11 +539,11 @@ uint8_t RfSnsAlectoCRC8(uint8_t *addr, uint8_t len)
}
#ifdef USE_WEBSERVER
const char HTTP_SNS_ALECTOV2[] PROGMEM = "%s"
const char HTTP_SNS_ALECTOV2[] PROGMEM =
"{s}" D_ALECTOV2 " " D_RAIN "{m}%s " D_UNIT_MILLIMETER "{e}"
"{s}" D_ALECTOV2 " " D_TX20_WIND_SPEED "{m}%s " D_UNIT_KILOMETER_PER_HOUR "{e}"
"{s}" D_ALECTOV2 " " D_TX20_WIND_SPEED_MAX "{m}%s " D_UNIT_KILOMETER_PER_HOUR "{e}";
const char HTTP_SNS_ALECTOV2_WDIR[] PROGMEM = "%s"
const char HTTP_SNS_ALECTOV2_WDIR[] PROGMEM =
"{s}" D_ALECTOV2 " " D_TX20_WIND_DIRECTION "{m}%s{e}";
#endif
@ -588,11 +588,11 @@ void RfSnsAlectoV2Show(bool json)
}
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, D_ALECTOV2, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, D_ALECTOV2, humidity);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ALECTOV2, mqtt_data, rain, wind, gust);
WSContentSend_PD(HTTP_SNS_TEMP, D_ALECTOV2, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, D_ALECTOV2, humidity);
WSContentSend_PD(HTTP_SNS_ALECTOV2, rain, wind, gust);
if (rfsns_alecto_v2->type) {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ALECTOV2_WDIR, mqtt_data, wdir);
WSContentSend_PD(HTTP_SNS_ALECTOV2_WDIR, wdir);
}
#endif // USE_WEBSERVER
}
@ -680,7 +680,7 @@ bool Xsns37(uint8_t function)
RfSnsShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
RfSnsShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -264,9 +264,9 @@ void AzShow(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_CO2, mqtt_data, ktype, az_co2);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, ktype, temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, ktype, humidity);
WSContentSend_PD(HTTP_SNS_CO2, ktype, az_co2);
WSContentSend_PD(HTTP_SNS_TEMP, ktype, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, ktype, humidity);
#endif // USE_WEBSERVER
}
}
@ -291,7 +291,7 @@ bool Xsns38(uint8_t function)
AzShow(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
AzShow(0);
break;
#endif // USE_WEBSERVER

View File

@ -139,7 +139,7 @@ void MAX31855_Show(bool Json){
#endif // USE_KNX
} else {
#ifdef USE_WEBSERVER
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, "MAX31855", probetemp, TempUnit());
WSContentSend_PD(HTTP_SNS_TEMP, "MAX31855", probetemp, TempUnit());
#endif // USE_WEBSERVER
}
}
@ -164,7 +164,7 @@ bool Xsns39(uint8_t function)
MAX31855_Show(true);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
MAX31855_Show(false);
break;
#endif // USE_WEBSERVER

View File

@ -139,8 +139,7 @@ void Max4409Show(bool json)
#ifdef USE_WEBSERVER
} else {
// show integer value for lx on web-server
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ILLUMINANCE,
mqtt_data, max44009_types, (int)max44009_illuminance);
WSContentSend_PD(HTTP_SNS_ILLUMINANCE, max44009_types, (int)max44009_illuminance);
#endif // USE_WEBSERVER
}
}
@ -166,7 +165,7 @@ bool Xsns41(uint8_t function)
Max4409Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Max4409Show(0);
break;
#endif // USE_WEBSERVER

View File

@ -452,10 +452,10 @@ void Scd30Show(bool json)
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_CO2EAVG, mqtt_data, "SCD30", scd30_CO2EAvg);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_CO2, mqtt_data, "SCD30", scd30_CO2);
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, "SCD30", temperature, TempUnit());
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_HUM, mqtt_data, "SCD30", humidity);
WSContentSend_PD(HTTP_SNS_CO2EAVG, "SCD30", scd30_CO2EAvg);
WSContentSend_PD(HTTP_SNS_CO2, "SCD30", scd30_CO2);
WSContentSend_PD(HTTP_SNS_TEMP, "SCD30", temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, "SCD30", humidity);
#endif // USE_WEBSERVER
}
}
@ -481,7 +481,7 @@ bool Xsns42(byte function)
Scd30Show(1);
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_APPEND:
case FUNC_WEB_SENSOR:
Scd30Show(0);
break;
#endif // USE_WEBSERVER