Ylianst / ESP-IQ2020

Connect a Hot Tub with a IQ2020 control board to Home Assistant and make it smart. Monitor and control temperature, jets, lights, power usage and more.
Apache License 2.0
35 stars 4 forks source link

General Discussion #13

Open Ylianst opened 4 months ago

Ylianst commented 4 months ago

New discussion thread. Please post anything on IQ2020 ESP.

elitemike commented 3 months ago

I got my hardware yesterday and got it installed today. Now I need to work on the dashboard. So far so good otherwise.

I have a new Dell xps 13 snapdragon machine. Support for the Atom lite esphome didn't seem to exist. I didn't put any effort into making it work so I just used a different machine. I run HA in docker so I ended up using the docker ESPHome dashboard to get it working.

I have a freshwater salt system, do you know if there is a way to acknowledge the output level without touching the tub's control panel?

Thanks for all you have done with this

Ylianst commented 3 months ago

Hi @elitemike. Nice, glad it's working for you. I did not think ESP-Home was picky so to what Home Assistant it could run on, this is new to me. I have a Intel NUC x86 and just figured it would work on anything.

For the Freshwater System, I do have it but I do not use it. I do not currently have a way to "acknowledge the output level", I did not know that was a thing. Basically, the integration can't push button on the remote so to speak. So, even if a proper command was sent, if the remote needs something, I am not sure it would get the remote acknowledge. That said, I am not sure I understand this area much.

elitemike commented 3 months ago

I'm the one that commented on your short video 10 days ago by the way. I have a 2023 Envoy with FWS so you can mark that as another tested unit. Once I get some time, I may fork your project to experiment a bit. I'm a .Net developer primarily and I'm the guy that does a lot of front end work on a project where looks don't matter much. I have some Python experience.

Is there a way to kill the power to both jets and lights using your integration, or would I just create a simple automation?

Ylianst commented 3 months ago

Hi @elitemike. Nice to hear back from you. If you are a .NET dev, you may want to take a look at the way debug the RS485 traffic, I use a C# application to do that. You can fully control the hot tub from a C# app if you like, it's not difficult once you enable the ESP32 traffic relay system.

Yes, you can turn on/off both lights and jets, generally you would create an automation and do it that way.

afp316 commented 3 months ago

Re: https://github.com/Ylianst/ESP-IQ2020/issues/4

Figured I'd share my model specifics.

Thanks!

derhally commented 3 months ago

Hi @elitemike. Nice, glad it's working for you. I did not think ESP-Home was picky so to what Home Assistant it could run on, this is new to me. I have a Intel NUC x86 and just figured it would work on anything.

For the Freshwater System, I do have it but I do not use it. I do not currently have a way to "acknowledge the output level", I did not know that was a thing. Basically, the integration can't push button on the remote so to speak. So, even if a proper command was sent, if the remote needs something, I am not sure it would get the remote acknowledge. That said, I am not sure I understand this area much.

I could never get the the Hot Spring app to confirm the salt setting after 15 days, but that doesn't mean it is impossible. I just added an automation in HA to send me a notification when the "Logo lights" value switches to 1 to remind me to go out and press the button.

derhally commented 3 months ago

@Ylianst what is needed to get the power entities to show up in the HA Energy dashboard? The entities don't show up in the entity picker.

Ylianst commented 3 months ago

@derhally Interesting point, I have not looked into this. I may that a look at it when I get a chance.

jdaleyftp commented 3 months ago

@Ylianst I have a goal to sync the hottub light state with other outdoor lights. Rather than waiting for a poll (and have a delay) I am wondering if there is an event that can trigger a "poll"/update out of the ESP. I am going to fire up the remote packet monitor this weekend, but do you know if there are any packets that send when a button is pressed on the unit (or equivalent).

jdaleyftp commented 3 months ago

@Ylianst what is needed to get the power entities to show up in the HA Energy dashboard? The entities don't show up in the entity picker.

The requirements to show up in the energy dashboard is for the device to have the following attributes.

device_class: power
state_class: measurement

It looks like it has state_class, but i think it might need "device_class: power"

I dont know ESPHome that well yet, but another option is to add this to your customize.yaml in HA, which lets you modify the entitiy outside of the integration

sensor.living_room_circuit:
  device_class: power
  state_class: measurement 
Ylianst commented 3 months ago

Ok, I think I have a solution for displaying energy usage. The tub tub will send back how much power it's using in Watts, but you need to integrate this over time and ESPHome has helper to do this, total_daily_energy. It will add up the wattage used over time and give you energy usage in KWh that resets everyday that you can then use in the energy panel.

The sensor section of my hot tub looked like this:

sensor:
  - platform: iq2020-dev
    current_f_temperature:
      name: Temperature
    target_f_temperature:
      name: Set Temperature
    outlet_f_temperature:
      name: Heater Outlet
    power_l1:
      name: Pump Power
    power_heater:
      name: Controller Power
    power_l2:
      name: Heater Power
    pcb_f_temperature:
      name: Controller Temperature
    buttons:
      name: Buttons

I changed it to this:

sensor:
  - platform: iq2020-dev
    current_f_temperature:
      name: Temperature
    target_f_temperature:
      name: Set Temperature
    outlet_f_temperature:
      name: Heater Outlet
    power_l1:
      name: Pump Power
      id: power_l1
    power_heater:
      name: Controller Power
      id: power_heater
    power_l2:
      name: Heater Power
      id: power_l2
    pcb_f_temperature:
      name: Controller Temperature
    buttons:
      name: Buttons
  - platform: total_daily_energy
    name: 'Pump Energy'
    power_id: power_l1
    unit_of_measurement: 'kWh'
    state_class: total_increasing
    device_class: energy
    accuracy_decimals: 3
    filters:
      # Multiplication factor from W to kW is 0.001
      - multiply: 0.001
  - platform: total_daily_energy
    name: 'Controller Energy'
    power_id: power_heater
    unit_of_measurement: 'kWh'
    state_class: total_increasing
    device_class: energy
    accuracy_decimals: 3
    filters:
      # Multiplication factor from W to kW is 0.001
      - multiply: 0.001
  - platform: total_daily_energy
    name: 'Heater Energy'
    power_id: power_l2
    unit_of_measurement: 'kWh'
    state_class: total_increasing
    device_class: energy
    accuracy_decimals: 3
    filters:
      # Multiplication factor from W to kW is 0.001
      - multiply: 0.001

# Enable time component to reset energy at midnight
time:
  - platform: homeassistant
    id: homeassistant_time

Note that there is a new time: section in addition to the sensor: section we had before. Once added and re-flashed, you can add Pump Energy, Heater Energy and Controller Energy to the Home Assistant Energy Dashboard. I think you need to wait a while before data will start to be shown. Let me know if this works.

If it works, I will add this to the documentation.

Ylianst commented 3 months ago

One more thing, I added internal: true to the wattage sensors to not have then be reported in Home Assistant and so, only get the KWh values like this:

sensor:
  - platform: iq2020-dev
...
    power_l1:
      internal: true
      name: Pump Power
      id: power_l1
    power_heater:
      internal: true
      name: Controller Power
      id: power_heater
    power_l2:
      internal: true
      name: Heater Power
      id: power_l2
...

This is a matter of preference, personally I don't want Home Assistant tracking and storing data I will not be using, so this makes things a bit more efficient. I get just what I need:

image

Displaying the new data works. I also use the Emporia Vu on in my breaker box so over the next few days, I will be able to compare the hot tub sensors to the Empora Vu and see if they match. Below, the 3 sensors that starts with Hot Tub and the new ones, everything else is from my breaker box.

image

Ylianst commented 3 months ago

Thanks @afp316. I added your data to the tested hot tubs page.

HalLandry commented 3 months ago

I think this is a firmware thing, so I didn't start an "issue" for it.

Using ACE emulation, then on/off button state does not change if the output level is set to zero.

I see retires for switch 8 in the sysout if the level is zero.

I use the on/off to control the outside lights and the output level to control the porch ceiling fan speed.

Hal

Ylianst commented 3 months ago

@HalLandry You are exactly correct, the ACE emulation on/off does not work when the salt power level is at zero and I can't do anything about that, it's a IQ2020 firmware thing. However, the "Test" button does work for all values so, I personally select my scene using the power level and trigger it using the "Test" button.

I also do this with a single Home Assistant automation for all the things I want do and can set this up in the user interface, no YAML required. I do an automation that if "Hot Tub Buttons" changes to 6 then in the action, I add a "If" block, if "Hot Tub Salt Power" state is "0.0" do a set of things, if state is "1.0" do something different... Note that the salt power state is a float, so "0.0", "1.0", "2.0"...

Ylianst commented 3 months ago

Follow up on the hot tub energy. Today, my breaker box is indicating that the hot tub used 5.22 KWh, the hot tub sensors are as follows:

Heaters: 2.92 KWh Controller: 1.73 KWh Pumps: 0.42 KWh

For a total of 5.07 KWh. I will keep watching this. So far, it seems to be under reporting a bit.

dhellerstedt commented 3 months ago

IQ2020 Enclosure Internals Watkins 1303401-1 Rev K IMG_1653

Yaml Changes Made in ESPHome same as @afp316

fan:

  • platform: iq2020 name: Jets 1 id: jets1 icon: "mdi:turbine" datapoint: 0 speeds: 2 #to 2 from 1
  • platform: iq2020 name: Jets 2 id: jets2 icon: "mdi:turbine" datapoint: 1 speeds: 1 #to 1 from 2

Result: Jets 1 has off/low/high speeds Jets 2 has off/high speeds

Update for lights: select:

number:

I'm not sure how to set color cycle instead of just a solid color. LCD shows options are (Loop 0, Loop 1, Loop 2, Loop 3.)

gdbassett commented 3 months ago

I'm hoping someone here can help with figuring out the chlorine sensor on a Caldera w/ Salt System and Watkins connected spa.

Background: The connected spa system has a pretty straight forward wireless transmitter and network attached receiver. The network attached receiver has a simple web interface and uses a python script and a custom binary library (dia) to read the channels from the spaw and upload them to watkins connected spaw cloud service which then interfaces with the app. The python script can be edited and replaced, allowing a way to shim the whole thing w/ stock hardware.

I added code to the python script to log the channel status as they're being read to upload to the cloud service. You can see the results in the chart below. "spa_usage" is the salt system setting. "mz_main_light_intensity" is a good indicator of when I used the tub (minus the las blurb where I cycled the light to ensure I knew when I added 4oz chlorine bleach).

Rplot09

What I can't find is any channel recording the measured chlorine levels. Given the settings and usage, from mid august 18 through august 21, I'd expect it to be getting progressively lower (form almost top value to lowest), and then shoot up to top (with the directly added chlorine). I don't see a single channel like that.

The channel I'd expect (g3_chlor_test_data) stays at 255. "peripheral_status_chlorine" and "peripheral_status_ace_gen_3" are both 0 (likely meaning missing since "peripheral_status_networking" is 1). However "g3_ph_test_data" does have values (need to add some ph down).

Does anyone have any ideas? The hot tub console can clearly read the chlorine level and the app says it can...

Here's the python script if anyone's interested (with a few of my edits): https://gist.github.com/gdbassett/5ee80a57c4eb80d9c5a481cbdb819a2c

Ylianst commented 3 months ago

Hi @gdbassett. So... basic question maybe, but how to you know there is a chlorine level sensor? Do you have the ACE or FreshWater system? Can you send a picture of the hot tub console reading this value? What does it looks like on the screen? Thanks.

gdbassett commented 3 months ago

Control screen: image

Salt system (I think): image

Sensor system (I think. I confuse the two): image

And the app screen: image

gdbassett commented 3 months ago

@Ylianst ^

(It's possible the control screen data isn't available to the python script and the app screen is made up. It doesn't always track the control screen accurately. But anything in the app has to come through the python script I believe.)

Ylianst commented 3 months ago

Ok, this is the FreshWater system so yes, none of the Python values you are looking at include data from FreshWater. FreshWater has a binary block of data that looks like this:

1C:01:29:0F:80:1E:01:00:00:03:35:00:00:00:00:B3:10:00:68:41:83

The address of the module is 0x29. I have the Python your talking about but, if I recall correctly, that code does not decode the Freshwater data block and instead just sends it as-is to the Watkins server. I attempted to decode this data, it's in the RS485 Protocol page. I did not get super far with it, but it would be wonderful if you could complete the work. I have a Freshwater system myself, but don't use it and disconnected it. If you can decode that data block correctly, that would be wonderful.

A while back, I made this, but it was just my first attempt and not accurate.

333976299-662a59c9-f473-450a-a7df-adae60d68dd2

I later emulated the ACE module and that one, I could figure out much better. If you look at the RS485 protocol page, the ACE has the same encoding as FreshWater and I have many of the values mapped out, so, I think it should not be difficult.

gdbassett commented 3 months ago

I'm happy to fiddle bits to figure it out if I can figure out how to read it from the python script. I'm looking through the Thinkworx_con() function and not seeing where it collects anything but the channels the database.

I'm seeing this in the python logs (generated from the custom binary library):

Aug 21 16:55:28 local7.info pylog: DEBUG:eagle:Packet not for us
Aug 21 16:55:28 local7.info pylog: parsing status waiting for header
Aug 21 16:55:28 local7.info pylog: DEBUG:eagle:received message from: [00:13:a2:00:41:a6:14:6f]!, buf is 1C 29 01 0F 40 1E 01 0A 02 FF FF FF 00 FF 01 FF FF FF FF FF 63.
Aug 21 16:55:28 local7.info pylog: DEBUG:eagle:buffer_to_parse 1C 29 01 0F 40 1E 01 0A 02 FF FF FF 00 FF 01 FF FF FF FF FF 63
Aug 21 16:55:28 local7.info pylog: parsing status waiting for header
Aug 21 16:55:28 local7.info pylog: DEBUG:eagle:Packet not for us
Aug 21 16:55:28 local7.info pylog: DEBUG:eagle:received message from: [00:13:a2:00:41:a6:14:6f]!, buf is 1C 01 29 0F 80 1E 01 0A 09 44 3F 09 03 00 00 1D 05 00 69 01 F9.
Aug 21 16:55:28 local7.info pylog: DEBUG:eagle:buffer_to_parse 1C 01 29 0F 80 1E 01 0A 09 44 3F 09 03 00 00 1D 05 00 69 01 F9
Aug 21 16:55:28 local7.info pylog: parsing status waiting for header
Aug 21 16:55:28 local7.info pylog: DEBUG:eagle:Packet not for us

No clue why it interprets it as 'Packet not for us'. Here's the dia.yml configuration:

devices:
  - name: xbee_device_manager
    driver: devices.xbee.xbee_device_manager.xbee_device_manager:XBeeDeviceManager

  - name: eagle
    driver: custom_devices.watkins_spa:WatkinsSpa
    settings:
        xbee_device_manager: "xbee_device_manager"
        extended_address: "00:13:a2:00:41:a6:14:6f!"
        poll_interval: 60.0
        tanas_poll_freq: 5

## The presentations section: contains a list of presentation instances.
presentations: 
  - name: idigiDB
    driver: presentations.idigi_db.idigi_db:iDigi_DB
    settings: 
        file_count: 10
        sample_threshold: 10000
        interval: 900
        filename: watkins

  - name: rci
    driver: presentations.rci.rci_handler:RCIHandler
    settings: 
        target_name: "watkins"

  - name: console0
    driver: presentations.console.console:Console

## The services section: contains a list of services instances.
#services:
#  # Create a new watchdog service instance. iDigi Dia will stroke the watchdog
#  # each 120 seconds. It will force reboot if below 40960 bytes of free memory.
#   - name: watchdog_service0
#     driver: services.watchdog_service:WatchdogService
#     settings:
#         watchdog_interval: 120
#         low_memory_threshold: 40960

tracing: 
    default_level: debug
    default_handlers: stdout
Ylianst commented 3 months ago

Yes, this is it. The start of the packet...

1C 01 29 0F 80 1E...

The 0x01 is the destination address (IQ2020) and 0x29 is the source access (Freshwater Module). The Spa Connection Kit only considers data sent to it, with destination address 0x1F so it will ignore everything else. IQ2020 will poll the Freshwater module periodically and you will need to change the Python code to decode that data even if it's not intended for it. You are on the right track.

gdbassett commented 3 months ago

Two questions from that.

If the spa connect kit ignores the message as it's not the destination, can I really capture the sensor reading from the python script (as the dia library is ignoring the message)? (I can apparently kick off multiple python scripts so kicking off one that scrapes the python log for message may then be the only option.)

If the spa connect kit is ignoring the freshwater module messages, WTF is it showing in the app?

(And thank you for the answers to the extent you know them.)

Ylianst commented 3 months ago

@gdbassett Ha yes... Looking at the protocol page, the base station must be polling the state like this:

Read FreshWater/ACE Salt Module Data (Polled)

<-- 01 1F 40 1E03
<-- 1F 01 80 1E030003FFFF00FF006800FF07FF0000B3100040

When it does that, the response address will be (0x1F) and so, not be ignored. I see that there was code is decoding this data, this is in my protocol page and have gotten this from Python:

FreshWater/ACE Salt Module Data Decoding

1E03
00 - spa_usage (0 to 10)
03 - spa_size
FF - g3_sensor_data
FF - g3_sensor_status
00 - dosing_state
FF - ?
00 - g3_level2_errors
6800FF - ?
07 - salline_test (salinity test)
FF - g3_chlor_test_data (chlorine test)
00 - g3_ph_test_data (Ph)
00 - g3_clrmtr_test_data (colorimeter test)
B3100040 - ?

Look for g3 in the python code, you should see where values.

The IQ2020 will also poll for these values and when it does, the base station will ignore this data, but yes, you should be able to see these values.

gdbassett commented 3 months ago

I got a script logging the freshwater system (https://gist.github.com/gdbassett/4e45cabf25e9a4e6c7950892fc0afbe4). In this log I go from red (low) to red (high) by adding 3oz 10% bleach to a 360gal tub (probably enough to go 0 to 7 PPM). I also decreased the salt system from 8 to 1

freshwater (5).log

Charting out the logs, if we look at the IQ2020 -> freshwater, it looks like the last two bytes (or at least the last byte or some set of the bits) is the chlorine level with high being low chlorine and lower being more. The 8th two bytes are the salt system setting: Rplot08

We can also see it from the freshwater system to the IQ2020: Rplot04

Next step is to leave the system at 1 and monitor it over the next week to see where it goes as it slowly decreases back to red (low).

gdbassett commented 3 months ago

If freshwater is 01 and IQ2020 is 29, I've got my charts above backwards. I assume just a typo.

Looking through the logs, I don't see any "1E 03" which makes me wonder where it gets the g3_ph_test_data channel, which is changing.

(also fixed issue with not being able to open the R plots)

Ylianst commented 3 months ago

Nice!! So, IQ2020 is 0x01 and Freshwater is 0x29. The full list is:

0x01 - IQ2020 controller
0x21 - Coolzone module
0x24 - ACE Salt System module
0x29 - Freshwater Salt System module
0x33 - Audio/Music module
0x1D - Audio/Music module
0x1F - Spa Connection Kit

The 0x1E03 is the command, this has no chance of containing any data.

gdbassett commented 3 months ago

channels_01_to_29

Still looking at it but have more data. Red are tub uses. Green line is adding chlorine. It appears COL 20 and 21 should be added. (not sure why they're separated.)

Going to test if the drop-outs in COL12, 20, 21, and peripheral current are cycle times on the chlorine setting. moved it from 8 to 10. Will see if those period shorten or disappear.

but still not seeing anything which would match the chlorine measurement. (decreases at the red lines, big increase at the green line, and progressively back down to where it was before the 2nd red line.)

Ylianst commented 3 months ago

@gdbassett Interesting. Looking at your chart, are you decoding command 0x1E03? It seems like this is the decoding of the 0x0256 command with voltage, etc. which will not have chlorine measurement. This said, maybe I am missing something?

gdbassett commented 3 months ago

There are no 0x1E03 commands, only 0x1E01. see attached log (scraped from dia debug logs). These are all 1C 01 29 0F 80 1E01...

freshwater (17).log

Ylianst commented 3 months ago

I have not seen the 0x1E01 command, maybe it's a short version of the 0x1E03. Decoding it:

"1C 01 29 0F 80 1E 01 01 03 44 42 00 03 00 00 51 05 00 69 41 9A"

You get this:

1E01
01 - spa_usage (0 to 10)
03 - spa_size
44 - g3_sensor_data
42 - g3_sensor_status
00 - dosing_state
03 - ?
00 - g3_level2_errors
005105 - ?
00 - salline_test (salinity test)
69 - g3_chlor_test_data (chlorine test)
41 - g3_ph_test_data (Ph)
9A - g3_clrmtr_test_data (colorimeter test)

This may not be correct at all, but keep monitoring 0x1E01, this is where you should see your data.

Look for commands starting with 1C 01 29 as they are directed at the controller.

gdbassett commented 3 months ago

This resource ( https://acesaltcellreplacement.com/wp-content/uploads/2018/12/Ace-Trouble-Shooting.pdf ) says the ace system doesn't have a chlorine sensor. Salt is a point estimate at run time (twice daily based on the peripheral current data). (Bold sentence at end of paragraph on page 1.) This leads me to believe g3_chlor_test_data will never return data.

right now for "1C 01 29 0F 80 1E 01 01 03 44 42 00 03 00 00 51 05 00 69 41 9A" I'm thinking something like...

1E01
01 - dosing_state (high confidence)
03 - date (med confidence - goes up 1 exactly every day)
44 - salt_test_data (high confidence.  follows aline_test on the main channel)
42 - ?? (Goes up roughly once per day, range 42 to 46 (hex) )
00 - ?? ph_test_data ?? (low confidence.  went up after use.  varies in a limited range so far, 00-09)
03 - ?? (single events of "0B", otherwise "03".  Maybe indicates the beginning of a cycle?)
00 - ?? (always 00)
00 - ?? (always 00)
51 - ?? Chlorine test or Chlorine generator on ?? (goes up at constant rate when chlorine system on)
05 - ?? (always 05)
00 - ?? (always 00)
69 - ?? (always 69)
41 - ?? high bytes of chlorine test ?? (when combined with next two-byte, results in a linear progression interrupted by duty cycle of chlorine dosing)
9A - ?? low bytes of chlorine test ?? (when combined with previous two-byte, results in a linear progression interrupted by duty cycle of chlorine dosing)

(note, the only thing on the freshwateriq system varied here was the dosing)

I got tired of downloading the settings through the dia webapp and so built a small webserver to serve them to me: https://gist.github.com/gdbassett/a50c40bf8429d13de5d55ce5e5855452. It works with the other scripts that collect the logs. I'll also use it as the basis of a bigger webapp to control the salt system eventually.

Ylianst commented 3 months ago

@gdbassett Nice work! I am not an expert at this, but for my hot tub both ACE or Freshwater can be installed and the remote control has two different user interfaces depending on the module you have installed. I was not able to figure out much about Freshwater, but ACE was a lot easier. It has a mode at the top, a salt level and a power level with a boost on/off and test button.

344362874-09665e9a-f9d7-43c2-b364-45ced6b1492d

Because my code can emulate ACE, I figured out all of the basic useful values for it and indeed, it does not offer a lot of data. This screen is my favorite way right now to control lights scenes of my house using my hot tub remote. I select the scene number and hit test to activate it. Anyway, yes, I am not surprised ACE is very limited... but your device has a water care menu that seems to be way more capable than ACE. I am sure your water care menu maps to 0x1E01 data.

gdbassett commented 3 months ago

image1

I put like 6oz of bleach in last night and it shows no-where. I'm honestly not sure the 01 <-> 29 communication contains the chlorine sensor. It definitely contains salt system data though.

Ylianst commented 2 months ago

Oh, humm... interesting. You posted this image before:

359902103-d4e264b9-ea6a-4c26-857e-2be71915c142

You are saying that the values shown on that user interface are correct, like, going up when you add chlorine, but you see nothing change in the commands? I would have expected the Freshwater module to provide all this data. If it's not the case, it's very much a misery. Are there any other commands being regularly sent to the controller from a different address?

The other option is that it's not on the RS485 bus at all, but I would be very surprised. Everything seems to be on that bus.

gdbassett commented 2 months ago

Exactly. The screen seems to reflect what's added, but nothing in the data (or the app for that matter).

My next step was to try and scrape every message, but the difference in length is going to make it a bit harder, and the volume is going to mean being a bit more judicious with how I log it on the device.

My concern is that there's possibly a bug and the chlorine monitoring beyond the user interface is broke. I may email them.

Ylianst commented 2 months ago

All packets with the same source+destination+commandid, should be the same length.

1C 29 01 0F 40 1E 01 0A 02 FF FF 

In this case 0x2901 and 0x1E01.

By the way, I take it you never installed the ESP32 integration, I imagine this is because you don't use Home Assistant? No worries if you did not, just asking why your using the Watkins device. In any case, if you have a way to get a large dump of all traffic for a long time, that would be interesting to look at and see if there is any other commands, etc.

gdbassett commented 2 months ago

Honestly? I asked for the watkins device w/ the hot tub. (Actually got it free because the sales guy thought the tub came with it and so didn't charge me extra.)

Also, I'm trying to avoid adminning a server at home. I have a phillips hue bridge for lights server and apple TV for matter server. Just too old to want to admin my own server these days. (But I love doing data stuff. Though I did wildly underestimate how difficult this would be. I expected both chlorine status and salt system setting to be in the data sent to the server. It's wild to me that the chlorine sensor clearly works given the user interface, but doesn't get read by the watkins device, sent to the cloud service, or displayed in the app.)

Also, now logging all seen messages, not just the salt ones, to gzipped files. should give me more head room in my logging.

Ylianst commented 2 months ago

@gdbassett ha yes, I completely understand. This is one of the big limitation of the ESP-IQ2020, you need to have Home Assistant which is a bridge too far for a lot of people and I completely understand it. At some point, I may look into a standalone ESP32 firmware with a local web page, that way you can do what you are doing, but for around 25$. The Watkins device is way expensive.

Going a big gzip of a lot of packets is a good idea, you can do a lot of offline analysis which is great. If there is no success and it's true there is no chlorine data on the RS485 bus, It would then be interesting to see how that data is routed to the IQ2020. If you have pictures of your IQ2020, it would be interesting to see if you have an extra wire to an additional module that others do not have. One theory is that an extra module connection using I2C and so, not visible to RS485. If this is the case, a close up picture of the modules connected to your expansion connectors should show what wires are connected and prove this.

Ylianst commented 2 months ago

Searching online a bit, I found "Freshwater IQ" with this UI.

c74d36-31b2-422-d57-5466ac1d3ea_CS-2024-FWIQ-LandingPage-Smarter-1635798507

This is certainly what you have. I have the Freshwater module, but not IQ. If anyone else has information on this, how it works and how it's installed? Can it be installed after market?

Some info here.

mediamanrit commented 2 months ago

I have the Freshwater IQ add on, and my ESP32 is in the mail to try to mess with it.

I have a HotSpring Envoy. It’s a sensor that goes in the old mineral stick hole. It appears to go to a connector on the expansion board, but I haven’t looked close enough to see if it’s rs485 or i2c yet.

Fair warning, I’ve got 2 little kids, so once my ESP32 gets here it’s going to be a bit before I get it set up and going.

Ylianst commented 2 months ago

Thanks @mediamanrit. Absolutely no worries on timing. If you can even send a high res picture of the connectors you have like this.

image

The expansion connectors have 8 pins, but generally only 4 wires are connected. It would interesting to know what wires are used for the IQ module. Overall, having Home Assistant be able to collect and graph the IQ data would be great for people that have it.

gdbassett commented 2 months ago

I spoke with watkins support and 0x37 is the freshwaterIQ. My log scraping script died so having to restart it, but going to focus in on the 37->01 messages. For the 2 hours or so I have, here's the columns (2-byte parts of the message) that have more than 1 value. (all for messages starting 1C 37 01 03 40 23 D5)

37_01_32_d5

Ylianst commented 2 months ago

Wow, you can talk to support and get that information? Well, did not know 0x37 was a module, I just added it to my list.

0x01 - IQ2020 controller
0x21 - Coolzone module
0x24 - ACE Salt System module
0x29 - Freshwater Salt System module
0x33 - Audio/Music module
0x37 - Freshwater IQ             <----
0x1D - Audio/Music module
0x1F - Spa Connection Kit

If you have any logs or captures of 0x37 data in both directions, please capture and share.

gdbassett commented 2 months ago

I'm starting to think the 23 d1 and 23 dc commands are the chlorine. See below There seem to be several columns carrying relatively smooth curves. (I sat in the hot tub today, Sept 7th for a few hours and it went from near max chlorine to about mid.) Will have to see if it continues to track.

(For this and the next few, I'm only showing the columns that had more than 1 value since most are 50 or so two-byte columns and 23 d5 is like 80.)

23 d1 37_01_23_d1 23 dc 37_01_23_dc

gdbassett commented 2 months ago

23 D5 on the other hand has far more signal, but mainly seems to be more binary values and a few counters around Col68 - 73

23 D5 image

gdbassett commented 2 months ago

The 23 a1 also kinda tracks teh d1 and dc messages.

23 a1 37_01_23_a1

gdbassett commented 2 months ago

Looking good for 23 D1. I was in the hot tub sept 7th for a while. The added 4oz chlorine sept 8th. System is set to 10 so should be going up.

COL 27 + 28 are likely related. Col 36 looks like it's scaled to 0-128 or such. Col 40 looks like it might be the bars on the screen... (80 = high red?, 70 = low red?) 37_01_23_d1v2 Will continue monitoring and using it. Eventually will add the salt system setting and lights/jets (which help indicate what I was doing...) to see if it all aligns.

Will also upload a weeks of logs after I get them. Friday - Friday.