Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

The objective of this project is to control the Jandy pool heater using the RS485 interface.. We can either control the heater using it's REMOTE relays or interface with it's RS485 interface. For now, we are going to use the REMOTE relays.

The equipment we will to interfacing with is the Model: Jandy JXi Gas-Fired Pool and Spa Heater 260N

Wiring Connections

Image Removed

Pool/Off/Spa Connector

Connecting to a Remote Pool-Off-Spa Selector (3-Wire Connection) (See b above)

  • Turn off the power to both the pool/spa control system and the heater unit.
  • Follow service access instructions from Section 6.1.
  • Run the wires from the pool/spa control system through the low voltage knockout on the right or left hand side of the heater.
  • Connect the wiring from the pool/spa control system to the heater remote control terminal. See Figure 16 item “b”.
  • Connect the three wires to the Spa, Pool & Common terminals of the J6 terminal bar.
  • Reinstall front panel.
  • Restore power to the heater and the pool/spa control system.

NOTE: When a fireman’s switch is being utilized and “hi-lo-com” is selected, the heater will fire automatically when the contacts close even if the user interface on the heater is off.

.


Micro Controller

For this solution, we are using a Sonoff SV controller. This is a nice controller since it has everything we need to control the heater's remote relays. Additionally, we can power it from the heater itself since it accepts 5-24 volts input and the heater will supply us with 10v. We are going to use the Sonoff SV in isolation mode by removing the two resisters that would normally supply the power to the controller using the input voltage.



Image Added

Firmware

Flashing

FirmwareRelease DateDownload
v3.52022-05-12


Once the flashing is complete, it will reboot.  You will need to look for pool-heater, in your list of available WIFI networks.

Once connected, navigate to http://192.168.4.1/

Image Added


Image Added

From this UI, you can set the WIFI SSID and password for your network. Once it reboots again, you can log into it via http://pool-heater.local/. If that doesn't work, you'll have to find it in your network. Check your router to see if you can find it.

From this UI, you can set the water temperature, mode and units.


This firmware also has a MQTT configuration allowing it to integrate with homebridge. (Requires an MQTT server)

Homebridge Configuration (Optional)

Using the mqtt-thing homebridge plugin, add the following configuration:

Code Block
{
            "accessory": "mqttthing",
            "type": "thermostat",
            "name": "pool-heater",
            "url": "http://192.168.1.50:1883",
            "username": "homebridge",
            "password": "pass",
            "topics":
            {
                "getCurrentTemperature": {
                    "topic": "pool-heater/status",
                    "apply": "return JSON.parse(message).temperature_f;"
                },
                "getTargetTemperature":{
                    "topic": "pool-heater/status",
                    "apply": "return JSON.parse(message).tarTemperature_f;"
                },
                "getTemperatureDisplayUnits":{
                    "topic": "pool-heater/status",
                    "apply": "return 0;"
                },
                "getCurrentHeatingCoolingState":{
                    "topic": "pool-heater/status",
                    "apply": "return JSON.parse(message).state;"
                },
                "getTargetHeatingCoolingState":{
                    "topic": "pool-heater/status",
                    "apply": "return JSON.parse(message).mode;"
                },
                "setTargetTemperature": {
                    "topic": "pool-heater/command",
                    "apply": "return 'setTemp ' + message;"
                },
                "setTargetHeatingCoolingState": {
                    "topic": "pool-heater/command",
                    "apply": "return 'mode ' + message;"
                },
                "setTemperatureDisplayUnits": {
                    "topic": "pool-heater/command",
                    "apply": "return 'tempUnits ' + message;"
                }
            },
            "heatingCoolingStateValues": ["0","1"],
            "temperatureDisplayUnitsValues": [0,1],
            "minTemperature": 60,
            "maxTemperature": 100
},


In the Apple Home App we now have access to our pool heater.


Image Added



Wiring

Wiring Diagram

Image Added


Board Pinout

Image Added

GPIOFunction
0Button
4-
5Temp
12Relay
13 LED
14-


Wiring Pictures

Image AddedImage AddedImage Added


Temperature Sensor

We are going to add a temperature sensor to the heater so that we can turn the heater on or off based on temperature.

We are going to use

  • Waterproof Digital Temperature Temp Sensor Probe DS18b20
  • a 1/4″ MIP to 1/4" compression adaptor
  • 2x 1/4" o-rings
  • teflon tape



Image AddedImage AddedImage AddedImage Added

For the 1/4" adaptor, some adjustments were needed.

Image Added

We needed to

  • drill out a metal piece on the compression cap in order to get the temperature probe through.
  • drill out the body of the adaptor


Image AddedImage Added

Once the drilling was done, we were able to pass the thermometer through the adaptor.

Image Added

We added 2 x 1/4" o-rings for sealing the compression fitting to the temperature probe.

Image Added


We can add a temperature sensor to the heater's header using the following procedure:

  • Turn off the power to the heater
  • Remove drain plug from header and allow all water to drain from heat exchanger.

Image Added

  • Locate the threaded port on the inlet side of the header, and find the dimple at the center.

Image Added


  • Use the dimple to center the drill bit. Drill a 1/4 in (6.4 mm) diameter hole through the port. Take care not to damage the plastic threads. TIP: Drilling a 1/8 in (3 mm) diameter hole first will help prevent thread damage
  • Wrapped 5-6 turns of PTFE (Teflon) tape around the male threads of the adaptor.
  • Thread in your 1/4 inch adaptor into the port. Make sure to get a snug fit. Do not over-tighten.


Image AddedImage Added


Configure the Jandy

...

Control Panel

  • Make sure the pool heater is OFF.
  • Press and hold MENU, then the POOL and SPA buttons for 5 seconds to access Service Setup mode.

NOTE: The display will revert back to OFF 1 minute after the last key press.

  • Press Up or Down to display REMOTE.
  • Press MENU, REMOTE OFF (default) is displayed.
  • Use Up or Down to scroll through the Remote options until HI-LO-COM is displayed, then press MENU to select.
  • Press POOL or SPA to exit Service Setup mode

RS-4865 Interface

Image RemovedImage Removed

RS485 protocol, wiring & adapters

All pool equipment uses a half duplex RS485 protocol to comunicate between Control Panel, Keypads and inteligent Devices like Salt Water Generators, Variable Speed Pumps, Chemical feeders & some heaters.

There are a few main problems areas that you should have a basic understanding of, that can effect the performance.

  • RS485 Wiring and Termination (The majority of issues new people have are here)

  • RS485 USB Adapters and how they actually work in reguard to Pool equiptment. (this becomes very important on busy RS485 bus)

Wiring and Termination

Below is a basic diagram of an RS485 bus

Image Removed


Advanced Functionality

Only Heat when the Forecast Looks Good

Using the home bridge weather plus plugin, we can pull weather forecasts for our location and then setup an automation in Apple HomeKit.


Ottawa Forecast:

https://openweathermap.org/city/6094817


Install the following plugin for homebridge:

https://github.com/naofireblade/homebridge-weather-plus


Configure it in the config.json. This plugin will add the current temperature and the forecast for today and tomorrow.

Code Block
        {
                "platform": "WeatherPlus",
                "service": "openweathermap",
                "key": "xxx",
                "locationId": 6094817,
                "locationCity": "Ottawa, CA",
                "locationGeo": [45.393553, -75.700374],
                "conditionCategory": "detailed",
                "forecast": [0,1],
                "nameNow": "Ottawa",
                "nameForecast": "Ottawa Forecast"
        }


In Apple HomeKit, setup the automation:


Add an Automation and select "A Sensor Detects Something"

Image AddedImage Added


Select your tomorrow's forecast (I renamed mine to Tomorrow's Forecast). Select Rises Above and choose a temperature. Restrict the time of the check. I do the check right before my pool pump is about to start it's nightly heat/filter cycle.

Image AddedImage AddedImage Added


Select the pool-heater and set the desired temperature and select Done.

Image AddedImage AddedImage Added

You are all setup!As you can see, each device is connected to 3 wires (Data+, Data- & Ground), and there is a termination resistor at each end of the wiring (or bus).
The ground connection is their so the adapter has a referance point for the voltages in Data+ & Data-, and there is some level of circuit protection.
The termination resistors are their to prodide clear signals and stop reflection. Here is a detailed article on that


References