infinitenothing Posted August 1, 2021 Report Posted August 1, 2021 Hardware In the above setup, for each COM port, the Pi can wait for a packet (see below) and then forward that packet on to the other device’s RX. This results in a man in the middle sort of setup. Example parts Description Mfg Part number Plugs into IQ2020 Control Head Port (8 Pin) TE 3-644540-8 Receives from Touch Panel (8 Pin) TE 3-647000-8 USB to RS422 adapter DTECH 12 to 5V supply for Raspberry Pi Weewooday Pinout Pin Color Touch Panel IQ2020 1 Blue Rx - Tx- 2 Green 12V In 12V Out 3 Yellow Tx + Rx+ 4 Red Ground Ground 5 Brown Tx - Rx- 6 White Rx + Rx+ 7 NC 8 NC Packet Everything is Big Endian (Network order) Message Bytes Notes Start 3 Can be XMS (from touch panel) or XSM (from IQ2020) Message Length 2 Doesn’t include start, length, or checksum bytes Message N Checksum 2 Simple sum of all prior bytes. Example full message (Main Screen Acknowledged): 58534D 0002 0800 0102 Important Messages From touch panel States The touch panel sends these commands many times per second Touch Panel Mode Hex Screen Off 6B 0000 0000 0100 0000 0000 Main Screen 6B 0000 0000 0100 0100 0000 Temperature Adjust Screen 6B 0300 0000 0100 0103 0000 Temp. Down Button Pressed 6B 0300 0008 0100 0103 0000 Temp. Up Button Pressed 6B 0300 0004 0100 0103 0000 Commands Command Msg Hex Description More 4B When you enter a new mode, the IQ2020 will give the touch panel info that it needs to show its next screen. The IQ2020 spreads this info over a few packets. The touch panel asks for “more” until the IQ2020 sends a “I don’t have more info” packet” and then should resume sending one of the state packets above From IQ2020 The green hex below is the temperature setpoint. The temperature is encoded as ASCII (eg 0x3831 => 81 F) Message Message Hex Main Screen Acknowledged 08 00 Temperature Screen Acknowledged 08 03 Setpoint (going into temp) 00 0000 0A00 4005 040A 1502 0003 3831 3A00 Setpoint (after setpoint adjust) 01 0005 1503 3832 3A00 Communication Capture The doc below is a capture of the communication during normal operation through the touch screen. In this capture, the touch screen starts off, then we go into the main screen, then we go to the temperature adjust screen, then we lower the temperature one degree, then we exit the temperature screen. I stop recording for a few minutes so the logs won’t be too long. The touch screen then goes back off. https://docs.google.com/spreadsheets/d/1FPIu6mpBpGdMX-Mh76JIv4aA3WfhkPuU5-MZ9X7wuec/edit?usp=sharing Full sequence to adjust temperature setpoint Verify we are in “Screen Off” mode Replace all “Screen Off” commands from touch screen with “Main Screen” commands Wait until IQ2020 acknowledges that we’ve entered “Main Screen” Replace all “Screen Off” commands with “Temperature Screen” commands Grab setpoint from IQ2020 Wait for IQ2020 to acknowledge that we’re in “Temperature Screen” mode Replace all “Screen Off” commands with “Temp. Up/Down” commands Wait for setpoint to reach your new target setpoint Go to main screen Go to “screen off” (stop replacing “screen off” commands) iPhone interface Option 1: https://www.npmjs.com/package/homebridge-web-thermostat Option 2: https://www.npmjs.com/package/homebridge-thermostat Temperature Measurement Watkins uses a 10kOhm thermistor to bring in the temperature. I connected to that thermistor (top right port) with a MAX31865. I used the calibration curves posted on the web (example) to convert from resistance to temperature 1 2 Quote
CanadianSpaTech Posted August 1, 2021 Report Posted August 1, 2021 Wow. Thanks for the hack and for posting for others. @darkwin This what you were looking for? 1 1 Quote
RDspaguy Posted August 1, 2021 Report Posted August 1, 2021 @infinitenothing, that is very impressive. Thanks for posting. We frequently have electronics questions that none of us regular contributors can answer. Would you consider leaving your notifications for mentions on so we can call your attention to threads that could benefit from your expertise? 1 Quote
darkwin Posted August 2, 2021 Report Posted August 2, 2021 Yes thank you that should be enough to control my pool via WIFI. You make my day. Thanks for sharing your knowledge. 1 Quote
darkwin Posted September 13, 2021 Report Posted September 13, 2021 Hi, After learning some C programming my 1st version of Hawk Control. When the program has started, the data traffic between the keyboard and the controller is output on the console. The set button can be locked by means of a switch. Since the keyboard and control are constantly exchanging the same data, there is also a switch that suppresses duplicate data. What is still missing is a web interface to call up and control the data on the mobile device. You can find the c program here. https://github.com/SvenPausH/Hotspring-Hawk Remember I have never programmed with c before. The program code can certainly be made more beautiful. If anyone feels like it, they are welcome to work on the project. 1 Quote
infinitenothing Posted September 14, 2021 Author Report Posted September 14, 2021 Nice! It looks like the commands are fairly similar? For a webserver, I've used python/flask before. Quote
darkwin Posted January 13, 2022 Report Posted January 13, 2022 Hello @infinitenothing it took a while but I have now found a solution that I like. I implemented the project with an ESP8266. The ESP send out a website and use Websocket. So I can see the data in real time on the website without reloading the page. The website is also suitable for mobile devices. If you're interested. I have the project uploaded here https://github.com/SvenPausH/Hawk-ESP8266 I will now solder everything to a circuit board and install it in the pool when the opportunity arises. The circuit has now been running on my desk for over 3 days without dropping out. Thanks again for your help. Quote
Hottubguy75 Posted April 4, 2022 Report Posted April 4, 2022 What are the minimum requirements here? Does the spa only need to have a IQ2020 control board? I have a tiger river spa that I would like to control remotely. The panel is different but it does have a IQ2020 controller inside. Quote
darkwin Posted April 5, 2022 Report Posted April 5, 2022 If you want to do it with an ESP chip you need 1* or 2* https://www.futurlec.com/Mini_RS422.shtml to read Data from Keybord and Mainboard. The ESP Chip has only 2 Hardware Serial und you need one Duplex chip. The second you need to write Data this is a little bit cheaper https://protosupplies.com/product/max485-ttl-to-rs-485-interface-module/ I found on Ali this https://de.aliexpress.com/item/1005001621705950.html?gatewayAdapt=glo2deu&spm=a2g0o.order_list.0.0.21ef5c5fT011zZ The board can handle an input voltage of up to 24V. The HAWK board has 12V. I think the IQ2020 has 12V too? So you don't need a power supply. So I used something like this. https://de.aliexpress.com/item/1005002197995752.html?_randl_currency=EUR&_randl_shipto=DE&src=google&aff_fcid=28d1d0a712d3475fb761a6fdb3ad317e-1649138399021-04942-UneMJZVf&aff_fsk=UneMJZVf&aff_platform=aaf&sk=UneMJZVf&aff_trace_key=28d1d0a712d3475fb761a6fdb3ad317e-1649138399021-04942-UneMJZVf&terminal_id=8578f8c28a3a4e539777f6867c822083&afSmartRedirect=y You have to use the ESP Chip Hardware Serial otherwise you will have data drops. But my sketch is for the Hawk mainboard and you would have to adapt it for the IQ2020. If infinitenothing is still reading here, he might give you his program for the IQ2020 I just see my ESP chip in the pool has a uptime of 32 days and it works Quote
ScoFo150 Posted May 29, 2022 Report Posted May 29, 2022 Amazing work. This is exactly what I want to achieve - is there any more detail on what I need to do to get this working on my iq2020 controlled hot tub? Ideally more photos / detailed steps and code? @infinitenothing - are you able to share further details? Thanks Quote
infinitenothing Posted July 2, 2022 Author Report Posted July 2, 2022 I didn't want to spend a great deal of unpaid hours to support this project. I was more hoping to support enough people that could then help people who were less experienced with hardware. If you had questions of how any of the pieces work, I can help with that. My IDE (LabVIEW) is super obscure so I doubt my source code would be useful. Quote
the0ne Posted September 29, 2022 Report Posted September 29, 2022 Thanks a lot to @infinitenothingand others for providing your information here. Fantastic work! Some information is still missing in this thread, that I want to add here - e.g. the RS422 baud rate which is 115200. Also I feel that from the pictures above it's maybe not 100% clear which connection to intercept. It's the one on right of the main IQ2020 board, not the one(s) on the "hub" that Hotspring adds on top of their IQ2020 board. The correct one is the white plug in a white socket on the right side and that plug has the lower six of the eight pins of the socket connected to its cables. Actually it really seems to be impossible to do this in any other way except by intercepting messages. Really sad as in the beginning I was hoping to find an easier, less intrusive, solution but didn't get lucky. The IQ2020 really seems to isolate the "hmi" part of the system (touchpad, wireless touchpad, etc.) from the "utility" part of the system (ace/freshwater, ozone, music, etc.). Regarding the HW interface, I'm using an ESP32 board with two cheap RS422/TTL converters for less than 4€ each. The TE connector was luckily available for order at the Conrad webshop. I noticed that once I stop forwarding messages for more than a second or two, I sometimes need to "restart" the wireless touchpad communication by disconnecting + reconnecting. I plan to add a relay to one of the ESP32 pins so that this can be done automatically whenever the ESP32 starts up, making sure that the touchpad-base and the IQ2020 can re-sync. So far I was able to log the data, but the "protocol" (the data inside) looks really, well - "interesting" to say the least. I want to be able to monitor and control the whirlpool from my mobile. The ESP32 can directly connect to the outside world via MQTTs which would be perfect for what I want, with instant reaction from all over the world. The tricky part for me is to get more information on how to make the IQ2020 actually change settings, take actions, etc. Also it's not really clear to me how the data content inside the messages are to be read. So if you have any more information than the above, I ask you to please let me know! Thanks in advance! 😃 Quote
the0ne Posted September 30, 2022 Report Posted September 30, 2022 Well, I thought about the "seems to be impossible to do this in any other way" I stated above. Actually there must be a better/easier way to do this, looking at the Spa Network Adapter (SNA) in the image: The "Connextion" app then offered all the fancy information and settings that you'd expect to be able to monitor and control. Same with the FreePad that basically was a RF remote: My point is that both of those do not have to intercept the IQ2020<->touchpad communication so there must be a simpler way to communicate with the IQ2020. I want to find out if anybody does actually successfully intercept and modify the messages between IQ2020 and the touchpad. If not, maybe we need to focus on analyzing the pairing between the IQ2020 and the Freepad or the SNA. Quote FreePad/IQ2020 Synchronization The Freepad comes pre-synchronized to the Interface Module. Since the IQ2020 will communicate with up to eight (8) FreePad controllers, any additional controllers will need to be manually synchronized. The following is required to synchronize a FreePad controller with the Interface Module: HotSpring models 1. Press and hold both the Light Plus and the Light Minus buttons on the spa’s Main control panel simultaneously for two (2) seconds to initiate synchronization. 2. Press any FreePad button to wake the FreePad. When the display illuminates, press the Plus button on the FreePad to complete the process. Quote
darkwin Posted October 2, 2022 Report Posted October 2, 2022 Hi, yes you are right, the control immediately goes into error when the data is interrupted. With the Hawk controller I found out that you can send a reset and the connection will be resumed after a fault. With the Hawk, the reset code is sent directly the first time a connection is established. You can take a look to see if it's the same with the IQ2020 controller. The Reset HEX Code from Keyboard from HAWK is \x58\x4d\x53\x00\x01\x4b\x01\x44 and Mainboard Reset is: \x58\x53\x4d\x00\x03\x1b\x27\x10\x01\x4d I looked at the data exchange for many hours and learned little by little. Quote
the0ne Posted October 2, 2022 Report Posted October 2, 2022 That's fantastic @darkwin, with your information I hope I can avoid having to hard-reset the touchpad every time I interrupt the communication too long during debugging. Thanks for the hint! 😃 Quote
infinitenothing Posted October 2, 2022 Author Report Posted October 2, 2022 I can always get the touchpad to come back by resuming the message forwarding. The controller and touchpad continue to try to reestablish communication. Quote
the0ne Posted October 2, 2022 Report Posted October 2, 2022 That's quite interesting - it's definitely not the same here. I start to suspect that something isn't perfectly smooth on my electronics setup. I just had to disconnect both the IQ2020 and the touchpad at the same time to get any communication - it had stopped completely after I had caused too much of a timeout. Quote
spamadness Posted October 3, 2022 Report Posted October 3, 2022 Super impressive!! Thank you for sharing! I was looking into if there was a way the a Raspberry PI or Arduino could remotely monitor water chemistry. If I find compatible sensors / shields I will let you know. Quote
infinitenothing Posted October 3, 2022 Author Report Posted October 3, 2022 As far as I know, the sensors you want don't exist. My plan is to use cheap peristaltic pumps to draw a sample and mix in the titrants (maybe OTO) and then use a color sensor to measure chlorine. I don't think I'm brave enough to have it pump bleach back in. So many projects, so many adult responsibilities, so little time. Quote
darkwin Posted October 3, 2022 Report Posted October 3, 2022 Hi, I have my hot tub outside and the cottage is for rent all year round. Therefore it is also important that I can monitor the whirlpool. That's why I built the Wifi control so that the guests don't constantly adjust the temperature. I have an isolated system for dosing. Here, however, the manufacturer has already created a way for the system to be controllable and monitorable via the network. You can see on the screenshot how often the up and down buttons and the SET button are pressed within just 31 days. Quote
Kovacsferi Posted November 22, 2022 Report Posted November 22, 2022 Dear Members! Does anyone know the assignment of the connector circled in red in the picture? I have an older Jetsetter with an IQ2020 control panel. I would like to monitor remotely. Sorry for the spelling, I'm Hungarian. Thanks. Quote
newgeneva Posted February 9, 2024 Report Posted February 9, 2024 On 10/2/2022 at 12:34 PM, the0ne said: That's quite interesting - it's definitely not the same here. I start to suspect that something isn't perfectly smooth on my electronics setup. I just had to disconnect both the IQ2020 and the touchpad at the same time to get any communication - it had stopped completely after I had caused too much of a timeout. @the0ne or anyone else with an IQ2020, Were you able to get the spa controlled remotely? Any instructions you can provide beyond what's in this thread would be greatly appreciated. Quote
the0ne Posted February 9, 2024 Report Posted February 9, 2024 Last summer was so busy that I couldn't even once take out the electronics and connect them to the hot-tub. I still got everything prepared for debugging but for the next months it'll be too cold outside. Quote
Ylianst Posted May 19, 2024 Report Posted May 19, 2024 Hi everyone. After some work, I got the RS485 bus of the IQ2020 connected to a ESP32 device using ESP-Home and so, connected to Home Assistant. Pins attached. It's not a complete project since I don't know the binary protocol to talk to the tub, however the physical connection work. Attached in the expansion port pin information as I could figure it out. Some of the data provided above helped. If anyone has more data on this topic, please open an issue on GitHub or let me know here. Thanks. Quote
Ylianst Posted May 20, 2024 Report Posted May 20, 2024 To follow up on my previous post. Here is an image of the ESP32 I am using and how it looks within the controller's enclosure. The RS485 protocol is 38400 bauds N,8,1 and the Checksum is the sum of all previous bytes except the first one XOR 0xFF. The ESP32 device is very good at reading the data, you can see it over WIFI within Home Assistant in near real time. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.