Skip to content

Commit

Permalink
More examples (#23)
Browse files Browse the repository at this point in the history
Needed an example for an ESP32 and MAX485-chipset. Not pretty but it's
something.
  • Loading branch information
runevad authored Jan 18, 2023
1 parent bb33aaa commit 7ee4eff
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ nibegw:
data: [
0x06, # Temperature
0x14, # degrees low
0x00, # degrees hight
0x00, # degrees high
]
```

Expand Down
67 changes: 67 additions & 0 deletions examples/esp32_max485.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
esphome:
name: nibegw
comment: Nibegw
platform: ESP32
board: lolin_d32
# Example is for a LolinD32 Board, use your own from here: https://esphome.io/components/esp32.html

# No API if you are using MQTT, password is optional
api:
password: !secret api_password

ota:
password: !secret ota_password

logger:

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: none
#fast_connect: true # --> Use fast_connect if you connecting to a hidden network

# Optional: Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "ESP D32 Nibe Proxy AP"
password: !secret ap_password

# Load nibe component
external_components:
- source: github://elupus/esphome-nibe

uart:
rx_pin: GPIO16
tx_pin: GPIO17
baud_rate: 9600

# Configure NibeGW
nibegw:
udp:
# The target address(s) to send data to. May be a multicast address.
target:
- ip: 192.168.255.254
port: 10090

# List of source address to accept data from, may be empty for no filter
source:
- 192.168.255.254

acknowledge:
- MODBUS40

# Constant replies to certain requests cabe made
constants:
- address: MODBUS40
token: ACCESSORY
data: [
0x0A, # MODBUS version low
0x00, # MODBUS version high
0x01, # MODBUS address?
]

# Some helper functions to restart ESPHome from HA
button:
- platform: restart
name: Nibegw Restart
- platform: safe_mode
name: Nibegw Safe Mode Boot
Binary file added examples/esp32_max485_bb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/esp32_max485_schem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7ee4eff

Please sign in to comment.