forked from esphome-econet/esphome-econet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm5atom-rs485-econet.yaml
84 lines (73 loc) · 5.06 KB
/
m5atom-rs485-econet.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
esphome:
name: m5atom-rs485-econet
friendly_name: m5atom-rs485-econet
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
#level: DEBUG #default is debug
tx_buffer_size: 2000
baud_rate: 0 # disable serial logging
# Enable Home Assistant API
api:
encryption:
key: "redacted"
services: # This is how I plan to send the hex data during testing..
- service: set_whtrsetp_124 #app > set temperature to 124f = WHTRSETP 0x42, 0xF8, 0x00, 0x00 = 124 (decimal converted from hex float)
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x12, 0x00, 0x00, 0x1F, 0x01, 0x01, 0x00, 0x07, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x53, 0x45, 0x54, 0x50, 0x42, 0xF8, 0x00, 0x00, 0xE4, 0xEE]
- service: set_whtrsetp_110 #app > set temperature to 110f = WHTRSETP 0x42, 0xDC, 0x00, 0x00 = 110 (decimal converted from hex float)
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x12, 0x00, 0x00, 0x1F, 0x01, 0x01, 0x00, 0x07, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x53, 0x45, 0x54, 0x50, 0x42, 0xDC, 0x00, 0x00, 0xA4, 0xE5]
- service: request_data # this is the same periodic request that the internal wifi does, requesting WHTRENAB WHTRCNFG WHTRSETP HOTWATER
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x2A, 0x00, 0x00, 0x1E, 0x02, 0x01, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x45, 0x4E, 0x41, 0x42, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x43, 0x4E, 0x46, 0x47, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x53, 0x45, 0x54, 0x50, 0x00, 0x00, 0x48, 0x4F, 0x54, 0x57, 0x41, 0x54, 0x45, 0x52, 0x30, 0x0D]
- service: set_enabled #app > power button icon > "Enable" = WHTRENAB 0x3F, 0x80, 0x00, 0x00 = 1 (decimal converted from hex float)
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x12, 0x00, 0x00, 0x1F, 0x01, 0x01, 0x00, 0x07, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x45, 0x4E, 0x41, 0x42, 0x3F, 0x80, 0x00, 0x00, 0xFD, 0xBB]
- service: set_disabled #app > power button icon > "Disable" = WHTRENAB 0x00, 0x00, 0x00, 0x00
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x12, 0x00, 0x00, 0x1F, 0x01, 0x01, 0x00, 0x07, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x45, 0x4E, 0x41, 0x42, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x47]
- service: set_mode_off #app > "Mode" > "Off" = WHTRCNFG 0x00, 0x00, 0x00, 0x00
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x12, 0x00, 0x00, 0x1F, 0x01, 0x01, 0x00, 0x07, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x43, 0x4E, 0x46, 0x47, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xDA]
- service: set_mode_energy_saver #app > "Mode" > "Energy Saver" = WHTRCNFG 0x3F, 0x80, 0x00, 0x00 = 1 (decimal converted from hex float)
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x12, 0x00, 0x00, 0x1F, 0x01, 0x01, 0x00, 0x07, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x43, 0x4E, 0x46, 0x47, 0x3F, 0x80, 0x00, 0x00, 0xB0, 0x26]
- service: set_mode_heat_pump #app > "Mode" > "Heat Pump" = WHTRCNFG 0x40, 0x00, 0x00, 0x00 = 2 (decimal converted from hex float)
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x12, 0x00, 0x00, 0x1F, 0x01, 0x01, 0x00, 0x07, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x43, 0x4E, 0x46, 0x47, 0x40, 0x00, 0x00, 0x00, 0xA8, 0x1A]
- service: set_mode_high_demand #app > "Mode" > "High Demand" = WHTRCNFG 0x40, 0x40, 0x00, 0x00 = 3 (decimal converted from hex float)
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x12, 0x00, 0x00, 0x1F, 0x01, 0x01, 0x00, 0x07, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x43, 0x4E, 0x46, 0x47, 0x40, 0x40, 0x00, 0x00, 0xA9, 0xCE]
- service: set_mode_electric_gas #app > "Mode" > "Electric/Gas" = WHTRCNFG 0x40, 0x80, 0x00, 0x00 = 4 (decimal converted from hex float)
then:
- uart.write: [0x80, 0x00, 0x12, 0x80, 0x00, 0x80, 0x00, 0x03, 0x40, 0x00, 0x12, 0x00, 0x00, 0x1F, 0x01, 0x01, 0x00, 0x07, 0x00, 0x00, 0x57, 0x48, 0x54, 0x52, 0x43, 0x4E, 0x46, 0x47, 0x40, 0x80, 0x00, 0x00, 0xA9, 0xF2]
ota:
password: "redacted"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "M5Atom-Rs485-Econet"
password: "HIISmBbn3ysd"
captive_portal:
uart:
rx_pin: 32
tx_pin: 26
baud_rate: 38400 # 38400 for econet
rx_buffer_size: 1900
debug: # Minimal debug configuration example, logs hex strings by default
after:
bytes: 1500 #max bytes
#timeout: 1s #max timeout - default 150ms
#delimiter: [0xCF, 0x6F] #list of bytes to send the serial data on BF E7 EF EB
#delimiter: [0x6F, 0xEF] #list of bytes to send the serial data on #F8 72 6F EF CF
dummy_receiver: true #necessary to log data if no other device is using this serial port
sequence:
- lambda: |-
UARTDebug::log_hex(direction, bytes, ' ');
UARTDebug::log_string(direction, bytes);