Renogy Wander with ESPHome

Here is my esp home yaml that works

#esphome setup data
esphome:
  name: solar-controller
  platform: ESP8266
  board: d1_mini
 
logger:
  level: info
  baud_rate: 0
captive_portal:
web_server:
  port: 80
     
# Enable Home Assistant API
api:
  encryption:
    key: !secret api_key  
ota:
  password: !secret ota_pass
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: !secret ap_ssid
    password: !secret ap_pass
  
#Modbus uart info
uart:
  baud_rate: 9600
  data_bits: 8
  stop_bits: 1
  parity: NONE
  tx_pin: 01
  rx_pin: 03
modbus:
  send_wait_time: 50ms
modbus_controller:
  - id: renogy
    address: 0xFF
    setup_priority: -10
    update_interval: 3s

#start of sensors
sensor:
#wifi sensor
  - platform: wifi_signal
    name: solar WiFi Signal
    id: solar_wifi_signal
    entity_category: diagnostic
    update_interval: 60s
#uptime sensor
  - platform: uptime
    name: Solar Uptime
    id: solar_uptime
    entity_category: diagnostic
    accuracy_decimals: 0
    unit_of_measurement: min
    update_interval: 60s
    filters:
      - lambda: return x / 60;
  
  #battery sensors
  - id: solar_battery_soc
    name: Battery Percentage Charged
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x0100
    unit_of_measurement: '%'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 0

  - id: solar_battery_voltage
    name: Battery Voltage
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x0101
    unit_of_measurement: 'V'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.1

  - id: solar_battery_charge_current
    name: Panel to Battery Amps
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x0102
    unit_of_measurement: 'A'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.01

#WYZE Cam Sensors
  - id: solar_cam_voltage
    name: WYZE Cam Voltage
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x0104
    unit_of_measurement: 'V'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.1

  - id: solar_cam_current
    name: WYZE Cam Amps
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x0105
    unit_of_measurement: 'A'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.01

  - id: solar_cam_watts
    name: WYZE Cam Watts
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x0106
    unit_of_measurement: 'W'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 0

#Solar Panel Sensors
  - id: solar_panel_voltage
    name: Solar Panel Voltage
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x0107
    unit_of_measurement: 'V'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.1

  - id: solar_panel_current
    name: Solar Panel to Controller Current
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x0108
    unit_of_measurement: 'A'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.01

  - id: solar_panel_watts
    name: Solar Panel Watts
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x0109
    unit_of_measurement: 'W'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 0

#test values
  - id: battery_min_volts
    name: Battery Voltage Minium for Day
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x010B
    unit_of_measurement: 'V'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.1

  - id: battery_max_volts
    name: Battery Voltage Max for Day
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x010C
    unit_of_measurement: 'V'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.1

  - id: solar_max_watts
    name: Solar Watts Max for Day
    platform: modbus_controller
    modbus_controller_id: renogy
    address: 0x010F
    unit_of_measurement: 'W'
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.1
2 Likes

Hi, I’m excited to try this project, thanks for sharing it! I’ve flashed it to both an ESP32 and ESP8266 NodeMCU v3 to try it out. The wifi signal and runtime are showing up. so far. I need to hardwire things next. I am wondering if there is a way to have one ESP transmit the data from two controllers?

Hi, anyone archived this via ble_client?
How would this work with ble_client:?
#Battery VOLTS

  • platform: modbus_controller
    modbus_controller_id: renogy_wanderer
    name: “Battery Volts”
    id: battery_volts
    register_type: read
    address: 0x101
    unit_of_measurement: “V”
    value_type: U_WORD
1 Like

I believe so, especially If both controllers are the same model. You would need to create a second uart in your esphome YAML file and identify the tx_pin and rx_pin for the second controller. If you have different models of controller, it would be a little bit harder as you would need to figure out how the new controller sends the data to the 2nd uart.

needs to be solved via ble
unfortuantely there is no module like modbus cable similar for ble

So used an implementation with some c++ code as base

1 Like

Hi, did you get ble_client working? I did some tests but the best I could get was a 0.0v voltage reading from my battery. I was thinking I needed to try to shift my parsing some but haven’t had a chance to experiment more.

yes it is working
see