Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stale temperature when heating (python module) #26

Open
montgomeryb opened this issue Jun 21, 2023 · 9 comments
Open

Stale temperature when heating (python module) #26

montgomeryb opened this issue Jun 21, 2023 · 9 comments
Assignees
Labels

Comments

@montgomeryb
Copy link

I tried looking to see if this is documented elsewhere, but didn't find it.
With no heating, it seems the current temperature is correctly reported with the status message, at least it changes over time.
However, when the heater is on it doesn't report updated temperatures. I noticed this on the intex app and had to force refresh it to give me an updated temperature. Today after leaving it heating overnight it still had the same temperature. The one way I found to force it to update was by changing the preset_temperature. It seemed that I had to set a different temperature for it to actually update the current temperature.

Am I missing something? I tried the three example get status scripts and info. before trying to change the temperature. Maybe it's my model (SC-WF10)? Anyway, it seems to be working now with making the call to change the preset temperature.

@mathieu-mp mathieu-mp changed the title Question: Stale temperature when heating? Work around to change preset_temp Stale temperature when heating Jul 1, 2023
@mathieu-mp
Copy link
Owner

Hi @montgomeryb,

As you found out, there is an issue opened on the home assistant integration, and I still don't know where the issue does come from.

If possible, could you please provide logs, as I asked Geoff-Hz to ?

I am working on it, and the info you already provided are very useful.

To circumvent the issue, you can automate a 'power on' every few minutes and it might refresh the temperature.
But please do not interfere while getting the logs.

Regards

@mathieu-mp mathieu-mp changed the title Stale temperature when heating Stale temperature when heating (python module) Jul 1, 2023
@mathieu-mp mathieu-mp added the Bug label Jul 1, 2023
@mathieu-mp mathieu-mp self-assigned this Jul 1, 2023
@montgomeryb
Copy link
Author

Hi,
Thanks for looking into this. The blue line in the image shows when the heating was selected (00:00 - 08:00) and the gold line shows the reported temperature.
image
intex.log

@mathieu-mp
Copy link
Owner

mathieu-mp commented Jul 5, 2023

Thanks @montgomeryb

This clearly leads to a bug in the spa firmware.

However, the logs confuse me about 2 things:

  • The update interval does not comply with the 30-seconds update interval configured in the integration. Did you disable integration auto-update and trigger updates via automation (or else) ?
  • Heating Stop
    • Did you manually stop heating on the control panel ? I can't read a command to stop heating
    • Two status requests [2023-07-03 08:02:03,188 / 2023-07-03 08:02:03,880] are needed to update current_temp to its real value. What would happen if you trigger this heating stop via an automation ?
2023-07-03 08:02:02,529 - intex_spa.intex_spa - INFO - Initializing IntexSpa instance...
2023-07-03 08:02:02,529 - intex_spa.intex_spa - INFO - IntexSpa instance initialized
2023-07-03 08:02:03,030 - intex_spa.intex_spa - DEBUG - 'status' intent: Handling new intent...
2023-07-03 08:02:03,031 - intex_spa.intex_spa - DEBUG - 'status' intent: a spa query is needed
2023-07-03 08:02:03,031 - intex_spa.intex_spa - DEBUG - 'status' intent: new spa query...
2023-07-03 08:02:03,031 - intex_spa.intex_spa_network_layer - INFO - Not connected to the spa, trying to connect...
2023-07-03 08:02:03,031 - intex_spa.intex_spa_network_layer - DEBUG - Opening TCP connection with the spa at SPA_DEVICE:8990 with asyncio...
2023-07-03 08:02:03,072 - intex_spa.intex_spa_network_layer - INFO - TCP connection established with the spa
2023-07-03 08:02:03,073 - intex_spa.intex_spa_network_layer - DEBUG - Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16883857230312", "type": 1}'
2023-07-03 08:02:03,187 - intex_spa.intex_spa_network_layer - DEBUG - Receiving bytes from the spa: b'{"sid":"16883857230312","data":"FFFF110F0101005F0000008E80808E680000F7","result":"ok","type":2}\n'
2023-07-03 08:02:03,188 - intex_spa.intex_spa_object_status - DEBUG - Spa status: '{'power': True, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 95, 'preset_temp': 104, 'error_code': False}'
2023-07-03 08:02:03,188 - intex_spa.intex_spa - DEBUG - 'status' intent: new status is rendered
2023-07-03 08:02:03,689 - intex_spa.intex_spa - DEBUG - 'status' intent: Handling new intent...
2023-07-03 08:02:03,690 - intex_spa.intex_spa - DEBUG - 'status' intent: a spa query is needed
2023-07-03 08:02:03,690 - intex_spa.intex_spa - DEBUG - 'status' intent: new spa query...
2023-07-03 08:02:03,690 - intex_spa.intex_spa_network_layer - DEBUG - Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16883857236907", "type": 1}'
2023-07-03 08:02:03,879 - intex_spa.intex_spa_network_layer - DEBUG - Receiving bytes from the spa: b'{"sid":"16883857236907","data":"FFFF110F01010067000000008080806800008C","result":"ok","type":2}\n'
2023-07-03 08:02:03,880 - intex_spa.intex_spa_object_status - DEBUG - Spa status: '{'power': True, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}'
2023-07-03 08:02:03,880 - intex_spa.intex_spa - DEBUG - 'status' intent: new status is rendered
2023-07-03 08:02:03,881 - intex_spa.intex_spa - DEBUG - 'filter' intent: Handling new intent...
2023-07-03 08:02:03,881 - intex_spa.intex_spa - DEBUG - 'filter' intent: triggering a preliminary 'update' intent...
2023-07-03 08:02:03,881 - intex_spa.intex_spa - DEBUG - 'status' intent: Handling new intent...
2023-07-03 08:02:03,884 - intex_spa.intex_spa - DEBUG - 'status' intent: a spa query is needed
2023-07-03 08:02:03,884 - intex_spa.intex_spa - DEBUG - 'status' intent: new spa query...
2023-07-03 08:02:03,885 - intex_spa.intex_spa_network_layer - DEBUG - Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16883857238850", "type": 1}'
2023-07-03 08:02:04,013 - intex_spa.intex_spa_network_layer - DEBUG - Receiving bytes from the spa: b'{"sid":"16883857238850","data":"FFFF110F01010067000000008080806800008C","result":"ok","type":2}\n'
2023-07-03 08:02:04,014 - intex_spa.intex_spa_object_status - DEBUG - Spa status: '{'power': True, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}'
2023-07-03 08:02:04,014 - intex_spa.intex_spa - DEBUG - 'status' intent: new status is rendered
2023-07-03 08:02:04,015 - intex_spa.intex_spa - DEBUG - 'filter' intent: a spa query is needed
2023-07-03 08:02:04,015 - intex_spa.intex_spa - DEBUG - 'filter' intent: new spa query...
2023-07-03 08:02:04,015 - intex_spa.intex_spa_network_layer - DEBUG - Sending bytes to the spa: b'{"data": "8888060F010004D4", "sid": "16883857240156", "type": 1}'
2023-07-03 08:02:04,395 - intex_spa.intex_spa_network_layer - DEBUG - Receiving bytes from the spa: b'{"sid":"16883857240156","data":"FFFF110F010300670000000082808068000088","result":"ok","type":2}\n'
2023-07-03 08:02:04,396 - intex_spa.intex_spa_object_status - DEBUG - Spa status: '{'power': True, 'filter': True, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}'
2023-07-03 08:02:04,396 - intex_spa.intex_spa - DEBUG - 'filter' intent: new status is rendered

Last thing:

  • How does the temperature update behaves if you replace your "preset_temp" forced-update automation with a "power on" one ?

I know am I asking for elaborated tests, but I see you made a great first answer 👍

@montgomeryb
Copy link
Author

Thanks @montgomeryb

This clearly leads to a bug in the spa firmware.

However, the logs confuse me about 2 things:

  • The update interval does not comply with the 30-seconds update interval configured in the integration. Did you disable integration auto-update and trigger updates via automation (or else) ?

I am not using Home Assistant (yet) or anything similar. I am using the api in a simple script that is run through cron

  • Heating Stop

    • Did you manually stop heating on the control panel ? I can't read a command to stop heating

Previously I was using the Intex App to schedule the heating from 00:00 - 08:00, it is still active and this time actually worked and turned off the heater.

  • Two status requests [2023-07-03 08:02:03,188 / 2023-07-03 08:02:03,880] are needed to update current_temp to its real value. What would happen if you trigger this heating stop via an automation ?

Last thing:

  • How does the temperature update behaves if you replace your "preset_temp" forced-update automation with a "power on" one ?

I know am I asking for elaborated tests, but I see you made a great first answer 👍
No problem, so I ran the example code

$ python intex_spa_get_status_with_delay.py
DEBUG:asyncio:Using proactor: IocpProactor
INFO:intex_spa.intex_spa:Initializing IntexSpa instance...
INFO:intex_spa.intex_spa:IntexSpa instance initialized
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
INFO:intex_spa.intex_spa_network_layer:Not connected to the spa, trying to connect...
DEBUG:intex_spa.intex_spa_network_layer:Opening TCP connection with the spa at SPA_DEVICE:8990 with asyncio...
INFO:intex_spa.intex_spa_network_layer:TCP connection established with the spa
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885879206834", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885879206834","data":"FFFF110F010700650000000080808068000088","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 101, 'preset_temp': 104, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885879332107", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885879332107","data":"FFFF110F010700650000000080808068000088","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 101, 'preset_temp': 104, 'error_code': False}'
{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 101, 'preset_temp': 104, 'error_code': False}
{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 101, 'preset_temp': 104, 'error_code': False}


Bryan@FuryG8 /cygdrive/d/Dropbox/dev/pitub/intex-spa/examples
$ python intex_spa_set_power_on.py 
DEBUG:asyncio:Using proactor: IocpProactor
INFO:intex_spa.intex_spa:Initializing IntexSpa instance...
INFO:intex_spa.intex_spa:IntexSpa instance initialized
DEBUG:intex_spa.intex_spa:'power' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'power' intent: triggering a preliminary 'update' intent...
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
INFO:intex_spa.intex_spa_network_layer:Not connected to the spa, trying to connect...
DEBUG:intex_spa.intex_spa_network_layer:Opening TCP connection with the spa at SPA_DEVICE:8990 with asyncio...
INFO:intex_spa.intex_spa_network_layer:TCP connection established with the spa
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885879786481", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885879786481","data":"FFFF110F010700650000000080808068000088","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 101, 'preset_temp': 104, 'error_code': False}'
{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 101, 'preset_temp': 104, 'error_code': False}


Bryan@FuryG8 /cygdrive/d/Dropbox/dev/pitub/intex-spa/examples
$ python intex_spa_set_power_off.py
DEBUG:asyncio:Using proactor: IocpProactor
INFO:intex_spa.intex_spa:Initializing IntexSpa instance...
INFO:intex_spa.intex_spa:IntexSpa instance initialized
DEBUG:intex_spa.intex_spa:'power' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'power' intent: triggering a preliminary 'update' intent...
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
INFO:intex_spa.intex_spa_network_layer:Not connected to the spa, trying to connect...
DEBUG:intex_spa.intex_spa_network_layer:Opening TCP connection with the spa at SPA_DEVICE:8990 with asyncio...
INFO:intex_spa.intex_spa_network_layer:TCP connection established with the spa
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885879887174", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885879887174","data":"FFFF110F010700650000000080808068000088","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 101, 'preset_temp': 104, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
DEBUG:intex_spa.intex_spa:'power' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'power' intent: new spa query...
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060F01400098", "sid": "16885879911919", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885879911919","data":"FFFF110F01000067000000008080806700008E","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': False, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 103, 'preset_temp': 103, 'error_code': False}'
{'power': False, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 103, 'preset_temp': 103, 'error_code': False}


Bryan@FuryG8 /cygdrive/d/Dropbox/dev/pitub/intex-spa/examples
$ python intex_spa_set_power_on.py
DEBUG:asyncio:Using proactor: IocpProactor
INFO:intex_spa.intex_spa:Initializing IntexSpa instance...
INFO:intex_spa.intex_spa:IntexSpa instance initialized
DEBUG:intex_spa.intex_spa:'power' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'power' intent: triggering a preliminary 'update' intent...
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
INFO:intex_spa.intex_spa_network_layer:Not connected to the spa, trying to connect...
DEBUG:intex_spa.intex_spa_network_layer:Opening TCP connection with the spa at SPA_DEVICE:8990 with asyncio...
INFO:intex_spa.intex_spa_network_layer:TCP connection established with the spa
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885879986360", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885879986360","data":"FFFF110F01000067000000008080806700008E","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': False, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 103, 'preset_temp': 103, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
DEBUG:intex_spa.intex_spa:'power' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'power' intent: new spa query...
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060F01400098", "sid": "16885880016274", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885880016274","data":"FFFF110F01010067000000008080806700008D","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°F', 'current_temp': 103, 'preset_temp': 103, 'error_code': False}'
{'power': True, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 103, 'preset_temp': 103, 'error_code': False}

I agree that it is more a firmware issue, than this library. I think any command that changes something will force the updated temperature. Turning the power on doesn't do anything as it's already on but turning it off resulted in an update. As I'm sure you noticed, I ran the intex_spa_get_status_double but they both came back with 101 instead of 103.

I was able to try another experiment. I let the tub cool to 102 and turned on the heat. Once the control panel was reading 103 I again rand the status commands. I then went to the app that still had the temperature as 102. I changed the app from Fahrenheit to Celsius. Ran the status and then changed it back to Fahrenheit and the status came back with a current temp of 103. After a short period, I saw the Intext app change from 102 to 103.

I'm not sure how easy it is to capture the traffic to the spa for the unit change and determine the command to send?

$ date |tee -a logfile.txt && python intex_spa_get_status_double.py 2>&1 | tee -a logfile.txt
Wed Jul  5 18:06:23 EDT 2023
DEBUG:asyncio:Using proactor: IocpProactor
INFO:intex_spa.intex_spa:Initializing IntexSpa instance...
INFO:intex_spa.intex_spa:IntexSpa instance initialized
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
INFO:intex_spa.intex_spa_network_layer:Not connected to the spa, trying to connect...
DEBUG:intex_spa.intex_spa_network_layer:Opening TCP connection with the spa at SPA_DEVICE:8990 with asyncio...
INFO:intex_spa.intex_spa_network_layer:TCP connection established with the spa
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885947838159", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885947838159","data":"FFFF110F010700660000000080808068000087","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 102, 'preset_temp': 104, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885947864089", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885947864089","data":"FFFF110F010700660000000080808068000087","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 102, 'preset_temp': 104, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 102, 'preset_temp': 104, 'error_code': False}
{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 102, 'preset_temp': 104, 'error_code': False}

Bryan@FuryG8 /cygdrive/d/Dropbox/dev/pitub/intex-spa/examples
$ date |tee -a logfile.txt && python intex_spa_get_status_double.py 2>&1 | tee -a logfile.txt
Wed Jul  5 18:06:40 EDT 2023
DEBUG:asyncio:Using proactor: IocpProactor
INFO:intex_spa.intex_spa:Initializing IntexSpa instance...
INFO:intex_spa.intex_spa:IntexSpa instance initialized
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
INFO:intex_spa.intex_spa_network_layer:Not connected to the spa, trying to connect...
DEBUG:intex_spa.intex_spa_network_layer:Opening TCP connection with the spa at SPA_DEVICE:8990 with asyncio...
INFO:intex_spa.intex_spa_network_layer:TCP connection established with the spa
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885948002950", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885948002950","data":"FFFF110F010700270000000080808028000007","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒C', 'current_temp': 39, 'preset_temp': 40, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885948027808", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885948027808","data":"FFFF110F010700270000000080808028000007","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒C', 'current_temp': 39, 'preset_temp': 40, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒C', 'current_temp': 39, 'preset_temp': 40, 'error_code': False}
{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒C', 'current_temp': 39, 'preset_temp': 40, 'error_code': False}

Bryan@FuryG8 /cygdrive/d/Dropbox/dev/pitub/intex-spa/examples
$ date |tee -a logfile.txt && python intex_spa_get_status_double.py 2>&1 | tee -a logfile.txt
Wed Jul  5 18:06:48 EDT 2023
DEBUG:asyncio:Using proactor: IocpProactor
INFO:intex_spa.intex_spa:Initializing IntexSpa instance...
INFO:intex_spa.intex_spa:IntexSpa instance initialized
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
INFO:intex_spa.intex_spa_network_layer:Not connected to the spa, trying to connect...
DEBUG:intex_spa.intex_spa_network_layer:Opening TCP connection with the spa at SPA_DEVICE:8990 with asyncio...
INFO:intex_spa.intex_spa_network_layer:TCP connection established with the spa
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885948082781", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885948082781","data":"FFFF110F010700670000000080808068000086","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885948108396", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885948108396","data":"FFFF110F010700670000000080808068000086","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}
{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}

Bryan@FuryG8 /cygdrive/d/Dropbox/dev/pitub/intex-spa/examples
$ date |tee -a logfile.txt && python intex_spa_set_power_off.py 2>&1 | tee -a logfile.txt                     Wed Jul  5 18:07:20 EDT 2023
DEBUG:asyncio:Using proactor: IocpProactor
INFO:intex_spa.intex_spa:Initializing IntexSpa instance...
INFO:intex_spa.intex_spa:IntexSpa instance initialized
DEBUG:intex_spa.intex_spa:'power' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'power' intent: triggering a preliminary 'update' intent...
DEBUG:intex_spa.intex_spa:'status' intent: Handling new intent...
DEBUG:intex_spa.intex_spa:'status' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
INFO:intex_spa.intex_spa_network_layer:Not connected to the spa, trying to connect...
DEBUG:intex_spa.intex_spa_network_layer:Opening TCP connection with the spa at SPA_DEVICE:8990 with asyncio...
INFO:intex_spa.intex_spa_network_layer:TCP connection established with the spa
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885948409093", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885948409093","data":"","result":"timeout","type":2}\n'
INFO:intex_spa.intex_spa:Malformed spa response during spa querying
DEBUG:intex_spa.intex_spa:'status' intent: new spa query...
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060FEE0F01DA", "sid": "16885948494872", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885948494872","data":"FFFF110F010700670000000080808068000086","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': True, 'filter': True, 'heater': True, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'status' intent: new status is rendered
DEBUG:intex_spa.intex_spa:'power' intent: a spa query is needed
DEBUG:intex_spa.intex_spa:'power' intent: new spa query...
DEBUG:intex_spa.intex_spa_network_layer:Sending bytes to the spa: b'{"data": "8888060F01400098", "sid": "16885948496532", "type": 1}'
DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16885948496532","data":"FFFF110F01000067000000008080806800008D","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_object_status:Spa status: '{'power': False, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}'
DEBUG:intex_spa.intex_spa:'power' intent: new status is rendered
{'power': False, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '▒F', 'current_temp': 103, 'preset_temp': 104, 'error_code': False}

Bryan@FuryG8 /cygdrive/d/Dropbox/dev/pitub/intex-spa/examples
$

P.S. Thanks again for your efforts, and your English is excellent. I had previously tried some hardware attempts at controlling the spa that were not very successful - this is much better even with the Intex quirks.

@montgomeryb
Copy link
Author

I think I have found another work-around. Setting the preset-temp to 106 (which is above the maximum) seems to trigger an updated current temperature, and also leaves the preset temp at the existing value.

@stale
Copy link

stale bot commented Sep 27, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Sep 27, 2023
@stale stale bot closed this as completed Oct 4, 2023
@mathieu-mp mathieu-mp reopened this Feb 6, 2024
@stale stale bot removed the Stale label Feb 6, 2024
@mathieu-mp
Copy link
Owner

@montgomeryb, big thanks for the lead!

My spa is disconnected for a while now, and I have currently now way to test the python module by myself. So, could you investigate on these 2 points?

  1. What if we replace all the status requests by the out-of-range target temp setting: when the heater is off, does it enable the heater? Is there any weird behavior altering the current other settings ?
  2. What if the 106 value is provided when the spa is configured in Celsius: does it switch the spa back to Farenheit or does it just discard the out-of-range value and provide the updated current temperature value ?

@montgomeryb
Copy link
Author

Hello, you are welcome. Yeah, in Ne York my spa is disconnected for another three months or so :) If there's no answers before then I'll be honoured to help out and get answers for those two questions.
Off the top of my head though, I'm pretty sure that if the heater is off and the temperature request is sent it doesn't turn the heater on but reports the current value. I say that I didn't run the heater during the day because electricity rates are much more expensive and I'm pretty sure I still got current temperatures.

@gleanlux
Copy link

gleanlux commented Feb 7, 2024

Hello!
Thank you for being active on this topic again!

I'm assembling my SPA this Sunday, and I'd like to help testing it.
As soon as I can, I'll do the tests you requested above and post the results.

Have a nice day! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants