ESPHome  2024.11.1
selec_meter_registers.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace esphome {
4 namespace selec_meter {
5 
6 static const float TWO_DEC_UNIT = 0.01;
7 static const float ONE_DEC_UNIT = 0.1;
8 static const float NO_DEC_UNIT = 1;
9 static const float MULTIPLY_TEN_UNIT = 10;
10 static const float MULTIPLY_THOUSAND_UNIT = 1000;
11 
12 /* PHASE STATUS REGISTERS */
13 static const uint16_t SELEC_TOTAL_ACTIVE_ENERGY = 0x0000;
14 static const uint16_t SELEC_IMPORT_ACTIVE_ENERGY = 0x0002;
15 static const uint16_t SELEC_EXPORT_ACTIVE_ENERGY = 0x0004;
16 static const uint16_t SELEC_TOTAL_REACTIVE_ENERGY = 0x0006;
17 static const uint16_t SELEC_IMPORT_REACTIVE_ENERGY = 0x0008;
18 static const uint16_t SELEC_EXPORT_REACTIVE_ENERGY = 0x000A;
19 static const uint16_t SELEC_APPARENT_ENERGY = 0x000C;
20 static const uint16_t SELEC_ACTIVE_POWER = 0x000E;
21 static const uint16_t SELEC_REACTIVE_POWER = 0x0010;
22 static const uint16_t SELEC_APPARENT_POWER = 0x0012;
23 static const uint16_t SELEC_VOLTAGE = 0x0014;
24 static const uint16_t SELEC_CURRENT = 0x0016;
25 static const uint16_t SELEC_POWER_FACTOR = 0x0018;
26 static const uint16_t SELEC_FREQUENCY = 0x001A;
27 static const uint16_t SELEC_MAXIMUM_DEMAND_ACTIVE_POWER = 0x001C;
28 static const uint16_t SELEC_MAXIMUM_DEMAND_REACTIVE_POWER = 0x001E;
29 static const uint16_t SELEC_MAXIMUM_DEMAND_APPARENT_POWER = 0x0020;
30 
31 } // namespace selec_meter
32 } // namespace esphome
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7