-
Notifications
You must be signed in to change notification settings - Fork 638
SensorsConfiguration
Maxim Prokhorov edited this page Oct 11, 2020
·
4 revisions
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) |
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) |
| 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|
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. Defaults to 'NaN', value is read as-is. |
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 |
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 |
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 |
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.
- 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
- MQTT
- REST API
- Domoticz
- Home Assistant
- InfluxDB
- Prometheus metrics
- Thingspeak
- Alexa
- Google Home
- Architecture
- 3rd Party Plugins
- Coding style
- Pull Requests