Table of Contents |
---|
Overview
The objective of this project is to control the Jandy pool heater using the . 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
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.
Firmware
Flashing
Firmware | Release Date | Download |
---|---|---|
v3.5 | 2022-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/
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.
Wiring
Wiring Diagram
Board Pinout
GPIO | Function |
---|---|
0 | Button |
4 | - |
5 | Temp |
12 | Relay |
13 | LED |
14 | - |
Wiring Pictures
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
For the 1/4" adaptor, some adjustments were needed.
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
Once the drilling was done, we were able to pass the thermometer through the adaptor.
We added 2 x 1/4" o-rings for sealing the compression fitting to the temperature probe.
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.
- Locate the threaded port on the inlet side of the header, and find the dimple at the center.
- 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.
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
Adding Temperature Probe to Heater
Would add it to "f".
RS-4865 Interface
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
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
Protocol
See:
Table 1 of the manual you posted lists the connections as
Red: +10V
Black: SD+
Yellow: SD-
Green: GND
...
Notes
...
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"
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.
Select the pool-heater and set the desired temperature and select Done.
You are all setup!
...
References
Reference | URL | ||
---|---|---|---|
Jandy Heater Manuals | https://www.jandy.com/en/products/heaters/jxi Installation: https://www.jandy.com/-/media/zodiac/global/downloads/h/h0574300.pdf Installation Code Handbook: Jandy_Serial_Adapterhttp://www.tagengineering.ca/wp-content/uploads/2015/02/B149-1handbook.pdf | *** Serial Adaptor Information | |
Jandy-Aqualink RS485 Protocol | https://github.com/sfeakes/AqualinkD/wiki/Jandy-Aqualink-RS485-protocol | ||
AqualinkD - Opensource Software | https://github.com/sfeakes/AqualinkD | ||
AqualinkD - Wiki | https://github.com/sfeakes/AqualinkD/wiki | ||
Controlling RS485 devices | https://www.troublefreepool.com/threads/controlling-rs485-slave-devices-heater-pump-swg-directly-with-pi.221088/ |