ESPHome  2024.11.3
sdm_meter_registers.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace esphome {
4 namespace sdm_meter {
5 
6 /* PHASE STATUS REGISTERS */
7 static const uint16_t SDM_PHASE_1_VOLTAGE = 0x0000;
8 static const uint16_t SDM_PHASE_2_VOLTAGE = 0x0002;
9 static const uint16_t SDM_PHASE_3_VOLTAGE = 0x0004;
10 static const uint16_t SDM_PHASE_1_CURRENT = 0x0006;
11 static const uint16_t SDM_PHASE_2_CURRENT = 0x0008;
12 static const uint16_t SDM_PHASE_3_CURRENT = 0x000A;
13 static const uint16_t SDM_PHASE_1_ACTIVE_POWER = 0x000C;
14 static const uint16_t SDM_PHASE_2_ACTIVE_POWER = 0x000E;
15 static const uint16_t SDM_PHASE_3_ACTIVE_POWER = 0x0010;
16 static const uint16_t SDM_PHASE_1_APPARENT_POWER = 0x0012;
17 static const uint16_t SDM_PHASE_2_APPARENT_POWER = 0x0014;
18 static const uint16_t SDM_PHASE_3_APPARENT_POWER = 0x0016;
19 static const uint16_t SDM_PHASE_1_REACTIVE_POWER = 0x0018;
20 static const uint16_t SDM_PHASE_2_REACTIVE_POWER = 0x001A;
21 static const uint16_t SDM_PHASE_3_REACTIVE_POWER = 0x001C;
22 static const uint16_t SDM_PHASE_1_POWER_FACTOR = 0x001E;
23 static const uint16_t SDM_PHASE_2_POWER_FACTOR = 0x0020;
24 static const uint16_t SDM_PHASE_3_POWER_FACTOR = 0x0022;
25 static const uint16_t SDM_PHASE_1_ANGLE = 0x0024;
26 static const uint16_t SDM_PHASE_2_ANGLE = 0x0026;
27 static const uint16_t SDM_PHASE_3_ANGLE = 0x0028;
28 
29 static const uint16_t SDM_AVERAGE_L_TO_N_VOLTS = 0x002A;
30 static const uint16_t SDM_AVERAGE_LINE_CURRENT = 0x002E;
31 static const uint16_t SDM_SUM_LINE_CURRENT = 0x0030;
32 static const uint16_t SDM_TOTAL_SYSTEM_POWER = 0x0034;
33 static const uint16_t SDM_TOTAL_SYSTEM_APPARENT_POWER = 0x0038;
34 static const uint16_t SDM_TOTAL_SYSTEM_REACTIVE_POWER = 0x003C;
35 static const uint16_t SDM_TOTAL_SYSTEM_POWER_FACTOR = 0x003E;
36 static const uint16_t SDM_TOTAL_SYSTEM_PHASE_ANGLE = 0x0042;
37 
38 static const uint16_t SDM_FREQUENCY = 0x0046;
39 
40 static const uint16_t SDM_IMPORT_ACTIVE_ENERGY = 0x0048;
41 static const uint16_t SDM_EXPORT_ACTIVE_ENERGY = 0x004A;
42 static const uint16_t SDM_IMPORT_REACTIVE_ENERGY = 0x004C;
43 static const uint16_t SDM_EXPORT_REACTIVE_ENERGY = 0x004E;
44 
45 static const uint16_t SDM_VAH_SINCE_LAST_RESET = 0x0050;
46 static const uint16_t SDM_AH_SINCE_LAST_RESET = 0x0052;
47 static const uint16_t SDM_TOTAL_SYSTEM_POWER_DEMAND = 0x0054;
48 static const uint16_t SDM_MAXIMUM_TOTAL_SYSTEM_POWER_DEMAND = 0x0056;
49 static const uint16_t SDM_CURRENT_SYSTEM_POSITIVE_POWER_DEMAND = 0x0058;
50 static const uint16_t SDM_MAXIMUM_SYSTEM_POSITIVE_POWER_DEMAND = 0x005A;
51 static const uint16_t SDM_CURRENT_SYSTEM_REVERSE_POWER_DEMAND = 0x005C;
52 static const uint16_t SDM_MAXIMUM_SYSTEM_REVERSE_POWER_DEMAND = 0x005E;
53 static const uint16_t SDM_TOTAL_SYSTEM_VA_DEMAND = 0x0064;
54 static const uint16_t SDM_MAXIMUM_TOTAL_SYSTEM_VA_DEMAND = 0x0066;
55 static const uint16_t SDM_NEUTRAL_CURRENT_DEMAND = 0x0068;
56 static const uint16_t SDM_MAXIMUM_NEUTRAL_CURRENT = 0x006A;
57 static const uint16_t SDM_LINE_1_TO_LINE_2_VOLTS = 0x00C8;
58 static const uint16_t SDM_LINE_2_TO_LINE_3_VOLTS = 0x00CA;
59 static const uint16_t SDM_LINE_3_TO_LINE_1_VOLTS = 0x00CC;
60 static const uint16_t SDM_AVERAGE_LINE_TO_LINE_VOLTS = 0x00CE;
61 static const uint16_t SDM_NEUTRAL_CURRENT = 0x00E0;
62 
63 static const uint16_t SDM_PHASE_1_LN_VOLTS_THD = 0x00EA;
64 static const uint16_t SDM_PHASE_2_LN_VOLTS_THD = 0x00EC;
65 static const uint16_t SDM_PHASE_3_LN_VOLTS_THD = 0x00EE;
66 static const uint16_t SDM_PHASE_1_CURRENT_THD = 0x00F0;
67 static const uint16_t SDM_PHASE_2_CURRENT_THD = 0x00F2;
68 static const uint16_t SDM_PHASE_3_CURRENT_THD = 0x00F4;
69 
70 static const uint16_t SDM_AVERAGE_LINE_TO_NEUTRAL_VOLTS_THD = 0x00F8;
71 static const uint16_t SDM_AVERAGE_LINE_CURRENT_THD = 0x00FA;
72 static const uint16_t SDM_TOTAL_SYSTEM_POWER_FACTOR_INV = 0x00FE;
73 static const uint16_t SDM_PHASE_1_CURRENT_DEMAND = 0x0102;
74 static const uint16_t SDM_PHASE_2_CURRENT_DEMAND = 0x0104;
75 static const uint16_t SDM_PHASE_3_CURRENT_DEMAND = 0x0106;
76 static const uint16_t SDM_MAXIMUM_PHASE_1_CURRENT_DEMAND = 0x0108;
77 static const uint16_t SDM_MAXIMUM_PHASE_2_CURRENT_DEMAND = 0x010A;
78 static const uint16_t SDM_MAXIMUM_PHASE_3_CURRENT_DEMAND = 0x010C;
79 static const uint16_t SDM_LINE_1_TO_LINE_2_VOLTS_THD = 0x014E;
80 static const uint16_t SDM_LINE_2_TO_LINE_3_VOLTS_THD = 0x0150;
81 static const uint16_t SDM_LINE_3_TO_LINE_1_VOLTS_THD = 0x0152;
82 static const uint16_t SDM_AVERAGE_LINE_TO_LINE_VOLTS_THD = 0x0154;
83 
84 static const uint16_t SDM_TOTAL_ACTIVE_ENERGY = 0x0156;
85 static const uint16_t SDM_TOTAL_REACTIVE_ENERGY = 0x0158;
86 
87 static const uint16_t SDM_L1_IMPORT_ACTIVE_ENERGY = 0x015A;
88 static const uint16_t SDM_L2_IMPORT_ACTIVE_ENERGY = 0x015C;
89 static const uint16_t SDM_L3_IMPORT_ACTIVE_ENERGY = 0x015E;
90 static const uint16_t SDM_L1_EXPORT_ACTIVE_ENERGY = 0x0160;
91 static const uint16_t SDM_L2_EXPORT_ACTIVE_ENERGY = 0x0162;
92 static const uint16_t SDM_L3_EXPORT_ACTIVE_ENERGY = 0x0164;
93 static const uint16_t SDM_L1_TOTAL_ACTIVE_ENERGY = 0x0166;
94 static const uint16_t SDM_L2_TOTAL_ACTIVE_ENERGY = 0x0168;
95 static const uint16_t SDM_L3_TOTAL_ACTIVE_ENERGY = 0x016a;
96 static const uint16_t SDM_L1_IMPORT_REACTIVE_ENERGY = 0x016C;
97 static const uint16_t SDM_L2_IMPORT_REACTIVE_ENERGY = 0x016E;
98 static const uint16_t SDM_L3_IMPORT_REACTIVE_ENERGY = 0x0170;
99 static const uint16_t SDM_L1_EXPORT_REACTIVE_ENERGY = 0x0172;
100 static const uint16_t SDM_L2_EXPORT_REACTIVE_ENERGY = 0x0174;
101 static const uint16_t SDM_L3_EXPORT_REACTIVE_ENERGY = 0x0176;
102 static const uint16_t SDM_L1_TOTAL_REACTIVE_ENERGY = 0x0178;
103 static const uint16_t SDM_L2_TOTAL_REACTIVE_ENERGY = 0x017A;
104 static const uint16_t SDM_L3_TOTAL_REACTIVE_ENERGY = 0x017C;
105 
106 static const uint16_t SDM_CURRENT_RESETTABLE_TOTAL_ACTIVE_ENERGY = 0x0180;
107 static const uint16_t SDM_CURRENT_RESETTABLE_TOTAL_REACTIVE_ENERGY = 0x0182;
108 static const uint16_t SDM_CURRENT_RESETTABLE_IMPORT_ENERGY = 0x0184;
109 static const uint16_t SDM_CURRENT_RESETTABLE_EXPORT_ENERGY = 0x0186;
110 static const uint16_t SDM_IMPORT_POWER = 0x0500;
111 static const uint16_t SDM_EXPORT_POWER = 0x0502;
112 
113 } // namespace sdm_meter
114 } // namespace esphome
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7