Skip to content

Commit

Permalink
Use MQTT per default and mention api as alternative (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored Jun 30, 2022
1 parent 6eb6f9e commit ca41ef4
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 43 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,19 @@ wifi:
password: !secret wifi_password
ota:
# api:
logger:
baud_rate: 0
# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client

# api:

logger:
baud_rate: 0

uart:
baud_rate: 4800
tx_pin: GPIO1
Expand Down
16 changes: 10 additions & 6 deletions esp32-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ substitutions:
name: soyosource-gtn-virtual-meter
device_description: "Monitor a Soyosource GTN and control the power output on demand both via RS485"
external_components_source: github://syssi/esphome-soyosource-gtn-virtual-meter@main
tx_pin: GPIO1
rx_pin: GPIO3

esphome:
name: ${name}
Expand All @@ -22,21 +24,23 @@ wifi:
password: !secret wifi_password

ota:
# api:

logger:
baud_rate: 0

# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client

# api:

logger:
baud_rate: 0

uart:
baud_rate: 4800
tx_pin: GPIO1
rx_pin: GPIO3
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}

soyosource_modbus:
# Optional settings
Expand Down
24 changes: 15 additions & 9 deletions esp32-multiple-uarts-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ substitutions:
device0: firstfloor_soyosource_gtn_virtual_meter
device1: groundfloor_soyosource_gtn_virtual_meter
external_components_source: github://syssi/esphome-soyosource-gtn-virtual-meter@main
tx_pin_uart0: GPIO1
rx_pin_uart0: GPIO3
tx_pin_uart1: GPIO14
rx_pin_uart1: GPIO4

esphome:
name: ${name}
Expand All @@ -26,28 +30,30 @@ ethernet:
clk_mode: GPIO17_OUT
phy_addr: 0

# api:
ota:

logger:
baud_rate: 0
level: INFO

# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client

# api:

logger:
baud_rate: 0
level: INFO

uart:
- id: uart0
baud_rate: 4800
tx_pin: GPIO1
rx_pin: GPIO3
tx_pin: ${tx_pin_uart0}
rx_pin: ${rx_pin_uart0}
- id: uart1
baud_rate: 4800
tx_pin: GPIO14
rx_pin: GPIO4
tx_pin: ${tx_pin_uart1}
rx_pin: ${rx_pin_uart1}

soyosource_modbus:
- id: modbus0
Expand Down
27 changes: 19 additions & 8 deletions esp8266-display-example.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
substitutions:
name: soyosource-gtn-display
device_description: "Monitor and control the WiFi version of the Soyosource GTN via the USB-TTL port and control the power output on demand via RS485"
device_description: "Monitor and control the WiFi version of the Soyosource GTN via the TTL-WIFI port and control the power output on demand via RS485"
external_components_source: github://syssi/esphome-soyosource-gtn-virtual-meter@main
tx_pin_ttl_wifi: GPIO14
rx_pin_ttl_wifi: GPIO12
tx_pin_rs485: GPIO4
rx_pin_rs485: GPIO5

esphome:
name: ${name}
Expand All @@ -22,23 +26,30 @@ wifi:
password: !secret wifi_password

ota:
api:

# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client

# api:

logger:
level: INFO

# Please be careful: The display port has a logic level of 5V.
uart:
- id: uart0
baud_rate: 9600
tx_pin: GPIO14
rx_pin: GPIO12
debug:
direction: BOTH
tx_pin: ${tx_pin_ttl_wifi}
rx_pin: ${rx_pin_ttl_wifi}

- id: uart1
baud_rate: 4800
tx_pin: GPIO4
rx_pin: GPIO5
tx_pin: ${tx_pin_rs485}
rx_pin: ${rx_pin_rs485}

soyosource_modbus:
- id: modbus0
Expand Down
16 changes: 10 additions & 6 deletions esp8266-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ substitutions:
name: soyosource-gtn-virtual-meter
device_description: "Monitor a Soyosource GTN and control the power output on demand both via RS485"
external_components_source: github://syssi/esphome-soyosource-gtn-virtual-meter@main
tx_pin: GPIO1
rx_pin: GPIO3

esphome:
name: ${name}
Expand All @@ -22,21 +24,23 @@ wifi:
password: !secret wifi_password

ota:
# api:

logger:
baud_rate: 0

# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client

# api:

logger:
baud_rate: 0

uart:
baud_rate: 4800
tx_pin: GPIO1
rx_pin: GPIO3
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}

soyosource_modbus:
# Optional settings
Expand Down
8 changes: 4 additions & 4 deletions esp8266-fake-display.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
substitutions:
name: fake-display
device_description: "Emulate the USB-TTL port traffic of the Soyosource GTN (WiFi version)"
tx_pin: GPIO5
rx_pin: GPIO4
device_description: "Emulate the TTL-WIFI port traffic of the Soyosource GTN (WiFi version)"
tx_pin: GPIO4
rx_pin: GPIO5

esphome:
name: ${name}
Expand All @@ -18,8 +18,8 @@ wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

api:
ota:
api:
logger:

uart:
Expand Down
8 changes: 3 additions & 5 deletions esp8266-inverter-emulator.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
substitutions:
name: soyosource-gtn-inverter-emu
device_description: "Emulate the USB-TTL port traffic of the Soyosource GTN (WiFi version)"
device_description: "Emulate the TTL-WIFI port traffic of the Soyosource GTN (WiFi version)"
external_components_source: github://syssi/esphome-soyosource-gtn-virtual-meter@main
tx_pin: GPIO1
rx_pin: GPIO3
tx_pin: GPIO4
rx_pin: GPIO5

esphome:
name: ${name}
Expand All @@ -25,9 +25,7 @@ wifi:

ota:
api:

logger:
baud_rate: 0

# Please be careful: The display port has a logic level of 5V.
uart:
Expand Down
11 changes: 10 additions & 1 deletion esp8266-wifi-dongle-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ wifi:
password: !secret wifi_password

ota:
api:

# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client

# api:

logger:
baud_rate: 0
level: INFO
Expand Down

0 comments on commit ca41ef4

Please sign in to comment.