-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhuawei_r4850.yaml
104 lines (85 loc) · 2.04 KB
/
huawei_r4850.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
substitutions:
name: huawei-r4850-controller
device_description: "Control the power output of a Huawei R4850 via CAN-Bus"
esphome:
name: ${name}
comment: ${device_description}
friendly_name: HuaweiR4850
external_components:
- source: github://securom87/r4850_esphome@main
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
level: DEBUG
logs:
canbus: INFO
# Enable Home Assistant API
api:
encryption:
key: !secret r4850_encryptionkey
ota:
password: !secret r4850_ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "Huawei Fallback Hotspot"
password: "F47oQ9E8K5iD"
web_server:
captive_portal:
canbus:
- platform: esp32_can
id: can
tx_pin: GPIO14
rx_pin: GPIO27
use_extended_id: true
can_id: 0
bit_rate: 125kbps
huawei_r4850:
# The state of this sensor (instantaneous power in watt) is used as source
power_id: powermeter0
canbus_id: can
update_interval: 5s
sensor:
- platform: huawei_r4850
output_voltage:
name: Output voltage
output_current:
name: Output current
output_power:
name: Output power
input_voltage:
name: Input voltage
input_current:
name: Input current
input_power:
name: Input power
input_frequency:
name: Input frequency
efficiency:
name: Efficiency
input_temp:
name: Input temperature
output_temp:
name: Output temperature
# import smartmeter reading from homeassistant
# requires the "api" component see above
- platform: homeassistant
id: powermeter0
name: "${name} smartmeter instantaneous power"
entity_id: sensor.wohnungszahler_akt_vebrauch
filters:
- throttle_average: 15s
number:
- platform: huawei_r4850
output_voltage:
name: Set output voltage
max_output_current:
name: Max output current
button:
- platform: huawei_r4850
set_offline_values:
name: Set offline values