mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-03 06:54:16 +01:00
Page:
SensorsConfiguration
Pages
3rd Party Plugins
Adding Custom IR Codes
Alexa
ArduinoIDE
Arilux LC12
Avatar Controls Smart Stecker EU
Backup
Binaries
Build and update from Visual Studio Code using PlatformIO
Buttons and switches
CodingStyle
Configuration
Contributions
Domoticz
Espurna OTA Manager
Firmware
Geiger Counter
Hardware AG L4
Hardware AI Thinker AI Light
Hardware Arilux AL LC06
Hardware Arilux AL LCxx
Hardware Arilux E27
Hardware Arniex Swifitch
Hardware Autohometion LYT8266
Hardware BLITZWOLF BW SHP2
Hardware Bakibo 9W E27 RGB CCT bulb
Hardware Bestek MRJ1011
Hardware EXS WiFi Relay v3.1
Hardware Electrodragon ESP Relay Board
Hardware Generic DHT11 v10
Hardware Generic DS18B20 v10
Hardware Generic ECH1560
Hardware Generic RGBLed v10
Hardware Generic Relay v40
Hardware Generic V9261F
Hardware Gosund SP111
Hardware Gosund WP3
Hardware Green ESP8266 Relay
Hardware HEYGO HY02
Hardware Hama WiFi Steckdose, 3.500W, 16A (Article Number 00176533)
Hardware Heltec Touch Relay
Hardware Huacanxing H80x
Hardware IKE ESPike
Hardware IWOOLE_LED_TABLE_LAMP
Hardware Itead 1CH
Hardware Itead BN SZ01
Hardware Itead Motor
Hardware Itead S20
Hardware Itead S26
Hardware Itead SV
Hardware Itead Slampher v2
Hardware Itead Slampher
Hardware Itead Sonoff 4CH Pro R2
Hardware Itead Sonoff 4CH
Hardware Itead Sonoff B1
Hardware Itead Sonoff Basic
Hardware Itead Sonoff Dual
Hardware Itead Sonoff LED
Hardware Itead Sonoff POW R2
Hardware Itead Sonoff POW
Hardware Itead Sonoff RF Bridge Direct Hack
Hardware Itead Sonoff RF Bridge
Hardware Itead Sonoff RF
Hardware Itead Sonoff S31
Hardware Itead Sonoff T1
Hardware Itead Sonoff TH
Hardware Itead Sonoff Touch
Hardware JINVOO VALVE SM AW713
Hardware Jan Goedeke Wifi Relay Board
Hardware Jorge Garcia Wifi Relay Board
Hardware KMC 70011
Hardware LINGAN SWA1
Hardware LSC Smart LED Light Strip
Hardware Lampi RGBWW Battery Powered Smart Light
Hardware Linksprite Linknode R4
Hardware Litesun LA WF7
Hardware Lombex Lux Nova
Hardware Magic Home LED Controller
Hardware Magic Home Light bulbs
Hardware ManCaveMade ESPLive
Hardware Maxcio W DE004
Hardware Maxcio W US002S
Hardware Muvit IO miobulb001
Hardware NEO COOLCAM NAS WR01W
Hardware NodeMCU Lolin
Hardware OBI Euromate Wifi Plug v2
Hardware OBI Euromate Wifi Plug
Hardware OpenEnergyMonitor Wifi MQTT Relay
Hardware Orvibo B25
Hardware QuinLED
Hardware TUYA in line dimmer
Hardware Teckin SP22 v1.4 and v1.6
Hardware Tinkerman ESPurna H
Hardware Tonbux Mosquito Killer
Hardware Tonbux Powerstrip02
Hardware Tonbux XS SSA06
Hardware Twakie Smart Plug
Hardware Wemos D1 Mini Relay Shield
Hardware WiOn 50055
Hardware Witty Cloud
Hardware WorkChoice EcoPlug
Hardware Xenon SM PW 702U
Hardware YT E002
Hardware YiDian XS SSA05
Hardware Zhilde ZLD 44EU W
Hardware Zhilde ZLD 64EU W
Hardware
Home
HomeAssistant
IR
InfluxDB
LED
Lights
MQTT
NTP
OTA TUYA
OTA flashing of virgin Itead Sonoff devices
OTA
Other Devices Unsupported
PWM
PlatformIO
Posts & Videos
Prometheus
PullRequests
RESTAPI
RFBRIDGE
RPN Rules
SCHEDULER
Sensor PZEM004T
Sensors
SensorsConfiguration
Software features
Telnet
Terminal
Thingspeak
Troubleshooting
TwoStepUpdates
WebInterface
WiFi
mDNS
Clone
4
SensorsConfiguration
Maxim Prokhorov edited this page 2024-08-23 21:47:20 +03:00
Table of Contents
Sensors Configuration
Terminal
| Command | description |
|---|---|
| Common | |
| magnitudes | Lists all sensor magnitudes |
| I2C | |
| i2c.scan | Lists available i2c devices |
| i2c.clear | Recovers i2c bus from failure |
| PZEM004T(v3) | |
| pz.address <address> | Set address string (use pzemAddress setting to permanently set it) |
| pz.reset <index> | Reset energy total for device |
| pz.value <index> | Show sensor values (only PZEM004T v1) |
Common
| Configuration key | Build flag | Description |
|---|---|---|
| snsRead | Sensor read interval in seconds | A positive number greater than 2. Defaults to 6 |
| snsReport | Sensor report every N reads | A positive number greater than 0. Defaults to 10 (i.e. by default, reports happen every minute) |
I2C
| Configuration key | Description |
|---|---|
| i2cSCL | SCL pin, defaults to 5 |
| i2cSDA | SDA pin, defaults to 4 |
| i2cCST | I2C Clock Stretch Time in milliseconds (only for I2C_Brzo library). A positive number, defaults to 200 |
| i2cFreq | I2C SCL frequency (only for I2C_Brzo library). A positive number, defaults to 1000 |
Magnitudes
Each individual magnitude can be configured by using special configuration keys. Each magnitute is assigned an unique index #. Default values depend on the selected sensor
| Configuration key | Description |
|---|---|
| xCorrection# | Static offset for the value |
| xMinDelta# | After N readings (specified as snsReport), check if the value changed by at least this much and only then proceed with the report action |
| xMaxDelta# | After each reading, check if the value had changed by at least this much and trigger the report action (even before the snsReport number of readings is reached) |
| xZeroThreshold# | After each reading, check if the sensor value is above a certain threshold. If not, reset the value to 0. Setting value is expected to be greater or equal to zero. Defaults to 'NaN', value is read as-is. |
| xMinThreshold# | After each reading, check if the sensor value is above a certain threshold. Proceed with the report action only when this condition is true. Defaults to 'NaN', value is always reported |
| xMaxThreshold# | After each reading, check if the sensor value is below a certain threshold. Proceed with the report action only when this condition is true. Defaults to 'NaN', value is always reported |
Where x is one of:
| Prefix | Description |
|---|---|
| tmp | Temperature |
| hum | Humidity |
| press | Pressure |
| curr | Current |
| volt | Voltage |
| pwrP | Active power |
| pwrQ | Apparent power |
| pwrModS | Reactive power |
| pwrPF | Power factor |
| ene | Energy (total) |
| eneDelta | Energy delta |
| analog | Analog reading |
| digital | Digital reading |
| event | |
| pm1dot0 | |
| pm1dot5 | |
| pm10 | |
| co2 | |
| voc | |
| iaq | |
| iaqAccuracy | |
| iaqStatic | |
| lux | |
| uva | |
| uvb | |
| uvi | |
| distance | |
| hcho | |
| gcpm | |
| gsiev | |
| count | |
| no2 | |
| co | |
| res | Resistance |
| ph | |
| freq |
Units
| Configuration key | Description |
|---|---|
| xUnits# | Defaults to the unit choosen by the BaseSensor or the custom override specific to the selected sensor |
Settings use 'Unit' enumeration represented as integer, which can be found in the sensor.h. Note that each sensor may provide a different Magnitude<->Unit defaults.
| Unit | Number |
|---|---|
| None | 1 |
| Celcius | 2 |
| Farenheit | 3 |
| Kelvin | 4 |
| Percentage | 5 |
| Hectopascal | 6 |
| Ampere | 7 |
| Volt | 8 |
| Voltampere | 9 |
| Kilovoltampere | 10 |
| VoltampereReactive | 11 |
| KilovoltampereReactive | 12 |
| Watt | 13 |
| Kilowatt | 14 |
| WattSecond | 15 |
| Joule | 15 |
| KilowattHour | 16 |
| PartsPerMillion | 17 |
| Ohm | 18 |
| MicrogrammPerCubicMeter | 19 |
| MilligrammPerCubicMeter | 20 |
| Lux | 21 |
| UltravioletIndex | 22 |
| CountsPerMinute | 23 |
| MicrosievertPerHour | 24 |
| Meter | 25 |
| Hertz | 26 |
| Ph | 27 |
EmonSensor configuration
| Configuration key | Description |
|---|---|
| pwrRatioC# | Ratio for the current |
| pwrRatioP# | Ratio for the active power |
| pwrRatioV# | Ratio for the voltage |
| pwrRatioE# | Ratio for the energy |
| pwrVoltage# | Nominal RMS mains voltage (125, 220, 230...). Depends on country, 230 by default |
Getting started
- Backup the stock firmware
- Flash a pre-built binary image
- Flash a virgin Itead Sonoff device without opening
- Flash TUYA-based device without opening
- Flash Shelly device without opening
- Using PlatformIO
- from Visual Studio Code
- Using Arduino IDE
- Build the Web Interface
- Over-the-air updates
- Two-step updates
- ESPurna OTA Manager
- NoFUSS
- Troubleshooting
Supported hardware and options
Configuration
Integrations
- MQTT
- REST API
- Domoticz
- Home Assistant
- InfluxDB
- Prometheus metrics
- Thingspeak
- Alexa
- Google Home
Network
Developers
- Architecture
- 3rd Party Plugins
- Coding style
- Pull Requests
More around ESPurna
Support
If you're looking for support:
- Issues: this is the most dynamic channel at the moment, you might find an answer to your question by searching open or closed issues.
- Wiki pages: might not be as up-to-date as we all would like (hey, you can also contribute in the documentation!).
- Gitter channel: you have better chances to get fast answers from project contributors or other ESPurna users. (also available with any Matrix client!)
- Issue a question: as a last resort, you can open new question issue on GitHub. Just remember: the more info you provide the more chances you'll have to get an accurate answer.