Aquascenic / Vistapool / modbus integration example

Hi,

While browsing this forum I got my Aquascenic values read out to home assistant using the modbus interface. For reference I’ll share my approach here.

I used a Wemos D1 board with ESPhome flashed onto it
Then I attached a MAX485 module that I found here: MAX485 module voor RS485 seriële communicatie - HobbyElectronica

Then I came up with this configuration for the ESPhome device.

My ESPhome configuration file is as follows:


esphome:
  name: esphome-web-0d488a
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:

ota:

web_server:
  port: 80

uart:
  id: mod_bus
  tx_pin: GPIO1
  rx_pin: GPIO3
  baud_rate: 19200
  stop_bits: 1

modbus:
  flow_control_pin: GPIO0
  id: modbus1

modbus_controller:
  id: aquascenic
  ## the Modbus device addr
  address: 0x1
  modbus_id: modbus1
  command_throttle: 0ms
  # ctrl_pin: 5    # if you need to set the driver enable (DE) pin high before transmitting data configure it here
  setup_priority: -10
 
sensor:
  - platform: modbus_controller
    id: temperatuur
    name: "Water Temperatuur Zwembad"
    address: 0x0106
    offset: 0
    unit_of_measurement: "°C"
    value_type: U_WORD
    accuracy_decimals: 2
    register_type: read
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    id: pH
    name: "pH Waarde Zwembad"
    address: 0x0102
    offset: 0
    unit_of_measurement: "pH"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
      
  - platform: modbus_controller
    id: cl
    name: "Vrije Chloor Waarde Zwembad"
    address: 0x0104
    offset: 0
    unit_of_measurement: "ppm"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
      
  - platform: modbus_controller
    id: hydrolyse
    name: "Hydrolyse Percentage Zwembad"
    address: 0x0101
    offset: 0
    unit_of_measurement: "%"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 0
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    id: redox
    name: "Redox ppm"
    address: 0x0103
    offset: 0
    unit_of_measurement: "ppm"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 0
    filters:
      - multiply: 1
      
  - platform: modbus_controller
    id: redox_setpoint
    name: "Redox ppm - setpoint"
    address: 0x0508
    offset: 0
    unit_of_measurement: "ppm"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 0
    filters:
      - multiply: 1

Then I was able to read out all the values of the controller

Hope this helps anyone setting up their integration too !

3 Likes

Further reading:

Further reading #2

I used this schema to connect my RS485 module to the wemos D1 mini:

Hi,
I’m certainly interested in this topic. Having an Oxilife myself and not willing to pay the 500+ EUR for an official Wifi-module, I’ll try to integrate the data into my HA Dashboard, maybe even to control it from HA in the future …

I 'll have to check, but I think I’ve got the necessary HW somewhere in a box.
But Modbus is completely new to me … So we’ll see where it gets me …

It’s an interesting project …

Hi Stefaan,

This is really really great and exactly what I was looking for! I will try that! Many thanks for sharing your experience.

Regards
Christian

Hi Stefaan,

sorry to bother you with an issue I have. I made larger progess in soldering the pcbs and configure the software. Everyting works fine so far.

The only thing I am currently totall lost is how to connect the RS485 TTL Board to my Aquascenic device.

However I connect it. Either nothing happens or the Aquascenic shows an communication error.

I am not sure where to connect the two cables. Maybe you have a hint for me?

That would be fantastic.

Many thanks
Christian

substitutions:
  name: aquascenic
  friendly_name: Aquascenic

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  name_add_mac_suffix: false
  project:
    name: esphome.web
    version: '1.0'

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:

# Allow Over-The-Air updates
ota:

# Allow provisioning Wi-Fi via serial
improv_serial:

wifi:
  # Set up a wifi access point
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# In combination with the `ap` this allows the user
# to provision wifi credentials to the device via WiFi AP.
captive_portal:

dashboard_import:
  package_import_url: github://esphome/example-configs/esphome-web/esp8266.yaml@main
  import_full_config: true

# To have a "next url" for improv serial
web_server:
 port: 80

uart:
  id: mod_bus
  tx_pin: GPIO1
  rx_pin: GPIO3
  baud_rate: 19200
  stop_bits: 1

modbus:
  flow_control_pin: GPIO0
  id: modbus1

modbus_controller:
  id: aquascenic
  ## the Modbus device addr
  address: 0x1
  modbus_id: modbus1
  command_throttle: 0ms
  # ctrl_pin: 5    # if you need to set the driver enable (DE) pin high before transmitting data configure it here
  setup_priority: -10
 
sensor:
  - platform: modbus_controller
    id: temperatur
    name: "Wasser Temperatur"
    address: 0x0106
    offset: 0
    unit_of_measurement: "°C"
    value_type: U_WORD
    accuracy_decimals: 2
    register_type: read
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    id: pH
    name: "pH Wert"
    address: 0x0102
    offset: 0
    unit_of_measurement: "pH"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
      
  - platform: modbus_controller
    id: cl
    name: "Freies Chlor"
    address: 0x0104
    offset: 0
    unit_of_measurement: "ppm"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
      
  - platform: modbus_controller
    id: hydrolyse
    name: "Hydrolyse"
    address: 0x0101
    offset: 0
    unit_of_measurement: "%"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 0
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    id: redox
    name: "Redox ppm"
    address: 0x0103
    offset: 0
    unit_of_measurement: "ppm"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 0
    filters:
      - multiply: 1
      
  - platform: modbus_controller
    id: redox_setpoint
    name: "Redox ppm - setpoint"
    address: 0x0508
    offset: 0
    unit_of_measurement: "ppm"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 0
    filters:
      - multiply: 1